@typespec/events 0.65.0-dev.2 → 0.65.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../src/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,KAAK,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvF,OAAO,KAAK,EACV,oBAAoB,EACpB,aAAa,EACb,eAAe,EAChB,MAAM,sCAAsC,CAAC;AAG9C,QAAA,MAAO,QAAQ,
|
|
1
|
+
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../src/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,KAAK,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvF,OAAO,KAAK,EACV,oBAAoB,EACpB,aAAa,EACb,eAAe,EAChB,MAAM,sCAAsC,CAAC;AAG9C,QAAA,MAAO,QAAQ,yEAAyD,CAAC;AAEzE,eAAO,MAAM,gBAAgB,EAAE,eAE9B,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,CAAC;AAEpB,QAAA,MAAO,cAAc,2GAEpB,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,oBAEnC,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC;AAE1B,QAAA,MAAO,WAAW,iFAAkE,CAAC;AAErF,eAAO,MAAM,cAAc,EAAE,aAE5B,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
package/dist/src/decorators.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {} from "@typespec/compiler";
|
|
2
|
-
import {
|
|
2
|
+
import { useStateMap, useStateSet } from "@typespec/compiler/utils";
|
|
3
3
|
import { EventsStateKeys } from "./lib.js";
|
|
4
|
-
const [isEvents, setEvents] =
|
|
4
|
+
const [isEvents, setEvents] = useStateSet(EventsStateKeys.events);
|
|
5
5
|
export const $eventsDecorator = (context, target) => {
|
|
6
6
|
setEvents(context.program, target);
|
|
7
7
|
};
|
|
8
8
|
export { isEvents };
|
|
9
|
-
const [getContentType, setContentType] =
|
|
9
|
+
const [getContentType, setContentType] = useStateMap(EventsStateKeys.contentType);
|
|
10
10
|
export const $contentTypeDecorator = (context, target, contentType) => {
|
|
11
11
|
setContentType(context.program, target, contentType);
|
|
12
12
|
};
|
|
13
13
|
export { getContentType };
|
|
14
|
-
const [isEventData, setEventData] =
|
|
14
|
+
const [isEventData, setEventData] = useStateSet(EventsStateKeys.data);
|
|
15
15
|
export const $dataDecorator = (context, target) => {
|
|
16
16
|
setEventData(context.program, target);
|
|
17
17
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../src/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqD,MAAM,oBAAoB,CAAC;AACvF,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../src/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqD,MAAM,oBAAoB,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAMpE,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG,WAAW,CAAQ,eAAe,CAAC,MAAM,CAAC,CAAC;AAEzE,MAAM,CAAC,MAAM,gBAAgB,GAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;IACnE,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AACrC,CAAC,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,CAAC;AAEpB,MAAM,CAAC,cAAc,EAAE,cAAc,CAAC,GAAG,WAAW,CAClD,eAAe,CAAC,WAAW,CAC5B,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAyB,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE;IAC1F,cAAc,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;AACvD,CAAC,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC;AAE1B,MAAM,CAAC,WAAW,EAAE,YAAY,CAAC,GAAG,WAAW,CAAgB,eAAe,CAAC,IAAI,CAAC,CAAC;AAErF,MAAM,CAAC,MAAM,cAAc,GAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;IAC/D,YAAY,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AACxC,CAAC,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typespec/events",
|
|
3
|
-
"version": "0.65.0
|
|
3
|
+
"version": "0.65.0",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec library providing events bindings",
|
|
6
6
|
"homepage": "https://typespec.io",
|
|
@@ -39,21 +39,20 @@
|
|
|
39
39
|
"!dist/test/**"
|
|
40
40
|
],
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@typespec/compiler": "~0.
|
|
42
|
+
"@typespec/compiler": "~0.65.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/node": "~22.10.10",
|
|
46
|
-
"@typespec/compiler": "~0.64.0 || >=0.65.0-dev <0.65.0",
|
|
47
|
-
"@typespec/library-linter": "~0.64.0 || >=0.65.0-dev <0.65.0",
|
|
48
46
|
"@vitest/coverage-v8": "^3.0.4",
|
|
49
47
|
"@vitest/ui": "^3.0.3",
|
|
50
48
|
"c8": "^10.1.3",
|
|
51
49
|
"rimraf": "~6.0.1",
|
|
52
50
|
"typescript": "~5.7.3",
|
|
53
|
-
"vitest": "^3.0.
|
|
51
|
+
"vitest": "^3.0.5",
|
|
52
|
+
"@typespec/compiler": "~0.65.0",
|
|
53
|
+
"@typespec/library-linter": "~0.65.0",
|
|
54
54
|
"@typespec/tspd": "~0.46.0"
|
|
55
55
|
},
|
|
56
|
-
"dependencies": {},
|
|
57
56
|
"scripts": {
|
|
58
57
|
"clean": "rimraf ./dist ./temp",
|
|
59
58
|
"build": "npm run gen-extern-signature && tsc -p . && npm run lint-typespec-library",
|