aabtop / reify

Reify lets you embed a customized TypeScript runtime within a C++ application.
MIT License
6 stars 0 forks source link

No compiler errors raised when `any` type is used. #23

Open aabtop opened 4 years ago

aabtop commented 4 years ago

Unfortunately it appears that the use of any is possible and can enable TS code to return an any type for any type.

Since Reify's backend code assumes that the types are correct, this can result in seg faults when things are not as they are expected to be.

Either we should add proper checks on the C++ side to just double check that everything is as expected (we should probably do this anyway), or we can search around for stricter methods (beyond the --strict TS compiler option which we already enable) to ensure absolute type safety. So far all I can find is that TSLint offers this with their no-any rule, but even then it's not clear if that will apply to the core ES libraries that have any embedded in them.