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
A custom re-usable Arg created in @oclif/core 3.27.0 is throwing an error when trying to upgrade to @oclif/core 4.0.9:
error TS2742: The inferred type of 'UrlArg' cannot be named without a reference to '../../node_modules/@oclif/core/lib/interfaces/parser'. This is likely not portable. A type annotation is necessary.
The Arg in question reports a type of ArgDefinition<Url, Record<string, unknown>>
It's also unclear as to why this started happening in 4.x since it doesn't appear there were any major changes to either interfaces/index.ts or interfaces/parser.ts
Describe the bug
A custom re-usable Arg created in
@oclif/core
3.27.0 is throwing an error when trying to upgrade to@oclif/core
4.0.9:error TS2742: The inferred type of 'UrlArg' cannot be named without a reference to '../../node_modules/@oclif/core/lib/interfaces/parser'. This is likely not portable. A type annotation is necessary.
The Arg in question reports a type of
ArgDefinition<Url, Record<string, unknown>>
Upon investigation, it appears that exporting
ArgDefinition
in https://github.com/oclif/core/blob/main/src/interfaces/index.ts fixes the issue, although it's not clear to me if there is a more correct way to do this.It's also unclear as to why this started happening in 4.x since it doesn't appear there were any major changes to either interfaces/index.ts or interfaces/parser.ts
To Reproduce
Steps to reproduce the behavior:
Create a custom arg:
Expected behavior
Typescript code compiles and arg is usable
Screenshots
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: