File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -118,6 +118,10 @@ const config: BuildEntries = {
118118 exportEntries : [ './actions/decorator' ] ,
119119 entryPoint : './src/actions/decorator.ts' ,
120120 } ,
121+ {
122+ exportEntries : [ './backgrounds' ] ,
123+ entryPoint : './src/backgrounds/index.ts' ,
124+ } ,
121125 {
122126 exportEntries : [ './viewport' ] ,
123127 entryPoint : './src/viewport/index.ts' ,
Original file line number Diff line number Diff line change 5656 "code" : " ./src/actions/decorator.ts" ,
5757 "default" : " ./dist/actions/decorator.js"
5858 },
59+ "./backgrounds" : {
60+ "types" : " ./dist/backgrounds/index.d.ts" ,
61+ "code" : " ./src/backgrounds/index.ts" ,
62+ "default" : " ./dist/backgrounds/index.js"
63+ },
5964 "./highlight" : {
6065 "types" : " ./dist/highlight/index.d.ts" ,
6166 "code" : " ./src/highlight/index.ts" ,
Original file line number Diff line number Diff line change 1+ import { expectTypeOf } from 'vitest' ;
2+
3+ import { DEFAULT_BACKGROUNDS } from 'storybook/backgrounds' ;
4+ import type { Background , BackgroundMap } from 'storybook/backgrounds' ;
5+
6+ expectTypeOf < BackgroundMap > ( ) . toEqualTypeOf < Record < string , Background > > ( ) ;
7+
8+ expectTypeOf ( DEFAULT_BACKGROUNDS ) . toEqualTypeOf < BackgroundMap > ( ) ;
9+
10+ const customBackgrounds = {
11+ light : { name : 'Light' , value : '#ffffff' } ,
12+ dark : { name : 'Dark' , value : '#1a1a1a' } ,
13+ } satisfies BackgroundMap ;
14+
15+ expectTypeOf ( customBackgrounds . light ) . toExtend < Background > ( ) ;
Original file line number Diff line number Diff line change 1+ export * from './constants.ts' ;
2+ export * from './types.ts' ;
3+ export * from './defaults.ts' ;
You can’t perform that action at this time.
0 commit comments