Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function findConstructs(node: Node, files: string[], parent?: Reflection) {
if (parent) {
node.parent = parent;
}
// Global = 0, ExternalModule = 1
if (
node.kind === ReflectionKind.Global ||
node.kind === ReflectionKind.ExternalModule
) {
let children = node.children;
if (children && children.length > 0) {
children.forEach(function(child) {
findConstructs(child, files, node);
});
}
} else {
if (
(node.kind === ReflectionKind.Class ||
node.kind === ReflectionKind.Interface ||
node.kind === ReflectionKind.TypeAlias ||
node.kind === ReflectionKind.ObjectLiteral ||
node.kind === ReflectionKind.Module ||
node.kind === ReflectionKind.Variable ||
function findConstructs(node: Node, files: string[], parent?: Reflection) {
if (parent) {
node.parent = parent;
}
// Global = 0, ExternalModule = 1
if (
node.kind === ReflectionKind.Global ||
node.kind === ReflectionKind.ExternalModule
) {
let children = node.children;
if (children && children.length > 0) {
children.forEach(function(child) {
findConstructs(child, files, node);
});
}
} else {
if (
(node.kind === ReflectionKind.Class ||
node.kind === ReflectionKind.Interface ||
node.kind === ReflectionKind.TypeAlias ||
node.kind === ReflectionKind.ObjectLiteral ||
node.kind === ReflectionKind.Module ||
node.kind === ReflectionKind.Variable ||
file.reflections.slice().forEach(r => {
if (r.flags.hasFlag(ReflectionFlag.External)) {
console.log(r.name);
CommentPlugin.removeReflection(rs, r);
}
if (r.kind === ReflectionKind.Global) {
CommentPlugin.removeReflection(rs, r);
}
});
});