in src/jsii2schema.ts [441:464]
export function isSerializableTypeReference(type: jsiiReflect.TypeReference, errorPrefix?: string): boolean {
if (type.primitive) {
return true;
}
if (type.arrayOfType) {
return isSerializableTypeReference(type.arrayOfType, errorPrefix);
}
if (type.mapOfType) {
return isSerializableTypeReference(type.mapOfType, errorPrefix);
}
if (type.type) {
return isSerializableType(type.type, errorPrefix);
}
if (type.unionOfTypes) {
return type.unionOfTypes.some(x => isSerializableTypeReference(x, errorPrefix));
}
return false;
}