-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with source-map-loader when using webpack: "The keyword 'interface' is reserved" #63
Comments
Actually using |
I am reopening this issue because, the same problem happens with |
@gcanti the problem is pretty general in this setting. |
@sledorze Could you please put up a repo reproducing the error? Based on your description though, it doesn't seem an issue with io-ts, it rather seems a bug in the transformer |
@sledorze anyway I'm ok with exporting some alias, I propose
does undefined raise an error too? (EDIT it shouldn't) |
@gcanti undefined is 'correctly webpacked' to something like: |
type Person = {
name: string
}
const Person = t.type({
name: t.string
}) |
It is a typescript keyword, not a js one, you're right |
(Issue using io-ts 0.5.0, 0.5.1 and 0.6.0)
The problem is that Webpack transform userland code of io-ts like this:
importing directly 'interface' even if the original code was using it like so:
Resulting in an error when source-map-loader kicks in:
Also this generates a visual error in visual code studio.
A solution would be to provide an alternative keyword.
The text was updated successfully, but these errors were encountered: