Skip to content

Commit 68f6d12

Browse files
Disable schemaUnionOfLiterals diagnostic for Effect v4 (#643)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 693e5a5 commit 68f6d12

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@effect/language-service": patch
3+
---
4+
5+
Disable `schemaUnionOfLiterals` diagnostic for Effect v4, as `Schema.Union` of multiple `Schema.Literal` calls is no longer applicable in v4.

packages/language-service/src/diagnostics/schemaUnionOfLiterals.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export const schemaUnionOfLiterals = LSP.createDiagnostic({
1414
apply: Nano.fn("schemaUnionOfLiterals.apply")(function*(sourceFile, report) {
1515
const ts = yield* Nano.service(TypeScriptApi.TypeScriptApi)
1616
const typeParser = yield* Nano.service(TypeParser.TypeParser)
17+
if (typeParser.supportedEffect() === "v4") return
1718

1819
const nodeToVisit: Array<ts.Node> = []
1920
const appendNodeToVisit = (node: ts.Node) => {

0 commit comments

Comments
 (0)