ValidatedFetch
Defined in: wp-typia-rest/src/client.ts:62
WordPress-aware fetch helper that validates response payloads.
Remarks
Section titled “Remarks”Each method keeps the original apiFetch request shape while exposing
either soft validation results or throwing assertion flows.
Type Parameters
Section titled “Type Parameters”T
Methods
Section titled “Methods”assertFetch()
Section titled “assertFetch()”assertFetch(
options):Promise<T>
Defined in: wp-typia-rest/src/client.ts:63
Parameters
Section titled “Parameters”options
Section titled “options”APIFetchOptions
Returns
Section titled “Returns”Promise<T>
fetch()
Section titled “fetch()”fetch(
options):Promise<ValidationResult<T>>
Defined in: wp-typia-rest/src/client.ts:64
Parameters
Section titled “Parameters”options
Section titled “options”APIFetchOptions
Returns
Section titled “Returns”Promise<ValidationResult<T>>
fetchWithResponse()
Section titled “fetchWithResponse()”fetchWithResponse(
options):Promise<{response:Response;validation:ValidationResult<T>; }>
Defined in: wp-typia-rest/src/client.ts:65
Parameters
Section titled “Parameters”options
Section titled “options”APIFetchOptions<false>
Returns
Section titled “Returns”Promise<{ response: Response; validation: ValidationResult<T>; }>
isFetch()
Section titled “isFetch()”isFetch(
options):Promise<T|null>
Defined in: wp-typia-rest/src/client.ts:68
Parameters
Section titled “Parameters”options
Section titled “options”APIFetchOptions
Returns
Section titled “Returns”Promise<T | null>