Closed SuperSodaSea closed 2 years ago
This does fix the warning but not the spirit of the issue :D. I'll check this out tonight and make it also parse the type definition properties
@ShukantPal I'll wait patiently :)
Added the data type to the TypeDef document signatures (with formatting!)
@ShukantPal I tried to bump @webdoc/cli
to 2.2.0 in pixi.js
and got errors like this:
[Indexer]: Parameter node couldn't be parsed, enable warning logs for more detail
Node {
type: 'TSCallSignatureDeclaration',
start: 1332,
end: 1369,
loc: SourceLocation {
start: Position { line: 67, column: 4, index: 1332 },
end: Position { line: 67, column: 41, index: 1369 },
filename: undefined,
identifierName: undefined
},
typeParameters: undefined,
parameters: [
Node {
type: 'Identifier',
start: 1333,
end: 1347,
loc: [SourceLocation],
name: 'urlStr',
typeAnnotation: [Node]
}
],
typeAnnotation: Node {
type: 'TSTypeAnnotation',
start: 1348,
end: 1368,
loc: SourceLocation {
start: [Position],
end: [Position],
filename: undefined,
identifierName: undefined
},
typeAnnotation: Node {
type: 'TSTypeReference',
start: 1350,
end: 1368,
loc: [SourceLocation],
typeName: [Node]
}
}
}
***unknown (typescript) data-type node***
Node {
type: 'TSCallSignatureDeclaration',
start: 1374,
end: 1477,
loc: SourceLocation {
start: Position { line: 68, column: 4, index: 1374 },
end: Position { line: 68, column: 107, index: 1477 },
filename: undefined,
identifierName: undefined
},
typeParameters: undefined,
parameters: [
Node {
type: 'Identifier',
start: 1375,
end: 1389,
loc: [SourceLocation],
name: 'urlStr',
typeAnnotation: [Node]
},
Node {
type: 'Identifier',
start: 1391,
end: 1426,
loc: [SourceLocation],
name: 'parseQueryString',
typeAnnotation: [Node]
},
Node {
type: 'Identifier',
start: 1428,
end: 1455,
loc: [SourceLocation],
name: 'slashesDenoteHost',
optional: true,
typeAnnotation: [Node]
}
],
typeAnnotation: Node {
type: 'TSTypeAnnotation',
start: 1456,
end: 1476,
loc: SourceLocation {
start: [Position],
end: [Position],
filename: undefined,
identifierName: undefined
},
typeAnnotation: Node {
type: 'TSTypeReference',
start: 1458,
end: 1476,
loc: [SourceLocation],
typeName: [Node]
}
}
}
***unknown (typescript) data-type node***
...
Seems to be code here: https://github.com/pixijs/pixijs/blob/3ba43e50030641e2cb028c7c265e80ce0fdf6fff/packages/utils/src/url.ts#L66-L80
I added parsing for namee method signatures but not call signatures - this would be a new PR :D
Just in case, don't forget about the ArrayPattern :)
@SuperSodaSea haven't forgotten about this. Prolly need a couple weeks to finish that part
Should fix
[DocParser]: Failed to parse doc for (@Unnamed)
caused by/** ... */ type Foo = {}
.See also: https://github.com/pixijs/pixijs/issues/8720