diff --git a/packages/openapi-ts/src/compiler/classes.ts b/packages/openapi-ts/src/compiler/classes.ts index 44cf676aa..d7bda0870 100644 --- a/packages/openapi-ts/src/compiler/classes.ts +++ b/packages/openapi-ts/src/compiler/classes.ts @@ -24,7 +24,7 @@ import { * @param comment - comment to add to function. * @param multiLine - if it should be multi line. * @param parameters - parameters for the constructor. - * @param statements - statements to put in the contructor body. + * @param statements - statements to put in the constructor body. * @returns ts.ConstructorDeclaration */ export const createConstructorDeclaration = ({ @@ -63,7 +63,7 @@ export const createConstructorDeclaration = ({ * @param name - name of the method. * @param parameters - parameters for the method. * @param returnType - the return type of the method. - * @param statements - statements to put in the contructor body. + * @param statements - statements to put in the constructor body. * @returns ts.MethodDeclaration */ export const createMethodDeclaration = ({ diff --git a/packages/openapi-ts/src/compiler/index.ts b/packages/openapi-ts/src/compiler/index.ts index 0c585c8f3..00bd1cb66 100644 --- a/packages/openapi-ts/src/compiler/index.ts +++ b/packages/openapi-ts/src/compiler/index.ts @@ -120,7 +120,7 @@ export class TypeScriptFile { return [name, 'gen', extension].filter(Boolean).join('.'); } - public toString(seperator: string = '\n') { + public toString(separator: string = '\n') { let output: string[] = []; if (this._headers.length) { output = [...output, this._headers.join('\n')]; @@ -148,10 +148,10 @@ export class TypeScriptFile { : utils.tsNodeToString({ node, unescape: true }), ), ]; - return output.join(seperator); + return output.join(separator); } - public write(seperator = '\n') { + public write(separator = '\n') { if (this.isEmpty()) { this.remove({ force: true }); return; @@ -163,7 +163,7 @@ export class TypeScriptFile { dir = parts.slice(0, parts.length - 1).join(path.sep); } ensureDirSync(dir); - writeFileSync(this._path, this.toString(seperator)); + writeFileSync(this._path, this.toString(separator)); } } diff --git a/packages/openapi-ts/src/compiler/types.ts b/packages/openapi-ts/src/compiler/types.ts index f78cbc663..ee23ec730 100644 --- a/packages/openapi-ts/src/compiler/types.ts +++ b/packages/openapi-ts/src/compiler/types.ts @@ -164,7 +164,7 @@ export const toAccessLevelModifiers = ( /** * Convert parameters to the declaration array expected by compiler API. - * @param parameters - the parameters to conver to declarations + * @param parameters - the parameters to convert to declarations * @returns ts.ParameterDeclaration[] */ export const toParameterDeclarations = (parameters: FunctionParameter[]) => diff --git a/packages/openapi-ts/src/generate/class.ts b/packages/openapi-ts/src/generate/class.ts index 5761f4f72..0e04a7ea3 100644 --- a/packages/openapi-ts/src/generate/class.ts +++ b/packages/openapi-ts/src/generate/class.ts @@ -12,7 +12,7 @@ import { ensureDirSync } from './utils'; /** * Generate the OpenAPI client index file using the Handlebar template and write it to disk. * The index file just contains all the exports you need to use the client as a standalone - * library. But yuo can also import individual models and services directly. + * library. But you can also import individual models and services directly. * @param openApi {@link OpenApi} Dereferenced OpenAPI specification * @param outputPath Directory to write the generated files to * @param client Client containing models, schemas, and services diff --git a/packages/openapi-ts/src/index.ts b/packages/openapi-ts/src/index.ts index 6b224e41c..09b671faf 100644 --- a/packages/openapi-ts/src/index.ts +++ b/packages/openapi-ts/src/index.ts @@ -14,7 +14,7 @@ import { registerHandlebarTemplates } from './utils/handlebars'; import { Performance } from './utils/performance'; import { postProcessClient } from './utils/postprocess'; -type OutputProcesser = { +type OutputProcessor = { args: (path: string) => ReadonlyArray; command: string; name: string; @@ -25,7 +25,7 @@ type OutputProcesser = { */ const formatters: Record< Extract, - OutputProcesser + OutputProcessor > = { biome: { args: (path) => ['format', '--write', path], @@ -50,7 +50,7 @@ const formatters: Record< */ const linters: Record< Extract, - OutputProcesser + OutputProcessor > = { biome: { args: (path) => ['lint', '--apply', path], diff --git a/packages/openapi-ts/src/openApi/common/parser/stripNamespace.ts b/packages/openapi-ts/src/openApi/common/parser/stripNamespace.ts index 07ac78cb9..7ae032282 100644 --- a/packages/openapi-ts/src/openApi/common/parser/stripNamespace.ts +++ b/packages/openapi-ts/src/openApi/common/parser/stripNamespace.ts @@ -1,5 +1,5 @@ /** - * Strip (OpenAPI) namespaces fom values. + * Strip (OpenAPI) namespaces from values. * @param value */ export const stripNamespace = (value: string): string =>