Open almostintuitive opened 7 years ago
This was already discussed in #15
I would very much like to be able to provide this as an option. If you can overcome the following problems I'd gladly accept a PR for the feature:
I think "noEmitOnError" would be a great option, that's already a valid compiler flag
This may be solved by the way this will be implemented anyway. AFAIK, we won't be able to use .transpileModule, since that method does not report type errors/warnings.
So far, my conclusion is that because of the differences between the behaviour of tsc
and transpileModule
, we'll need to run tsc
in some way, and then collect the compiled module, rather than calling methods on the public API. is this also your understanding?
For reference, there are quite a few issues on the TS repo documenting the difference between tsx
and transpileModule
https://github.com/Microsoft/TypeScript/issues/4864
I think the workaround for this problem which is here https://github.com/ds300/react-native-typescript-transformer/issues/15#issuecomment-331355513 should be mentioned in README etc because this prevents developer to commit shit to the code base :D
Hi,
It's super nice to see this happening!
noEmitOnError is the one of the main reasons we're using TypeScript. It'd be great if the packager would fail the build if there's a type error - that's currently the expected way according to everyone who's working on this project.
We'd be happy to even submit a PR for this. Will/would it be accepted?
Thank you!