UNPKG
cmd-ts
Version:
latest (0.14.1)
0.14.1
0.13.0
0.12.1
0.12.0
0.11.0
0.10.2
0.10.1
0.10.0
0.9.0
0.8.0
0.7.0
0.6.9
0.6.8
0.6.7
0.6.6
0.6.5
0.6.4
0.6.3
0.6.2
0.6.1
0.6.0
0.5.1
0.5.0
0.4.1
0.4.0
0.3.2
0.3.1
0.3.0
0.3.0-beta-2
0.0.0-684600f145d167471c0fc091edc2110f2e846c6c
0.0.0-3e900a27a0a123265351578d50a10d744c179e01
> 💻 A type-driven command line argument parser, with awesome error reporting 🤤
cmd-ts.now.sh
cmd-ts
/
dist
/
cjs
/
oneOf.d.ts
6 lines
(5 loc)
•
196 B
TypeScript
View Raw
1
2
3
4
5
6
import
{
Type
}
from
'./type'
;
/** * A union of literals. When you want to take an exact enum value. */
export
declare
function
oneOf<T
extends
string
>(
literals
:
readonly
T[]):
Type
<
string
, T>;