Skip to content
Open
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .chronus/changes/decorator-post-validator-2025-10-26-18-27-31.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking
changeKind: internal
packages:
- "@typespec/events"
- "@typespec/http-client"
- "@typespec/http"
- "@typespec/json-schema"
- "@typespec/openapi"
- "@typespec/openapi3"
- "@typespec/protobuf"
- "@typespec/rest"
- "@typespec/spector"
- "@typespec/sse"
- "@typespec/streams"
- "@typespec/tspd"
- "@typespec/versioning"
- "@typespec/xml"
---

Regenerate signature
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking
changeKind: feature
packages:
- "@typespec/compiler"
---

[API] Introduction of decorator validator callbacks. A decorator can define some callbacks to achieve some deferred validation (After the type is finished or the whole graph is)
7 changes: 5 additions & 2 deletions packages/compiler/generated-defs/TypeSpec.Prototypes.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import type { DecoratorContext, Type } from "../src/index.js";
import type { DecoratorContext, DecoratorValidatorCallbacks, Type } from "../src/index.js";

export type GetterDecorator = (context: DecoratorContext, target: Type) => void;
export type GetterDecorator = (
context: DecoratorContext,
target: Type,
) => DecoratorValidatorCallbacks | void;

export type TypeSpecPrototypesDecorators = {
getter: GetterDecorator;
Expand Down
Loading
Loading