File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -6,16 +6,28 @@ import {
6
6
PredicateType ,
7
7
} from "https://deno.land/x/unknownutil@v3.10.0/mod.ts#^" ;
8
8
9
+ /**
10
+ * Predicate that the value is FileFormat.
11
+ */
9
12
export const isFileFormat = is . LiteralOneOf ( [ "unix" , "dos" , "mac" ] as const ) ;
10
13
11
14
export type FileFormat = PredicateType < typeof isFileFormat > ;
12
15
16
+ /**
17
+ * Assert that the value is FileFormat.
18
+ */
13
19
export const assertFileFormat = ( v : unknown ) : asserts v is FileFormat =>
14
20
assert ( v , isFileFormat ) ;
15
21
22
+ /**
23
+ * Ensure that the value is FileFormat.
24
+ */
16
25
export const ensureFileFormat = ( v : unknown ) : FileFormat =>
17
26
ensure ( v , isFileFormat ) ;
18
27
28
+ /**
29
+ * Maybe that the value is FileFormat.
30
+ */
19
31
export const maybeFileFormat = ( v : unknown ) : FileFormat | undefined =>
20
32
maybe ( v , isFileFormat ) ;
21
33
You can’t perform that action at this time.
0 commit comments