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
Add readonly
to TypeScript type modifier
#9529
Add readonly
to TypeScript type modifier
#9529
Conversation
tanhauhau
commented
Feb 18, 2019
Q | A |
---|---|
Fixed Issues? | Fixes #9503 |
Patch: Bug Fix? | |
Major: Breaking Change? | |
Minor: New Feature? | |
Tests Added + Pass? | Yes |
Documentation PR Link | |
Any Dependency Changes? | |
License | MIT |
92ff7c6
to
bb9967e
Compare
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/10151/ |
Thanks for all the amazing work 👍 |
Maybe we should throw an error for https://github.com/Microsoft/TypeScript/pull/29435/files#diff-e119cc28df9582f9e1ca0d41720ea142R1026? Unless this is valid, in which case we don't have enough info to know whether to throw or not. type A = number[];
type B = readonly A; |
//cc @DanielRosenwasser ^ Above comment |
is there a TypeScript Playground that supports |
No, it hasn't been released yet. |
IMO yes, we should |
Does that mean we throw a syntax error whenever readonly does not proceed with array literal or tuple literal? |
It depends on
|
Exactly, accordingly to https://github.com/Microsoft/TypeScript/blob/9d3707d671592d030386956c9ce39e539b8d0972/tests/baselines/reference/readonlyArraysAndTuples.errors.txt, we should throw. |
bb9967e
to
ff3a66e
Compare
The circleci failure doesn't seem related to this PR 🤔 |
Thanks! |