Move language files into dedicated folder
This commit is contained in:
parent
3d1cd89067
commit
1b406899e0
15 changed files with 7 additions and 343 deletions
10
src/lang/result.ts
Normal file
10
src/lang/result.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
export type Result<T, E> =
|
||||
| { tag: "ok", value: T }
|
||||
| { tag: "error", error: E }
|
||||
|
||||
export namespace Result {
|
||||
export function ok<T, E>(value: T): Result<T, E> { return { tag: "ok", value } }
|
||||
export function error<T, E>(error: E): Result<T, E> { return { tag: "error", error } }
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue