Closed joshhornby closed 7 years ago
I don't have any experience with typescript myself, so I'm just guessing. But our setup of the awesome-typescript-loader
only accepts .ts
and tsx
files. Could it be that because your app.js
file doesn't have that extension, it's not loaded through the compiler and therefore isn't type checked?
TLDR - try renaming app.js
to app.ts
, update your webpack.config.js
accordingly.
Please let me know if this helps at all.
Closing the issue for now - let me know if you need further assistance.
I have upload an example what highlights this issue, I am passing a string into this component but the
interface
shows aboolean
(https://github.com/joshhornby/hjs-webpack-ts/blob/master/src/Test.tsx#L4) This should throw a error, but instead this gets rendered. As if the types are being ignored.I am trying to render both TS and JSX (Babel)
Am I missing a setting in my
tsconfig
?Repo: https://github.com/joshhornby/hjs-webpack-ts