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

Migrate @fluent/sequence to TypeScript #450

Merged
merged 4 commits into from
Jan 27, 2020
Merged

Conversation

stasm
Copy link
Contributor

@stasm stasm commented Jan 27, 2020

See #376.

@stasm stasm requested a review from Pike January 27, 2020 15:38
@stasm
Copy link
Contributor Author

stasm commented Jan 27, 2020

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?

@stasm stasm mentioned this pull request Jan 27, 2020
7 tasks
export function mapBundleAsync(
bundles: AsyncIterable<FluentBundle>,
ids: Array<string>
): Promise<Array<FluentBundle | null>>;
Copy link
Contributor

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??

Copy link
Contributor Author

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".

Copy link
Contributor

@Pike Pike left a 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)

@stasm stasm merged commit 0b3a389 into projectfluent:master Jan 27, 2020
@stasm stasm deleted the ts-sequence branch January 27, 2020 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants