VoidType-level representation of Void.
export interface Void extends interface Bottom<out T, out E, out RD, out RE, out Ast extends SchemaAST.AST, out Rebuild extends Top, out TypeMakeIn = T, out Iso = T, in out TypeParameters extends ReadonlyArray<Constraint> = readonly [], out TypeMake = TypeMakeIn, out TypeMutability extends Mutability = "readonly", out TypeOptionality extends Optionality = "required", out TypeConstructorDefault extends ConstructorDefault = "no-default", out EncodedMutability extends Mutability = "readonly", out EncodedOptionality extends Optionality = "required">The fully-parameterized base interface for all schemas. Exposes all 14 type
parameters controlling type inference, mutability, optionality, services, and
transformation behavior.
When to use
Use when you are writing advanced generic schema utilities or performing
schema introspection.
Bottom<void, void, never, never, import SchemaASTSchemaAST.class Voidclass Void {
_tag: 'Void';
getParser: () => SchemaParser.Parser;
toCodecJson: () => AST;
getExpected: () => string;
annotations: Schema.Annotations.Annotations | undefined;
checks: Checks | undefined;
encoding: Encoding | undefined;
context: Context | undefined;
toString: () => string;
}
AST node matching TypeScript void return-value semantics.
When to use
Use when you need an AST node for a value whose result is intentionally
ignored.
Details
Parsers built from this node accept any present runtime input and map it to
undefined. Public schemas built from it may still expose void as their
typed decoded and encoded representation.
Void, Void> {}
/**
* Schema for a TypeScript `void` return value.
*
* **When to use**
*
* Use when you need to model the return value of a function, RPC, or endpoint
* whose result is intentionally ignored.
*
* **Details**
*
* Runtime parsing accepts any present value and discards it, producing
* `undefined`. The public decoded and encoded TypeScript representation remains
* `void`, so typed construction, decoding, and encoding APIs are still modeled
* as `void`.
*
* @see {@link Undefined} for a schema that matches only the exact `undefined` value.
* @category schemas
* @since 3.10.0
*/
export const const Void: Voidconst Void: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Annotations.Bottom<void, readonly []>) => Void;
annotateKey: (annotations: Annotations.Key<void>) => Void;
check: (checks_0: SchemaAST.Check<void>, ...checks: Array<SchemaAST.Check<void>>) => Void;
rebuild: (ast: SchemaAST.Void) => Void;
make: (input: void, options?: MakeOptions) => void;
makeOption: (input: void, options?: MakeOptions) => Option_.Option<void>;
makeEffect: (input: void, options?: MakeOptions) => Effect.Effect<void, 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
Void
.
Schema for a TypeScript void return value.
When to use
Use when you need to model the return value of a function, RPC, or endpoint
whose result is intentionally ignored.
Details
Runtime parsing accepts any present value and discards it, producing
undefined. The public decoded and encoded TypeScript representation remains
void, so typed construction, decoding, and encoding APIs are still modeled
as void.
Void: Void = const make: <S extends Constraint>(
ast: S["ast"],
options?: object
) => S
Creates a schema from an AST (Abstract Syntax Tree) node.
Details
This is the fundamental constructor for all schemas in the Effect Schema
library. It takes an AST node and wraps it in a fully-typed schema that
preserves all type information and provides the complete schema API.
The make function is used internally to create all primitive schemas like
String, Number, Boolean, etc., as well as more complex schemas. It's
the bridge between the untyped AST representation and the strongly-typed
schema.
make(import SchemaASTSchemaAST.const void: SchemaAST.Void(alias) const void: {
_tag: 'Void';
getParser: () => SchemaParser.Parser;
toCodecJson: () => AST;
getExpected: () => string;
annotations: Schema.Annotations.Annotations | undefined;
checks: Checks | undefined;
encoding: Encoding | undefined;
context: Context | undefined;
toString: () => string;
}
Provides the singleton
Void
AST instance.
When to use
Use when constructing or comparing AST nodes for TypeScript void return
values whose result is intentionally ignored.
Details
The node parses any present runtime value as undefined; schemas may still
expose void on their typed decoded and encoded sides.
void)