Skip to content

Commit

Permalink
Merge pull request #1017 from mikavilpas/typo-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mrlubos authored Sep 5, 2024
2 parents 386da70 + 70092e0 commit b6106a6
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions packages/openapi-ts/src/compiler/classes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ({
Expand Down Expand Up @@ -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 = ({
Expand Down
8 changes: 4 additions & 4 deletions packages/openapi-ts/src/compiler/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')];
Expand Down Expand Up @@ -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;
Expand All @@ -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));
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/openapi-ts/src/compiler/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[]) =>
Expand Down
2 changes: 1 addition & 1 deletion packages/openapi-ts/src/generate/class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions packages/openapi-ts/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>;
command: string;
name: string;
Expand All @@ -25,7 +25,7 @@ type OutputProcesser = {
*/
const formatters: Record<
Extract<Config['output']['format'], string>,
OutputProcesser
OutputProcessor
> = {
biome: {
args: (path) => ['format', '--write', path],
Expand All @@ -50,7 +50,7 @@ const formatters: Record<
*/
const linters: Record<
Extract<Config['output']['lint'], string>,
OutputProcesser
OutputProcessor
> = {
biome: {
args: (path) => ['lint', '--apply', path],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Strip (OpenAPI) namespaces fom values.
* Strip (OpenAPI) namespaces from values.
* @param value
*/
export const stripNamespace = (value: string): string =>
Expand Down

0 comments on commit b6106a6

Please sign in to comment.