TrimmedType-level representation of Trimmed.
stringTrimmed
Source effect/Schema.ts:1160811 lines
export interface Trimmed extends String {
readonly "Rebuild": Trimmed
}
/**
* Schema for strings that contains no leading or trailing whitespaces.
*
* @category string
* @since 3.10.0
*/
export const const Trimmed: Trimmedconst Trimmed: {
Rebuild: Trimmed;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Annotations.Bottom<string, readonly []>) => Trimmed;
annotateKey: (annotations: Annotations.Key<string>) => Trimmed;
check: (checks_0: SchemaAST.Check<string>, ...checks: Array<SchemaAST.Check<string>>) => Trimmed;
rebuild: (ast: SchemaAST.String) => Trimmed;
make: (input: string, options?: MakeOptions) => string;
makeOption: (input: string, options?: MakeOptions) => Option_.Option<string>;
makeEffect: (input: string, options?: MakeOptions) => Effect.Effect<string, 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
Trimmed
.
Schema for strings that contains no leading or trailing whitespaces.
Trimmed: Trimmed = const String: Stringconst String: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Annotations.Bottom<string, readonly []>) => String;
annotateKey: (annotations: Annotations.Key<string>) => String;
check: (checks_0: SchemaAST.Check<string>, ...checks: Array<SchemaAST.Check<string>>) => String;
rebuild: (ast: SchemaAST.String) => String;
make: (input: string, options?: MakeOptions) => string;
makeOption: (input: string, options?: MakeOptions) => Option_.Option<string>;
makeEffect: (input: string, options?: MakeOptions) => Effect.Effect<string, 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
String
.
Schema for string values. Validates that the input is typeof "string".
String.Bottom<string, string, never, never, String, String, string, string, readonly [], string, "readonly", "required", "no-default", "readonly", "required">.check(checks_0: SchemaAST.Check<string>, ...checks: SchemaAST.Check<string>[]): Stringcheck(function isTrimmed(
annotations?: Annotations.Filter
): SchemaAST.Filter<string>
Validates that a string has no leading or trailing whitespace.
Details
JSON Schema:
This check corresponds to a pattern constraint in JSON Schema that
matches strings without leading or trailing whitespace.
Arbitrary:
When generating test data with fast-check, this applies a patterns
constraint to ensure generated strings match the trimmed pattern.
isTrimmed())Referenced by 1 symbols