Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReferenceError: parent is not defined #87

Closed
Siedlerchr opened this issue Jul 6, 2019 · 4 comments
Closed

ReferenceError: parent is not defined #87

Siedlerchr opened this issue Jul 6, 2019 · 4 comments

Comments

@Siedlerchr
Copy link

Hi,

I was experimenting to generate typing for the the module: https://github.com/Viglino/ol-ext
when it suddenly stopped with an error:

[18:20:50] [TSD-JSDoc] Unable to resolve type for ol.ordering.yOrdering, none specified in JSDoc. Defaulting to `any`.
[TSD-JSDoc] Unable to resolve type for ol.ordering.zIndex, none specified in JSDoc. Defaulting to `any`.
[TSD-JSDoc] Invalid object key type. It must be `string` or `number`, but got: TemplateAttributes. Defaulting to `string`.

[18:20:50] E:\workspace\ol-ext\node_modules\tsd-jsdoc\dist\type_resolve_helpers.js:199
                    logger_1.warn('Unable to resolve object value type, this is likely due to invalid JSDoc. Defaulting to \`any\`.', parent);
                                                                                                                                      ^

ReferenceError: parent is not defined
    at resolveTree (E:\workspace\ol-ext\node_modules\tsd-jsdoc\dist\type_resolve_helpers.js:199:135)
    at resolveComplexTypeName (E:\workspace\ol-ext\node_modules\tsd-jsdoc\dist\type_resolve_helpers.js:60:12)
    at resolveTypeName (E:\workspace\ol-ext\node_modules\tsd-jsdoc\dist\type_resolve_helpers.js:410:12)
    at resolveType (E:\workspace\ol-ext\node_modules\tsd-jsdoc\dist\type_resolve_helpers.js:366:16)
    at createTypeLiteral (E:\workspace\ol-ext\node_modules\tsd-jsdoc\dist\type_resolve_helpers.js:425:77)
    at resolveTypeLiteral (E:\workspace\ol-ext\node_modules\tsd-jsdoc\dist\type_resolve_helpers.js:417:12)
    at resolveTypeName (E:\workspace\ol-ext\node_modules\tsd-jsdoc\dist\type_resolve_helpers.js:392:24)
    at Object.resolveType (E:\workspace\ol-ext\node_modules\tsd-jsdoc\dist\type_resolve_helpers.js:366:16)
    at Object.createTypedef (E:\workspace\ol-ext\node_modules\tsd-jsdoc\dist\create_helpers.js:209:41)
    at Emitter._parseTreeNode (E:\workspace\ol-ext
[18:20:50] \node_modules\tsd-jsdoc\dist\Emitter.js:174:41)
    at Emitter._parseTree (E:\workspace\ol-ext\node_modules\tsd-jsdoc\dist\Emitter.js:128:31)
    at Emitter.parse (E:\workspace\ol-ext\node_modules\tsd-jsdoc\dist\Emitter.js:38:14)
    at Object.publish (E:\workspace\ol-ext\node_modules\tsd-jsdoc\dist\publish.js:14:13)
    at Object.module.exports.cli.generateDocs (E:\workspace\ol-ext\node_modules\jsdoc\cli.js:441:39)
    at Object.module.exports.cli.processParseResults (E:\workspace\ol-ext\node_modules\jsdoc\cli.js:392:24)
    at module.exports.cli.main (E:\workspace\ol-ext\node_modules\jsdoc\cli.js:235:18) 
@englercj
Copy link
Owner

englercj commented Jul 7, 2019

What version are you using? That code looks out of date.

@Siedlerchr
Copy link
Author

Siedlerchr commented Jul 7, 2019

I'm using the latest npm version
"tsd-jsdoc": "^2.3.0",

jsdoc is installed globall as 3.6.2

The error appears if I run it from commandline or add it to the existing jsdoc and run the gulp doc task.

{
    "tags": {
      "allowUnknownTags": true
    },
    "opts": {
      "destination": "./doc/doc-pages",
      "template": "./node_modules/tsd-jsdoc/dist"
    },
    "plugins": [
      "plugins/markdown",
      "../node_modules/jsdoc-export-default-interop/dist/index"
    ],
    "templates": {
      "cleverLinks": false,
      "monospaceLinks": false,
      "default": {
        "outputSourceFiles": true,
        "useLongnameInNav": true
      },
      "logoFile": "https://openlayers.org/en/latest/examples/resources/logo-70x70.png",
      "systemName": "ol-ext",
      "path": "ink-docstrap",
      "theme": "cerulean",
      "navType": "vertical",
      "linenums": true,
      "includeDate": false
    }
  }

@englercj
Copy link
Owner

englercj commented Jul 7, 2019

Ah sorry I forgot the code is transpiled. I see the issue now.

@englercj
Copy link
Owner

englercj commented Jul 7, 2019

Should be fixed in v2.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants