Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Mutator API to experimental sub export #4290

Merged
merged 14 commits into from
Sep 21, 2024
7 changes: 7 additions & 0 deletions .chronus/changes/feature-mutators-2024-7-28-15-59-14.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: feature
packages:
- "@typespec/compiler"
---

Adding experimental (unstable) API fro Type Mutators
4 changes: 4 additions & 0 deletions packages/compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
"./emitter-framework": {
"types": "./dist/src/emitter-framework/index.d.ts",
"default": "./dist/src/emitter-framework/index.js"
},
"./experimental": {
"types": "./dist/src/experimental/index.d.ts",
"default": "./dist/src/experimental/index.js"
}
},
"browser": {
Expand Down
11 changes: 11 additions & 0 deletions packages/compiler/src/experimental/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export * from "./mutators.js";
joheredi marked this conversation as resolved.
Show resolved Hide resolved
export * from "./realm.js";

import { createConsoleSink } from "../core/logger/console-sink.js";
import { createLogger } from "../core/logger/logger.js";

const logSink = createConsoleSink({ pretty: true });
joheredi marked this conversation as resolved.
Show resolved Hide resolved
const logger = createLogger({ sink: logSink, level: "warning" });
logger.warn(
"Functionality from @typespec/compiler/experimental is highly likely to change or be removed."
);
joheredi marked this conversation as resolved.
Show resolved Hide resolved
Loading
Loading