This repository has been archived by the owner on May 17, 2024. It is now read-only.
Add prebuild script and tsconfig to generate declarations #125
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #41
Relevant issues:
emitDeclaration
andisolatedModules
together microsoft/TypeScript#29490 (emitDeclaration
is not compatible withisolatedModules
, which is already set in the basetsconfig.json
, so an alternate config was needed)rollup-plugin-typescript
doesn't support generating declarations, so we have to usetsc
itself to generate the declarations)Caveats:
!
andany
, but this seems to be something that can only be resolved with 1. some refactoring of types in the upstream shepherd library or 2. some sort of explicit string check (e.g.if (type === 'next') action = tour.next
) which means that every time you add a new action type to the base library, you need to add another check here, which I think goes against the spirit of this being a very lightweight, mostly independent-of-upstream wrapper, but let me know your thoughtsAlternative solutions:
rollup-plugin-typescript2
seems to support generating declarations, so we could also try upgrading