MCPcopy Create free account
hub / github.com/testing-library/react-hooks-testing-library / current

Function current

src/core/index.ts:15–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13 return results.map(({ value, error }) => error ?? (value as TValue))
14 },
15 get current() {
16 const { value, error } = results[results.length - 1] ?? {}
17 if (error) {
18 throw error
19 }
20 return value as TValue
21 },
22 get error() {
23 const { error } = results[results.length - 1] ?? {}
24 return error

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…