@openpkg-ts/spec 0.43.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +10 -0
- package/dist/index.js +9 -0
- package/package.json +1 -1
- package/schemas/v0.4.0/openpkg.schema.json +9 -0
package/dist/index.d.ts
CHANGED
|
@@ -167,6 +167,8 @@ type SpecSignature = {
|
|
|
167
167
|
overloadIndex?: number;
|
|
168
168
|
isImplementation?: boolean;
|
|
169
169
|
throws?: SpecThrows[];
|
|
170
|
+
/** Name of the base class this signature was inherited from (e.g. a subclass constructor declared only on its base) */
|
|
171
|
+
inheritedFrom?: string;
|
|
170
172
|
};
|
|
171
173
|
/**
|
|
172
174
|
* Type predicate information for type guard functions.
|
|
@@ -196,6 +198,7 @@ type SpecTypePredicate = {
|
|
|
196
198
|
* | `x-ts-type-arguments`| Preserves generic type arguments for parameterized types |
|
|
197
199
|
* | `x-ts-type-predicate`| Preserves type guard narrowing information |
|
|
198
200
|
* | `x-ts-package` | Package name for external type references |
|
|
201
|
+
* | `x-ts-method` | Marks function-valued properties declared with method syntax |
|
|
199
202
|
*/
|
|
200
203
|
type JSONSchemaExtensions = {
|
|
201
204
|
/**
|
|
@@ -233,6 +236,13 @@ type JSONSchemaExtensions = {
|
|
|
233
236
|
* Example: AnyRouter from @trpc/server → { "$ref": "#/types/AnyRouter", "x-ts-package": "@trpc/server" }
|
|
234
237
|
*/
|
|
235
238
|
"x-ts-package"?: string;
|
|
239
|
+
/**
|
|
240
|
+
* Marks a function-valued property declared with method syntax
|
|
241
|
+
* (`run(cmd: string): void`) as opposed to a function-typed property
|
|
242
|
+
* (`walk: () => void`). Mapped members (Omit/Pick) lose method form;
|
|
243
|
+
* this preserves the checker's distinction for doc pipelines.
|
|
244
|
+
*/
|
|
245
|
+
"x-ts-method"?: boolean;
|
|
236
246
|
};
|
|
237
247
|
type SpecMember = {
|
|
238
248
|
id?: string;
|
package/dist/index.js
CHANGED
|
@@ -2431,12 +2431,21 @@ var openpkg_schema_default4 = {
|
|
|
2431
2431
|
},
|
|
2432
2432
|
returns: { $ref: "#/$defs/returns" },
|
|
2433
2433
|
description: { type: "string" },
|
|
2434
|
+
tags: {
|
|
2435
|
+
type: "array",
|
|
2436
|
+
items: { $ref: "#/$defs/tag" }
|
|
2437
|
+
},
|
|
2438
|
+
examples: {
|
|
2439
|
+
type: "array",
|
|
2440
|
+
items: { $ref: "#/$defs/example" }
|
|
2441
|
+
},
|
|
2434
2442
|
typeParameters: {
|
|
2435
2443
|
type: "array",
|
|
2436
2444
|
items: { $ref: "#/$defs/typeParameter" }
|
|
2437
2445
|
},
|
|
2438
2446
|
overloadIndex: { type: "integer", minimum: 0 },
|
|
2439
2447
|
isImplementation: { type: "boolean" },
|
|
2448
|
+
inheritedFrom: { type: "string" },
|
|
2440
2449
|
throws: {
|
|
2441
2450
|
type: "array",
|
|
2442
2451
|
items: { $ref: "#/$defs/throwsInfo" }
|
package/package.json
CHANGED
|
@@ -196,12 +196,21 @@
|
|
|
196
196
|
},
|
|
197
197
|
"returns": { "$ref": "#/$defs/returns" },
|
|
198
198
|
"description": { "type": "string" },
|
|
199
|
+
"tags": {
|
|
200
|
+
"type": "array",
|
|
201
|
+
"items": { "$ref": "#/$defs/tag" }
|
|
202
|
+
},
|
|
203
|
+
"examples": {
|
|
204
|
+
"type": "array",
|
|
205
|
+
"items": { "$ref": "#/$defs/example" }
|
|
206
|
+
},
|
|
199
207
|
"typeParameters": {
|
|
200
208
|
"type": "array",
|
|
201
209
|
"items": { "$ref": "#/$defs/typeParameter" }
|
|
202
210
|
},
|
|
203
211
|
"overloadIndex": { "type": "integer", "minimum": 0 },
|
|
204
212
|
"isImplementation": { "type": "boolean" },
|
|
213
|
+
"inheritedFrom": { "type": "string" },
|
|
205
214
|
"throws": {
|
|
206
215
|
"type": "array",
|
|
207
216
|
"items": { "$ref": "#/$defs/throwsInfo" }
|