alexprey / sveltedoc-parser

Generate a JSON documentation for a Svelte (https://github.com/sveltejs/svelte) component
https://www.npmjs.com/package/sveltedoc-parser
MIT License
90 stars 7 forks source link

Parse imported type from jsdoc #60

Closed alexprey closed 3 years ago

alexprey commented 3 years ago

The following parameter type:

 * @param {import('./typings.d.ts')}.ImpotedObjectType} The parameter description.

parsed as import('./typings.d.ts').ImportedObjectType, but it's is a good to extend parameter property to have additional information about path of importing and provide the normal clear type name.

{
    "kind": "type",
    "type": "ImportedObjectType",
    "importPath": "./typings.d.ts"
}
soft-decay commented 3 years ago

This would be nice, but I just want to throw out there that it is not jsdoc-specific: https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html#import-types

Still I think it would be worthwhile addition.

alexprey commented 3 years ago

Hm, thanks! So, I think that is better to support both formats