Comparing version 3.0.0-rc.11 to 3.0.0-rc.12
@@ -28,7 +28,6 @@ import { StrictValidator } from "typanion"; | ||
export declare function String(): CommandOptionReturn<string>; | ||
export declare function String<T = string>(opts: Omit<StringPositionalFlags<T>, 'required'>): CommandOptionReturn<T>; | ||
export declare function String<T = string>(opts: StringPositionalFlags<T> & { | ||
required: false; | ||
}): CommandOptionReturn<T | undefined>; | ||
export declare function String<T = string>(opts: StringPositionalFlags<T>): CommandOptionReturn<T | undefined>; | ||
export declare function String<T = string>(opts: StringPositionalFlags<T>): CommandOptionReturn<T>; | ||
/** | ||
@@ -35,0 +34,0 @@ * Used to annotate string options. Such options will be typed as strings |
@@ -52,2 +52,3 @@ 'use strict'; | ||
transformer(builder, key, state) { | ||
var _a; | ||
for (let i = 0; i < state.positionals.length; ++i) { | ||
@@ -68,3 +69,3 @@ // We skip NoLimits extras. We only care about | ||
const [positional] = state.positionals.splice(i, 1); | ||
return positional.value; | ||
return utils.applyValidator((_a = opts.name) !== null && _a !== void 0 ? _a : key, positional.value, opts.validator); | ||
} | ||
@@ -71,0 +72,0 @@ return undefined; |
{ | ||
"name": "clipanion", | ||
"version": "3.0.0-rc.11", | ||
"version": "3.0.0-rc.12", | ||
"main": "lib/advanced/index", | ||
@@ -15,3 +15,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"typanion": "^3.3.0" | ||
"typanion": "^3.3.1" | ||
}, | ||
@@ -18,0 +18,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
195658
4633
Updatedtypanion@^3.3.1