Closed
Description
openedon Jul 15, 2019
Code:
Looks like the readonly
modifier for arrays breaks code reformatting in the Playground.
// comment out to allow reformatting
const oops: readonly number[] = [1, 2, 3];
/*
SyntaxError: "',' expected. (2:22), parser-typescript.js
> 2 | const oops: readonly number[] = [1, 2, 3];
| ^
*/
// Alt + Shift + F: IT DOES NOTHING!!!
const
x
=
1;
Expected behavior:
Code reformats (so const x = 1;
is moved to a single line)
Actual behavior:
Code does not reformat. A console error indicates that the readonly
modifier is not expected.
Playground Link:
Playground Link
Related Issues:
microsoft/TypeScript#29435, introducing the readonly
modifier for array types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
No labels