-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
bug 🐜Something isn't workingSomething isn't workingcore ⚙Relates to the @stricli/core packageRelates to the @stricli/core package
Description
Describe the bug
Adding flag aliases causes type errors when using func
or specific loader
styles.
To Reproduce
buildCommand({
parameters: {
flags: {
repo: {
kind: 'parsed',
parse: String,
brief: '',
},
},
aliases: {
r: 'repo', // ts error: Type 'string' is not assignable to type 'undefined'.
},
},
docs: { brief: 'Add release to releases.txt' },
// ts error in the next line. it disappears when you remove aliases.
func({ repo }: { repo: string }) {
console.log(repo);
},
});
See reproduction here: https://stackblitz.com/edit/stricli-alias-repro?file=cli.ts.
There are three examples in linked file, out of which second and third have type errors.
Expected behavior
No type errors.
Environment (please complete the following information):
- Operating System and Version: macOS 15.5
- Browser [e.g. Firefox, Safari] (if applicable): N/A
Additional context
Thank you for maintaining this library :)
Metadata
Metadata
Assignees
Labels
bug 🐜Something isn't workingSomething isn't workingcore ⚙Relates to the @stricli/core packageRelates to the @stricli/core package