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 definitions wrong for concerto-tools #318

Closed
sstone1 opened this issue Aug 25, 2021 · 0 comments
Closed

TypeScript definitions wrong for concerto-tools #318

sstone1 opened this issue Aug 25, 2021 · 0 comments

Comments

@sstone1
Copy link
Contributor

sstone1 commented Aug 25, 2021

All of the code generation classes are exported under a top level CodeGen object:

https://github.com/accordproject/concerto/blob/master/packages/concerto-tools/index.js

The TypeScript definitions do not reflect this:

https://github.com/accordproject/concerto/blob/master/packages/concerto-tools/types/index.d.ts

So you can compile TypeScript that does this:

import { JSONSchemaVisitor } from '@accordproject/concerto-tools';

But it fails at runtime:

TypeError: concerto_tools_1.JSONSchemaVisitor is not a constructor

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

1 participant