Skip to content

Interface: ResponseParser<T> ​

Defined in: packages/minerender/src/assets/source/parser/ResponseParser.ts:6

Configures a hosted asset request and converts its response into an asset.

Type Parameters ​

Type Parameter
T extends MinecraftAsset

Methods ​

config() ​

ts
config(request): any;

Defined in: packages/minerender/src/assets/source/parser/ResponseParser.ts:8

Sets response decoding or other request options before the request starts.

Parameters ​

ParameterType
requestRequestConfig

Returns ​

any


parse() ​

ts
parse(response): 
  | Maybe<T>
| Promise<Maybe<T>>;

Defined in: packages/minerender/src/assets/source/parser/ResponseParser.ts:11

Returns undefined to permit source fallback, or throws to report a parse failure.

Parameters ​

ParameterType
responseRequestResponse

Returns ​

| Maybe<T> | Promise<Maybe<T>>