How to use the typedoc.ReflectionKind 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 swimos / swim / swim-js / swim-core-js / @swim / build / main / DocTarget.ts View on Github external
}

    const targetReflections: {[uid: string]: TargetReflection | undefined} = {};

    const targets = this.target.transitiveDeps();
    for (let i = 0; i < targets.length; i += 1) {
      const target = targets[i];
      const indexPath = path.resolve(target.baseDir, "index.ts");
      const targetInfo = this.fileTargetMap[indexPath];
      if (targetInfo) {
        delete this.fileTargetMap[indexPath];
        targetReflections[target.uid] = targetInfo;

        const targetReflection = targetInfo.reflection as ContainerReflection;
        targetReflection.name = target.project.name;
        targetReflection.kind = typedoc.ReflectionKind.Module;

        const readmePath = path.join(target.project.baseDir, target.project.build.readme || "README.md");
        if (fs.existsSync(readmePath)) {
          const readme = fs.readFileSync(readmePath);
          targetReflection.comment = new Comment("", readme.toString());
        }
      }
    }

    const rootInfo = targetReflections[this.target.uid]!;
    const rootTarget = rootInfo.target;
    const rootReflection = rootInfo.reflection as ContainerReflection;

    for (const fileName in this.fileTargetMap) {
      // lift file reflections into library reflection
      const fileInfo = this.fileTargetMap[fileName]!;
github wix / react-native-navigation / scripts / gen-docs / ClassParser.ts View on Github external
private parseMethods(reflection: Typedoc.DeclarationReflection): MethodContext[] {
    const methodReflections = reflection.getChildrenByKind(Typedoc.ReflectionKind.Method);
    const methods = methodReflections.map((m) => this.parseMethod(m))
      .filter((m) => !m.source.includes('/node_modules/'))
      .sort((a, b) => a.line - b.line);
    return methods;
  }
github wix / react-native-navigation / scripts / gen-docs / ClassParser.ts View on Github external
private parseProperties(reflection: Typedoc.DeclarationReflection): PropertyContext[] {
    const propsReflections = reflection.getChildrenByKind(Typedoc.ReflectionKind.Property);
    return propsReflections.map((propReflection) => ({
      name: propReflection.name,
      type: propReflection.type.toString()
    }));
  }
}
github swimos / swim / swim-system-js / swim-core-js / @swim / build / main / DocTarget.ts View on Github external
}

    const targetReflections: {[uid: string]: TargetReflection | undefined} = {};

    const targets = this.target.transitiveDeps();
    for (let i = 0; i < targets.length; i += 1) {
      const target = targets[i];
      const indexPath = path.resolve(target.baseDir, "index.ts");
      const targetInfo = this.fileTargetMap[indexPath];
      if (targetInfo) {
        delete this.fileTargetMap[indexPath];
        targetReflections[target.uid] = targetInfo;

        const targetReflection = targetInfo.reflection as typedoc.ContainerReflection;
        targetReflection.name = target.project.name;
        targetReflection.kind = typedoc.ReflectionKind.Module;

        const readmePath = path.join(target.project.baseDir, target.project.readme || "README.md");
        if (fs.existsSync(readmePath)) {
          const readme = fs.readFileSync(readmePath);
          targetReflection.comment = new Comment("", readme.toString());
        }
      }
    }

    const rootInfo = targetReflections[this.target.uid]!;
    const rootTarget = rootInfo.target;
    const rootReflection = rootInfo.reflection as typedoc.ContainerReflection;

    const rootReadmePath = path.join(this.target.project.baseDir, this.target.project.readme || "README.md");
    if (fs.existsSync(rootReadmePath)) {
      const readme = fs.readFileSync(rootReadmePath);