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
This is fun, type checking for the contents of H[] seems to be completely disabled, you can stuff literally anything you want into that array and TypeScript won't make a peep:
The example is running into the depth limiter for nested instantiations of the same type. We stop once we've seen five or more instantiations, in this case of type Array<T>. Here's a very simple repro:
constaa: string[][][][][]=[[[[[42]]]]];// No error!
I'm going think about the best way to not trigger from nested literals (which are never recursive).
TypeScript Version: 3.6.3 / 3.7.0-dev.20191021
Search Terms: type check, no error, large object
Code
Expected behavior:
Reporting error as property
i
is missing.Actual behavior:
No error.
Playground Link: http://www.typescriptlang.org/play/?ts=Nightly&ssl=1&ssc=1&pln=61&pc=1#code/JYOwLgpgTgZghgYwgAgILIN4ChnIEYBcyAQgNoC6A3FgL5ZaiSyIrGY7IJEDC1dD4aPCTJu7XABMiAEQp96jIS2TTxyCEQCic2gsHMRmtTCIAxHf0UGUptQHMiAcXkCmwlI7UALIgAkLem7KvmrARADOYFCgdi4IAPYgkcgAHkToALxqhMikHLjYuEWcRIXFRVK5+eUF1TW4GlX19WXNNSZNbc2tXfUOar1tPp2DXT2jbQD0k8hgAJ4ADigIXhAIANbI8MAANuHIq1AQdRP108hhyADkVwA0J6dFNPePNeQvr7jPD73fj+8-Gp-XoArrAt4fYrg5DAgE0ahAA
The text was updated successfully, but these errors were encountered: