fork of hey-api/openapi-ts because I need some additional things
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: update comments for eg

Lubos 2b9c9cd6 ebb5832d

+137 -137
+1 -1
packages/codegen-core/src/files/file.ts
··· 16 16 */ 17 17 private _exports: Array<ExportModule> = []; 18 18 /** 19 - * File extension (e.g. `.ts`). 19 + * File extension (e.g., `.ts`). 20 20 */ 21 21 private _extension?: string; 22 22 /**
+1 -1
packages/codegen-core/src/symbols/symbol.ts
··· 22 22 private _exported: boolean; 23 23 /** 24 24 * External module name if this symbol is imported from a module not managed 25 - * by the project (e.g. "zod", "lodash"). 25 + * by the project (e.g., "zod", "lodash"). 26 26 * 27 27 * @default undefined 28 28 */
+1 -1
packages/codegen-core/src/symbols/types.ts
··· 16 16 exported?: boolean; 17 17 /** 18 18 * External module name if this symbol is imported from a module not managed 19 - * by the project (e.g. "zod", "lodash"). 19 + * by the project (e.g., "zod", "lodash"). 20 20 * 21 21 * @default undefined 22 22 */
+1 -1
packages/custom-client/src/core/types.ts
··· 68 68 requestValidator?: (data: unknown) => Promise<unknown>; 69 69 /** 70 70 * A function transforming response data before it's returned. This is useful 71 - * for post-processing data, e.g. converting ISO strings into Date objects. 71 + * for post-processing data, e.g., converting ISO strings into Date objects. 72 72 */ 73 73 responseTransformer?: (data: unknown) => Promise<unknown>; 74 74 /**
+2 -2
packages/json-schema-ref-parser/src/bundle.ts
··· 213 213 } 214 214 215 215 const newEntry: InventoryEntry = { 216 - $ref, // The JSON Reference (e.g. {$ref: string}) 216 + $ref, // The JSON Reference (e.g., {$ref: string}) 217 217 circular: pointer.circular, // Is this $ref pointer DIRECTLY circular? (i.e. it references itself) 218 218 depth, // How far from the JSON Schema root is this $ref pointer? 219 219 extended, // Does this $ref extend its resolved value? (i.e. it has extra properties, in addition to "$ref") ··· 240 240 // Recursively crawl the resolved value. 241 241 // When the resolution followed a $ref chain to a different file, 242 242 // use the resolved file as the base path so that local $ref values 243 - // (e.g. #/components/schemas/SiblingSchema) inside the resolved 243 + // (e.g., #/components/schemas/SiblingSchema) inside the resolved 244 244 // value resolve against the correct file. 245 245 if (!existingEntry || external) { 246 246 let crawlPath = pointer.path;
+3 -3
packages/json-schema-ref-parser/src/pointer.ts
··· 205 205 /** 206 206 * Parses a JSON pointer (or a path containing a JSON pointer in the hash) 207 207 * and returns an array of the pointer's tokens. 208 - * (e.g. "schema.json#/definitions/person/name" => ["definitions", "person", "name"]) 208 + * (e.g., "schema.json#/definitions/person/name" => ["definitions", "person", "name"]) 209 209 * 210 210 * The pointer is parsed according to RFC 6901 211 211 * {@link https://tools.ietf.org/html/rfc6901#section-3} ··· 244 244 /** 245 245 * Creates a JSON pointer path, by joining one or more tokens to a base path. 246 246 * 247 - * @param base - The base path (e.g. "schema.json#/definitions/person") 248 - * @param tokens - The token(s) to append (e.g. ["name", "first"]) 247 + * @param base - The base path (e.g., "schema.json#/definitions/person") 248 + * @param tokens - The token(s) to append (e.g., ["name", "first"]) 249 249 * @returns 250 250 */ 251 251 static join(base: string, tokens: string | string[]) {
+1 -1
packages/json-schema-ref-parser/src/ref.ts
··· 46 46 $refs: $Refs<S>; 47 47 48 48 /** 49 - * Indicates the type of {@link $Ref#path} (e.g. "file", "http", etc.) 49 + * Indicates the type of {@link $Ref#path} (e.g., "file", "http", etc.) 50 50 */ 51 51 pathType: string | unknown; 52 52
+1 -1
packages/openapi-python/src/plugins/@hey-api/sdk/types.ts
··· 31 31 client?: PluginClientNames | boolean; 32 32 /** 33 33 * Generate code examples for SDK operations and attach them to the 34 - * input source (e.g. via `x-codeSamples`). 34 + * input source (e.g., via `x-codeSamples`). 35 35 * 36 36 * Set to `false` to disable example generation entirely, or provide an 37 37 * object for fine-grained control over the output and post-processing.
+40 -40
packages/openapi-python/src/py-dsl/index.ts
··· 74 74 import { safeKeywordName } from './utils/name'; 75 75 76 76 const pyDsl = { 77 - /** Creates an array literal expression (e.g. `[1, 2, 3]`). */ 77 + /** Creates an array literal expression (e.g., `[1, 2, 3]`). */ 78 78 // array: (...args: ConstructorParameters<typeof ArrayTsDsl>) => new ArrayTsDsl(...args), 79 - /** Creates an `as` type assertion expression (e.g. `value as Type`). */ 79 + /** Creates an `as` type assertion expression (e.g., `value as Type`). */ 80 80 // as: (...args: ConstructorParameters<typeof AsTsDsl>) => new AsTsDsl(...args), 81 81 82 - /** Creates a property access expression (e.g. `obj.foo`). */ 82 + /** Creates a property access expression (e.g., `obj.foo`). */ 83 83 attr: (...args: ConstructorParameters<typeof AttrPyDsl>) => new AttrPyDsl(...args), 84 84 85 - /** Creates an await expression (e.g. `await promise`). */ 85 + /** Creates an await expression (e.g., `await promise`). */ 86 86 // await: (...args: ConstructorParameters<typeof AwaitTsDsl>) => new AwaitTsDsl(...args), 87 87 88 - /** Creates a binary expression (e.g. `a + b`). */ 88 + /** Creates a binary expression (e.g., `a + b`). */ 89 89 binary: (...args: ConstructorParameters<typeof BinaryPyDsl>) => new BinaryPyDsl(...args), 90 90 91 91 /** Creates a statement block. */ ··· 94 94 /** Creates a break statement. */ 95 95 break: (...args: ConstructorParameters<typeof BreakPyDsl>) => new BreakPyDsl(...args), 96 96 97 - /** Creates a function or method call expression (e.g. `fn(arg)`). */ 97 + /** Creates a function or method call expression (e.g., `fn(arg)`). */ 98 98 call: (...args: ConstructorParameters<typeof CallPyDsl>) => new CallPyDsl(...args), 99 99 100 100 /** Creates a class declaration or expression. */ ··· 103 103 /** Creates a continue statement. */ 104 104 continue: (...args: ConstructorParameters<typeof ContinuePyDsl>) => new ContinuePyDsl(...args), 105 105 106 - /** Creates a decorator expression (e.g. `@decorator`). */ 106 + /** Creates a decorator expression (e.g., `@decorator`). */ 107 107 // decorator: (...args: ConstructorParameters<typeof DecoratorTsDsl>) => new DecoratorTsDsl(...args), 108 108 109 - /** Creates a dictionary expression (e.g. `{ 'a': 1 }`). */ 109 + /** Creates a dictionary expression (e.g., `{ 'a': 1 }`). */ 110 110 dict: (...args: ConstructorParameters<typeof DictPyDsl>) => new DictPyDsl(...args), 111 111 112 112 /** Creates a Python docstring (`"""..."""`). */ ··· 121 121 /** Creates a field declaration in a class or object. */ 122 122 // field: (...args: ConstructorParameters<typeof FieldTsDsl>) => new FieldTsDsl(...args), 123 123 124 - /** Creates a for statement (e.g. `for x in items:`). */ 124 + /** Creates a for statement (e.g., `for x in items:`). */ 125 125 for: (...args: ConstructorParameters<typeof ForPyDsl>) => new ForPyDsl(...args), 126 126 127 127 /** Converts a runtime value into a corresponding expression node. */ ··· 139 139 /** Creates a Python comment (`# ...`). */ 140 140 hint: (...args: ConstructorParameters<typeof HintPyDsl>) => new HintPyDsl(...args), 141 141 142 - /** Creates an identifier (e.g. `foo`). */ 142 + /** Creates an identifier (e.g., `foo`). */ 143 143 id: (...args: ConstructorParameters<typeof IdPyDsl>) => new IdPyDsl(...args), 144 144 145 145 /** Creates an if statement. */ ··· 151 151 /** Creates an initialization block or statement. */ 152 152 // init: (...args: ConstructorParameters<typeof InitTsDsl>) => new InitTsDsl(...args), 153 153 154 - /** Creates a keyword argument expression (e.g. `name=value`). */ 154 + /** Creates a keyword argument expression (e.g., `name=value`). */ 155 155 kwarg: (...args: ConstructorParameters<typeof KwargPyDsl>) => new KwargPyDsl(...args), 156 156 157 157 /** Creates a lazy, context-aware node with deferred evaluation. */ 158 158 lazy: <T extends py.Node>(...args: ConstructorParameters<typeof LazyPyDsl<T>>) => 159 159 new LazyPyDsl<T>(...args), 160 160 161 - /** Creates a list expression (e.g. `[1, 2, 3]`). */ 161 + /** Creates a list expression (e.g., `[1, 2, 3]`). */ 162 162 list: (...args: ConstructorParameters<typeof ListPyDsl>) => new ListPyDsl(...args), 163 163 164 - /** Creates a literal value (e.g. string, number, boolean). */ 164 + /** Creates a literal value (e.g., string, number, boolean). */ 165 165 literal: (...args: ConstructorParameters<typeof LiteralPyDsl>) => new LiteralPyDsl(...args), 166 166 167 167 /** Creates an enum member declaration. */ ··· 177 177 /** Creates a negation expression (`-x`). */ 178 178 // neg: (...args: ConstructorParameters<typeof PrefixTsDsl>) => new PrefixTsDsl(...args).neg(), 179 179 180 - /** Creates a new expression (e.g. `new ClassName()`). */ 180 + /** Creates a new expression (e.g., `new ClassName()`). */ 181 181 // new: (...args: ConstructorParameters<typeof NewTsDsl>) => new NewTsDsl(...args), 182 182 183 183 /** Creates a newline (for formatting purposes). */ ··· 195 195 /** Creates a pattern for destructuring or matching. */ 196 196 // pattern: (...args: ConstructorParameters<typeof PatternTsDsl>) => new PatternTsDsl(...args), 197 197 198 - /** Creates a prefix unary expression (e.g. `-x`, `!x`, `~x`). */ 198 + /** Creates a prefix unary expression (e.g., `-x`, `!x`, `~x`). */ 199 199 // prefix: (...args: ConstructorParameters<typeof PrefixTsDsl>) => new PrefixTsDsl(...args), 200 200 201 - /** Creates an object literal property (e.g. `{ foo: bar }`). */ 201 + /** Creates an object literal property (e.g., `{ foo: bar }`). */ 202 202 // prop: (...args: ConstructorParameters<typeof ObjectPropTsDsl>) => new ObjectPropTsDsl(...args), 203 203 204 204 /** Creates a raise statement. */ 205 205 raise: (...args: ConstructorParameters<typeof RaisePyDsl>) => new RaisePyDsl(...args), 206 206 207 - /** Creates a regular expression literal (e.g. `/foo/gi`). */ 207 + /** Creates a regular expression literal (e.g., `/foo/gi`). */ 208 208 // regexp: (...args: ConstructorParameters<typeof RegExpTsDsl>) => new RegExpTsDsl(...args), 209 209 210 210 /** Creates a return statement. */ 211 211 return: (...args: ConstructorParameters<typeof ReturnPyDsl>) => new ReturnPyDsl(...args), 212 212 213 - /** Creates a set expression (e.g. `{1, 2, 3}`). */ 213 + /** Creates a set expression (e.g., `{1, 2, 3}`). */ 214 214 set: (...args: ConstructorParameters<typeof SetPyDsl>) => new SetPyDsl(...args), 215 215 216 216 /** Creates a setter method declaration. */ ··· 219 219 /** Wraps an expression or statement-like value into a `StmtPyDsl`. */ 220 220 stmt: (...args: ConstructorParameters<typeof StmtPyDsl>) => new StmtPyDsl(...args), 221 221 222 - /** Creates a subscript expression (e.g. `obj[index]` or `Type[Param]`). */ 222 + /** Creates a subscript expression (e.g., `obj[index]` or `Type[Param]`). */ 223 223 subscript: (...args: ConstructorParameters<typeof SubscriptPyDsl>) => new SubscriptPyDsl(...args), 224 224 225 225 /** Creates a template literal expression. */ ··· 231 231 // /** Creates a throw statement. */ 232 232 // throw: (...args: ConstructorParameters<typeof ThrowTsDsl>) => new ThrowTsDsl(...args), 233 233 234 - /** Creates a syntax token (e.g. `?`, `readonly`, `+`, `-`). */ 234 + /** Creates a syntax token (e.g., `?`, `readonly`, `+`, `-`). */ 235 235 // token: (...args: ConstructorParameters<typeof TokenTsDsl>) => new TokenTsDsl(...args), 236 236 237 237 /** Creates a try/except/finally statement. */ 238 238 try: (...args: ConstructorParameters<typeof TryPyDsl>) => new TryPyDsl(...args), 239 239 240 - /** Creates a tuple expression (e.g. `(1, 2, 3)`). */ 240 + /** Creates a tuple expression (e.g., `(1, 2, 3)`). */ 241 241 tuple: (...args: ConstructorParameters<typeof TuplePyDsl>) => new TuplePyDsl(...args), 242 242 243 - /** Creates a basic type reference or type expression (e.g. Foo or Foo<T>). */ 243 + /** Creates a basic type reference or type expression (e.g., Foo or Foo<T>). */ 244 244 // type: Object.assign( 245 245 // (...args: ConstructorParameters<typeof TypeExprTsDsl>) => new TypeExprTsDsl(...args), 246 246 // { 247 - /** Creates a type alias declaration (e.g. `type Foo = Bar`). */ 247 + /** Creates a type alias declaration (e.g., `type Foo = Bar`). */ 248 248 // alias: (...args: ConstructorParameters<typeof TypeAliasTsDsl>) => new TypeAliasTsDsl(...args), 249 - /** Creates an intersection type (e.g. `A & B`). */ 249 + /** Creates an intersection type (e.g., `A & B`). */ 250 250 // and: (...args: ConstructorParameters<typeof TypeAndTsDsl>) => new TypeAndTsDsl(...args), 251 - /** Creates a qualified type reference (e.g. Foo.Bar). */ 251 + /** Creates a qualified type reference (e.g., Foo.Bar). */ 252 252 // attr: (...args: ConstructorParameters<typeof TypeAttrTsDsl>) => new TypeAttrTsDsl(...args), 253 - /** Creates a basic type reference or type expression (e.g. Foo or Foo<T>). */ 253 + /** Creates a basic type reference or type expression (e.g., Foo or Foo<T>). */ 254 254 // expr: (...args: ConstructorParameters<typeof TypeExprTsDsl>) => new TypeExprTsDsl(...args), 255 255 /** Converts a runtime value into a corresponding type expression node. */ 256 256 // fromValue: (...args: Parameters<typeof typeValue>) => typeValue(...args), 257 - /** Creates a function type node (e.g. `(a: string) => number`). */ 257 + /** Creates a function type node (e.g., `(a: string) => number`). */ 258 258 // func: (...args: ConstructorParameters<typeof TypeFuncTsDsl>) => new TypeFuncTsDsl(...args), 259 - /** Creates an indexed-access type (e.g. `Foo<T>[K]`). */ 259 + /** Creates an indexed-access type (e.g., `Foo<T>[K]`). */ 260 260 // idx: (...args: ConstructorParameters<typeof TypeIdxTsDsl>) => new TypeIdxTsDsl(...args), 261 - /** Creates a literal type node (e.g. 'foo', 42, or true). */ 261 + /** Creates a literal type node (e.g., 'foo', 42, or true). */ 262 262 // literal: (...args: ConstructorParameters<typeof TypeLiteralTsDsl>) => 263 263 // new TypeLiteralTsDsl(...args), 264 - /** Creates a mapped type (e.g. `{ [K in keyof T]: U }`). */ 264 + /** Creates a mapped type (e.g., `{ [K in keyof T]: U }`). */ 265 265 // mapped: (...args: ConstructorParameters<typeof TypeMappedTsDsl>) => 266 266 // new TypeMappedTsDsl(...args), 267 - /** Creates a type literal node (e.g. { foo: string }). */ 267 + /** Creates a type literal node (e.g., { foo: string }). */ 268 268 // object: (...args: ConstructorParameters<typeof TypeObjectTsDsl>) => 269 269 // new TypeObjectTsDsl(...args), 270 - /** Creates a type operator node (e.g. `readonly T`, `keyof T`, `unique T`). */ 270 + /** Creates a type operator node (e.g., `readonly T`, `keyof T`, `unique T`). */ 271 271 // operator: (...args: ConstructorParameters<typeof TypeOperatorTsDsl>) => 272 272 // new TypeOperatorTsDsl(...args), 273 - /** Represents a union type (e.g. `A | B | C`). */ 273 + /** Represents a union type (e.g., `A | B | C`). */ 274 274 // or: (...args: ConstructorParameters<typeof TypeOrTsDsl>) => new TypeOrTsDsl(...args), 275 - /** Creates a type parameter (e.g. `<T>`). */ 275 + /** Creates a type parameter (e.g., `<T>`). */ 276 276 // param: (...args: ConstructorParameters<typeof TypeParamTsDsl>) => new TypeParamTsDsl(...args), 277 - /** Creates a type query node (e.g. `typeof Foo`). */ 277 + /** Creates a type query node (e.g., `typeof Foo`). */ 278 278 // query: (...args: ConstructorParameters<typeof TypeQueryTsDsl>) => new TypeQueryTsDsl(...args), 279 - /** Builds a TypeScript template literal *type* (e.g. `${Foo}-${Bar}` as a type). */ 279 + /** Builds a TypeScript template literal *type* (e.g., `${Foo}-${Bar}` as a type). */ 280 280 // template: (...args: ConstructorParameters<typeof TypeTemplateTsDsl>) => 281 281 // new TypeTemplateTsDsl(...args), 282 - /** Creates a tuple type (e.g. [A, B, C]). */ 282 + /** Creates a tuple type (e.g., [A, B, C]). */ 283 283 // tuple: (...args: ConstructorParameters<typeof TypeTupleTsDsl>) => new TypeTupleTsDsl(...args), 284 284 // }, 285 285 // ), 286 - /** Creates a `typeof` expression (e.g. `typeof value`). */ 286 + /** Creates a `typeof` expression (e.g., `typeof value`). */ 287 287 // typeofExpr: (...args: ConstructorParameters<typeof TypeOfExprTsDsl>) => 288 288 // new TypeOfExprTsDsl(...args), 289 289 290 290 /** Creates a variable assignment. */ 291 291 var: (...args: ConstructorParameters<typeof VarPyDsl>) => new VarPyDsl(...args), 292 292 293 - /** Creates a while statement (e.g. `while x:`). */ 293 + /** Creates a while statement (e.g., `while x:`). */ 294 294 while: (...args: ConstructorParameters<typeof WhilePyDsl>) => new WhilePyDsl(...args), 295 295 296 - /** Creates a with statement (e.g. `with open(f) as file:`). */ 296 + /** Creates a with statement (e.g., `with open(f) as file:`). */ 297 297 with: (...args: ConstructorParameters<typeof WithPyDsl>) => new WithPyDsl(...args), 298 298 }; 299 299
+3 -3
packages/openapi-python/src/py-dsl/mixins/expr.ts
··· 5 5 import type { BaseCtor, DropFirst, MixinCtor } from './types'; 6 6 7 7 export interface ExprMethods extends Node { 8 - /** Accesses a property on the current expression (e.g. `this.foo`). */ 8 + /** Accesses a property on the current expression (e.g., `this.foo`). */ 9 9 attr(...args: DropFirst<Parameters<typeof f.attr>>): ReturnType<typeof f.attr>; 10 - /** Calls the current expression (e.g. `fn(arg1, arg2)`). */ 10 + /** Calls the current expression (e.g., `fn(arg1, arg2)`). */ 11 11 call(...args: DropFirst<Parameters<typeof f.call>>): ReturnType<typeof f.call>; 12 12 /** Produces a `return` statement returning the current expression. */ 13 13 return(): ReturnType<typeof f.return>; 14 - /** Produces a subscript/slice expression (e.g. `expr[args]`). */ 14 + /** Produces a subscript/slice expression (e.g., `expr[args]`). */ 15 15 slice(...args: DropFirst<Parameters<typeof f.slice>>): ReturnType<typeof f.slice>; 16 16 } 17 17
+1 -1
packages/openapi-python/src/py-dsl/mixins/value.ts
··· 9 9 10 10 export interface ValueMethods extends Node { 11 11 $value(): py.Expression | undefined; 12 - /** Sets the initializer expression (e.g. `= expr`). */ 12 + /** Sets the initializer expression (e.g., `= expr`). */ 13 13 assign(expr: ValueExpr): this; 14 14 } 15 15
+1 -1
packages/openapi-python/src/py-dsl/stmt/raise.ts
··· 24 24 // ctx.analyze(this.msg); 25 25 } 26 26 27 - // /** Sets the message argument for the exception (e.g. `raise ValueError('msg')`). */ 27 + // /** Sets the message argument for the exception (e.g., `raise ValueError('msg')`). */ 28 28 // message(value: string | MaybePyDsl<py.Expression>): this { 29 29 // this.msg = value; 30 30 // return this;
+2 -2
packages/openapi-python/src/py-dsl/utils/factories.ts
··· 27 27 } 28 28 29 29 export const f = { 30 - /** Factory for creating property access expressions (e.g. `obj.foo`). */ 30 + /** Factory for creating property access expressions (e.g., `obj.foo`). */ 31 31 attr: createFactory<AttrCtor>('attr'), 32 32 33 - /** Factory for creating function or method call expressions (e.g. `fn(arg)`). */ 33 + /** Factory for creating function or method call expressions (e.g., `fn(arg)`). */ 34 34 call: createFactory<CallCtor>('call'), 35 35 36 36 /** Factory for creating return statements. */
+2 -2
packages/openapi-python/src/py-dsl/utils/render-utils.ts
··· 20 20 export type SortKey = [SortGroup, SortDistance, SortModule]; 21 21 22 22 export type ModuleExport = Omit<ExportModule, 'from'> & { 23 - /** Module specifier for re-exports, e.g. `./foo`. */ 23 + /** Module specifier for re-exports, e.g., `./foo`. */ 24 24 modulePath: string; 25 25 }; 26 26 27 27 export type ModuleImport = Omit<ImportModule, 'from'> & { 28 - /** Module specifier for imports, e.g. `./foo`. */ 28 + /** Module specifier for imports, e.g., `./foo`. */ 29 29 modulePath: string; 30 30 }; 31 31
+1 -1
packages/openapi-ts-tests/main/test/custom/client/core/types.ts
··· 62 62 querySerializer?: QuerySerializer | QuerySerializerOptions; 63 63 /** 64 64 * A function transforming response data before it's returned. This is useful 65 - * for post-processing data, e.g. converting ISO strings into Date objects. 65 + * for post-processing data, e.g., converting ISO strings into Date objects. 66 66 */ 67 67 responseTransformer?: (data: unknown) => Promise<unknown>; 68 68 /**
+1 -1
packages/openapi-ts/src/plugins/@hey-api/client-core/bundle/types.ts
··· 78 78 requestValidator?: (data: unknown) => Promise<unknown>; 79 79 /** 80 80 * A function transforming response data before it's returned. This is useful 81 - * for post-processing data, e.g. converting ISO strings into Date objects. 81 + * for post-processing data, e.g., converting ISO strings into Date objects. 82 82 */ 83 83 responseTransformer?: (data: unknown) => Promise<unknown>; 84 84 /**
+1 -1
packages/openapi-ts/src/plugins/@hey-api/schemas/types.ts
··· 11 11 Plugin.UserExports & { 12 12 /** 13 13 * Customise the schema name. By default, `{{name}}Schema` is used. `name` is a 14 - * valid JavaScript/TypeScript identifier, e.g. if your schema name is 14 + * valid JavaScript/TypeScript identifier, e.g., if your schema name is 15 15 * "Foo-Bar", `name` value would be "FooBar". 16 16 * 17 17 * @default '{{name}}Schema'
+2 -2
packages/openapi-ts/src/plugins/@hey-api/sdk/shared/signature.ts
··· 33 33 34 34 /** 35 35 * Collects and resolves all operation parameters for flattened SDK signatures. 36 - * - Prefixes all conflicting names with their location (e.g. path_foo, query_foo) 36 + * - Prefixes all conflicting names with their location (e.g., path_foo, query_foo) 37 37 * - Returns a flat map of resolved parameter names to their metadata 38 38 */ 39 39 export function getSignatureParameters({ ··· 75 75 addParameter(key, 'body'); 76 76 } 77 77 } else if (operation.body.schema.$ref) { 78 - // alias body for more ergonomic naming, e.g. user if the type is User 78 + // alias body for more ergonomic naming, e.g., user if the type is User 79 79 const name = refToName(operation.body.schema.$ref); 80 80 const key = toCase(name, 'camelCase'); 81 81 addParameter(key, 'body');
+1 -1
packages/openapi-ts/src/plugins/@hey-api/sdk/types.ts
··· 30 30 client?: PluginClientNames | boolean; 31 31 /** 32 32 * Generate code examples for SDK operations and attach them to the 33 - * input source (e.g. via `x-codeSamples`). 33 + * input source (e.g., via `x-codeSamples`). 34 34 * 35 35 * Set to `false` to disable example generation entirely, or provide an 36 36 * object for fine-grained control over the output and post-processing.
+1 -1
packages/openapi-ts/src/plugins/@hey-api/transformers/plugin.ts
··· 336 336 }); 337 337 if (!nodes.length) return; 338 338 339 - // For nullable union responses (e.g. anyOf: [SomeSchema, null]), wrap the 339 + // For nullable union responses (e.g., anyOf: [SomeSchema, null]), wrap the 340 340 // transformation in a null guard so that null data is returned as-is. 341 341 // We require nodes.length >= 2 because we need at least one transformation 342 342 // statement AND a return statement (empty .do() would fail validation).
+4 -4
packages/openapi-ts/src/ts-dsl/decl/pattern.ts
··· 9 9 const Mixed = TsDsl<ts.BindingName>; 10 10 11 11 /** 12 - * Builds binding patterns (e.g. `{ foo, bar }`, `[a, b, ...rest]`). 12 + * Builds binding patterns (e.g., `{ foo, bar }`, `[a, b, ...rest]`). 13 13 */ 14 14 export class PatternTsDsl extends Mixed { 15 15 readonly '~dsl' = 'PatternTsDsl'; ··· 28 28 return this.missingRequiredCalls().length === 0; 29 29 } 30 30 31 - /** Defines an array pattern (e.g. `[a, b, c]`). */ 31 + /** Defines an array pattern (e.g., `[a, b, c]`). */ 32 32 array(...props: ReadonlyArray<string> | [ReadonlyArray<string>]): this { 33 33 const values = props[0] instanceof Array ? [...props[0]] : (props as ReadonlyArray<string>); 34 34 this.pattern = { kind: 'array', values }; 35 35 return this; 36 36 } 37 37 38 - /** Defines an object pattern (e.g. `{ a, b: alias }`). */ 38 + /** Defines an object pattern (e.g., `{ a, b: alias }`). */ 39 39 object(...props: ReadonlyArray<MaybeArray<string> | Record<string, string>>): this { 40 40 const entries: Record<string, string> = {}; 41 41 for (const p of props) { ··· 47 47 return this; 48 48 } 49 49 50 - /** Adds a spread element (e.g. `...rest`, `...options`, `...args`). */ 50 + /** Adds a spread element (e.g., `...rest`, `...options`, `...args`). */ 51 51 spread(name: string): this { 52 52 this._spread = name; 53 53 return this;
+1 -1
packages/openapi-ts/src/ts-dsl/expr/binary.ts
··· 60 60 return this.opAndExpr('&&', expr); 61 61 } 62 62 63 - /** Creates an assignment expression (e.g. `this = expr`). */ 63 + /** Creates an assignment expression (e.g., `this = expr`). */ 64 64 assign(expr: Expr): this { 65 65 return this.opAndExpr('=', expr); 66 66 }
+4 -4
packages/openapi-ts/src/ts-dsl/expr/object.ts
··· 42 42 return `${prop.kind}:${prop.propName}`; 43 43 } 44 44 45 - /** Adds a computed property (e.g. `{ [expr]: value }`), or removes if null. */ 45 + /** Adds a computed property (e.g., `{ [expr]: value }`), or removes if null. */ 46 46 computed(name: string, expr: ExprFn | null): this { 47 47 if (expr === null) { 48 48 this._props.delete(`computed:${name}`); ··· 55 55 return this; 56 56 } 57 57 58 - /** Adds a getter property (e.g. `{ get foo() { ... } }`), or removes if null. */ 58 + /** Adds a getter property (e.g., `{ get foo() { ... } }`), or removes if null. */ 59 59 getter(name: string, stmt: StmtFn | null): this { 60 60 if (stmt === null) { 61 61 this._props.delete(`getter:${name}`); ··· 93 93 return this; 94 94 } 95 95 96 - /** Adds a setter property (e.g. `{ set foo(v) { ... } }`), or removes if null. */ 96 + /** Adds a setter property (e.g., `{ set foo(v) { ... } }`), or removes if null. */ 97 97 setter(name: string, stmt: StmtFn | null): this { 98 98 if (stmt === null) { 99 99 this._props.delete(`setter:${name}`); ··· 103 103 return this; 104 104 } 105 105 106 - /** Adds a spread property (e.g. `{ ...options }`). */ 106 + /** Adds a spread property (e.g., `{ ...options }`). */ 107 107 spread(expr: ExprFn): this { 108 108 const key = `spread:${this._spreadCounter++}`; 109 109 this._props.set(key, new ObjectPropTsDsl({ kind: 'spread' }).value(expr));
+1 -1
packages/openapi-ts/src/ts-dsl/expr/prefix.ts
··· 49 49 return this; 50 50 } 51 51 52 - /** Sets the operator (e.g. `ts.SyntaxKind.ExclamationToken` for `!`). */ 52 + /** Sets the operator (e.g., `ts.SyntaxKind.ExclamationToken` for `!`). */ 53 53 op(op: PrefixOp): this { 54 54 this._op = op; 55 55 return this;
+31 -31
packages/openapi-ts/src/ts-dsl/index.ts
··· 64 64 import { LazyTsDsl } from './utils/lazy'; 65 65 66 66 const tsDsl = { 67 - /** Creates an array literal expression (e.g. `[1, 2, 3]`). */ 67 + /** Creates an array literal expression (e.g., `[1, 2, 3]`). */ 68 68 array: (...args: ConstructorParameters<typeof ArrayTsDsl>) => new ArrayTsDsl(...args), 69 69 70 - /** Creates an `as` type assertion expression (e.g. `value as Type`). */ 70 + /** Creates an `as` type assertion expression (e.g., `value as Type`). */ 71 71 as: (...args: ConstructorParameters<typeof AsTsDsl>) => new AsTsDsl(...args), 72 72 73 - /** Creates a property access expression (e.g. `obj.foo`). */ 73 + /** Creates a property access expression (e.g., `obj.foo`). */ 74 74 attr: (...args: ConstructorParameters<typeof AttrTsDsl>) => new AttrTsDsl(...args), 75 75 76 - /** Creates an await expression (e.g. `await promise`). */ 76 + /** Creates an await expression (e.g., `await promise`). */ 77 77 await: (...args: ConstructorParameters<typeof AwaitTsDsl>) => new AwaitTsDsl(...args), 78 78 79 - /** Creates a binary expression (e.g. `a + b`). */ 79 + /** Creates a binary expression (e.g., `a + b`). */ 80 80 binary: (...args: ConstructorParameters<typeof BinaryTsDsl>) => new BinaryTsDsl(...args), 81 81 82 82 /** Creates a statement block (`{ ... }`). */ 83 83 block: (...args: ConstructorParameters<typeof BlockTsDsl>) => new BlockTsDsl(...args), 84 84 85 - /** Creates a function or method call expression (e.g. `fn(arg)`). */ 85 + /** Creates a function or method call expression (e.g., `fn(arg)`). */ 86 86 call: (...args: ConstructorParameters<typeof CallTsDsl>) => new CallTsDsl(...args), 87 87 88 88 /** Creates a class declaration or expression. */ ··· 94 94 /** Creates a postfix decrement expression (`i--`). */ 95 95 dec: (...args: ConstructorParameters<typeof PostfixTsDsl>) => new PostfixTsDsl(...args).dec(), 96 96 97 - /** Creates a decorator expression (e.g. `@decorator`). */ 97 + /** Creates a decorator expression (e.g., `@decorator`). */ 98 98 decorator: (...args: ConstructorParameters<typeof DecoratorTsDsl>) => new DecoratorTsDsl(...args), 99 99 100 100 /** Creates a JSDoc documentation block. */ ··· 146 146 /** Creates a single-line comment (//). */ 147 147 hint: (...args: ConstructorParameters<typeof HintTsDsl>) => new HintTsDsl(...args), 148 148 149 - /** Creates an identifier (e.g. `foo`). */ 149 + /** Creates an identifier (e.g., `foo`). */ 150 150 id: (...args: ConstructorParameters<typeof IdTsDsl>) => new IdTsDsl(...args), 151 151 152 152 /** Creates an if statement. */ ··· 165 165 /** Creates a let variable declaration (`let`). */ 166 166 let: (...args: ConstructorParameters<typeof VarTsDsl>) => new VarTsDsl(...args).let(), 167 167 168 - /** Creates a literal value (e.g. string, number, boolean). */ 168 + /** Creates a literal value (e.g., string, number, boolean). */ 169 169 literal: (...args: ConstructorParameters<typeof LiteralTsDsl>) => new LiteralTsDsl(...args), 170 170 171 171 /** Creates an enum member declaration. */ ··· 177 177 /** Creates a negation expression (`-x`). */ 178 178 neg: (...args: ConstructorParameters<typeof PrefixTsDsl>) => new PrefixTsDsl(...args).neg(), 179 179 180 - /** Creates a new expression (e.g. `new ClassName()`). */ 180 + /** Creates a new expression (e.g., `new ClassName()`). */ 181 181 new: (...args: ConstructorParameters<typeof NewTsDsl>) => new NewTsDsl(...args), 182 182 183 183 /** Creates a newline (for formatting purposes). */ ··· 198 198 /** Creates a pattern for destructuring or matching. */ 199 199 pattern: (...args: ConstructorParameters<typeof PatternTsDsl>) => new PatternTsDsl(...args), 200 200 201 - /** Creates a prefix unary expression (e.g. `-x`, `!x`, `~x`). */ 201 + /** Creates a prefix unary expression (e.g., `-x`, `!x`, `~x`). */ 202 202 prefix: (...args: ConstructorParameters<typeof PrefixTsDsl>) => new PrefixTsDsl(...args), 203 203 204 - /** Creates an object literal property (e.g. `{ foo: bar }`). */ 204 + /** Creates an object literal property (e.g., `{ foo: bar }`). */ 205 205 prop: (...args: ConstructorParameters<typeof ObjectPropTsDsl>) => new ObjectPropTsDsl(...args), 206 206 207 - /** Creates a regular expression literal (e.g. `/foo/gi`). */ 207 + /** Creates a regular expression literal (e.g., `/foo/gi`). */ 208 208 regexp: (...args: ConstructorParameters<typeof RegExpTsDsl>) => new RegExpTsDsl(...args), 209 209 210 210 /** Creates a return statement. */ ··· 225 225 /** Creates a throw statement. */ 226 226 throw: (...args: ConstructorParameters<typeof ThrowTsDsl>) => new ThrowTsDsl(...args), 227 227 228 - /** Creates a syntax token (e.g. `?`, `readonly`, `+`, `-`). */ 228 + /** Creates a syntax token (e.g., `?`, `readonly`, `+`, `-`). */ 229 229 token: (...args: ConstructorParameters<typeof TokenTsDsl>) => new TokenTsDsl(...args), 230 230 231 231 /** Creates a try/catch/finally statement. */ 232 232 try: (...args: ConstructorParameters<typeof TryTsDsl>) => new TryTsDsl(...args), 233 233 234 - /** Creates a basic type reference or type expression (e.g. Foo or Foo<T>). */ 234 + /** Creates a basic type reference or type expression (e.g., Foo or Foo<T>). */ 235 235 type: Object.assign( 236 236 (...args: ConstructorParameters<typeof TypeExprTsDsl>) => new TypeExprTsDsl(...args), 237 237 { 238 - /** Creates a type alias declaration (e.g. `type Foo = Bar`). */ 238 + /** Creates a type alias declaration (e.g., `type Foo = Bar`). */ 239 239 alias: (...args: ConstructorParameters<typeof TypeAliasTsDsl>) => new TypeAliasTsDsl(...args), 240 240 241 - /** Creates an intersection type (e.g. `A & B`). */ 241 + /** Creates an intersection type (e.g., `A & B`). */ 242 242 and: (...args: ConstructorParameters<typeof TypeAndTsDsl>) => new TypeAndTsDsl(...args), 243 243 244 - /** Creates a qualified type reference (e.g. Foo.Bar). */ 244 + /** Creates a qualified type reference (e.g., Foo.Bar). */ 245 245 attr: (...args: ConstructorParameters<typeof TypeAttrTsDsl>) => new TypeAttrTsDsl(...args), 246 246 247 - /** Creates a basic type reference or type expression (e.g. Foo or Foo<T>). */ 247 + /** Creates a basic type reference or type expression (e.g., Foo or Foo<T>). */ 248 248 expr: (...args: ConstructorParameters<typeof TypeExprTsDsl>) => new TypeExprTsDsl(...args), 249 249 250 250 /** Converts a runtime value into a corresponding type expression node. */ 251 251 fromValue: (...args: Parameters<typeof typeValue>) => typeValue(...args), 252 252 253 - /** Creates a function type node (e.g. `(a: string) => number`). */ 253 + /** Creates a function type node (e.g., `(a: string) => number`). */ 254 254 func: (...args: ConstructorParameters<typeof TypeFuncTsDsl>) => new TypeFuncTsDsl(...args), 255 255 256 - /** Creates an indexed-access type (e.g. `Foo<T>[K]`). */ 256 + /** Creates an indexed-access type (e.g., `Foo<T>[K]`). */ 257 257 idx: (...args: ConstructorParameters<typeof TypeIdxTsDsl>) => new TypeIdxTsDsl(...args), 258 258 259 - /** Creates a literal type node (e.g. 'foo', 42, or true). */ 259 + /** Creates a literal type node (e.g., 'foo', 42, or true). */ 260 260 literal: (...args: ConstructorParameters<typeof TypeLiteralTsDsl>) => 261 261 new TypeLiteralTsDsl(...args), 262 262 263 - /** Creates a mapped type (e.g. `{ [K in keyof T]: U }`). */ 263 + /** Creates a mapped type (e.g., `{ [K in keyof T]: U }`). */ 264 264 mapped: (...args: ConstructorParameters<typeof TypeMappedTsDsl>) => 265 265 new TypeMappedTsDsl(...args), 266 266 267 - /** Creates a type literal node (e.g. { foo: string }). */ 267 + /** Creates a type literal node (e.g., { foo: string }). */ 268 268 object: (...args: ConstructorParameters<typeof TypeObjectTsDsl>) => 269 269 new TypeObjectTsDsl(...args), 270 270 271 - /** Creates a type operator node (e.g. `readonly T`, `keyof T`, `unique T`). */ 271 + /** Creates a type operator node (e.g., `readonly T`, `keyof T`, `unique T`). */ 272 272 operator: (...args: ConstructorParameters<typeof TypeOperatorTsDsl>) => 273 273 new TypeOperatorTsDsl(...args), 274 274 275 - /** Represents a union type (e.g. `A | B | C`). */ 275 + /** Represents a union type (e.g., `A | B | C`). */ 276 276 or: (...args: ConstructorParameters<typeof TypeOrTsDsl>) => new TypeOrTsDsl(...args), 277 277 278 - /** Creates a type parameter (e.g. `<T>`). */ 278 + /** Creates a type parameter (e.g., `<T>`). */ 279 279 param: (...args: ConstructorParameters<typeof TypeParamTsDsl>) => new TypeParamTsDsl(...args), 280 280 281 - /** Creates a type query node (e.g. `typeof Foo`). */ 281 + /** Creates a type query node (e.g., `typeof Foo`). */ 282 282 query: (...args: ConstructorParameters<typeof TypeQueryTsDsl>) => new TypeQueryTsDsl(...args), 283 283 284 - /** Builds a TypeScript template literal *type* (e.g. `${Foo}-${Bar}` as a type). */ 284 + /** Builds a TypeScript template literal *type* (e.g., `${Foo}-${Bar}` as a type). */ 285 285 template: (...args: ConstructorParameters<typeof TypeTemplateTsDsl>) => 286 286 new TypeTemplateTsDsl(...args), 287 287 288 - /** Creates a tuple type (e.g. [A, B, C]). */ 288 + /** Creates a tuple type (e.g., [A, B, C]). */ 289 289 tuple: (...args: ConstructorParameters<typeof TypeTupleTsDsl>) => new TypeTupleTsDsl(...args), 290 290 }, 291 291 ), 292 292 293 - /** Creates a `typeof` expression (e.g. `typeof value`). */ 293 + /** Creates a `typeof` expression (e.g., `typeof value`). */ 294 294 typeofExpr: (...args: ConstructorParameters<typeof TypeOfExprTsDsl>) => 295 295 new TypeOfExprTsDsl(...args), 296 296
+1 -1
packages/openapi-ts/src/ts-dsl/mixins/as.ts
··· 5 5 import type { BaseCtor, DropFirst, MixinCtor } from './types'; 6 6 7 7 export interface AsMethods extends Node { 8 - /** Creates an `as` type assertion expression (e.g. `value as Type`). */ 8 + /** Creates an `as` type assertion expression (e.g., `value as Type`). */ 9 9 as(...args: DropFirst<Parameters<typeof f.as>>): ReturnType<typeof f.as>; 10 10 } 11 11
+1 -1
packages/openapi-ts/src/ts-dsl/mixins/decorator.ts
··· 8 8 export interface DecoratorMethods extends Node { 9 9 /** Renders the decorators into an array of `ts.Decorator`s. */ 10 10 $decorators(): ReadonlyArray<ts.Decorator>; 11 - /** Adds a decorator (e.g. `@sealed({ in: 'root' })`). */ 11 + /** Adds a decorator (e.g., `@sealed({ in: 'root' })`). */ 12 12 decorator( 13 13 name: NodeName | MaybeTsDsl<ts.Expression>, 14 14 ...args: ReadonlyArray<string | MaybeTsDsl<ts.Expression>>
+3 -3
packages/openapi-ts/src/ts-dsl/mixins/expr.ts
··· 5 5 import type { BaseCtor, DropFirst, MixinCtor } from './types'; 6 6 7 7 export interface ExprMethods extends Node { 8 - /** Accesses a property on the current expression (e.g. `this.foo`). */ 8 + /** Accesses a property on the current expression (e.g., `this.foo`). */ 9 9 attr(...args: DropFirst<Parameters<typeof f.attr>>): ReturnType<typeof f.attr>; 10 - /** Awaits the current expression (e.g. `await expr`). */ 10 + /** Awaits the current expression (e.g., `await expr`). */ 11 11 await(): ReturnType<typeof f.await>; 12 - /** Calls the current expression (e.g. `fn(arg1, arg2)`). */ 12 + /** Calls the current expression (e.g., `fn(arg1, arg2)`). */ 13 13 call(...args: DropFirst<Parameters<typeof f.call>>): ReturnType<typeof f.call>; 14 14 /** Produces a `return` statement returning the current expression. */ 15 15 return(): ReturnType<typeof f.return>;
+1 -1
packages/openapi-ts/src/ts-dsl/mixins/operator.ts
··· 10 10 export interface OperatorMethods extends Node { 11 11 /** Logical AND — `this && expr` */ 12 12 and(expr: Expr): BinaryTsDsl; 13 - /** Creates an assignment expression (e.g. `this = expr`). */ 13 + /** Creates an assignment expression (e.g., `this = expr`). */ 14 14 assign(expr: Expr): BinaryTsDsl; 15 15 /** Nullish coalescing — `this ?? expr` */ 16 16 coalesce(expr: Expr): BinaryTsDsl;
+2 -2
packages/openapi-ts/src/ts-dsl/mixins/pattern.ts
··· 12 12 array(...props: ReadonlyArray<string> | [ReadonlyArray<string>]): this; 13 13 /** Defines an object binding pattern. */ 14 14 object(...props: ReadonlyArray<MaybeArray<string> | Record<string, string>>): this; 15 - /** Adds a spread element (e.g. `...args`, `...options`) to the pattern. */ 15 + /** Adds a spread element (e.g., `...args`, `...options`) to the pattern. */ 16 16 spread(name: string): this; 17 17 } 18 18 ··· 38 38 return this; 39 39 } 40 40 41 - /** Adds a spread element (e.g. `...args`, `...options`) to the pattern. */ 41 + /** Adds a spread element (e.g., `...args`, `...options`) to the pattern. */ 42 42 protected spread(name: string): this { 43 43 (this.pattern ??= new PatternTsDsl()).spread(name); 44 44 return this;
+2 -2
packages/openapi-ts/src/ts-dsl/mixins/type-args.ts
··· 10 10 export interface TypeArgsMethods extends Node { 11 11 /** Returns the type arguments as an array of ts.TypeNode nodes. */ 12 12 $generics(): ReadonlyArray<ts.TypeNode> | undefined; 13 - /** Adds a single type argument (e.g. `string` in `Foo<string>`). */ 13 + /** Adds a single type argument (e.g., `string` in `Foo<string>`). */ 14 14 generic(arg: Arg): this; 15 - /** Adds type arguments (e.g. `Map<string, number>`). */ 15 + /** Adds type arguments (e.g., `Map<string, number>`). */ 16 16 generics(...args: ReadonlyArray<Arg>): this; 17 17 } 18 18
+1 -1
packages/openapi-ts/src/ts-dsl/mixins/type-expr.ts
··· 6 6 import type { BaseCtor, DropFirst, MixinCtor } from './types'; 7 7 8 8 export interface TypeExprMethods extends Node { 9 - /** Creates an indexed-access type (e.g. `Foo<T>[K]`). */ 9 + /** Creates an indexed-access type (e.g., `Foo<T>[K]`). */ 10 10 idx( 11 11 this: Parameters<typeof f.type.idx>[0], 12 12 ...args: DropFirst<Parameters<typeof f.type.idx>>
+2 -2
packages/openapi-ts/src/ts-dsl/mixins/type-params.ts
··· 9 9 export interface TypeParamsMethods extends Node { 10 10 /** Returns the type parameters as an array of ts.TypeParameterDeclaration nodes. */ 11 11 $generics(): ReadonlyArray<ts.TypeParameterDeclaration> | undefined; 12 - /** Adds a single type parameter (e.g. `T` in `Array<T>`). */ 12 + /** Adds a single type parameter (e.g., `T` in `Array<T>`). */ 13 13 generic(...args: ConstructorParameters<typeof TypeParamTsDsl>): this; 14 - /** Adds type parameters (e.g. `Map<string, T>`). */ 14 + /** Adds type parameters (e.g., `Map<string, T>`). */ 15 15 generics(...args: ReadonlyArray<NodeName | MaybeTsDsl<TypeParamTsDsl>>): this; 16 16 } 17 17
+1 -1
packages/openapi-ts/src/ts-dsl/mixins/value.ts
··· 8 8 9 9 export interface ValueMethods extends Node { 10 10 $value(): ts.Expression | undefined; 11 - /** Sets the initializer expression (e.g. `= expr`). */ 11 + /** Sets the initializer expression (e.g., `= expr`). */ 12 12 assign(expr: ValueExpr): this; 13 13 } 14 14
+1 -1
packages/openapi-ts/src/ts-dsl/type/expr.ts
··· 44 44 return this.missingRequiredCalls().length === 0; 45 45 } 46 46 47 - /** Accesses a nested type (e.g. `Foo.Bar`). */ 47 + /** Accesses a nested type (e.g., `Foo.Bar`). */ 48 48 attr(right: string | ts.Identifier | TypeAttrTsDsl): this { 49 49 this._exprInput = isNode(right) 50 50 ? ref(right.base(this._exprInput))
+10 -10
packages/openapi-ts/src/ts-dsl/utils/factories.ts
··· 34 34 } 35 35 36 36 export const f = { 37 - /** Factory for creating `as` type assertion expressions (e.g. `value as Type`). */ 37 + /** Factory for creating `as` type assertion expressions (e.g., `value as Type`). */ 38 38 as: createFactory<AsCtor>('as'), 39 39 40 - /** Factory for creating property access expressions (e.g. `obj.foo`). */ 40 + /** Factory for creating property access expressions (e.g., `obj.foo`). */ 41 41 attr: createFactory<AttrCtor>('attr'), 42 42 43 - /** Factory for creating await expressions (e.g. `await promise`). */ 43 + /** Factory for creating await expressions (e.g., `await promise`). */ 44 44 await: createFactory<AwaitCtor>('await'), 45 45 46 - /** Factory for creating function or method call expressions (e.g. `fn(arg)`). */ 46 + /** Factory for creating function or method call expressions (e.g., `fn(arg)`). */ 47 47 call: createFactory<CallCtor>('call'), 48 48 49 - /** Factory for creating new expressions (e.g. `new ClassName()`). */ 49 + /** Factory for creating new expressions (e.g., `new ClassName()`). */ 50 50 new: createFactory<NewCtor>('new'), 51 51 52 52 /** Factory for creating return statements. */ ··· 54 54 55 55 /** Factories for creating type nodes. */ 56 56 type: { 57 - /** Factory for creating basic type references or type expressions (e.g. Foo or Foo<T>). */ 57 + /** Factory for creating basic type references or type expressions (e.g., Foo or Foo<T>). */ 58 58 expr: createFactory<TypeExprCtor>('type.expr'), 59 59 60 - /** Factory for creating indexed-access types (e.g. `Foo<T>[K]`). */ 60 + /** Factory for creating indexed-access types (e.g., `Foo<T>[K]`). */ 61 61 idx: createFactory<TypeIdxCtor>('type.idx'), 62 62 63 - /** Factory for creating type operator nodes (e.g. `readonly T`, `keyof T`, `unique T`). */ 63 + /** Factory for creating type operator nodes (e.g., `readonly T`, `keyof T`, `unique T`). */ 64 64 operator: createFactory<TypeOperatorCtor>('type.operator'), 65 65 66 - /** Factory for creating type query nodes (e.g. `typeof Foo`). */ 66 + /** Factory for creating type query nodes (e.g., `typeof Foo`). */ 67 67 query: createFactory<TypeQueryCtor>('type.query'), 68 68 }, 69 69 70 - /** Factory for creating `typeof` expressions (e.g. `typeof value`). */ 70 + /** Factory for creating `typeof` expressions (e.g., `typeof value`). */ 71 71 typeofExpr: createFactory<TypeOfExprCtor>('typeofExpr'), 72 72 };
+2 -2
packages/openapi-ts/src/ts-dsl/utils/render-utils.ts
··· 71 71 export type SortKey = [SortGroup, SortDistance, SortModule]; 72 72 73 73 export type ModuleExport = Omit<ExportModule, 'from'> & { 74 - /** Module specifier for re-exports, e.g. `./foo`. */ 74 + /** Module specifier for re-exports, e.g., `./foo`. */ 75 75 modulePath: string; 76 76 }; 77 77 78 78 export type ModuleImport = Omit<ImportModule, 'from'> & { 79 - /** Module specifier for imports, e.g. `./foo`. */ 79 + /** Module specifier for imports, e.g., `./foo`. */ 80 80 modulePath: string; 81 81 }; 82 82
+1 -1
packages/shared/src/ir/graph.ts
··· 14 14 /** 15 15 * Checks if a pointer matches a known top-level IR component (schema, parameter, etc) and returns match info. 16 16 * 17 - * @param pointer - The IR pointer string (e.g. '#/components/schemas/Foo') 17 + * @param pointer - The IR pointer string (e.g., '#/components/schemas/Foo') 18 18 * @param kind - (Optional) The component kind to check 19 19 * @returns { matched: true, kind: IrTopLevelKind } | { matched: false } - Whether it matched, and the matched kind if so 20 20 */
+1 -1
packages/shared/src/ir/schema.ts
··· 1 1 import type { IR } from './types'; 2 2 3 3 /** 4 - * Ensure we don't produce redundant types, e.g. string | string. 4 + * Ensure we don't produce redundant types, e.g., string | string. 5 5 */ 6 6 export function deduplicateSchema<T extends IR.SchemaObject>({ 7 7 detectFormat = true,