-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Emitter framework: Allow reference context to be passed to `emitTypeR…
…eference` (#2712) Current way of setting reference context is flawed in that you cannot have a different context to different reference. It is also run before the element itself instead of before emitting the reference so this mean the context would apply to the referrer as well. This allows the `emitTypeReference` to take a parameter to patch the reference context Next step would be to reconsider the `*ReferenceContext` and `*Context` methods to make more sense.
- Loading branch information
1 parent
0b33308
commit 4e63cab
Showing
4 changed files
with
304 additions
and
89 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
common/changes/@typespec/compiler/emitter-framework-ref-context_2023-11-30-18-46.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@typespec/compiler", | ||
"comment": "[API] Emitter framework: `emitTypeReference` function takes an optional reference context that can be used to patch the context for the target.", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@typespec/compiler" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.