Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
alvrs committed Mar 11, 2024
1 parent 10d7e8f commit 9db9060
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 29 deletions.
7 changes: 0 additions & 7 deletions packages/store/ts/config/v2/generics.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
export type get<input, key> = key extends keyof input ? input[key] : undefined;

export type freeze<T> =
T extends Array<infer R>
? ReadonlyArray<freeze<R>>
: T extends object
? { readonly [P in keyof T]: freeze<T[P]> }
: T;
16 changes: 0 additions & 16 deletions packages/store/ts/config/v2/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,22 +76,6 @@ export function validateKeys<validKeys extends PropertyKey, keys = PropertyKey[]
return {} as never;
}

// export type validateTableFull<input, scope extends AbiTypeScope = AbiTypeScope> =
// input extends TableFullInput<SchemaInput<scope>, scope>
// ? {
// primaryKey: validateKeys<getStaticAbiTypeKeys<input["schema"], scope>, input["primaryKey"]>;
// schema: input["schema"];
// }
// : input extends { primaryKey: unknown; schema: SchemaInput }
// ? {
// primaryKey: validateKeys<getStaticAbiTypeKeys<input["schema"], scope>, input["primaryKey"]>;
// schema: SchemaInput<scope>;
// }
// : {
// primaryKey: string[];
// schema: SchemaInput<scope>;
// };

export type validateTableFull<input, scope extends AbiTypeScope = AbiTypeScope> = {
[key in keyof input]: key extends "primaryKey"
? validateKeys<getStaticAbiTypeKeys<conform<get<input, "schema">, SchemaInput<scope>>, scope>, input[key]>
Expand Down
6 changes: 0 additions & 6 deletions packages/world/ts/config/v2/generics.ts

This file was deleted.

0 comments on commit 9db9060

Please sign in to comment.