Ts.Assert.parameter1.sub
Import
import { Ts } from '@wollybeard/kit'
// Access via namespace
Ts.Assert.parameter1.subimport { sub } from '@wollybeard/kit/ts'Functions
[F] noExcessAs
<$Type>(): DispatchAfterInput<State.SetExpectedType<State.SetRelator<State.SetRelator<State.AddExtractor<State.Empty, Parameter1>, SubKind>, SubNoExcessKind>, $Type>>[F] ofAs
<$Type>(): DispatchAfterInput<State.SetExpectedType<State.SetRelator<State.AddExtractor<State.Empty, Parameter1>, SubKind>, $Type>>Constants
[C] any
InputActualAsValueNarrow<
State.SetExpectedType<
State.SetAllowAny<
State.SetRelator<State.AddExtractor<State.Empty, Parameter1>, SubKind>
>,
any
>
>[C] bigint
InputActualAsValueNarrow<
State.SetExpectedType<
State.SetRelator<State.AddExtractor<State.Empty, Parameter1>, SubKind>,
bigint
>
>[C] boolean
InputActualAsValueNarrow<
State.SetExpectedType<
State.SetRelator<State.AddExtractor<State.Empty, Parameter1>, SubKind>,
boolean
>
>[C] Date
InputActualAsValueNarrow<
State.SetExpectedType<
State.SetRelator<State.AddExtractor<State.Empty, Parameter1>, SubKind>,
Date
>
>[C] Error
InputActualAsValueNarrow<
State.SetExpectedType<
State.SetRelator<State.AddExtractor<State.Empty, Parameter1>, SubKind>,
Error
>
>[C] never
InputActualAsValueNarrow<
State.SetExpectedType<
State.SetAllowNever<
State.SetRelator<State.AddExtractor<State.Empty, Parameter1>, SubKind>
>,
never
>
>[C] noExcess
InputExpectedAsValueNarrow<
State.SetRelator<
State.SetRelator<State.AddExtractor<State.Empty, Parameter1>, SubKind>,
SubNoExcessKind
>
>[C] null
InputActualAsValueNarrow<
State.SetExpectedType<
State.SetRelator<State.AddExtractor<State.Empty, Parameter1>, SubKind>,
null
>
>[C] number
InputActualAsValueNarrow<
State.SetExpectedType<
State.SetRelator<State.AddExtractor<State.Empty, Parameter1>, SubKind>,
number
>
>[C] of
InputExpectedAsValueNarrow<
State.SetRelator<State.AddExtractor<State.Empty, Parameter1>, SubKind>
>[C] RegExp
InputActualAsValueNarrow<
State.SetExpectedType<
State.SetRelator<State.AddExtractor<State.Empty, Parameter1>, SubKind>,
RegExp
>
>[C] string
InputActualAsValueNarrow<
State.SetExpectedType<
State.SetRelator<State.AddExtractor<State.Empty, Parameter1>, SubKind>,
string
>
>[C] symbol
InputActualAsValueNarrow<
State.SetExpectedType<
State.SetRelator<State.AddExtractor<State.Empty, Parameter1>, SubKind>,
symbol
>
>[C] undefined
InputActualAsValueNarrow<
State.SetExpectedType<
State.SetRelator<State.AddExtractor<State.Empty, Parameter1>, SubKind>,
undefined
>
>[C] unknown
InputActualAsValueNarrow<
State.SetExpectedType<
State.SetAllowUnknown<
State.SetRelator<State.AddExtractor<State.Empty, Parameter1>, SubKind>
>,
unknown
>
>Types
[T] any
type any_<$Actual> = Kind.Apply<
SubKind,
[any, Kind.Apply<Path.Parameter1, [$Actual]>]
>Pre-curried matcher for any. Extraction chain: (p1: T, ...) = any → T
Examples:
// ✓ Pass
type _ = Assert.parameter1.sub.any<(arg: any) => any>
// ✗ Fail
type _ = Assert.parameter1.sub.any<(arg: string) => any>[T] bigint
type bigint_<$Actual> = Kind.Apply<
SubKind,
[bigint, Kind.Apply<Path.Parameter1, [$Actual]>]
>Pre-curried matcher for bigint. Extraction chain: (p1: T, ...) = any → T
Examples:
// ✓ Pass
type _ = Assert.parameter1.sub.bigint<(arg: bigint) => any>
// ✗ Fail
type _ = Assert.parameter1.sub.bigint<(arg: string) => any>[T] boolean
type boolean_<$Actual> = Kind.Apply<
SubKind,
[boolean, Kind.Apply<Path.Parameter1, [$Actual]>]
>Pre-curried matcher for boolean. Extraction chain: (p1: T, ...) = any → T
Examples:
// ✓ Pass
type _ = Assert.parameter1.sub.boolean<(arg: boolean) => any>
// ✗ Fail
type _ = Assert.parameter1.sub.boolean<(arg: string) => any>[T] Date
type Date_<$Actual> = Kind.Apply<
SubKind,
[Date, Kind.Apply<Path.Parameter1, [$Actual]>]
>Pre-curried matcher for Date. Extraction chain: (p1: T, ...) = any → T
Examples:
// ✓ Pass
type _ = Assert.parameter1.sub.Date<(arg: Date) => any>
// ✗ Fail
type _ = Assert.parameter1.sub.Date<(arg: string) => any>[T] Error
type Error_<$Actual> = Kind.Apply<
SubKind,
[Error, Kind.Apply<Path.Parameter1, [$Actual]>]
>Pre-curried matcher for Error. Extraction chain: (p1: T, ...) = any → T
Examples:
// ✓ Pass
type _ = Assert.parameter1.sub.Error<(arg: Error) => any>
// ✗ Fail
type _ = Assert.parameter1.sub.Error<(arg: string) => any>[T] never
type never_<$Actual> = Kind.Apply<
SubKind,
[never, Kind.Apply<Path.Parameter1, [$Actual]>]
>Pre-curried matcher for never. Extraction chain: (p1: T, ...) = any → T
Examples:
// ✓ Pass
type _ = Assert.parameter1.sub.never<(arg: never) => any>
// ✗ Fail
type _ = Assert.parameter1.sub.never<(arg: string) => any>[T] noExcess
type noExcess_<$Expected, $Actual> = Kind.Apply<
SubNoExcessKind,
[$Expected, Kind.Apply<Path.Parameter1, [$Actual]>]
>No-excess variant of sub relation. Checks that actual has no excess properties beyond expected.
[T] null
type null_<$Actual> = Kind.Apply<
SubKind,
[null, Kind.Apply<Path.Parameter1, [$Actual]>]
>Pre-curried matcher for null. Extraction chain: (p1: T, ...) = any → T
Examples:
// ✓ Pass
type _ = Assert.parameter1.sub.null<(arg: null) => any>
// ✗ Fail
type _ = Assert.parameter1.sub.null<(arg: string) => any>[T] number
type number_<$Actual> = Kind.Apply<
SubKind,
[number, Kind.Apply<Path.Parameter1, [$Actual]>]
>Pre-curried matcher for number. Extraction chain: (p1: T, ...) = any → T
Examples:
// ✓ Pass
type _ = Assert.parameter1.sub.number<(arg: number) => any>
// ✗ Fail
type _ = Assert.parameter1.sub.number<(arg: string) => any>[T] of
type of_<$Expected, $Actual> = Kind.Apply<
SubKind,
[$Expected, Kind.Apply<Path.Parameter1, [$Actual]>]
>parameter1 + sub relation matchers.
Extraction: extracts the first parameter type from a function Relation: subtype relation (extends)
[T] RegExp
type RegExp_<$Actual> = Kind.Apply<
SubKind,
[RegExp, Kind.Apply<Path.Parameter1, [$Actual]>]
>Pre-curried matcher for RegExp. Extraction chain: (p1: T, ...) = any → T
Examples:
// ✓ Pass
type _ = Assert.parameter1.sub.RegExp<(arg: RegExp) => any>
// ✗ Fail
type _ = Assert.parameter1.sub.RegExp<(arg: string) => any>[T] string
type string_<$Actual> = Kind.Apply<
SubKind,
[string, Kind.Apply<Path.Parameter1, [$Actual]>]
>Pre-curried matcher for string. Extraction chain: (p1: T, ...) = any → T
Examples:
// ✓ Pass
type _ = Assert.parameter1.sub.string<(arg: string) => any>
// ✗ Fail
type _ = Assert.parameter1.sub.string<(arg: number) => any>[T] symbol
type symbol_<$Actual> = Kind.Apply<
SubKind,
[symbol, Kind.Apply<Path.Parameter1, [$Actual]>]
>Pre-curried matcher for symbol. Extraction chain: (p1: T, ...) = any → T
Examples:
// ✓ Pass
type _ = Assert.parameter1.sub.symbol<(arg: symbol) => any>
// ✗ Fail
type _ = Assert.parameter1.sub.symbol<(arg: string) => any>[T] undefined
type undefined_<$Actual> = Kind.Apply<
SubKind,
[undefined, Kind.Apply<Path.Parameter1, [$Actual]>]
>Pre-curried matcher for undefined. Extraction chain: (p1: T, ...) = any → T
Examples:
// ✓ Pass
type _ = Assert.parameter1.sub.undefined<(arg: undefined) => any>
// ✗ Fail
type _ = Assert.parameter1.sub.undefined<(arg: string) => any>[T] unknown
type unknown_<$Actual> = Kind.Apply<
SubKind,
[unknown, Kind.Apply<Path.Parameter1, [$Actual]>]
>Pre-curried matcher for unknown. Extraction chain: (p1: T, ...) = any → T
Examples:
// ✓ Pass
type _ = Assert.parameter1.sub.unknown<(arg: unknown) => any>
// ✗ Fail
type _ = Assert.parameter1.sub.unknown<(arg: string) => any>