akito0107 / catacli Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
I tried create simple command that uses only arguments (like a file path).
But if do not assignment flag
property for makeCommand
function 2nd arguments, get an Error: TypeError: t2 is not a function
I did investigation for this.
makeCommand
option of flag
is Partial type intype CommandSpec
.
Lines 5 to 26 in 14d54bd
But inside of makeCommand
function, spec.flag
is calling as a function.
Lines 45 to 54 in 14d54bd
In short, if do not assignment flag
property, spec.flag
is undefined but called as as function.
then get an Error: TypeError: t2 is not a function
.
that is correct?
and if correct this, may i try create a pull request?
I tried to create subcommand, using same code as README subcommand example.
There is build error.
ERROR in /path/to/repo/src/index.ts
./src/index.ts
[tsl] ERROR in /path/to/repo/src/index.ts(73,3)
TS2322: Type '(args: any, _: any, helpFn: any, { spec, rawArgs }: { spec: any; rawArgs: any; }) => void' is not assignable to type '(args: { COMMAND_NAME: { value: string; position: number[]; usage: string; }; }, flags: ParseResult<boolean, "opts1"> & ParseResult<number, "opts2"> & ParseResult<string, "opts3">, helpFn?: Function | undefined, metaInfo?: { ...; } | undefined) => any'.
Types of parameters '__3' and 'metaInfo' are incompatible.
Type '{ spec?: CommandSpec<"example", (args: string[]) => ParseResult<boolean, "opts1"> & ParseResult<number, "opts2"> & ParseResult<string, "opts3">, (args: string[]) => { ...; }> | undefined; rawArgs?: string[] | undefined; } | undefined' is not assignable to type '{ spec: any; rawArgs: any; }'.
Type 'undefined' is not assignable to type '{ spec: any; rawArgs: any; }'.
Is there any problem on subcommand example?
$node -v
v14.9.0
$grep catacli package.json
"catacli": "^0.1.3",
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are currently rate-limited. Click on a checkbox below to force their creation now.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
@types/jest
, jest
, ts-jest
)@typescript-eslint/eslint-plugin
, @typescript-eslint/parser
).github/workflows/pr.yml
actions/checkout v1
actions/setup-node v1
package.json
source-map-support ^0.5.12
@types/jest 27.5.2
@types/node 20.12.11
@typescript-eslint/eslint-plugin 1.13.0
@typescript-eslint/parser 1.13.0
eslint 7.32.0
eslint-config-prettier 8.10.0
eslint-plugin-prettier 4.0.0
jest 27.5.1
prettier 1.19.1
rimraf 3.0.2
ts-jest 27.1.4
ts-node 9.1.1
typescript 4.9.5
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Error type: Cannot find preset's package (github>whitesource/merge-confidence:beta)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.