MCPcopy Create free account
hub / github.com/TanStack/query / readId

Function readId

packages/angular-query/src/__tests__/inject-query.test-d.ts:166–167  ·  view source on GitHub ↗
(query: CreateQueryResult<T>)

Source from the content-addressed store, hash-verified

164
165 it('supports reading data from a generic result type', () => {
166 const readId = <T extends { id: number }>(query: CreateQueryResult<T>) =>
167 query.data()?.id
168
169 expectTypeOf(readId).toBeCallableWith(
170 {} as CreateQueryResult<{ id: number }>,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected