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.
Is there documentation on what these do, in combination with the impl below??
There was a problem hiding this comment.
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".
Pike
left a comment
There was a problem hiding this comment.
Aha, thing I'll soon forget (says that guy that can't claim TIL)
See #376.