-
Notifications
You must be signed in to change notification settings - Fork 643
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
Exported variable 'Todo' has or is using 'IModelType' ... but cannot be named. in Typescript #426
Comments
If you import it at the top:
With my given compiler args you then get:
|
Okay so you can get around it if you do this nastyness:
|
Yep, Thats a known typescript behaviour with interfaces :) |
@mattiamanzati Okay, perhaps put it in the docs, in the Typescript section to make people aware of the issue? |
Yeah, would make sense :) |
Sure, ill do it now |
Great! Thanks a lot! :) |
does "export { imodeltype} from mobx-state-tree" help?
…On vr 6 okt. 2017 07:22 Mattia Manzati ***@***.***> wrote:
Great! Thanks a lot! :)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#426 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABvGhOMLQ426mRXGjTf_MQTvcNpRm2Jiks5spbkrgaJpZM4Pv4tf>
.
|
@mweststrate no, I tried that already, you get the same error |
Is there a work around for this? I am trying to make my MST store an exportable library but I get
when I try to compile it. |
A simple example taken from the MST docs:
With tsconfig.json:
Gives the following compiler error:
Unfortunately it looks like this is not a MST problem and is instead a Typescript issue:
microsoft/TypeScript#5938
Until this is fixed in Typescript or MST it renders MST unusable for my use case in Typescript :(
The text was updated successfully, but these errors were encountered: