-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Bug: No types on Deno #3764
Comments
This will be fixed in the next major version of XState. |
We landed the appropriate change on the |
Actually, while that PR switches the repo to We gonna fix this and provide a way to import XState correctly in Deno but I need to rethink our options. |
Can you check |
importing xstate 5 latest- alpha 6 I see types! Thanks a lot! |
How does |
Personally I like that this style of import is not abstracted, like it is with local imports. Easier to debug and understand imported code IMO. For the main module in deno there is a mod.ts convention. Also, This is an interesting read. if I understand correctly the next version of deno will formalize the mod.ts pattern to encourage npm style import with the "deno:" URL scheme (and I'm sure they'll generalize for file servers hosting ESM). I think the more ESM the better, great ergonomics and less power to npm. |
Closing as it seems that Feel free to reopen if some details are still missing about this. EDIT: not closed yet |
I’d definitely like to figure out a better way for Deno users to consume our package. Relying in the |
|
npm import works now |
Great, thanks for the update! |
Description
Hello!
when importing xstate in deno like so:
import * as xstate from "https://deno.land/x/xstate@[email protected]/src/index.ts";
loaded code has no types, probably since xstate doesn't use the .ts file extensions when importing files.
import { createMachine, Machine } from './Machine';
=>
import { createMachine, Machine } from './Machine.ts';
Expected result
typescript types should be loaded
Actual result
everything is typed as any
Reproduction
import * as xstate from "https://deno.land/x/xstate@[email protected]/src/index.ts";
Additional context
No response
The text was updated successfully, but these errors were encountered: