Skip to content

Commit

Permalink
style: fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
cmd-johnson committed Sep 4, 2024
1 parent ffd4fd4 commit 8dca741
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,10 @@ export function optionsFromParameter(parameter: string | undefined): Options {

// Handle outputSchema=true
if ((options.outputSchema as any) === true) {
options.outputSchema = []
options.outputSchema = [];
}
if (typeof options.outputSchema === "string") {
options.outputSchema = [options.outputSchema]
options.outputSchema = [options.outputSchema];
}

if ((options.useDate as any) === true) {
Expand Down
10 changes: 4 additions & 6 deletions src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ export function generateSchema(ctx: Context, fileDesc: FileDescriptorProto, sour
};
export interface ProtoMetadata {
${
outputFileDescriptor ? code`fileDescriptor: ${fileDescriptorProto};\n` : ""
}references: { [key: string]: any };
${outputFileDescriptor ? code`fileDescriptor: ${fileDescriptorProto};\n` : ""}references: { [key: string]: any };
dependencies?: ProtoMetadata[];
options?: {
options?: { [key: string]: any };
Expand Down Expand Up @@ -187,9 +185,9 @@ export function generateSchema(ctx: Context, fileDesc: FileDescriptorProto, sour

chunks.push(code`
export const ${def("protoMetadata")}${outputAsConst ? "" : ": ProtoMetadata"} = {
${
outputFileDescriptor ? code`fileDescriptor: ${descriptor},\n` : ""
}references: { ${joinCode(references, { on: "," })} },
${outputFileDescriptor ? code`fileDescriptor: ${descriptor},\n` : ""}references: { ${joinCode(references, {
on: ",",
})} },
dependencies: [${joinCode(dependencies, { on: "," })}],
${
fileOptions || messagesOptions.length > 0 || servicesOptions.length > 0 || enumsOptions.length > 0
Expand Down

0 comments on commit 8dca741

Please sign in to comment.