You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I imagine there's some strategies available for external packages to have links resolved in some way (e.g. to the npm package URL?). I have a feeling I've missed this config or plugin or I'm thinking about the problem wrongly.
To take an example, we have a module which can consume a LoggerOptions configuration which is provided by the winston library and passed on to that library during initialisation. See https://www.npmjs.com/package/winston
Although the details of the type are suitably hoisted and rendered, the LoggerOptions type ends up with a non-linked source reference below its definition like
Defined in node_modules/.pnpm/[email protected]/node_modules/winston/index.d.ts:84
I can almost certainly configure external to be terser about files in node_modules/.pnpm so it doesn't spit out the whole path maybe.
However, better would be for our use of a type like LoggerOptions to imply some onward journey to standard resources for the winston library.
Is there any scheme available to have types referenced from npm-resolved libraries to have an onward journey to documentation of some kind.
Search terms
Sourcelink, npm module,
Question
I imagine there's some strategies available for external packages to have links resolved in some way (e.g. to the npm package URL?). I have a feeling I've missed this config or plugin or I'm thinking about the problem wrongly.
To take an example, we have a module which can consume a
LoggerOptions
configuration which is provided by thewinston
library and passed on to that library during initialisation. See https://www.npmjs.com/package/winstonAlthough the details of the type are suitably hoisted and rendered, the
LoggerOptions
type ends up with a non-linked source reference below its definition likeI can almost certainly configure
external
to be terser about files innode_modules/.pnpm
so it doesn't spit out the whole path maybe.However, better would be for our use of a type like
LoggerOptions
to imply some onward journey to standard resources for thewinston
library.Is there any scheme available to have types referenced from npm-resolved libraries to have an onward journey to documentation of some kind.
For example in this particular case this would mean there was some link to e.g. https://www.npmjs.com/package/winston maybe? Maybe https://github.com/winstonjs/winston/blob/c69cdb0cec15a138e0b6e374501e027d1c39606c/index.d.ts#L84 would be even better if there's a way to resolve it.
The text was updated successfully, but these errors were encountered: