Skip to content

Commit b97ecef

Browse files
authored
Merge branch 'main' into shuuji3/test/setup-bsky-appview
2 parents 3c20b5d + 6a749b7 commit b97ecef

File tree

2 files changed

+592
-10
lines changed

2 files changed

+592
-10
lines changed

packages/lex-cli/src/generator/resolvers/complex.ts

+5
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ export function resolveRefType(def: RefSchema): string {
1919
}
2020

2121
export function resolveUnionType(def: RefUnionSchema): string {
22+
// empty refs ([]) never has any type
23+
if (def.refs.length === 0) {
24+
return 'never';
25+
}
26+
2227
const refs = def.refs.toSorted(sortName).map((raw) => {
2328
const [ns, ref] = raw.split('#');
2429
return (ns ? `${toNamespace(ns)}.` : '') + (ref ? toUpper(ref) : 'Main');

0 commit comments

Comments
 (0)