-
Notifications
You must be signed in to change notification settings - Fork 42
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
wrong types - module:modulename/typename turned into just module #89
Comments
I don't think that is valid Typescript, is it? I definitely get errors on the playground trying to use it. I agree the new one is incorrect as well. Assuming |
Yea, I agree the old output was wrong but I had some post process to fix it. Now the output is unusable though. |
Well look into PR if someone doesn't beat me to it. For now just moved my deps back to 2.1.2 |
So, I've been having the same issue and decided to try changing modules to imports, e.g. something like this: if (/^module:/.test(name)) {
const [mod, imp] = name.replace(/^module:/, '').split('~');
return ts.createImportTypeNode(ts.createStringLiteral(mod), ts.createTypeReferenceNode(imp || 'default'));
} This turns: /**
* @typedef {Object} Options
* @property {module:ol/coordinate~Coordinate} coords
* @property {module:cesium~CesiumTerrainProvider} terrain
*/ into declare type Options = {
coords: import("ol/coordinate").Coordinate;
terrain: import("cesium").CesiumTerrainProvider;
}; Thoughts? |
I have jsdocs that look like
tsd-jsdoc 2.1.3 generated the correct (or at least useful for me) signature
tsd-jsdoc 2.2.0+ generates an incorrect signature
The text was updated successfully, but these errors were encountered: