Skip to content

Commit e61a278

Browse files
committed
Describe the prelude
1 parent 782913e commit e61a278

File tree

1 file changed

+44
-1
lines changed

1 file changed

+44
-1
lines changed

text/0000-template-imports.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,50 @@ Then a loose-mode component could invoke them like `<NamedOnly::Greet @name="Chr
562562

563563
### The “prelude”
564564

565-
<!-- TODO: prelude -->
565+
While all values used in templates must be explicitly in scope, Ember[^glimmer-prelude] will provide some via a “prelude”.[^prelude] These are always in scope and do not need to be imported.
566+
567+
The helpers in the prelude are:
568+
569+
- `action`
570+
- `array`
571+
- `component`
572+
- `concat`
573+
- `debugger`
574+
- `each`
575+
- `each-in`
576+
- `fn`
577+
- `get`
578+
- `has-block`
579+
- `has-block-params`
580+
- `hash`
581+
- `if`
582+
- `in-element`
583+
- `let`
584+
- `log`
585+
- `mount`
586+
- `mut`
587+
- `on`
588+
- `outlet`
589+
- `query-params`
590+
- `unbound`[^unbound-deprecated]
591+
- `unless`
592+
- `yield`
593+
594+
The modifiers in the prelude are:
595+
596+
- `on`
597+
598+
The components in the prelude are:
599+
600+
- `LinkTo`
601+
- `Input`
602+
- `Textarea`
603+
604+
[^glimmer-prelude]: Glimmer.js may provide its own prelude. While long-term the two should likely align, this RFC simply takes the _status quo_ as a given
605+
606+
[^prelude]: “Prelude” is the conventional name for this functionality in programming language design.
607+
608+
[^unbound-deprecated]: `unbound` is deprecated, but since it will not be removed till Ember 5.0.0, it should appear in the prelude nonetheless.
566609

567610

568611
### Tooling

0 commit comments

Comments
 (0)