Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (!apiMethod.supportedName) {
return;
}
for (const param of apiMethod.params) {
if (apiMethod.documentation.parameters[param.name] == null) {
apiMethod.documentation.parameters[param.name] = {} as any;
}
this.visitApiParam(param, apiMethod.documentation.parameters[param.name]);
}
let newNode: Object;
if (apiMethod.name === "__constructor") {
newNode = {
kind: ApiJsonFile.convertKindToJson(ApiItemKind.Constructor),
signature: apiMethod.getDeclarationLine(),
parameters: apiMethod.documentation.parameters || {},
deprecatedMessage: apiMethod.documentation.deprecatedMessage || [],
summary: apiMethod.documentation.summary || [],
remarks: apiMethod.documentation.remarks || []
};
} else {
const returnValueNode: IReturn = {
type: apiMethod.returnType,
description: apiMethod.documentation.returnsMessage
};
newNode = {
kind: ApiJsonFile.convertKindToJson(apiMethod.kind),
signature: apiMethod.getDeclarationLine(),
accessModifier: apiMethod.accessModifier ? AccessModifier[apiMethod.accessModifier].toLowerCase() : "",