Const strings don't narrow their length
property
#55338
Labels
Duplicate
An existing issue was already created
length
property
#55338
π Search Terms
const string length
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play?#code/MYewdgzgLgBAhgJwTAvDA2gcjpgNDTAIzwOEwF14IZRIoBuAKFuhmmTW0LKpvGibN+sRAgAyAUzCp4SAHQAbKQHMoACyYB6TTF0wAegH4hdNlHFSZ7RSvVadeo4yA
π» Code
π Actual behavior
The
length
property of the constant string is of typenumber
π Expected behavior
The
length
property of the constant string should be3
, like it is for the constant array.The text was updated successfully, but these errors were encountered: