Representation overview
Representation
is a data structure holding information about how to serialize and deserialize a server response for a given conten type.
Added in v1.0.0
Table of contents
constructors
make
Signature
export declare const make: (fields: Omit<Representation, TypeId>) => Representation
Added in v1.0.0
errors
RepresentationError (interface)
Signature
export interface RepresentationError extends Cause.YieldableError {
readonly _tag: "RepresentationError"
readonly message: string
}
Added in v1.0.0
models
Representation (interface)
Signature
export interface Representation extends Pipeable.Pipeable {
readonly [TypeId]: TypeId
readonly stringify: (input: unknown) => Effect.Effect<string, RepresentationError>
readonly parse: (input: string) => Effect.Effect<unknown, RepresentationError>
contentType: string
}
Added in v1.0.0
representations
json
Signature
export declare const json: Representation
Added in v1.0.0
plainText
Signature
export declare const plainText: Representation
Added in v1.0.0
type id
TypeId
Signature
export declare const TypeId: typeof TypeId
Added in v1.0.0
TypeId (type alias)
Signature
export type TypeId = typeof TypeId
Added in v1.0.0