diff --git a/src/util/common.ts b/src/util/common.ts index 0e4f829..b2ac8f1 100644 --- a/src/util/common.ts +++ b/src/util/common.ts @@ -1,5 +1,9 @@ export type WithRequired = T & { [P in K]-?: T[P] }; +export type ArrayElements> = T extends ReadonlyArray + ? S + : never; + // Reference: // https://stackoverflow.com/questions/7225407/convert-camelcasetext-to-sentence-case-text export function camelToTitle(camel: string): string {