File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed
Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,10 @@ const configSchema = Type.Object(
6767 * What file extension, if any, to add to src file imports. Set to ".js" to support nodenext module resolution
6868 */
6969 importFileExtension : Type . String ( { default : "" } ) ,
70+ /**
71+ * The prefix to add to exported types
72+ */
73+ exportedTypePrefix : Type . String ( { default : "" } ) ,
7074 } ,
7175 { additionalProperties : false } ,
7276) ;
Original file line number Diff line number Diff line change @@ -4,5 +4,5 @@ import { getConfig } from "../../config";
44export function makeComposite ( inputModels : string [ ] ) {
55 return `${
66 getConfig ( ) . typeboxImportVariableName
7- } .Composite([${ inputModels . join ( "," ) } ], ${ generateTypeboxOptions ( ) } )\n`;
7+ } .Composite([${ inputModels . map ( ( i ) => ` ${ getConfig ( ) . exportedTypePrefix } ${ i } ` ) . join ( "," ) } ], ${ generateTypeboxOptions ( ) } )\n`;
88}
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export type ProcessedModel = {
2323function convertModelToStandalone (
2424 input : Pick < ProcessedModel , "name" | "stringRepresentation" > ,
2525) {
26- return `export const ${ input . name } = ${ input . stringRepresentation } \n` ;
26+ return `export const ${ getConfig ( ) . exportedTypePrefix } ${ input . name } = ${ input . stringRepresentation } \n` ;
2727}
2828
2929function typepoxImportStatement ( ) {
You can’t perform that action at this time.
0 commit comments