in src/jsii2schema.ts [89:141]
export function schemaForTypeReference(type: jsiiReflect.TypeReference, ctx: SchemaContext): any {
const prim = schemaForPrimitive(type);
if (prim) {
return prim;
}
const arr = schemaForArray(type, ctx);
if (arr) {
return arr;
}
const map = schemaForMap(type, ctx);
if (map) {
return map;
}
const union = schemaForUnion(type, ctx);
if (union) {
return union;
}
const constructRef = schemaForConstructRef(type);
if (constructRef) {
return constructRef;
}
const iface = schemaForInterface(type.type, ctx);
if (iface) {
return iface;
}
const enm = schemaForEnum(type.type);
if (enm) {
return enm;
}
const enumLike = schemaForEnumLikeClass(type.type, ctx);
if (enumLike) {
return enumLike;
}
const cls = schemaForPolymorphic(type.type, ctx);
if (cls) {
return cls;
}
if (!ctx.hasWarningsOrErrors) {
ctx.error('didn\'t match any schematizable shape');
}
return undefined;
}