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
I used a npm package with d.ts containing #private, the compiler issues some errors, such as : '#private' is declared here., Property '#private' is missing in type xxx.
…type.
Nominal means two classes with the same public methods/properties will not be considered equal by the type checker.
Not using private properties makes this class a structural type instead.
RyanCavanaugh on github (microsoft/TypeScript#38050 (comment)):
> This is the intended behavior so that classes with #p private fields retain their nominal typing behavior when emitted to a .d.ts file
TypeScript Version: 3.8.3 and v3.9.0 nightly
repro:
Expected behavior:
Actual behavior:
playground:
https://www.typescriptlang.org/play?ts=3.9.0-dev.20200418#code/MYGwhgzhAEBiD28BCYBO0DeAoavoGIAzRaAXmgHJj4Ksc8AjNACgEpN689UBTAFwCuqAHbQ+ACwCWEAHRFEnaAF8sSoA
Related Issues:
#36963
#36640
#36630
The text was updated successfully, but these errors were encountered: