File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
packages/jsrepo/src/utils/config Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " jsrepo " : patch
3+ ---
4+
5+ fix: Fix add type
6+
Original file line number Diff line number Diff line change @@ -119,14 +119,14 @@ export type RegistryItemType = LooseAutocomplete<
119119 'block' | 'component' | 'lib' | 'hook' | 'ui' | 'page'
120120> ;
121121
122- export const RegistryItemAddSchema = z . enum ( [
122+ export const RegistryItemAddOptions = [
123123 'optionally-on-init' ,
124124 'on-init' ,
125125 'when-needed' ,
126126 'when-added' ,
127- ] ) ;
128-
129- export type RegistryItemAdd = z . infer < typeof RegistryItemAddSchema > ;
127+ ] as const ;
128+ export const RegistryItemAddSchema = z . enum ( RegistryItemAddOptions ) ;
129+ export type RegistryItemAdd = ( typeof RegistryItemAddOptions ) [ number ] ;
130130
131131export type RegistryItem = {
132132 /** The name of the item. MUST be unique. Spaces are NOT allowed. */
You can’t perform that action at this time.
0 commit comments