fix(client): loosen opaque promise outputs

This commit is contained in:
Dax Raad 2026-07-11 16:36:49 -04:00
commit 1956497f42
3 changed files with 135 additions and 114 deletions

View file

@ -827,7 +827,7 @@ function structuralTypes(schemas: ReadonlyArray<Schema.Top>, mutable: boolean, r
const output = type
.replaceAll(/ & Brand\.Brand<"[^"]+">/g, "")
.replaceAll("Schema.Json", "JsonValue")
.replaceAll(/(?<!["'])\bunknown\b(?!["'])/g, "JsonValue")
.replaceAll(/(?<!["'])\bunknown\b(?!["'])/g, "any")
return mutable ? mutableType(output) : output
}
return {