marp-team / marp-react

[INACTIVE] Marp renderer component for React
https://marp-react.netlify.com/
MIT License
19 stars 3 forks source link

Expose `worker.d.ts` #21

Closed exKAZUu closed 4 years ago

exKAZUu commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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.