How to use the typedoc.ReflectionKind.Property 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 / strong-docs / src / ts-parser.ts View on Github external
while (current) {
    if (
      current.kind === ReflectionKind.Global ||
      current.kind === ReflectionKind.ExternalModule
    ) {
      // Skip global/external module nodes
      break;
    }
    const index = current.name.lastIndexOf('.');
    const name =
      index === -1 ? current.name : current.name.substring(index + 1);

    // Check static methods/properties
    if (
      current.kind === ReflectionKind.Method ||
      current.kind === ReflectionKind.Property
    ) {
      if (current.flags.isStatic) {
        names.unshift(name);
      } else {
        names.unshift(`prototype.${name}`);
      }
    } else {
      names.unshift(name);
    }
    current = current.parent;
  }
  const qname = names.join('.');
  return qname;
}
github strongloop / loopback-next / packages / tsdocs / src / ts-parser.ts View on Github external
while (current) {
    if (
      current.kind === ReflectionKind.Global ||
      current.kind === ReflectionKind.ExternalModule
    ) {
      // Skip global/external module nodes
      break;
    }
    const index = current.name.lastIndexOf('.');
    const name =
      index === -1 ? current.name : current.name.substring(index + 1);

    // Check static methods/properties
    if (
      current.kind === ReflectionKind.Method ||
      current.kind === ReflectionKind.Property
    ) {
      if (current.flags.isStatic) {
        names.unshift(name);
      } else {
        names.unshift(`prototype.${name}`);
      }
    } else {
      names.unshift(name);
    }
    current = current.parent;
  }
  const qname = names.join('.');
  return qname;
}
github tom-grey / typedoc-plugin-markdown / src / resources / helpers / member-symbol.ts View on Github external
export function memberSymbol(this: DeclarationReflection) {
  const isStatic = this.flags.map(flag => flag).includes('Static');
  const symbol = '•';
  if (this.kind === ReflectionKind.ConstructorSignature) {
    return '\\+';
  }
  if (this.kind === ReflectionKind.CallSignature) {
    return '▸';
  }
  if (this.kind === ReflectionKind.TypeAlias) {
    return 'Ƭ';
  }
  if (this.kind === ReflectionKind.ObjectLiteral) {
    return '▪';
  }
  if (this.kind === ReflectionKind.Property && isStatic) {
    return '▪';
  }
  return symbol;
}