You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Default values of readonly parameter properties shouldn't have literal types #11409
$ node built/local/tsc.js -t es6 -m commonjs --noEmit index.ts
index.ts(6,6): error TS2345: Argument of type '4' is not assignable to parameter of type '2'.
changed the title [-]Default parameters shouldn't be inferred to literal types[/-][+]Default values of readonly parameter properties shouldn't be treated as literal types[/+]on Oct 26, 2016
changed the title [-]Default values of readonly parameter properties shouldn't be treated as literal types[/-][+]Default values of readonly parameter properties shouldn't have literal types[/+]on Oct 26, 2016
Activity
falsandtru commentedon Oct 26, 2016
I think this issue should be added milestone 2.1.
[-]Default parameters shouldn't be inferred to literal types[/-][+]Default values of readonly parameter properties shouldn't be treated as literal types[/+][-]Default values of readonly parameter properties shouldn't be treated as literal types[/-][+]Default values of readonly parameter properties shouldn't have literal types[/+]Andarist commentedon Jan 8, 2023
Ryan Cavanaugh (@RyanCavanaugh) this works OK today, the issue can be closed