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.
Unfortunately it appears that the use of
any
is possible and can enable TS code to return anany
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 haveany
embedded in them.