Skip to content
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 example fails to compile #474

Open
evilguest opened this issue Apr 24, 2024 · 1 comment
Open

Typescript example fails to compile #474

evilguest opened this issue Apr 24, 2024 · 1 comment

Comments

@evilguest
Copy link

I have checked out the ohm repository. Now I'm trying to run the tests in the examples/typescript folder, but it does fail with the following diagnostics:

TSError: ⨯ Unable to compile TypeScript:
src/arithmetic.ts:10:44 - error TS2307: Cannot find module './arithmetic.ohm-bundle' or its corresponding type declarations.

The ohm generateBundles --withTypes 'src/*.ohm' command did complete with no output to console; however, I am not seeing any results (.ts/d.ts files) in the folder.

What am I doing wrong?

@kamtschatka
Copy link

I ran into a similar issue, maybe you have a problem with the ' around the path?
The sample in the doc does not work for me.
I have to call npx ohm generateBundles --withTypes src/*.ohm

Additionally it does not work with windows style path separators:
npx ohm generateBundles --withTypes .\src\*.ohm does not work (tried all kinds of combinations without the leading . and so on as well)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants