tangled
alpha
login
or
join now
danabra.mov
/
typelex
56
fork
atom
An experimental TypeSpec syntax for Lexicon
56
fork
atom
overview
issues
1
pulls
2
pipelines
fix namespaces failing to emit
danabra.mov
5 months ago
e2219ee6
a2a5ace9
1/1
deploy.yaml
success
1m 8s
+1
-6
1 changed file
expand all
collapse all
unified
split
packages
emitter
src
emitter.ts
+1
-6
packages/emitter/src/emitter.ts
reviewed
···
164
164
const hasScalars = ns.scalars.size > 0;
165
165
const hasUnions = ns.unions?.size > 0;
166
166
const hasOperations = ns.operations?.size > 0;
167
167
-
const hasChildNamespaces = ns.namespaces.size > 0;
168
167
const hasContent = hasModels || hasScalars || hasUnions;
169
168
170
169
if (hasOperations) {
171
170
return "operation";
172
171
}
173
172
174
174
-
if (hasContent && hasChildNamespaces) {
175
175
-
return "defs";
176
176
-
}
177
177
-
178
178
-
if (hasContent && !hasChildNamespaces) {
173
173
+
if (hasContent) {
179
174
return "content";
180
175
}
181
176