Tests refactored

This commit is contained in:
David
2021-03-13 19:37:44 +01:00
parent de1aec63d9
commit 0a38a83c38
5 changed files with 64 additions and 55 deletions

View File

@@ -3,16 +3,16 @@ import { languages, exceptions, mappings } from "./languages.json";
const checkTypes = {
exception: exceptions,
mapping: mappings
}
};
type CheckType = keyof typeof checkTypes;
export type CheckType = keyof typeof checkTypes;
const langTypes = [
"source",
"target"
] as const;
type LangType = typeof langTypes[number];
export type LangType = typeof langTypes[number];
const isKeyOf = <T extends object>(obj: T) => (key: keyof any): key is keyof T => key in obj;