Skip to content

Improve typing support to aid Pontoon flow-to-ts migration #524

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

Closed
Pike opened this issue Mar 17, 2021 · 0 comments · Fixed by #525
Closed

Improve typing support to aid Pontoon flow-to-ts migration #524

Pike opened this issue Mar 17, 2021 · 0 comments · Fixed by #525
Assignees

Comments

@Pike
Copy link
Contributor

Pike commented Mar 17, 2021

Some of the issues we see when trying to migrate Pontoon's frontend to typescript come from Fluent.

Let's have an issue to track that work.

I've got a first step for @fluent/langneg, but that might not be all.

CC @mathjazz @adngdb

@Pike Pike self-assigned this Mar 17, 2021
@Pike Pike linked a pull request Mar 17, 2021 that will close this issue
Pike added a commit to Pike/fluent.js that referenced this issue Mar 28, 2021
For projectfluent#524, I'll want new TypeScript features, so updating TypeScript.
The new TypeScript requires a new typedoc. Which removed the setup
we used to generated the docs (--mode=file) because it was duh.
Now the docs are actually for the exposed symbols of the module.
Pike added a commit that referenced this issue Mar 29, 2021
For #524, I'll want new TypeScript features, so updating TypeScript.
The new TypeScript requires a new typedoc. Which removed the setup
we used to generated the docs (--mode=file) because it was duh.
Now the docs are actually for the exposed symbols of the module.
@Pike Pike closed this as completed in #525 Apr 2, 2021
Pike added a commit that referenced this issue Apr 2, 2021
* Better typing for @fluent/syntax
  * Align AST with fluent-rs to use Union types instead of inheritance.
* Give input type hints to Visitor and Transformer
* Stricter typing for @fluent/langneg
  * Expose option type of API

The AST now aligns with the fluent-rs one, and less so with the reference AST. That's OK as it helps consumers of the library in types JS variants to use narrowing reliably.
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 a pull request may close this issue.

1 participant