RFC#560 - {{eq}}, {{neq}} as keywords#21339
Open
NullVoxPopuli wants to merge 5 commits intomainfrom
Open
Conversation
Add equality helpers and register them as built-in keywords so they no longer need to be imported in strict-mode (gjs/gts) templates. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
5 tasks
Contributor
📊 Package size report 0.1%↑
🤖 This report was automatically generated by pkg-size-action |
bertdeblock
reviewed
Apr 27, 2026
| @@ -0,0 +1,9 @@ | |||
| import { DEBUG } from '@glimmer/env'; | |||
|
|
|||
| export const eq = (...args: unknown[]) => { | |||
Member
There was a problem hiding this comment.
Would it not be better TS wise for both helpers to do (a: unknown, b: unknown), so:
{{eq 1 2 3}}Gets flagged by Glint?:
Expected 2 arguments, but got 3.
Contributor
Author
There was a problem hiding this comment.
it is better, perhaps, yes. I've updated it -- but the types for glint are going to require some iteration, because currently glint has no idea how to wire in these keywords.
I want to move all the types from glint in to ember-source, so the responsibility isn't backwards
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
https://github.com/emberjs/rfcs/blob/main/text/0560-add-equality-operators.md