Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
static getNodeTitle(node: Node) {
let type = node.kindString;
const kind = node.kind;
if (kind === ReflectionKind.Module) type = 'Namespace';
if (kind === ReflectionKind.Enum) type = 'Enum';
if (kind === ReflectionKind.EnumMember) type = '';
if (kind === ReflectionKind.TypeAlias) type = 'Type';
if (kind === ReflectionKind.ObjectLiteral) type = 'Object';
let prefix = '';
if (kind === ReflectionKind.Method || kind === ReflectionKind.Property) {
if (node.flags.isStatic) {
prefix = 'static ';
}
}
if (
kind === ReflectionKind.Method ||
kind === ReflectionKind.Constructor ||
kind === ReflectionKind.Function
)
return prefix + node.name + '()';
if (kind === ReflectionKind.Accessor) return '>' + node.name;
if (kind === ReflectionKind.Variable || kind === ReflectionKind.Property)
return prefix + node.name;
if (!type) return node.name;
return type + ': ' + node.name;
}
static getNodeTitle(node: Node) {
let type = node.kindString;
const kind = node.kind;
if (kind === ReflectionKind.Module) type = 'Namespace';
if (kind === ReflectionKind.Enum) type = 'Enum';
if (kind === ReflectionKind.EnumMember) type = '';
if (kind === ReflectionKind.TypeAlias) type = 'Type';
if (kind === ReflectionKind.ObjectLiteral) type = 'Object';
let prefix = '';
if (kind === ReflectionKind.Method || kind === ReflectionKind.Property) {
if (node.flags.isStatic) {
prefix = 'static ';
}
}
if (
kind === ReflectionKind.Method ||
kind === ReflectionKind.Constructor ||
kind === ReflectionKind.Function
)
return prefix + node.name + '()';
if (kind === ReflectionKind.Accessor) return '>' + node.name;
if (kind === ReflectionKind.Variable || kind === ReflectionKind.Property)
return prefix + node.name;
if (!type) return node.name;
return type + ': ' + node.name;
}
static getNodeTitle(node: Node) {
let type = node.kindString;
const kind = node.kind;
if (kind === ReflectionKind.Module) type = 'Namespace';
if (kind === ReflectionKind.Enum) type = 'Enum';
if (kind === ReflectionKind.EnumMember) type = '';
if (kind === ReflectionKind.TypeAlias) type = 'Type';
if (kind === ReflectionKind.ObjectLiteral) type = 'Object';
let prefix = '';
if (kind === ReflectionKind.Method || kind === ReflectionKind.Property) {
if (node.flags.isStatic) {
prefix = 'static ';
}
}
if (
kind === ReflectionKind.Method ||
kind === ReflectionKind.Constructor ||
kind === ReflectionKind.Function
)
return prefix + node.name + '()';
if (kind === ReflectionKind.Accessor) return '>' + node.name;
if (kind === ReflectionKind.Variable || kind === ReflectionKind.Property)
return prefix + node.name;
if (!type) return node.name;
return type + ': ' + node.name;
}
}
static getNodeTitle(node: Node) {
let type = node.kindString;
const kind = node.kind;
if (kind === ReflectionKind.Module) type = 'Namespace';
if (kind === ReflectionKind.Enum) type = 'Enum';
if (kind === ReflectionKind.EnumMember) type = '';
if (kind === ReflectionKind.TypeAlias) type = 'Type';
if (kind === ReflectionKind.ObjectLiteral) type = 'Object';
let prefix = '';
if (kind === ReflectionKind.Method || kind === ReflectionKind.Property) {
if (node.flags.isStatic) {
prefix = 'static ';
}
}
if (
kind === ReflectionKind.Method ||
kind === ReflectionKind.Constructor ||
kind === ReflectionKind.Function
)
return prefix + node.name + '()';
if (kind === ReflectionKind.Accessor) return '>' + node.name;
if (kind === ReflectionKind.Variable || kind === ReflectionKind.Property)
return prefix + node.name;
if (!type) return node.name;
return type + ': ' + node.name;
}
}