Open ninok opened 5 years ago
Might be related to https://github.com/microsoft/web-build-tools/issues/1455 even though the error message is slightly different (i.e. ts.SyntaxKind.Parameter instead of ts.SyntaxKind.SourceFile)
(Note to self)
Instead of this:
git clone git@github.com:heremaps/harp.gl.git
Do this:
git clone https://github.com/heremaps/harp.gl
The problem is with this declaration from Projection.d.ts:
/**
* Reproject a world position from the given source [[Projection]].
*
* @param sourceProjection The source projection.
* @param worldPos A valid position in the world space defined by the source projection.
* @param result The resulting position reprojected using this [[Projection]].
*/
reprojectPoint<WorldCoordinates extends Vector3Like>(sourceProjection: Projection, worldPos: Vector3Like, result: WorldCoordinates): typeof result;
The return value of this function is typeof result
, which is referring back to the type of one of the other parameters. API Extractor's analyzer doesn't currently support this construct.
We can improve that.
However, you can also workaround it by substituting WorldCoordinates
for typeof result
.
I have to ask, though -- WHYYYY would you write it this way? :-P
Same happens with the leaflet
types definition, probably for the same reason: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/leaflet/index.d.ts
Please prefix the issue title with the project name i.e. [rush], [api-extractor] etc.
Is this a feature or a bug?
Please describe the actual behavior.
If the issue is a bug, how can we reproduce it? Please provide detailed steps and include a GitHub branch if applicable. Your issue will get resolved faster if you can make it easy to investigate.
What is the expected behavior? No error
If this is a bug, please provide the tool version, Node.js version, and OS.
Output of 'api-extractor run --diagnostics`: diagnostics.txt
Api extractor configuration: api-extractor.json