Upgrade to TS 4.3 and play nicely with new flags #206
Merged
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.
This upgrades the Glint codebase to
typescript@4.3
and ensures we play nicely withnoImplicitOverride
andnoPropertyAccessFromIndexSignature
.For
noImplicitOverride
, we could run afoul when defining a template on a subclass of some other component that already had an associated template. Since we can't know during emit whether or not to useoverride
, for now we include the class name as part of the template key to avoid collisions. Though it's not included in the TS 4.4 Beta blog post, class static blocks look to be landing as part of that release, at which point we can make use of those for template definitions and the need for a field name goes away entirely.For
noPropertyAccessFromIndexSignature
, the main culprit I was able to identify where we might trigger that inappropriately was the case of accessing named block params, in particular in the presence of prior type errors, since that could cause𝛄.blockParams
to fall back to the base type with an index signature rather than properly resolving. We now always access block params with[]
notation.