Skip to content

requires are included in the docs #1248

Closed
Closed
@hugomrdias

Description

@hugomrdias

Expected Behavior

Generated docs should include only exported functions

Actual Behavior

Generated docs include exported functions plus const's from require's

Steps to reproduce the bug

input file

'use strict'

const fs = require('fs')
const os = require('os')
const path = require('path')
const nanoid = require('nanoid')

/**
 * Temporary folder
 *
 * @param {(d: string) => string} transform - Transform function to add prefixes or sufixes to the unique id
 * @returns {string} - Full real path to a temporary folder
 */
const tempdir = (transform = d => d) => {
  const osTmpDir = fs.realpathSync(os.tmpdir())
  return path.join(osTmpDir, transform(nanoid()))
}

module.exports = {
  tempdir
}

config

{
    "compilerOptions": {
        "allowJs": true,
        "checkJs": true,
        "target": "es2018",
        "moduleResolution": "node",
        "resolveJsonModule": true,
        "stripInternal": true,
        "strict": false,
        "alwaysStrict": true,
        "strictNullChecks": true,
        "noUnusedLocals": true,
        "noUnusedParameters": true,
        "noFallthroughCasesInSwitch": true,
        "noEmitOnError": true,
        "emitDeclarationOnly": true,
        "declaration": true,
        "outDir": "types",
        "removeComments": true,
        "skipLibCheck": true,
        "lib": [
            "WebWorker.ImportScripts",
            "DOM"
        ]
    },
    "files": [
        "src/temp-dir.js"
    ],
    "exclude": [
        "__tests__",
        "node_modules",
        "types"
    ],
    "typedocOptions": {
        "mode": "file",
        "out": "docs",
        "includeDeclarations": true,
        "excludeExternals": true,
        "excludeNotExported": true,
        "theme": "minimal",
        "exclude": [
            "**/node_modules/**"
        ],
        "externalPattern":[
            "**/node_modules/**"
        ]
    }
}

Screenshot 2020-03-26 at 15 55 59

How can i remove those const in the previous pic ? They are not exported and they are external and still they should up in the docs.

Thank you for your help.

Environment

  • Typedoc version: 0.17.3
  • Node.js version: 12
  • OS: mac os

Metadata

Metadata

Assignees

No one assigned

    Labels

    jsThis issue relates to better TS-in-JS support

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions