triplit icon indicating copy to clipboard operation
triplit copied to clipboard

Remote client fails to infer types based on query and schema

Open wernst opened this issue 1 year ago • 0 comments

Example:

const client = new RemoteClient({ schema });
const result = await client.fetch({
    collectionName: 'todos',
});

// Result is Map<string, any>

I think we need to properly type the query parameter of fetch (so we can pull out the schema and proper return type) or ensure that happens under the hood of fetch somewhere.

wernst avatar Jan 16 '24 20:01 wernst