Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(store): add missing ts codegen exports #3462

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Create pretty-boxes-scream.md
dk1a authored Jan 17, 2025
commit 9e8c146dffddb4aee8684a14e5608502d328fad8
5 changes: 5 additions & 0 deletions .changeset/pretty-boxes-scream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@latticexyz/store": patch
---

Added missing typescript exports to `@latticexyz/store/codegen` endpoint.

Unchanged files with check annotations Beta

asNumberArray,
} from "../postgres/columnTypes";
export function buildColumn(name: string, schemaAbiType: SchemaAbiType) {

Check warning on line 15 in packages/store-sync/src/postgres-decoded/buildColumn.ts

GitHub Actions / Run lint

Missing return type on function
switch (schemaAbiType) {
case "bool":
return boolean(name);
import superjson from "superjson";
import { Address, ByteArray, bytesToHex, getAddress, Hex, hexToBytes } from "viem";
export const asJson = <TData>(name: string) =>

Check warning on line 5 in packages/store-sync/src/postgres/columnTypes.ts

GitHub Actions / Run lint

Missing return type on function
customType<{ data: TData; driverData: string }>({
dataType() {
// TODO: move to json column type? if we do, we'll prob wanna choose something other than superjson since it adds one level of depth (json/meta keys)
},
})(name);
export const asNumber = (name: string, columnType: string) =>

Check warning on line 19 in packages/store-sync/src/postgres/columnTypes.ts

GitHub Actions / Run lint

Missing return type on function
customType<{ data: number; driverData: string }>({
dataType() {
return columnType;
},
})(name);
export const asBigInt = (name: string, columnType: string) =>

Check warning on line 32 in packages/store-sync/src/postgres/columnTypes.ts

GitHub Actions / Run lint

Missing return type on function
customType<{ data: bigint; driverData: string }>({
dataType() {
return columnType;
},
})(name);
export const asHex = (name: string) =>

Check warning on line 45 in packages/store-sync/src/postgres/columnTypes.ts

GitHub Actions / Run lint

Missing return type on function
customType<{ data: Hex; driverData: ByteArray }>({
dataType() {
return "bytea";
},
})(name);
export const asAddress = (name: string) =>

Check warning on line 58 in packages/store-sync/src/postgres/columnTypes.ts

GitHub Actions / Run lint

Missing return type on function
customType<{ data: Address; driverData: ByteArray }>({
dataType() {
return "bytea";
},
})(name);
export const asBoolArray = (name: string) =>

Check warning on line 71 in packages/store-sync/src/postgres/columnTypes.ts

GitHub Actions / Run lint

Missing return type on function
customType<{ data: boolean[]; driverData: string[] }>({
dataType() {
return "bool[]";
},
})(name);
export const asNumberArray = (name: string, columnType: string) =>

Check warning on line 84 in packages/store-sync/src/postgres/columnTypes.ts

GitHub Actions / Run lint

Missing return type on function
customType<{ data: number[]; driverData: string[] }>({
dataType() {
return columnType;
},
})(name);
export const asBigIntArray = (name: string, columnType: string) =>

Check warning on line 97 in packages/store-sync/src/postgres/columnTypes.ts

GitHub Actions / Run lint

Missing return type on function
customType<{ data: bigint[]; driverData: string[] }>({
dataType() {
return columnType;
children: ReactNode;
};
export function SyncProvider({ chainId, adapter, children, ...syncOptions }: Props) {

Check warning on line 16 in packages/store-sync/src/react/SyncProvider.tsx

GitHub Actions / Run lint

Missing return type on function
const existingValue = useContext(SyncContext);
if (existingValue != null) {
throw new Error("A `SyncProvider` cannot be nested inside another.");