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 11import { expectTypeOf } from 'expect-type' ;
22import * as gc from '@glimmer/component' ;
33
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+
410const Component = gc . default ;
511
612expectTypeOf ( gc ) . toHaveProperty ( 'default' ) ;
@@ -33,9 +39,7 @@ interface ElementOnly {
3339
3440const componentWithElOnly = new Component < ElementOnly > ( { } , { } ) ;
3541
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 > > ( ) ;
3943
4044interface Blocks {
4145 default : [ name : string ] ;
@@ -48,9 +52,7 @@ interface BlockOnlySig {
4852
4953const componentWithBlockOnly = new Component < BlockOnlySig > ( { } , { } ) ;
5054
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 > > ( ) ;
5456
5557interface ArgsAndBlocks {
5658 Args : Args ;
You can’t perform that action at this time.
0 commit comments