diff --git a/packages/store/ts/config/v2/generics.ts b/packages/store/ts/config/v2/generics.ts index fc92b17cc6..fc52cbf3cb 100644 --- a/packages/store/ts/config/v2/generics.ts +++ b/packages/store/ts/config/v2/generics.ts @@ -1,8 +1 @@ export type get = key extends keyof input ? input[key] : undefined; - -export type freeze = - T extends Array - ? ReadonlyArray> - : T extends object - ? { readonly [P in keyof T]: freeze } - : T; diff --git a/packages/store/ts/config/v2/table.ts b/packages/store/ts/config/v2/table.ts index 49a54cdecd..314e86e5f2 100644 --- a/packages/store/ts/config/v2/table.ts +++ b/packages/store/ts/config/v2/table.ts @@ -76,22 +76,6 @@ export function validateKeys = -// input extends TableFullInput, scope> -// ? { -// primaryKey: validateKeys, input["primaryKey"]>; -// schema: input["schema"]; -// } -// : input extends { primaryKey: unknown; schema: SchemaInput } -// ? { -// primaryKey: validateKeys, input["primaryKey"]>; -// schema: SchemaInput; -// } -// : { -// primaryKey: string[]; -// schema: SchemaInput; -// }; - export type validateTableFull = { [key in keyof input]: key extends "primaryKey" ? validateKeys, SchemaInput>, scope>, input[key]> diff --git a/packages/world/ts/config/v2/generics.ts b/packages/world/ts/config/v2/generics.ts deleted file mode 100644 index a1854255da..0000000000 --- a/packages/world/ts/config/v2/generics.ts +++ /dev/null @@ -1,6 +0,0 @@ -export type freeze = - T extends Array - ? ReadonlyArray> - : T extends object - ? { readonly [P in keyof T]: freeze } - : T;