-
-
Notifications
You must be signed in to change notification settings - Fork 157
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
[TypeScript] Unable to use a plugin with typescript #149
Comments
You're right, I can reproduce this, and it's incorrect, but I have no idea why it's happening. It's definitely not marked as a read-only property explicitly. Any suggestions? Happy to take hints or PRs to get this fixed. |
Ok, I think I know the cause of this. The problem is that TypeScript assumes that Fortunately, this is possible if you're using a default import. That was only supported in TS if you had I'll release this at 1.7.0 in a moment. To use it, just change from: import * as log from 'loglevel'; to import log from 'loglevel'; Both are supported in general, but to make the types happy when assigning to |
Worked for me using "allowUmdGlobalAccess": true in the tsconfig.json |
Just doing similar thing to demo code to add a new plugin:
And got:
Maybe there're some thong wrong with the TypeScript definition
The text was updated successfully, but these errors were encountered: