File tree Expand file tree Collapse file tree 6 files changed +22
-18
lines changed
-internals/glimmer/lib/templates Expand file tree Collapse file tree 6 files changed +22
-18
lines changed Original file line number Diff line number Diff line change 1
1
import { precompileTemplate } from '@ember/template-compilation' ;
2
- import { on } from '@ember/modifier' ;
2
+ import { on } from '@ember/modifier/on ' ;
3
3
export default precompileTemplate (
4
4
`<input
5
5
{{!-- for compatibility --}}
Original file line number Diff line number Diff line change 1
1
import { precompileTemplate } from '@ember/template-compilation' ;
2
- import { on } from '@ember/modifier' ;
2
+ import { on } from '@ember/modifier/on ' ;
3
3
4
4
export default precompileTemplate (
5
5
`<a
Original file line number Diff line number Diff line change 1
1
import { precompileTemplate } from '@ember/template-compilation' ;
2
- import { on } from '@ember/modifier' ;
2
+ import { on } from '@ember/modifier/on ' ;
3
3
4
4
export default precompileTemplate (
5
5
`<textarea
Original file line number Diff line number Diff line change 1
- import { on as glimmerOn } from '@glimmer/runtime' ;
2
1
import { setModifierManager as glimmerSetModifierManager } from '@glimmer/manager' ;
3
2
4
- import type { Opaque } from '@ember/-internals/utility-types' ;
5
3
import type Owner from '@ember/owner' ;
6
4
import type { ModifierManager } from '@glimmer/interfaces' ;
7
5
8
- // In normal TypeScript, this modifier is essentially an opaque token that just
9
- // needs to be importable. Declaring it with a unique interface like this,
10
- // however, gives tools like Glint (that *do* have a richer notion of what it
11
- // is) a place to install more detailed type information.
12
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
13
- export interface OnModifier extends Opaque < 'modifier:on' > { }
14
-
15
- // SAFETY: at the time of writing, the cast here is from `{}` to `OnModifier`,
16
- // which makes it strictly safer to use outside this module because it is not
17
- // usable as "any non-null item", which is what `{}` means, without loss of any
18
- // information from the type itself.
19
- export const on = glimmerOn as OnModifier ;
6
+ export { on , type OnModifier } from './on' ;
20
7
21
8
// NOTE: this uses assignment to *require* that the `glimmerSetModifierManager`
22
9
// is legally assignable to this type, i.e. that variance is properly upheld.
Original file line number Diff line number Diff line change
1
+ import { on as glimmerOn } from '@glimmer/runtime' ;
2
+
3
+ import type { Opaque } from '@ember/-internals/utility-types' ;
4
+
5
+ // In normal TypeScript, this modifier is essentially an opaque token that just
6
+ // needs to be importable. Declaring it with a unique interface like this,
7
+ // however, gives tools like Glint (that *do* have a richer notion of what it
8
+ // is) a place to install more detailed type information.
9
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
10
+ export interface OnModifier extends Opaque < 'modifier:on' > { }
11
+
12
+ // SAFETY: at the time of writing, the cast here is from `{}` to `OnModifier`,
13
+ // which makes it strictly safer to use outside this module because it is not
14
+ // usable as "any non-null item", which is what `{}` means, without loss of any
15
+ // information from the type itself.
16
+ export const on = glimmerOn as OnModifier ;
Original file line number Diff line number Diff line change 3
3
"private" : true ,
4
4
"type" : " module" ,
5
5
"exports" : {
6
- "." : " ./index.ts"
6
+ "." : " ./index.ts" ,
7
+ "./on" : " ./on.ts"
7
8
},
8
9
"dependencies" : {
9
10
"@ember/-internals" : " workspace:*" ,
You can’t perform that action at this time.
0 commit comments