3 ms·
A naive question: Is it only the type inference that will recurse indefinitely? I.e. If you always specify your types and cast them explicitly, is the Turing co
by krastanov 9y ago
A naive question: Is it only the type inference that will recurse indefinitely? I.e. If you always specify your types and cast them explicitly, is the Turing completeness still an issue?
- klodolph 9y agoType inference is not necessary in general nor does it look like the TypeScript example here uses type inference in any significant way.
- Gehinnn 9y agoThe properties that enable TS' type system to be turing complete are recursive types and indexer types. Indexer types allow you to write `{ foo: string }["foo"]` which results in the type `string`.
- deleted 9y ago[deleted]