microsoft/typescript-go · error
Unknown kind alias member ${member} in ${alias.name}
Error message
Unknown kind alias member ${member} in ${alias.name} What it means
validate() checks each kind alias's member list; a member name is neither a known kind alias nor a kind element. The kind alias union references an undefined member.
Source
Thrown at _scripts/schema.ts:1165
}
if (!listAlias.elementTypeName) {
throw new Error(`List alias ${listAlias.name} is missing an element type`);
}
if (listAlias.elementType !== this.resolveType(listAlias.elementTypeName)) {
throw new Error(`List alias element type cache mismatch for ${listAlias.name}`);
}
}
for (const marker of this.kindMarkers()) {
if (!this.hasKindElement(marker.value) && !this.kindMarkers().some(candidate => candidate.name === marker.value)) {
throw new Error(`Kind marker ${marker.name} references undefined kind or marker ${marker.value}`);
}
}
for (const alias of this.kindAliases()) {
for (const member of alias.members) {
if (!this.hasKindAlias(member) && !this.hasKindElement(member)) {
throw new Error(`Unknown kind alias member ${member} in ${alias.name}`);
}
}
}
}
primitiveType(name: string): PrimitiveType {
const existing = this.primitiveTypeMap.get(name);
if (existing) return existing;
const type = new PrimitiveType(this, name);
this.primitiveTypeMap.set(name, type);
return type;
}
kindType(value: string): KindType {
const existing = this.kindTypeMap.get(value);
if (existing) return existing;
const type = new KindType(this, value);
this.kindTypeMap.set(value, type);
View on GitHub (pinned to 1bcfa18d79)
Solutions
- Correct or remove the unknown member from the alias in the schema source
- Define the missing kind/alias if the member is legitimately new
- Regenerate and revalidate the schema
Defensive patterns
Strategy: validation
Validate before calling
// precheck: every kind-alias member resolves to a known alias or kind for (const a of schema.kindAliases()) for (const m of a.members) assert(schema.hasKindAlias(m) || schema.hasKindElement(m));
Prevention
- Keep member lists in sync when kinds are renamed or deleted
- Run validate() locally before pushing schema changes
When it happens
Trigger: Listing a member in a kind alias that was never defined as a kind or alias; typos; deleting a kind without pruning alias member lists.
Common situations: Editing kind aliases in the AST schema; stale member lists after kind removals in a refactor.
Related errors
- List alias ${listAlias.name} did not resolve to an alias of
- List alias ${listAlias.name} is missing an element type
- Kind marker ${marker.name} references undefined kind or mark
- Source file does not exist: ${src}
- Unsupported OS: ${os}
AI-assisted analysis of microsoft/typescript-go@1bcfa18d79 (2026-08-16).
Data as JSON: /api/errors/b36b8fa5963715b5.
Report an issue: GitHub.