Skip to content
New issue

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

TypeScript errors in config #7

Open
selfagency opened this issue Jan 14, 2025 · 0 comments
Open

TypeScript errors in config #7

selfagency opened this issue Jan 14, 2025 · 0 comments

Comments

@selfagency
Copy link

using your example code, typescript instantly starts throwing errors.

const commands = {
	new: {desc: `Creates a new user account`},
	duplicate: {desc: `Duplicates a user account`}
};

const flags = {
	random: {
		desc: `Prints random data`,
		type: 'boolean',
		default: true
	}
};

const helpText = meowHelp({
	name: `cli-command`,
	flags,
	commands
});

meow(helpText, {flags});

the error

Type '{ debug: { type: string; alias: string; desc: string; }; }' is not assignable to type 'AnyFlags'.
  Property 'debug' is incompatible with index signature.
    Type '{ type: string; alias: string; desc: string; }' is not assignable to type 'AnyFlag'.
      Type '{ type: string; alias: string; desc: string; }' is not assignable to type 'Flag<"number", number[], true>'.
        Types of property 'type' are incompatible.
          Type 'string' is not assignable to type '"number"'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant