-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
22 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { on as glimmerOn } from '@glimmer/runtime'; | ||
|
||
import type { Opaque } from '@ember/-internals/utility-types'; | ||
|
||
// In normal TypeScript, this modifier is essentially an opaque token that just | ||
// needs to be importable. Declaring it with a unique interface like this, | ||
// however, gives tools like Glint (that *do* have a richer notion of what it | ||
// is) a place to install more detailed type information. | ||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
export interface OnModifier extends Opaque<'modifier:on'> {} | ||
|
||
// SAFETY: at the time of writing, the cast here is from `{}` to `OnModifier`, | ||
// which makes it strictly safer to use outside this module because it is not | ||
// usable as "any non-null item", which is what `{}` means, without loss of any | ||
// information from the type itself. | ||
export const on = glimmerOn as OnModifier; |
This file contains 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