Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Overloading a function doesn't generate all of the signatures #22

Open
ocombe opened this issue Nov 27, 2017 · 5 comments
Open

Overloading a function doesn't generate all of the signatures #22

ocombe opened this issue Nov 27, 2017 · 5 comments

Comments

@ocombe
Copy link

ocombe commented Nov 27, 2017

When I try to overload a function it doesn't add the overloaded signature to the api file like it does for class methods.

Code of the function:

export function registerLocaleData(data: any, extraData?: any): void;
export function registerLocaleData(data: any, localeId?: string, extraData?: any): void;
export function registerLocaleData(data: any, localeId?: string | any, extraData?: any): void {
  ...
}

Declarations generated by typescript:

export declare function registerLocaleData(data: any, extraData?: any): void;
export declare function registerLocaleData(data: any, localeId?: string, extraData?: any): void;

Api file:

export declare function registerLocaleData(data: any, extraData?: any): void;
@IgorMinar
Copy link
Contributor

Could you send a PR?

@ocombe
Copy link
Author

ocombe commented Nov 27, 2017

I already have a lot of things on my todo list for now, so if you're not in a hurry then yes, but don't expect anything soon.

@IgorMinar
Copy link
Contributor

IgorMinar commented Nov 27, 2017 via email

@ocombe
Copy link
Author

ocombe commented Nov 27, 2017

It's not blocking, we'll update the api file with the correct definitions when this bug is fixed

@alexeagle
Copy link
Contributor

note, this project moved to angular/angular

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants