Skip to content

Upgrade to TS 4.3 and play nicely with new flags #206

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

Merged
merged 6 commits into from
Jul 20, 2021
Merged

Conversation

dfreeman
Copy link
Member

@dfreeman dfreeman commented Jul 20, 2021

This upgrades the Glint codebase to typescript@4.3 and ensures we play nicely with noImplicitOverride and noPropertyAccessFromIndexSignature.

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 use override, 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.

@dfreeman dfreeman merged commit f2eb003 into master Jul 20, 2021
@dfreeman dfreeman deleted the upgrade-typescript branch July 20, 2021 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Glint doesn't work with the noPropertyAccessFromIndexSignature TypeScript option Glint doesn't work with the noImplicitOverride TypeScript option
1 participant