Skip to content

Commit 2b9c9cd

Browse files
committed
chore: update comments for eg
1 parent ebb5832 commit 2b9c9cd

39 files changed

Lines changed: 137 additions & 137 deletions

File tree

packages/codegen-core/src/files/file.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class File<Node extends INode = INode> {
1616
*/
1717
private _exports: Array<ExportModule> = [];
1818
/**
19-
* File extension (e.g. `.ts`).
19+
* File extension (e.g., `.ts`).
2020
*/
2121
private _extension?: string;
2222
/**

packages/codegen-core/src/symbols/symbol.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class Symbol<Node extends INode = INode> {
2222
private _exported: boolean;
2323
/**
2424
* 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").
2626
*
2727
* @default undefined
2828
*/

packages/codegen-core/src/symbols/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export type ISymbolIn = {
1616
exported?: boolean;
1717
/**
1818
* 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").
2020
*
2121
* @default undefined
2222
*/

packages/custom-client/src/core/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export interface Config {
6868
requestValidator?: (data: unknown) => Promise<unknown>;
6969
/**
7070
* 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.
7272
*/
7373
responseTransformer?: (data: unknown) => Promise<unknown>;
7474
/**

packages/json-schema-ref-parser/src/bundle.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ const inventory$Ref = <S extends object = JSONSchema>({
213213
}
214214

215215
const newEntry: InventoryEntry = {
216-
$ref, // The JSON Reference (e.g. {$ref: string})
216+
$ref, // The JSON Reference (e.g., {$ref: string})
217217
circular: pointer.circular, // Is this $ref pointer DIRECTLY circular? (i.e. it references itself)
218218
depth, // How far from the JSON Schema root is this $ref pointer?
219219
extended, // Does this $ref extend its resolved value? (i.e. it has extra properties, in addition to "$ref")
@@ -240,7 +240,7 @@ const inventory$Ref = <S extends object = JSONSchema>({
240240
// Recursively crawl the resolved value.
241241
// When the resolution followed a $ref chain to a different file,
242242
// 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
244244
// value resolve against the correct file.
245245
if (!existingEntry || external) {
246246
let crawlPath = pointer.path;

packages/json-schema-ref-parser/src/pointer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ class Pointer<S extends object = JSONSchema> {
205205
/**
206206
* Parses a JSON pointer (or a path containing a JSON pointer in the hash)
207207
* 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"])
209209
*
210210
* The pointer is parsed according to RFC 6901
211211
* {@link https://tools.ietf.org/html/rfc6901#section-3}
@@ -244,8 +244,8 @@ class Pointer<S extends object = JSONSchema> {
244244
/**
245245
* Creates a JSON pointer path, by joining one or more tokens to a base path.
246246
*
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"])
249249
* @returns
250250
*/
251251
static join(base: string, tokens: string | string[]) {

packages/json-schema-ref-parser/src/ref.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class $Ref<S extends object = JSONSchema> {
4646
$refs: $Refs<S>;
4747

4848
/**
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.)
5050
*/
5151
pathType: string | unknown;
5252

packages/openapi-python/src/plugins/@hey-api/sdk/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export type UserConfig = Plugin.Name<'@hey-api/python-sdk'> &
3131
client?: PluginClientNames | boolean;
3232
/**
3333
* 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`).
3535
*
3636
* Set to `false` to disable example generation entirely, or provide an
3737
* object for fine-grained control over the output and post-processing.

packages/openapi-python/src/py-dsl/index.ts

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -74,18 +74,18 @@ import { LazyPyDsl } from './utils/lazy';
7474
import { safeKeywordName } from './utils/name';
7575

7676
const pyDsl = {
77-
/** Creates an array literal expression (e.g. `[1, 2, 3]`). */
77+
/** Creates an array literal expression (e.g., `[1, 2, 3]`). */
7878
// 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`). */
8080
// as: (...args: ConstructorParameters<typeof AsTsDsl>) => new AsTsDsl(...args),
8181

82-
/** Creates a property access expression (e.g. `obj.foo`). */
82+
/** Creates a property access expression (e.g., `obj.foo`). */
8383
attr: (...args: ConstructorParameters<typeof AttrPyDsl>) => new AttrPyDsl(...args),
8484

85-
/** Creates an await expression (e.g. `await promise`). */
85+
/** Creates an await expression (e.g., `await promise`). */
8686
// await: (...args: ConstructorParameters<typeof AwaitTsDsl>) => new AwaitTsDsl(...args),
8787

88-
/** Creates a binary expression (e.g. `a + b`). */
88+
/** Creates a binary expression (e.g., `a + b`). */
8989
binary: (...args: ConstructorParameters<typeof BinaryPyDsl>) => new BinaryPyDsl(...args),
9090

9191
/** Creates a statement block. */
@@ -94,7 +94,7 @@ const pyDsl = {
9494
/** Creates a break statement. */
9595
break: (...args: ConstructorParameters<typeof BreakPyDsl>) => new BreakPyDsl(...args),
9696

97-
/** Creates a function or method call expression (e.g. `fn(arg)`). */
97+
/** Creates a function or method call expression (e.g., `fn(arg)`). */
9898
call: (...args: ConstructorParameters<typeof CallPyDsl>) => new CallPyDsl(...args),
9999

100100
/** Creates a class declaration or expression. */
@@ -103,10 +103,10 @@ const pyDsl = {
103103
/** Creates a continue statement. */
104104
continue: (...args: ConstructorParameters<typeof ContinuePyDsl>) => new ContinuePyDsl(...args),
105105

106-
/** Creates a decorator expression (e.g. `@decorator`). */
106+
/** Creates a decorator expression (e.g., `@decorator`). */
107107
// decorator: (...args: ConstructorParameters<typeof DecoratorTsDsl>) => new DecoratorTsDsl(...args),
108108

109-
/** Creates a dictionary expression (e.g. `{ 'a': 1 }`). */
109+
/** Creates a dictionary expression (e.g., `{ 'a': 1 }`). */
110110
dict: (...args: ConstructorParameters<typeof DictPyDsl>) => new DictPyDsl(...args),
111111

112112
/** Creates a Python docstring (`"""..."""`). */
@@ -121,7 +121,7 @@ const pyDsl = {
121121
/** Creates a field declaration in a class or object. */
122122
// field: (...args: ConstructorParameters<typeof FieldTsDsl>) => new FieldTsDsl(...args),
123123

124-
/** Creates a for statement (e.g. `for x in items:`). */
124+
/** Creates a for statement (e.g., `for x in items:`). */
125125
for: (...args: ConstructorParameters<typeof ForPyDsl>) => new ForPyDsl(...args),
126126

127127
/** Converts a runtime value into a corresponding expression node. */
@@ -139,7 +139,7 @@ const pyDsl = {
139139
/** Creates a Python comment (`# ...`). */
140140
hint: (...args: ConstructorParameters<typeof HintPyDsl>) => new HintPyDsl(...args),
141141

142-
/** Creates an identifier (e.g. `foo`). */
142+
/** Creates an identifier (e.g., `foo`). */
143143
id: (...args: ConstructorParameters<typeof IdPyDsl>) => new IdPyDsl(...args),
144144

145145
/** Creates an if statement. */
@@ -151,17 +151,17 @@ const pyDsl = {
151151
/** Creates an initialization block or statement. */
152152
// init: (...args: ConstructorParameters<typeof InitTsDsl>) => new InitTsDsl(...args),
153153

154-
/** Creates a keyword argument expression (e.g. `name=value`). */
154+
/** Creates a keyword argument expression (e.g., `name=value`). */
155155
kwarg: (...args: ConstructorParameters<typeof KwargPyDsl>) => new KwargPyDsl(...args),
156156

157157
/** Creates a lazy, context-aware node with deferred evaluation. */
158158
lazy: <T extends py.Node>(...args: ConstructorParameters<typeof LazyPyDsl<T>>) =>
159159
new LazyPyDsl<T>(...args),
160160

161-
/** Creates a list expression (e.g. `[1, 2, 3]`). */
161+
/** Creates a list expression (e.g., `[1, 2, 3]`). */
162162
list: (...args: ConstructorParameters<typeof ListPyDsl>) => new ListPyDsl(...args),
163163

164-
/** Creates a literal value (e.g. string, number, boolean). */
164+
/** Creates a literal value (e.g., string, number, boolean). */
165165
literal: (...args: ConstructorParameters<typeof LiteralPyDsl>) => new LiteralPyDsl(...args),
166166

167167
/** Creates an enum member declaration. */
@@ -177,7 +177,7 @@ const pyDsl = {
177177
/** Creates a negation expression (`-x`). */
178178
// neg: (...args: ConstructorParameters<typeof PrefixTsDsl>) => new PrefixTsDsl(...args).neg(),
179179

180-
/** Creates a new expression (e.g. `new ClassName()`). */
180+
/** Creates a new expression (e.g., `new ClassName()`). */
181181
// new: (...args: ConstructorParameters<typeof NewTsDsl>) => new NewTsDsl(...args),
182182

183183
/** Creates a newline (for formatting purposes). */
@@ -195,22 +195,22 @@ const pyDsl = {
195195
/** Creates a pattern for destructuring or matching. */
196196
// pattern: (...args: ConstructorParameters<typeof PatternTsDsl>) => new PatternTsDsl(...args),
197197

198-
/** Creates a prefix unary expression (e.g. `-x`, `!x`, `~x`). */
198+
/** Creates a prefix unary expression (e.g., `-x`, `!x`, `~x`). */
199199
// prefix: (...args: ConstructorParameters<typeof PrefixTsDsl>) => new PrefixTsDsl(...args),
200200

201-
/** Creates an object literal property (e.g. `{ foo: bar }`). */
201+
/** Creates an object literal property (e.g., `{ foo: bar }`). */
202202
// prop: (...args: ConstructorParameters<typeof ObjectPropTsDsl>) => new ObjectPropTsDsl(...args),
203203

204204
/** Creates a raise statement. */
205205
raise: (...args: ConstructorParameters<typeof RaisePyDsl>) => new RaisePyDsl(...args),
206206

207-
/** Creates a regular expression literal (e.g. `/foo/gi`). */
207+
/** Creates a regular expression literal (e.g., `/foo/gi`). */
208208
// regexp: (...args: ConstructorParameters<typeof RegExpTsDsl>) => new RegExpTsDsl(...args),
209209

210210
/** Creates a return statement. */
211211
return: (...args: ConstructorParameters<typeof ReturnPyDsl>) => new ReturnPyDsl(...args),
212212

213-
/** Creates a set expression (e.g. `{1, 2, 3}`). */
213+
/** Creates a set expression (e.g., `{1, 2, 3}`). */
214214
set: (...args: ConstructorParameters<typeof SetPyDsl>) => new SetPyDsl(...args),
215215

216216
/** Creates a setter method declaration. */
@@ -219,7 +219,7 @@ const pyDsl = {
219219
/** Wraps an expression or statement-like value into a `StmtPyDsl`. */
220220
stmt: (...args: ConstructorParameters<typeof StmtPyDsl>) => new StmtPyDsl(...args),
221221

222-
/** Creates a subscript expression (e.g. `obj[index]` or `Type[Param]`). */
222+
/** Creates a subscript expression (e.g., `obj[index]` or `Type[Param]`). */
223223
subscript: (...args: ConstructorParameters<typeof SubscriptPyDsl>) => new SubscriptPyDsl(...args),
224224

225225
/** Creates a template literal expression. */
@@ -231,69 +231,69 @@ const pyDsl = {
231231
// /** Creates a throw statement. */
232232
// throw: (...args: ConstructorParameters<typeof ThrowTsDsl>) => new ThrowTsDsl(...args),
233233

234-
/** Creates a syntax token (e.g. `?`, `readonly`, `+`, `-`). */
234+
/** Creates a syntax token (e.g., `?`, `readonly`, `+`, `-`). */
235235
// token: (...args: ConstructorParameters<typeof TokenTsDsl>) => new TokenTsDsl(...args),
236236

237237
/** Creates a try/except/finally statement. */
238238
try: (...args: ConstructorParameters<typeof TryPyDsl>) => new TryPyDsl(...args),
239239

240-
/** Creates a tuple expression (e.g. `(1, 2, 3)`). */
240+
/** Creates a tuple expression (e.g., `(1, 2, 3)`). */
241241
tuple: (...args: ConstructorParameters<typeof TuplePyDsl>) => new TuplePyDsl(...args),
242242

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>). */
244244
// type: Object.assign(
245245
// (...args: ConstructorParameters<typeof TypeExprTsDsl>) => new TypeExprTsDsl(...args),
246246
// {
247-
/** Creates a type alias declaration (e.g. `type Foo = Bar`). */
247+
/** Creates a type alias declaration (e.g., `type Foo = Bar`). */
248248
// 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`). */
250250
// 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). */
252252
// 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>). */
254254
// expr: (...args: ConstructorParameters<typeof TypeExprTsDsl>) => new TypeExprTsDsl(...args),
255255
/** Converts a runtime value into a corresponding type expression node. */
256256
// 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`). */
258258
// 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]`). */
260260
// 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). */
262262
// literal: (...args: ConstructorParameters<typeof TypeLiteralTsDsl>) =>
263263
// 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 }`). */
265265
// mapped: (...args: ConstructorParameters<typeof TypeMappedTsDsl>) =>
266266
// new TypeMappedTsDsl(...args),
267-
/** Creates a type literal node (e.g. { foo: string }). */
267+
/** Creates a type literal node (e.g., { foo: string }). */
268268
// object: (...args: ConstructorParameters<typeof TypeObjectTsDsl>) =>
269269
// 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`). */
271271
// operator: (...args: ConstructorParameters<typeof TypeOperatorTsDsl>) =>
272272
// new TypeOperatorTsDsl(...args),
273-
/** Represents a union type (e.g. `A | B | C`). */
273+
/** Represents a union type (e.g., `A | B | C`). */
274274
// or: (...args: ConstructorParameters<typeof TypeOrTsDsl>) => new TypeOrTsDsl(...args),
275-
/** Creates a type parameter (e.g. `<T>`). */
275+
/** Creates a type parameter (e.g., `<T>`). */
276276
// 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`). */
278278
// 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). */
280280
// template: (...args: ConstructorParameters<typeof TypeTemplateTsDsl>) =>
281281
// new TypeTemplateTsDsl(...args),
282-
/** Creates a tuple type (e.g. [A, B, C]). */
282+
/** Creates a tuple type (e.g., [A, B, C]). */
283283
// tuple: (...args: ConstructorParameters<typeof TypeTupleTsDsl>) => new TypeTupleTsDsl(...args),
284284
// },
285285
// ),
286-
/** Creates a `typeof` expression (e.g. `typeof value`). */
286+
/** Creates a `typeof` expression (e.g., `typeof value`). */
287287
// typeofExpr: (...args: ConstructorParameters<typeof TypeOfExprTsDsl>) =>
288288
// new TypeOfExprTsDsl(...args),
289289

290290
/** Creates a variable assignment. */
291291
var: (...args: ConstructorParameters<typeof VarPyDsl>) => new VarPyDsl(...args),
292292

293-
/** Creates a while statement (e.g. `while x:`). */
293+
/** Creates a while statement (e.g., `while x:`). */
294294
while: (...args: ConstructorParameters<typeof WhilePyDsl>) => new WhilePyDsl(...args),
295295

296-
/** Creates a with statement (e.g. `with open(f) as file:`). */
296+
/** Creates a with statement (e.g., `with open(f) as file:`). */
297297
with: (...args: ConstructorParameters<typeof WithPyDsl>) => new WithPyDsl(...args),
298298
};
299299

packages/openapi-python/src/py-dsl/mixins/expr.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ import { f } from '../utils/factories';
55
import type { BaseCtor, DropFirst, MixinCtor } from './types';
66

77
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`). */
99
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)`). */
1111
call(...args: DropFirst<Parameters<typeof f.call>>): ReturnType<typeof f.call>;
1212
/** Produces a `return` statement returning the current expression. */
1313
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]`). */
1515
slice(...args: DropFirst<Parameters<typeof f.slice>>): ReturnType<typeof f.slice>;
1616
}
1717

0 commit comments

Comments
 (0)