in build-scripts/doc-gen/parser.ts [472:500]
function serializeInterfaceParams(
checker: ts.TypeChecker, symbol: ts.Symbol): DocFunctionParam[] {
const type = checker.getDeclaredTypeOfSymbol(symbol);
const properties = checker.getPropertiesOfType(type)
const params: DocFunctionParam[] = properties.map(prop => {
const name = prop.getName();
// Note: This is where we could recurse to serialize nested interface types
// The display of such an interface might be confusing though.
// We don't support generics on interfaces yet, so pass an empty
// generic map.
const identifierGenericMap = {};
const paramType =
util.parameterTypeToString(checker, prop, identifierGenericMap);
const documentation =
ts.displayPartsToString(prop.getDocumentationComment(checker));
const optional = checker.isOptionalParameter(
symbol.valueDeclaration as ts.ParameterDeclaration);
return {
name,
type: paramType,
documentation,
optional,
isConfigParam: true,
};
});
return params;
}