Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Declare callback types for built-in methods #43

Open
amikheychik opened this issue Dec 4, 2023 · 0 comments
Open

Declare callback types for built-in methods #43

amikheychik opened this issue Dec 4, 2023 · 0 comments
Labels
needs planning Large-size issues that need to be broken down

Comments

@amikheychik
Copy link
Contributor

Callback types for methods like Array.prototype.map() do not exist in TypeScript standard library. Instead, they are inlined into the method declaration, e.g.:

map<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[];

Such type are useful when a return type or property type has to be declared.

@amikheychik amikheychik added the needs planning Large-size issues that need to be broken down label Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs planning Large-size issues that need to be broken down
Projects
None yet
Development

No branches or pull requests

1 participant