Skip to content
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

Introduce @glint-ignore and @glint-expect-error directives #166

Merged
merged 13 commits into from
Apr 16, 2021

Conversation

dfreeman
Copy link
Member

In TypeScript, it's possible to tell the typechecker to either silence any errors that begin on a particular line (@ts-ignore) or to specifically expect an error and fail if none is produced (@ts-expect-error). While it's generally preferable to have code that typechecks correctly, these tools are useful to have available for cases where expressiveness of the type system falls short.

This PR introduces equivalent directives for Glint. Unfortunately we can't directly rely on the TS implementation of these, as there's no one-to-one mapping between lines in the input template and lines in our translated TypeScript.

Closes #82

@dfreeman dfreeman added the enhancement New feature or request label Apr 16, 2021
Copy link
Member

@chriskrycho chriskrycho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@dfreeman dfreeman merged commit 00b6310 into master Apr 16, 2021
@dfreeman dfreeman deleted the glint-ignore branch April 16, 2021 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature request] Ignore lines in HBS with {{! glint-ignore }} or something
2 participants