Skip to main content

BufferToJSObjectTransformer

@h4ad/serverless-adapter > BufferToJSObjectTransformer

(class) BufferToJSObjectTransformer

Warning: This API is now obsolete.

You should use JsonBodyParserFramework instead, is more reliable and enable you to use transformer of trpc to other things.

The transformer that is responsible to transform buffer's input to javascript objects

Signature:

export declare class BufferToJSObjectTransformer implements DataTransformer 

Implements: DataTransformer

(method) deserialize

Deserialize unknown values to javascript objects

Signature:

deserialize(value?: unknown): any;

Parameters

Parameter

Type

Description

value

unknown

(Optional) The value to be deserialized

Returns:

any

(method) serialize

The value to be serialized, do nothing because tRPC can handle.

Signature:

serialize(value: any): any;

Parameters

Parameter

Type

Description

value

any

The value to be serialized

Returns:

any