Pregunta:
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 ) {}
Autor: Kate WRespuesta:
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 calificaciones)
1 answer(s) in total