rlaffers / xstate-ninja

Devtool for XState state machines
ISC License
69 stars 2 forks source link

The 'xstate-ninja' library may need to update its package.json or typings #5

Closed deden closed 1 year ago

deden commented 1 year ago

working on a typescript project with vscode and vite, I got this vscode error :

Could not find a declaration file for module 'xstate-ninja'. '/project/node_modules/xstate-ninja/dist/xstate-ninja.js' implicitly has an 'any' type.
  There are types at '/project/node_modules/xstate-ninja/dist/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'xstate-ninja' library may need to update its package.json or typings.ts(7016)

what should I do to fixed this issue? or this library may need to update the package.json?

Here's I found similar issue on SO https://stackoverflow.com/a/76212193

rlaffers commented 1 year ago

Thanks for the report, I will make a PR momentarily.

deden commented 1 year ago

Hi @rlaffers , thanks for updating. however, the issue still exists in package @xstate-ninja/react

Could not find a declaration file for module '@xstate-ninja/react'....

How to reproduce:

import { useMachine } from '@xstate-ninja/react'
rlaffers commented 1 year ago

@deden Version @xstate-ninja/react@1.1.3 is out, should be fixed now.