We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
null
packages/which-pm/index.d.ts
Line 1 in 6da32f0
Line 4 in 6da32f0
In this type declaration, the return type is defined as Promise<whichpm.NPM | whichpm.YARN | whichpm.PNPM | whichpm.Other>.
Promise<whichpm.NPM | whichpm.YARN | whichpm.PNPM | whichpm.Other>
However, according to the actual code, this function could return null.
packages/which-pm/index.js
Line 19 in 6da32f0
Therefore, the correct return type is Promise<whichpm.NPM | whichpm.YARN | whichpm.PNPM | whichpm.Other | null>.
Promise<whichpm.NPM | whichpm.YARN | whichpm.PNPM | whichpm.Other | null>
This type declaration should add null to the type whichpm.Result.
whichpm.Result
- type Result = NPM | YARN | PNPM | Other + type Result = NPM | YARN | PNPM | Other | null
Or, should add null to the return type.
- declare function whichpm (pkgPath: string): Promise<whichpm.Result> + declare function whichpm (pkgPath: string): Promise<whichpm.Result | null>
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
packages/which-pm/index.d.ts
Line 1 in 6da32f0
packages/which-pm/index.d.ts
Line 4 in 6da32f0
In this type declaration, the return type is defined as
Promise<whichpm.NPM | whichpm.YARN | whichpm.PNPM | whichpm.Other>
.However, according to the actual code, this function could return
null
.packages/which-pm/index.js
Line 19 in 6da32f0
Therefore, the correct return type is
Promise<whichpm.NPM | whichpm.YARN | whichpm.PNPM | whichpm.Other | null>
.This type declaration should add
null
to the typewhichpm.Result
.Or, should add
null
to the return type.The text was updated successfully, but these errors were encountered: