in lib/facade_converter.ts [578:617]
visitTypeName(typeName: ts.EntityName|ts.PropertyName|ts.PropertyAccessExpression) {
if (ts.isPropertyAccessExpression(typeName)) {
// The LHS of the expression doesn't matter as we will get the global symbol name for the RHS
// of the expression.
this.visitTypeName(typeName.name);
return;
}
if (ts.isQualifiedName(typeName)) {
// The LHS of the expression doesn't matter as we will get the global symbol name for the RHS
// of the expression.
this.visitTypeName(typeName.right);
return;
}
if (!ts.isIdentifier(typeName)) {
this.visit(typeName);
return;
}
const ident = base.ident(typeName);
const identifier = typeName;
if (this.isGenericMethodTypeParameterName(identifier)) {
// DDC generic methods hack - all names that are type parameters to generic methods have to be
// emitted in comments.
this.emitType('dynamic', ident);
return;
}
const custom = this.lookupCustomDartTypeName(
identifier,
{insideComment: this.insideCodeComment, insideTypeArgument: this.insideTypeArgument});
if (custom) {
if (custom.comment) {
this.emitType(custom.name, custom.comment);
} else {
this.emit(custom.name);
}
} else {
this.visit(typeName);
}
}