In the Typescript definition file (DefinitelyTyped) I am examining, there is an interface, a function and a namespace all with the exact same name: twilio
.
Here is the sample, from the first few lines of the file:
declare interface twilio {
(sid?: string, tkn?: string, options?: twilio.ClientOptions): twilio.RestClient
}
declare function twilio(sid?: string, tkn?: string, options?: twilio.ClientOptions): twilio.RestClient;
declare namespace twilio {
....
Then all the way at the bottom of the file it says
export = twilio;
Well which one is it exporting; the interface, the function, or the namespace?
How does this make any sense?
How can you name multiple things the exact same name in the same scope/namespace?