-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
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
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 chainingTo 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. */
}
}Metadata
Metadata
Assignees
Labels
No labels