Options for creating an httpResource.
parse
((value: TRaw) => TResult) | undefinedTransform the result of the HTTP request before it's delivered to the resource.
parse receives the value from the HTTP layer as its raw type (e.g. as unknown for JSON data).
It can be used to validate or transform the type of the resource, and return a more specific
type. This is also useful for validating backend responses using a runtime schema validation
library such as Zod.
defaultValue
NoInfer<TResult> | undefinedValue that the resource will take when in Idle or Loading states.
If not set, the resource will use undefined as its default value.
injector
Injector | undefinedThe Injector in which to create the httpResource.
If this is not provided, the current injection context
will be used instead (via inject).
equal
ValueEqualityFn<NoInfer<TResult>> | undefinedA comparison function which defines equality for the response value.