Skip to content

withDefaults

Enhances a property signature with a default decoding value and a default constructor value.

Since

3.10.0

Call Signature

withDefaults<Type>(defaults): <Key, Encoded, R>(self) => PropertySignature<":", Exclude<Type, undefined>, Key, "?:", Encoded, true, R>

Defined in: node_modules/.pnpm/effect@3.14.8/node_modules/effect/dist/dts/Schema.d.ts:1051

Enhances a property signature with a default decoding value and a default constructor value.

Type Parameters

Type

Parameters

defaults

constructor

() => NoInfer<Exclude<Type, undefined>>

decoding

() => NoInfer<Exclude<Type, undefined>>

Returns

Function

Type Parameters

Key extends PropertyKey

Encoded

R

Parameters

self

PropertySignature<"?:", Type, Key, "?:", Encoded, boolean, R>

Returns

PropertySignature<":", Exclude<Type, undefined>, Key, "?:", Encoded, true, R>

Since

3.10.0

Since

3.10.0

Call Signature

withDefaults<Type, Key, Encoded, R>(self, defaults): PropertySignature<":", Exclude<Type, undefined>, Key, "?:", Encoded, true, R>

Defined in: node_modules/.pnpm/effect@3.14.8/node_modules/effect/dist/dts/Schema.d.ts:1061

Enhances a property signature with a default decoding value and a default constructor value.

Type Parameters

Type

Key extends PropertyKey

Encoded

R

Parameters

self

PropertySignature<"?:", Type, Key, "?:", Encoded, boolean, R>

defaults

constructor

() => NoInfer<Exclude<Type, undefined>>

decoding

() => NoInfer<Exclude<Type, undefined>>

Returns

PropertySignature<":", Exclude<Type, undefined>, Key, "?:", Encoded, true, R>

Since

3.10.0

Since

3.10.0