This repository was archived by the owner on Oct 29, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 1
1
import { expectTypeOf } from 'expect-type' ;
2
2
import * as gc from '@glimmer/component' ;
3
3
4
+ // Imported from non-public-API so we can check that we are publishing what we
5
+ // expect to be -- and this keeps us honest about the fact that if we *change*
6
+ // this import location, we've broken any existing declarations published using
7
+ // the current type signatures.
8
+ import { EmptyObject } from '@glimmer/component/addon/-private/component' ;
9
+
4
10
const Component = gc . default ;
5
11
6
12
expectTypeOf ( gc ) . toHaveProperty ( 'default' ) ;
@@ -33,9 +39,7 @@ interface ElementOnly {
33
39
34
40
const componentWithElOnly = new Component < ElementOnly > ( { } , { } ) ;
35
41
36
- // We cannot check on toEqualTypeOf here b/c EmptyObject is intentionally not
37
- // public.
38
- expectTypeOf ( componentWithElOnly . args ) . toMatchTypeOf < Readonly < { } > > ( ) ;
42
+ expectTypeOf ( componentWithElOnly . args ) . toEqualTypeOf < Readonly < EmptyObject > > ( ) ;
39
43
40
44
interface Blocks {
41
45
default : [ name : string ] ;
@@ -48,9 +52,7 @@ interface BlockOnlySig {
48
52
49
53
const componentWithBlockOnly = new Component < BlockOnlySig > ( { } , { } ) ;
50
54
51
- // We cannot check on toEqualTypeOf here b/c EmptyObject is intentionally not
52
- // public.
53
- expectTypeOf ( componentWithBlockOnly . args ) . toMatchTypeOf < Readonly < { } > > ( ) ;
55
+ expectTypeOf ( componentWithBlockOnly . args ) . toEqualTypeOf < Readonly < EmptyObject > > ( ) ;
54
56
55
57
interface ArgsAndBlocks {
56
58
Args : Args ;
You can’t perform that action at this time.
0 commit comments