Doubtful. Within the current paradigm of even TS, thatβs not even that useful. Type-checking in TS (and, by extension, JS) is duck-typing. Having access to type information at runtime beyond expecting specific object structures (duck-types) really suggests a different architecture or language
No not really, although I do sometimes wish it had better type casting to keep a variable type from being changed if you would for example define it as a number
Comments
Will we ever get types at runtime in JS?
Or things Zod is used for - easier to create powerful parsers if you have type info at runtime
But it's also not needed if the type system has certain features
https://bsky.app/profile/mohammedaljbour0.bsky.social/post/3lfhxu7jmxs2g
https://nodejs.org/api/typescript.html#type-stripping