@typespec/events 0.78.0-dev.0 → 0.78.0-dev.2
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,4 +1,4 @@
|
|
|
1
|
-
import type { DecoratorContext, ModelProperty, Union, UnionVariant } from "@typespec/compiler";
|
|
1
|
+
import type { DecoratorContext, DecoratorValidatorCallbacks, ModelProperty, Union, UnionVariant } from "@typespec/compiler";
|
|
2
2
|
/**
|
|
3
3
|
* Specify that this union describes a set of events.
|
|
4
4
|
*
|
|
@@ -12,7 +12,7 @@ import type { DecoratorContext, ModelProperty, Union, UnionVariant } from "@type
|
|
|
12
12
|
* }
|
|
13
13
|
* ```
|
|
14
14
|
*/
|
|
15
|
-
export type EventsDecorator = (context: DecoratorContext, target: Union) => void;
|
|
15
|
+
export type EventsDecorator = (context: DecoratorContext, target: Union) => DecoratorValidatorCallbacks | void;
|
|
16
16
|
/**
|
|
17
17
|
* Specifies the content type of the event envelope, event body, or event payload.
|
|
18
18
|
* When applied to an event payload, that field must also have a corresponding `@data`
|
|
@@ -35,7 +35,7 @@ export type EventsDecorator = (context: DecoratorContext, target: Union) => void
|
|
|
35
35
|
* }
|
|
36
36
|
* ```
|
|
37
37
|
*/
|
|
38
|
-
export type ContentTypeDecorator = (context: DecoratorContext, target: UnionVariant | ModelProperty, contentType: string) => void;
|
|
38
|
+
export type ContentTypeDecorator = (context: DecoratorContext, target: UnionVariant | ModelProperty, contentType: string) => DecoratorValidatorCallbacks | void;
|
|
39
39
|
/**
|
|
40
40
|
* Identifies the payload of an event.
|
|
41
41
|
* Only one field in an event can be marked as the payload.
|
|
@@ -47,7 +47,7 @@ export type ContentTypeDecorator = (context: DecoratorContext, target: UnionVari
|
|
|
47
47
|
* }
|
|
48
48
|
* ```
|
|
49
49
|
*/
|
|
50
|
-
export type DataDecorator = (context: DecoratorContext, target: ModelProperty) => void;
|
|
50
|
+
export type DataDecorator = (context: DecoratorContext, target: ModelProperty) => DecoratorValidatorCallbacks | void;
|
|
51
51
|
export type TypeSpecEventsDecorators = {
|
|
52
52
|
events: EventsDecorator;
|
|
53
53
|
contentType: ContentTypeDecorator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeSpec.Events.d.ts","sourceRoot":"","sources":["../../generated-defs/TypeSpec.Events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"TypeSpec.Events.d.ts","sourceRoot":"","sources":["../../generated-defs/TypeSpec.Events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,2BAA2B,EAC3B,aAAa,EACb,KAAK,EACL,YAAY,EACb,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,eAAe,GAAG,CAC5B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,KAAK,KACV,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,MAAM,oBAAoB,GAAG,CACjC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,YAAY,GAAG,aAAa,EACpC,WAAW,EAAE,MAAM,KAChB,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;;;;;;GAUG;AACH,MAAM,MAAM,aAAa,GAAG,CAC1B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,aAAa,KAClB,2BAA2B,GAAG,IAAI,CAAC;AAExC,MAAM,MAAM,wBAAwB,GAAG;IACrC,MAAM,EAAE,eAAe,CAAC;IACxB,WAAW,EAAE,oBAAoB,CAAC;IAClC,IAAI,EAAE,aAAa,CAAC;CACrB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typespec/events",
|
|
3
|
-
"version": "0.78.0-dev.
|
|
3
|
+
"version": "0.78.0-dev.2",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec library providing events bindings",
|
|
6
6
|
"homepage": "https://typespec.io",
|
|
@@ -39,19 +39,19 @@
|
|
|
39
39
|
"!dist/test/**"
|
|
40
40
|
],
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@typespec/compiler": "^1.7.
|
|
42
|
+
"@typespec/compiler": "^1.7.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@types/node": "~
|
|
46
|
-
"@typespec/compiler": "^1.7.
|
|
45
|
+
"@types/node": "~25.0.2",
|
|
46
|
+
"@typespec/compiler": "^1.7.1",
|
|
47
47
|
"@typespec/library-linter": "^0.77.0 || >=0.78.0-dev <0.78.0",
|
|
48
48
|
"@typespec/tspd": "^0.73.2 || >=0.74.0-dev <0.74.0",
|
|
49
|
-
"@vitest/coverage-v8": "^4.0.
|
|
50
|
-
"@vitest/ui": "^4.0.
|
|
49
|
+
"@vitest/coverage-v8": "^4.0.15",
|
|
50
|
+
"@vitest/ui": "^4.0.15",
|
|
51
51
|
"c8": "^10.1.3",
|
|
52
52
|
"rimraf": "~6.1.2",
|
|
53
53
|
"typescript": "~5.9.2",
|
|
54
|
-
"vitest": "^4.0.
|
|
54
|
+
"vitest": "^4.0.15"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {},
|
|
57
57
|
"scripts": {
|