Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.forEach(prop => {
const isOptional = !prop.required ? '?' : '';
const isReadonly = prop.additionalTags.includes(DocumentationTag.AVAILABILITY_READONLY)
? 'readonly '
: '';
moduleAPI.push(`${isReadonly}${prop.name}${isOptional}: ${utils.typify(prop)};`);
});
}
.map(tag => {
switch (tag) {
case DocumentationTag.STABILITY_DEPRECATED:
return ' * @deprecated';
case DocumentationTag.STABILITY_EXPERIMENTAL:
return ' * @experimental';
case DocumentationTag.OS_LINUX:
nodePlatforms.push('linux');
break;
case DocumentationTag.OS_MACOS:
nodePlatforms.push('darwin');
break;
case DocumentationTag.OS_MAS:
nodePlatforms.push('mas');
break;
case DocumentationTag.OS_WINDOWS:
nodePlatforms.push('win32');
break;
}
return '';
})
.filter(tag => tag),
.map(tag => {
switch (tag) {
case DocumentationTag.STABILITY_DEPRECATED:
return ' * @deprecated';
case DocumentationTag.STABILITY_EXPERIMENTAL:
return ' * @experimental';
case DocumentationTag.OS_LINUX:
nodePlatforms.push('linux');
break;
case DocumentationTag.OS_MACOS:
nodePlatforms.push('darwin');
break;
case DocumentationTag.OS_MAS:
nodePlatforms.push('mas');
break;
case DocumentationTag.OS_WINDOWS:
nodePlatforms.push('win32');
break;
}
return '';
})
.filter(tag => tag),
.map(tag => {
switch (tag) {
case DocumentationTag.STABILITY_DEPRECATED:
return ' * @deprecated';
case DocumentationTag.STABILITY_EXPERIMENTAL:
return ' * @experimental';
case DocumentationTag.OS_LINUX:
nodePlatforms.push('linux');
break;
case DocumentationTag.OS_MACOS:
nodePlatforms.push('darwin');
break;
case DocumentationTag.OS_MAS:
nodePlatforms.push('mas');
break;
case DocumentationTag.OS_WINDOWS:
nodePlatforms.push('win32');
break;
}
return '';
})
.filter(tag => tag),
.map(tag => {
switch (tag) {
case DocumentationTag.STABILITY_DEPRECATED:
return ' * @deprecated';
case DocumentationTag.STABILITY_EXPERIMENTAL:
return ' * @experimental';
case DocumentationTag.OS_LINUX:
nodePlatforms.push('linux');
break;
case DocumentationTag.OS_MACOS:
nodePlatforms.push('darwin');
break;
case DocumentationTag.OS_MAS:
nodePlatforms.push('mas');
break;
case DocumentationTag.OS_WINDOWS:
nodePlatforms.push('win32');
break;
}
return '';
})
.filter(tag => tag),
.map(tag => {
switch (tag) {
case DocumentationTag.STABILITY_DEPRECATED:
return ' * @deprecated';
case DocumentationTag.STABILITY_EXPERIMENTAL:
return ' * @experimental';
case DocumentationTag.OS_LINUX:
nodePlatforms.push('linux');
break;
case DocumentationTag.OS_MACOS:
nodePlatforms.push('darwin');
break;
case DocumentationTag.OS_MAS:
nodePlatforms.push('mas');
break;
case DocumentationTag.OS_WINDOWS:
nodePlatforms.push('win32');
break;
}
.map(tag => {
switch (tag) {
case DocumentationTag.STABILITY_DEPRECATED:
return ' * @deprecated';
case DocumentationTag.STABILITY_EXPERIMENTAL:
return ' * @experimental';
case DocumentationTag.OS_LINUX:
nodePlatforms.push('linux');
break;
case DocumentationTag.OS_MACOS:
nodePlatforms.push('darwin');
break;
case DocumentationTag.OS_MAS:
nodePlatforms.push('mas');
break;
case DocumentationTag.OS_WINDOWS:
nodePlatforms.push('win32');
break;
}
return '';
})