File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
import { distinct } from "@std/collections/distinct" ;
2
+ import { distinctBy } from "@std/collections/distinct-by" ;
2
3
import { shuffle } from "@std/random/shuffle" ;
3
- import { deduplicateErrors } from "../../misc/deduplicate_errors.ts" ;
4
4
import { errors } from "../../telo_misikeke/telo_misikeke.js" ;
5
5
import { ArrayResult , ArrayResultError } from "../array_result.ts" ;
6
6
import { parser } from "../parser/parser.ts" ;
@@ -31,3 +31,6 @@ export function translate(tokiPona: string): ArrayResult<string> {
31
31
return ArrayResult . errors ( error ) ;
32
32
}
33
33
}
34
+ function deduplicateErrors < const T extends Error > ( errors : Iterable < T > ) {
35
+ return distinctBy ( errors , ( { message } ) => message ) ;
36
+ }
You can’t perform that action at this time.
0 commit comments