A class with only getters satisfies some type without checking for the possibility of changing these fields #58141
Labels
Design Limitation
Constraints of the existing architecture prevent this from being fixed
π Search Terms
getters, types, classes, classes with getters
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play?ts=5.4.4#code/C4TwDgpgBAggCgJwPZgM5QLxQN4CgoFQCWAJgFxQB2ArgLYBGECA3LgL664DGANgIap0MHPkJcklVMATUuwJAgAUYBEQBufYNAQQ+JCTxBQVKVBXjI0AShwdRBAOYRgxEoqsUaDJiMJ+oOsDUCJRQwAAWRKgAdCZo0aSsfhx24pIuEOaIpphUEADusIrYrhQAjFBsVqy4EAkkuQDMzEA
π» Code
π Actual behavior
Fails on execute without typescript errors
π Expected behavior
It is necessary to notify the user that the class type and the user-defined type of the function argument are incompatible with each other
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: