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
Expected 1 arguments, but got 0.ts(2554)
index.d.ts(208, 11): An argument for'argv' was not provided.
(method) local.Command.parse(argv: string[]): local.Command
Parse argv, settings options and invoking commands when defined.
@param argv
@returns — for chaining
To replicate, create a new project as described above. For reference, here is the tsconfig I'm using:
{
"compilerOptions": {
"target": "es2016"/* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,"module": "Node16"/* Specify what module code is generated. */,"rootDir": "./src"/* Specify the root folder within your source files. */,"moduleResolution": "Node16"/* Specify how TypeScript looks up a file from a given module specifier. */,"outDir": "./dist"/* Specify an output folder for all emitted files. */,"esModuleInterop": true/* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,"forceConsistentCasingInFileNames": true/* Ensure that casing is correct in imports. */,"strict": true/* Enable all strict type-checking options. */,"skipLibCheck": true/* Skip type checking all .d.ts files. */
}
}
The text was updated successfully, but these errors were encountered:
I was not able to reproduce this. I suspect TypeScript is finding an old version of the typings file, as local has been gone for a while (#1081). If you are using npm, you can have a look at your Commander dependency using:
Using the latest commander.js with the latest typescript (and Node v18.12.1 FWIW), the Quick Start code from https://github.com/tj/commander.js/blob/HEAD/examples/string-util.js (but import via
import { Command } from "commander";
)Gets a squiggly line under program.parse() with
To replicate, create a new project as described above. For reference, here is the tsconfig I'm using:
The text was updated successfully, but these errors were encountered: