Expose template registry and drop rollup-plugin-ts #194
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.
Context
This PR aims at improving the TypeScript experience and aligning with the last best practice.
How
First, we now expose the template-registry of the
Lottie
component. It allows proper template typing in consuming applications using TypeScript with a Glint setup (see how-to from Glint).Then, we propose to move off
rollup-plugin-ts
, following the latest guidelines fromaddon-blueprint
(see PR for details). Note that in our case, usingrollup-plugin-ts
, it became impossible to build the addon locally (and so impossible to test it locally in consuming applications). Now the type declarations will be outputted in a separatedeclarations
folder inside the build folder.Examples
Wrong argument
Wrong type
Tasks
glint
dependenciesrollup-plugin-ts
yalc
to test the addon (build and usage) locally in both JS and TS ember applications