Skip to content

Commit 64fc101

Browse files
committed
📝 Add documentations for FileFormat
1 parent 19a3d83 commit 64fc101

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

denops_std/buffer/fileformat.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,28 @@ import {
66
PredicateType,
77
} from "https://deno.land/x/unknownutil@v3.10.0/mod.ts#^";
88

9+
/**
10+
* Predicate that the value is FileFormat.
11+
*/
912
export const isFileFormat = is.LiteralOneOf(["unix", "dos", "mac"] as const);
1013

1114
export type FileFormat = PredicateType<typeof isFileFormat>;
1215

16+
/**
17+
* Assert that the value is FileFormat.
18+
*/
1319
export const assertFileFormat = (v: unknown): asserts v is FileFormat =>
1420
assert(v, isFileFormat);
1521

22+
/**
23+
* Ensure that the value is FileFormat.
24+
*/
1625
export const ensureFileFormat = (v: unknown): FileFormat =>
1726
ensure(v, isFileFormat);
1827

28+
/**
29+
* Maybe that the value is FileFormat.
30+
*/
1931
export const maybeFileFormat = (v: unknown): FileFormat | undefined =>
2032
maybe(v, isFileFormat);
2133

0 commit comments

Comments
 (0)