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
Right now it crashes productions all over the world. As much as backcompat is an issue, this change could be pushed in a major version of TS (oh, it could have been TS 4, if anyone cared).
Having
JSON.stringify(expr)
returnstring | undefined
#38574
JSON.stringify
potentially returningundefined
.JSON.stringify(function() {})
->undefined
JSON.stringify(undefined)
->undefined
JSON.stringify(Symbol())
->undefined
JSON.stringify({ toJSON() {} })
-> 🤷♀️JSON.stringify(?????)
->string
JSON.stringify(object | undefined)
->string | undefined
JSON.stringify(any)
->string
string | undefined
from the beginning, butstrictNullChecks
came later and we didn't wanna break people.Upper Bounds of Types Resolved to
any
#38555
#29571
fn<T extends U>(arg: T)
whenU
is a type that resolves toany
?any
ideally shouldn't break existing code.any
as a type constraint is a foot-gun.any
itself is a foot-gun.any
being different?any
: "you meanunknown
"extends any
might be meaningful, but 50% of the time that meaning might not be obvious to people, causes more bugs.Emitting empty export lists, and other fun problems with bundlers
webpack/webpack#10889
Do we need to start emitting
export {}
?We're not emitting
export {}
for value-ful modules though.alwaysStrict
is on.Weird because we emit
export {}
for.d.ts
files.Conclusion
export *
behaviorexport {}
may need to be injected.The text was updated successfully, but these errors were encountered: