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

export ThreadManager to allow auto-generation of TypeScript types #25

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

aspiers
Copy link
Contributor

@aspiers aspiers commented Dec 14, 2021

threadman.js exports the buildThreadManager() function which returns an instance of the ThreadManager class.

However the ThreadManager class itself is not exported. This can be problematic; for instance, when auto-generating TypeScript declaration files from the source via tsc, it results in the following error:

src/engine.js:1:1 - error TS9006: Declaration emit for this file requires using private name 'ThreadManager' from module '"src/threadman"'. An explicit type annotation may unblock declaration emit.

1 import WasmField1 from "./wasm_field1.js";
  ~~~~~~

This is simply solved by exporting ThreadManager.

threadman.js exports the buildThreadManager() function which returns
an instance of the ThreadManager class.

However the ThreadManager class itself is not exported.  This can
be problematic; for instance, when auto-generating TypeScript
declaration files from the source via tsc, it results in the following
error:

    src/engine.js:1:1 - error TS9006: Declaration emit for this file requires using private name 'ThreadManager' from module '"src/threadman"'. An explicit type annotation may unblock declaration emit.

    1 import WasmField1 from "./wasm_field1.js";
      ~~~~~~

This is simply solved by exporting ThreadManager.
@Kolezhniuk Kolezhniuk self-requested a review April 8, 2024 12:09
@OBrezhniev OBrezhniev merged commit 1cb2027 into iden3:master Apr 9, 2024
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

Successfully merging this pull request may close these issues.

3 participants