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

Expose worker.d.ts #21

Closed
exKAZUu opened this issue Jan 17, 2020 · 2 comments · Fixed by #26
Closed

Expose worker.d.ts #21

exKAZUu opened this issue Jan 17, 2020 · 2 comments · Fixed by #26

Comments

@exKAZUu
Copy link
Contributor

exKAZUu commented Jan 17, 2020

worker.d.ts is required when using a custom worker, so I think we should expose worker.d.ts (via index.d.ts ?).

Note marp worker on CDN is incompatible with the latest marp-react (i.e. master branch) so we must use a custom worker when using the latest marp-react.

@exKAZUu
Copy link
Contributor Author

exKAZUu commented Jan 29, 2020

May I change https://github.com/marp-team/marp-react/blob/master/src/worker.ts#L6 to export function initializeWorker or something? Are there some reasons where we use default export?
Because named export can easily expose this function via index.d.ts.

@yhatt
Copy link
Member

yhatt commented Jan 29, 2020

I recommend to take a way with no depending the structure of export type: emit type definition of worker.d.ts into the same directory as lib/worker.js rather than types directory.

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