{
limit: Schema.optionalKey<Schema.Number>
since: Schema.optionalKey<Schema.DateTimeUtc>
until: Schema.optionalKey<Schema.DateTimeUtc>
}Payload fields for the metrics.query history read — newest limit entries within an optional
[since, until] window.
export const const historyQuery: {
limit: Schema.optionalKey<Schema.Number>
since: Schema.optionalKey<Schema.DateTimeUtc>
until: Schema.optionalKey<Schema.DateTimeUtc>
}
Payload fields for the metrics.query history read — newest limit entries within an optional
[since, until] window.
historyQuery = {
limit: Schema.optionalKey<Schema.Number>(property) limit: {
Type: S["Type"];
Encoded: S["Encoded"];
DecodingServices: S["DecodingServices"];
EncodingServices: S["EncodingServices"];
Iso: S["Iso"];
schema: S;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<number, readonly []>) => Schema.optionalKey<Schema.Number>;
annotateKey: (annotations: Schema.Annotations.Key<number>) => Schema.optionalKey<Schema.Number>;
check: (checks_0: Check<number>, ...checks: Array<Check<number>>) => Schema.optionalKey<Schema.Number>;
rebuild: (ast: Number) => Schema.optionalKey<Schema.Number>;
make: (input: number, options?: Schema.MakeOptions) => number;
makeOption: (input: number, options?: Schema.MakeOptions) => Option.Option<number>;
makeEffect: (input: number, options?: Schema.MakeOptions) => Effect.Effect<number, Schema.SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
limit: import SchemaSchema.const optionalKey: optionalKeyLambda
<Schema.Number>(self: Schema.Number) => Schema.optionalKey<Schema.Number>
Type-level representation returned by
optionalKey
.
Creates an exact optional key schema for struct fields. Unlike optional,
this creates exact optional properties (not | undefined) that can be
completely omitted from the object.
Example (Creating a struct with optional key)
import { Schema } from "effect"
const schema = Schema.Struct({
name: Schema.String,
age: Schema.optionalKey(Schema.Number)
})
// Type: { readonly name: string; readonly age?: number }
type Person = typeof schema["Type"]
optionalKey(import SchemaSchema.const Number: Schema.Numberconst Number: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<number, readonly []>) => Schema.Number;
annotateKey: (annotations: Schema.Annotations.Key<number>) => Schema.Number;
check: (checks_0: Check<number>, ...checks: Array<Check<number>>) => Schema.Number;
rebuild: (ast: Number) => Schema.Number;
make: (input: number, options?: Schema.MakeOptions) => number;
makeOption: (input: number, options?: Schema.MakeOptions) => Option.Option<number>;
makeEffect: (input: number, options?: Schema.MakeOptions) => Effect.Effect<number, Schema.SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
Type-level representation of
Number
.
Schema for number values, including NaN, Infinity, and -Infinity.
Details
Default JSON serializer:
- Finite numbers are serialized as numbers.
- Non-finite values are serialized as strings (
"NaN", "Infinity", "-Infinity").
Number),
since: Schema.optionalKey<Schema.DateTimeUtc>(property) since: {
Type: S["Type"];
Encoded: S["Encoded"];
DecodingServices: S["DecodingServices"];
EncodingServices: S["EncodingServices"];
Iso: S["Iso"];
schema: S;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<DateTime.Utc, readonly []>) => Schema.optionalKey<Schema.DateTimeUtc>;
annotateKey: (annotations: Schema.Annotations.Key<DateTime.Utc>) => Schema.optionalKey<Schema.DateTimeUtc>;
check: (checks_0: Check<DateTime.Utc>, ...checks: Array<Check<DateTime.Utc>>) => Schema.optionalKey<Schema.DateTimeUtc>;
rebuild: (ast: Declaration) => Schema.optionalKey<Schema.DateTimeUtc>;
make: (input: DateTime.Utc, options?: Schema.MakeOptions) => DateTime.Utc;
makeOption: (input: DateTime.Utc, options?: Schema.MakeOptions) => Option.Option<DateTime.Utc>;
makeEffect: (input: DateTime.Utc, options?: Schema.MakeOptions) => Effect.Effect<DateTime.Utc, Schema.SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
since: import SchemaSchema.const optionalKey: optionalKeyLambda
<Schema.DateTimeUtc>(self: Schema.DateTimeUtc) => Schema.optionalKey<Schema.DateTimeUtc>
Type-level representation returned by
optionalKey
.
Creates an exact optional key schema for struct fields. Unlike optional,
this creates exact optional properties (not | undefined) that can be
completely omitted from the object.
Example (Creating a struct with optional key)
import { Schema } from "effect"
const schema = Schema.Struct({
name: Schema.String,
age: Schema.optionalKey(Schema.Number)
})
// Type: { readonly name: string; readonly age?: number }
type Person = typeof schema["Type"]
optionalKey(import SchemaSchema.const DateTimeUtc: Schema.DateTimeUtcconst DateTimeUtc: {
Rebuild: DateTimeUtc;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<DateTime.Utc, readonly []>) => Schema.DateTimeUtc;
annotateKey: (annotations: Schema.Annotations.Key<DateTime.Utc>) => Schema.DateTimeUtc;
check: (checks_0: Check<DateTime.Utc>, ...checks: Array<Check<DateTime.Utc>>) => Schema.DateTimeUtc;
rebuild: (ast: Declaration) => Schema.DateTimeUtc;
make: (input: DateTime.Utc, options?: Schema.MakeOptions) => DateTime.Utc;
makeOption: (input: DateTime.Utc, options?: Schema.MakeOptions) => Option.Option<DateTime.Utc>;
makeEffect: (input: DateTime.Utc, options?: Schema.MakeOptions) => Effect.Effect<DateTime.Utc, Schema.SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
Type-level representation of
DateTimeUtc
.
Schema for DateTime.Utc values.
When to use
Use to validate existing DateTime.Utc schema values and use the default JSON
codec that represents them as UTC ISO strings.
Details
The default JSON codec decodes UTC ISO strings into DateTime.Utc values and
encodes DateTime.Utc values as UTC ISO strings.
DateTimeUtc),
until: Schema.optionalKey<Schema.DateTimeUtc>(property) until: {
Type: S["Type"];
Encoded: S["Encoded"];
DecodingServices: S["DecodingServices"];
EncodingServices: S["EncodingServices"];
Iso: S["Iso"];
schema: S;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<DateTime.Utc, readonly []>) => Schema.optionalKey<Schema.DateTimeUtc>;
annotateKey: (annotations: Schema.Annotations.Key<DateTime.Utc>) => Schema.optionalKey<Schema.DateTimeUtc>;
check: (checks_0: Check<DateTime.Utc>, ...checks: Array<Check<DateTime.Utc>>) => Schema.optionalKey<Schema.DateTimeUtc>;
rebuild: (ast: Declaration) => Schema.optionalKey<Schema.DateTimeUtc>;
make: (input: DateTime.Utc, options?: Schema.MakeOptions) => DateTime.Utc;
makeOption: (input: DateTime.Utc, options?: Schema.MakeOptions) => Option.Option<DateTime.Utc>;
makeEffect: (input: DateTime.Utc, options?: Schema.MakeOptions) => Effect.Effect<DateTime.Utc, Schema.SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
until: import SchemaSchema.const optionalKey: optionalKeyLambda
<Schema.DateTimeUtc>(self: Schema.DateTimeUtc) => Schema.optionalKey<Schema.DateTimeUtc>
Type-level representation returned by
optionalKey
.
Creates an exact optional key schema for struct fields. Unlike optional,
this creates exact optional properties (not | undefined) that can be
completely omitted from the object.
Example (Creating a struct with optional key)
import { Schema } from "effect"
const schema = Schema.Struct({
name: Schema.String,
age: Schema.optionalKey(Schema.Number)
})
// Type: { readonly name: string; readonly age?: number }
type Person = typeof schema["Type"]
optionalKey(import SchemaSchema.const DateTimeUtc: Schema.DateTimeUtcconst DateTimeUtc: {
Rebuild: DateTimeUtc;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<DateTime.Utc, readonly []>) => Schema.DateTimeUtc;
annotateKey: (annotations: Schema.Annotations.Key<DateTime.Utc>) => Schema.DateTimeUtc;
check: (checks_0: Check<DateTime.Utc>, ...checks: Array<Check<DateTime.Utc>>) => Schema.DateTimeUtc;
rebuild: (ast: Declaration) => Schema.DateTimeUtc;
make: (input: DateTime.Utc, options?: Schema.MakeOptions) => DateTime.Utc;
makeOption: (input: DateTime.Utc, options?: Schema.MakeOptions) => Option.Option<DateTime.Utc>;
makeEffect: (input: DateTime.Utc, options?: Schema.MakeOptions) => Effect.Effect<DateTime.Utc, Schema.SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
Type-level representation of
DateTimeUtc
.
Schema for DateTime.Utc values.
When to use
Use to validate existing DateTime.Utc schema values and use the default JSON
codec that represents them as UTC ISO strings.
Details
The default JSON codec decodes UTC ISO strings into DateTime.Utc values and
encodes DateTime.Utc values as UTC ISO strings.
DateTimeUtc),
};