ohmjs/ohm

Typescript example fails to compile

evilguest opened this issue · 1 comments

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?

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)