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
OOM issues due to the switch to use isDeeplyNestedType for recursion tracking.
Pathological examples where we do enormous amounts of work.
If you're inferring from 2 type references, and you come back to the same type references, you often don't get helpful inferences.
The reason we do "up to 5 levels of exploration" in inference is that we do get a little further with type references when inferring from Box2<Box2<string>> to Box1<Box1<T>>.
Newest commits just track just 1 level of recursion. As soon as we see 2 types with identical "recursion identities" (new concept that relates potentially-recursive constructs back to their origin location), we stop.
Have some fix-ups for literal types - object literals aren't recursive.
Sure they are!
What about a getter with this?
Oh no
The text was updated successfully, but these errors were encountered:
paths
withoutbaseUrl
#31869
One of the things you have to do every single time you set up
paths
is setbaseUrl
.baseUrl
makes sense with the browser behavior in mind.So why do you need both?
Require.js
legacy reasons.Proposal: whenever there's no
baseUrl
, resolve each path relative to thetsconfig.json
.What about non-relative mappings?
Also, what about circularities?
Could always say when there's no
baseUrl
, all paths must be relative.Could also use
rootDir
instead oftsconfig.json
location.rootDir
is poorly understood, doesn't do what most people think, don't use it.Conclusion: put put a PR, try it out.
Treat Trailing
undefined
/any
/unknown
Parameters as Optional#39817
Usually, a promise's resolver callback requires a parameter.
We have some special-cased behavior for
void
- if you havevoid
, then the parameter is considered optional.Idea: if you have trailing
undefined
orany
orunknown
parameters, then these become optional.Problem: this weakens the TypeScript side.
People definitely don't want
strict
.Does
--strict
with JavaScript make sense? Is it coherent!So only outside of
strictNullChecks
?number | undefined
becomesnumber
outside ofstrictNullChecks
😬Conclusion: try without
strictNullChecks
, check with @sandersn.Update on Recursive Conditional Types
#40002
isDeeplyNestedType
for recursion tracking.Box2<Box2<string>>
toBox1<Box1<T>>
.this
?The text was updated successfully, but these errors were encountered: