add converter tests

This commit is contained in:
Christopher Cooper
2022-12-27 09:21:25 +09:00
parent 9e6fb5770e
commit f5cc831ef2
12 changed files with 241 additions and 39 deletions
+8
View File
@@ -352,3 +352,11 @@ export function AddToSetInRecord<T extends string, V>(
obj[key] = new Set([toAdd]);
}
}
// This function can be used in places where we need a function that takes never
// as a parameter (for instance, an iterator over Array<never>). Such a function
// cannot ever be called. See lib/score-import/import-types/converters.ts for an
// example.
export function Never(_: never): never {
throw new Error("Unreachable");
}