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
Invalid type declaration for Class Instance Method inside a .js file with a default value of an inner parameter #36507
Notes: Both top-level functions (in either .js or .ts) and class instance methods in .ts files have correct type defs generated in both 3.7.5 and 3.8.0-dev.20200128
Emitting the undefined even outside strict mode is, IMO fine; but I'm not 100% sure if that's desirable (since the code in question may not actually handle undefined)
Activity
a-tarasyuk commentedon Feb 3, 2020
Should TS emit
x: number | undefined(x?) in strict mode? Or herestrictoption doesn't matter?сс Ryan Cavanaugh (@RyanCavanaugh) Wesley Wigham (@weswigham) Daniel Rosenwasser (@DanielRosenwasser)
weswigham commentedon Feb 3, 2020
Emitting the
undefinedeven outside strict mode is, IMO fine; but I'm not 100% sure if that's desirable (since the code in question may not actually handleundefined)