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 see the other type is also listed in the next line, but typescript doesn't recognise it as an overload
meszaros-lajos-gyorgy
changed the title
Incorrect input type for the get method in jsdoc
Typescript fails to compile when get method's first parameter is not a string
Dec 7, 2022
importhqfrom'alias-hq'typeTsOrJsConfig={rootUrl: stringbaseUrl: stringpaths: Record<string,string[]>}typePluginCallback=(params: TsOrJsConfig)=>anyconstget=hq.getas(plugin: string|PluginCallback)=>any// ... use get instead of hq.get
The following line says that the method's first parameter is a string:
https://github.com/davestewart/alias-hq/blob/main/src/index.js#L247
and vscode is yelling about it in my typescript project as expected:
The text was updated successfully, but these errors were encountered: