File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { z } from 'zod/mini' ;
2+ import type { CompilerAsync , CompilerSync } from '../compilers/types.ts' ;
23import { SYMBOL_TYPE } from '../constants.ts' ;
34import { globSchema , pluginsSchema } from './plugins.ts' ;
45
56const pathsSchema = z . record ( z . string ( ) , z . array ( z . string ( ) ) ) ;
67
7- type SyncCompiler = ( filename : string , contents : string ) => string ;
8- type AsyncCompiler = ( filename : string , contents : string ) => Promise < string > ;
9-
10- const syncCompilerSchema = z . union ( [ z . literal ( true ) , z . custom < SyncCompiler > ( ) ] ) ;
11- const asyncCompilerSchema = z . custom < AsyncCompiler > ( ) ;
8+ const syncCompilerSchema = z . union ( [ z . literal ( true ) , z . custom < CompilerSync > ( ) ] ) ;
9+ const asyncCompilerSchema = z . custom < CompilerAsync > ( ) ;
1210const compilerSchema = z . union ( [ syncCompilerSchema , asyncCompilerSchema ] ) ;
1311const compilersSchema = z . record ( z . string ( ) , compilerSchema ) ;
1412
You can’t perform that action at this time.
0 commit comments