File tree Expand file tree Collapse file tree
typescript-schema-generator/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 "exports" : {
1212 "." : {
1313 "default" : " ./index.ts"
14+ },
15+ "./*.js" : {
16+ "default" : " ./validators/*.js" ,
17+ "types" : " ./validators/index.d.ts"
1418 }
1519 },
1620 "name" : " digital-letters-events" ,
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ export async function generateGuardFunctions() {
1818
1919 const validatorVariableName = `event${ typeName } Validator` ;
2020
21- const guardFunction = `import ${ validatorVariableName } from '../validators /${ typeName } .js';
21+ const guardFunction = `import ${ validatorVariableName } from 'digital-letters-events /${ typeName } .js';
2222import { type ${ typeName } } from '../types';
2323import { InvalidEvent } from '../errors';
2424import { Logger } from 'utils';
@@ -40,11 +40,11 @@ export function validate${typeName}(
4040}
4141` ;
4242
43- const typeDeclarationFilename = `${ typeName } .ts` ;
43+ const typeDeclarationFilename = `${ typeName } Guard .ts` ;
4444 writeFile ( outputDir , typeDeclarationFilename , guardFunction ) ;
4545 console . log ( typeDeclarationFilename ) ;
4646
47- indexLines . push ( `export * from './${ typeName } ';` ) ;
47+ indexLines . push ( `export * from './${ typeName } Guard ';` ) ;
4848 }
4949 console . groupEnd ( ) ;
5050
You can’t perform that action at this time.
0 commit comments