@typespec/compiler 1.0.0-rc.0 → 1.0.0-rc.1-dev.1
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/manifest.js +2 -2
- package/dist/src/experimental/typekit/kits/operation.d.ts +6 -0
- package/dist/src/experimental/typekit/kits/operation.d.ts.map +1 -1
- package/dist/src/experimental/typekit/kits/operation.js +5 -0
- package/dist/src/experimental/typekit/kits/operation.js.map +1 -1
- package/package.json +5 -4
package/dist/manifest.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ModelProperty, Operation, Type } from "../../../core/types.js";
|
|
2
|
+
import { PagingOperation } from "../../../lib/paging.js";
|
|
2
3
|
/**
|
|
3
4
|
* A descriptor for an operation.
|
|
4
5
|
* @experimental
|
|
@@ -33,6 +34,11 @@ export interface OperationKit {
|
|
|
33
34
|
* @param type type to check
|
|
34
35
|
*/
|
|
35
36
|
is(type: Type): type is Operation;
|
|
37
|
+
/**
|
|
38
|
+
* Get the paging operation's metadata for an operation.
|
|
39
|
+
* @param operation operation to get the paging operation for
|
|
40
|
+
*/
|
|
41
|
+
getPagingMetadata(operation: Operation): PagingOperation | undefined;
|
|
36
42
|
}
|
|
37
43
|
interface TypekitExtension {
|
|
38
44
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../../../../../src/experimental/typekit/kits/operation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../../../../../src/experimental/typekit/kits/operation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAsB,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAG7E;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,UAAU,EAAE,aAAa,EAAE,CAAC;IAE5B;;OAEG;IACH,UAAU,EAAE,IAAI,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAC7C;;;OAGG;IACH,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI,SAAS,CAAC;IAClC;;;OAGG;IACH,iBAAiB,CAAC,SAAS,EAAE,SAAS,GAAG,eAAe,GAAG,SAAS,CAAC;CACtE;AAED,UAAU,gBAAgB;IACxB;;;OAGG;IACH,SAAS,EAAE,YAAY,CAAC;CACzB;AAED,OAAO,QAAQ,kBAAkB,CAAC;IAChC,UAAU,OAAQ,SAAQ,gBAAgB;KAAG;CAC9C"}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
+
import { ignoreDiagnostics } from "../../../core/diagnostics.js";
|
|
2
|
+
import { getPagingOperation } from "../../../lib/paging.js";
|
|
1
3
|
import { defineKit } from "../define-kit.js";
|
|
2
4
|
defineKit({
|
|
3
5
|
operation: {
|
|
4
6
|
is(type) {
|
|
5
7
|
return type.kind === "Operation";
|
|
6
8
|
},
|
|
9
|
+
getPagingMetadata(operation) {
|
|
10
|
+
return ignoreDiagnostics(getPagingOperation(this.program, operation));
|
|
11
|
+
},
|
|
7
12
|
create(desc) {
|
|
8
13
|
const parametersModel = this.model.create({
|
|
9
14
|
name: `${desc.name}Parameters`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation.js","sourceRoot":"","sources":["../../../../../src/experimental/typekit/kits/operation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"operation.js","sourceRoot":"","sources":["../../../../../src/experimental/typekit/kits/operation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE,OAAO,EAAE,kBAAkB,EAAmB,MAAM,wBA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4
|
"description": "TypeSpec Compiler Preview",
|
|
5
5
|
"author": "Microsoft Corporation",
|
|
6
6
|
"license": "MIT",
|
|
@@ -100,6 +100,7 @@
|
|
|
100
100
|
"@types/node": "~22.13.11",
|
|
101
101
|
"@types/semver": "^7.5.8",
|
|
102
102
|
"@types/yargs": "~17.0.33",
|
|
103
|
+
"@typespec/internal-build-utils": "^0.68.0 || >=0.69.0-dev <0.69.0",
|
|
103
104
|
"@vitest/coverage-v8": "^3.0.9",
|
|
104
105
|
"@vitest/ui": "^3.0.9",
|
|
105
106
|
"c8": "^10.1.3",
|
|
@@ -107,13 +108,13 @@
|
|
|
107
108
|
"pathe": "^2.0.3",
|
|
108
109
|
"rimraf": "~6.0.1",
|
|
109
110
|
"source-map-support": "~0.5.21",
|
|
111
|
+
"tmlanguage-generator": "^0.6.1 || >=0.7.0-dev <0.7.0",
|
|
110
112
|
"typescript": "~5.8.2",
|
|
111
113
|
"vitest": "^3.0.9",
|
|
112
114
|
"vscode-oniguruma": "~2.0.1",
|
|
113
|
-
"vscode-textmate": "~9.2.0"
|
|
114
|
-
"@typespec/internal-build-utils": "^0.68.0",
|
|
115
|
-
"tmlanguage-generator": "^0.6.1"
|
|
115
|
+
"vscode-textmate": "~9.2.0"
|
|
116
116
|
},
|
|
117
|
+
"peerDependencies": {},
|
|
117
118
|
"scripts": {
|
|
118
119
|
"clean": "rimraf ./dist ./temp",
|
|
119
120
|
"build:init-templates-index": "tsx ./.scripts/build-init-templates.ts",
|