-
Notifications
You must be signed in to change notification settings - Fork 77
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
Migrate @fluent/sequence to TypeScript #450
Conversation
With this PR, I've fleshed out the process of migrating our packages to TS. It's not a lot of work; I hope other packages will follow shortly. @Pike Would you like to take a look, please? |
export function mapBundleAsync( | ||
bundles: AsyncIterable<FluentBundle>, | ||
ids: Array<string> | ||
): Promise<Array<FluentBundle | null>>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there documentation on what these do, in combination with the impl below??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They're function overloads: https://www.typescriptlang.org/docs/handbook/functions.html#overloads. They allow specifying extra typing constraints when the implementation is quite loose. E.g. "if you pass an array, expect an array as a result".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha, thing I'll soon forget (says that guy that can't claim TIL)
See #376.