SEARCH
You are in browse mode. You must login to use MEMORY

   Log in to start


From course:

TypeScript

» Start this Course
(Practice similar questions for free)
Question:

What's going on here? function handleMainEvent( elem: HTMLFormElement, handler: FormSubmitHandler ) function handleMainEvent( elem: HTMLIFrameElement, handler: MessageHandler ) function handleMainEvent( elem: HTMLFormElement | HTMLIFrameElement, handler: FormSubmitHandler | MessageHandler ) {}

Author: Kate W



Answer:

This is an example of function overloading. Two function heads or overload signatures are written above the body of the function and serve as multiple entry points to a single implementation.


0 / 5  (0 ratings)

1 answer(s) in total

Author

Kate W
Kate W