Skip to content

RFC#560 - {{eq}}, {{neq}} as keywords#21339

Merged
NullVoxPopuli merged 5 commits intomainfrom
nvp/eq-neq-as-keyword
Apr 28, 2026
Merged

RFC#560 - {{eq}}, {{neq}} as keywords#21339
NullVoxPopuli merged 5 commits intomainfrom
nvp/eq-neq-as-keyword

Conversation

@NullVoxPopuli
Copy link
Copy Markdown
Contributor

NullVoxPopuli and others added 2 commits April 24, 2026 10:35
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) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 24, 2026

📊 Package size report   0.1%↑

File Before (Size / Brotli) After (Size / Brotli)
dist/dev/packages/@ember/helper/index.js 17.7 kB / 4.7 kB 6%↑18.7 kB / 5%↑4.9 kB
dist/dev/packages/@ember/template-compiler/lib/plugins/auto-import-builtins.js 2.1 kB / 521 B 32%↑2.7 kB / 2%↑533 B
dist/dev/packages/shared-chunks/invoke-CgfoEtMT.js 2.6 kB / 881 B
dist/dev/packages/shared-chunks/neq-DujMPv1k.js 3.2 kB / 1 kB
dist/prod/packages/@ember/helper/index.js 17.6 kB / 4.7 kB 6%↑18.6 kB / 4%↑4.9 kB
dist/prod/packages/@ember/template-compiler/lib/plugins/auto-import-builtins.js 2.1 kB / 521 B 32%↑2.7 kB / 2%↑533 B
dist/prod/packages/shared-chunks/index-Cc8WmrB-.js 59.5 kB / 12 kB 189%↑172 kB / 220%↑38.5 kB
dist/prod/packages/shared-chunks/invoke-BdJCXD-b.js 1.8 kB / 634 B
dist/prod/packages/shared-chunks/neq-BqdovTuC.js 2 kB / 705 B
types/stable/@ember/helper/index.d.ts 18.6 kB / 4.5 kB 7%↑19.9 kB / 5%↑4.7 kB
types/stable/@glimmer/runtime/index.d.ts 2.6 kB / 753 B 4%↑2.8 kB / 1%↑763 B
types/stable/@glimmer/runtime/lib/helpers/eq.d.ts 207 B / 134 B
types/stable/@glimmer/runtime/lib/helpers/neq.d.ts 211 B / 138 B
types/stable/index.d.ts 42.8 kB / 4 kB 0.3%↑43 kB / -0.17%↓4 kB
Total (Includes all files) 5.4 MB / 1.3 MB 0.1%↑5.4 MB / 0.09%↑1.3 MB
Tarball size 1.2 MB 0.1%↑1.2 MB

🤖 This report was automatically generated by pkg-size-action

@NullVoxPopuli NullVoxPopuli changed the title RFC#560 - {{eq}}, {{neq}} as keywords#21312 RFC#560 - {{eq}}, {{neq}} as keywords Apr 24, 2026
@@ -0,0 +1,9 @@
import { DEBUG } from '@glimmer/env';

export const eq = (...args: unknown[]) => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Member

@mansona mansona left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

@NullVoxPopuli NullVoxPopuli merged commit 8c2698d into main Apr 28, 2026
38 checks passed
@NullVoxPopuli NullVoxPopuli deleted the nvp/eq-neq-as-keyword branch April 28, 2026 20:27
@kategengler
Copy link
Copy Markdown
Member

This was merged without the RFC advancing to 'Ready for Release' stage. We should make sure the RFC advances asap to avoid publishing a feature that we have not advanced through our process emberjs/rfcs#1180

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants