How to use the typedoc/dist/lib/models/reflections/abstract.ReflectionKind.Method function in typedoc

To help you get started, we’ve selected a few typedoc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github strongloop / loopback-next / packages / tsdocs / src / ts-helper.ts View on Github external
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;
  }
github strongloop / strong-docs / src / ts-helper.ts View on Github external
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;
  }
github strongloop / strong-docs / src / ts-helper.ts View on Github external
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;
  }
}
github strongloop / loopback-next / packages / tsdocs / src / ts-helper.ts View on Github external
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;
  }
}