in src/transforms/deprecated-remover.ts [253:274]
private verifyCallable(
assembly: Assembly,
strippedFqns: ReadonlySet<string>,
method: Method | Initializer,
): readonly JsiiDiagnostic[] {
const diagnostics = new Array<JsiiDiagnostic>();
const deprecatedReturnFqn =
isMethod(method) && method.returns && this.tryFindReference(method.returns.type, strippedFqns);
if (deprecatedReturnFqn) {
diagnostics.push(this.makeDiagnostic(deprecatedReturnFqn, 'Method', method, assembly));
}
if (method.parameters) {
for (const parameter of method.parameters) {
const deprecatedTypeFqn = this.tryFindReference(parameter.type, strippedFqns);
if (deprecatedTypeFqn) {
diagnostics.push(this.makeDiagnostic(deprecatedTypeFqn, 'Parameter', parameter, assembly));
}
}
}
return diagnostics;
}