Ts.Assert.array.exact
Import
import { Ts } from '@wollybeard/kit'
// Access via namespace
Ts.Assert.array.exactimport { exact } from '@wollybeard/kit/ts'Functions
[F] ofAs
<$Type>(): DispatchAfterInput<State.SetExpectedType<State.SetRelator<State.AddExtractor<State.Empty, ArrayElement>, ExactKind>, $Type>>Constants
[C] any
InputActualAsValueNarrow<
State.SetExpectedType<
State.SetAllowAny<
State.SetRelator<State.AddExtractor<State.Empty, ArrayElement>, ExactKind>
>,
any
>
>[C] bigint
InputActualAsValueNarrow<
State.SetExpectedType<
State.SetRelator<State.AddExtractor<State.Empty, ArrayElement>, ExactKind>,
bigint
>
>[C] boolean
InputActualAsValueNarrow<
State.SetExpectedType<
State.SetRelator<State.AddExtractor<State.Empty, ArrayElement>, ExactKind>,
boolean
>
>[C] Date
InputActualAsValueNarrow<
State.SetExpectedType<
State.SetRelator<State.AddExtractor<State.Empty, ArrayElement>, ExactKind>,
Date
>
>[C] Error
InputActualAsValueNarrow<
State.SetExpectedType<
State.SetRelator<State.AddExtractor<State.Empty, ArrayElement>, ExactKind>,
Error
>
>[C] never
InputActualAsValueNarrow<
State.SetExpectedType<
State.SetAllowNever<
State.SetRelator<State.AddExtractor<State.Empty, ArrayElement>, ExactKind>
>,
never
>
>[C] noExcess
never[C] null
InputActualAsValueNarrow<
State.SetExpectedType<
State.SetRelator<State.AddExtractor<State.Empty, ArrayElement>, ExactKind>,
null
>
>[C] number
InputActualAsValueNarrow<
State.SetExpectedType<
State.SetRelator<State.AddExtractor<State.Empty, ArrayElement>, ExactKind>,
number
>
>[C] of
InputExpectedAsValueNarrow<
State.SetRelator<State.AddExtractor<State.Empty, ArrayElement>, ExactKind>
>[C] RegExp
InputActualAsValueNarrow<
State.SetExpectedType<
State.SetRelator<State.AddExtractor<State.Empty, ArrayElement>, ExactKind>,
RegExp
>
>[C] string
InputActualAsValueNarrow<
State.SetExpectedType<
State.SetRelator<State.AddExtractor<State.Empty, ArrayElement>, ExactKind>,
string
>
>[C] symbol
InputActualAsValueNarrow<
State.SetExpectedType<
State.SetRelator<State.AddExtractor<State.Empty, ArrayElement>, ExactKind>,
symbol
>
>[C] undefined
InputActualAsValueNarrow<
State.SetExpectedType<
State.SetRelator<State.AddExtractor<State.Empty, ArrayElement>, ExactKind>,
undefined
>
>[C] unknown
InputActualAsValueNarrow<
State.SetExpectedType<
State.SetAllowUnknown<
State.SetRelator<State.AddExtractor<State.Empty, ArrayElement>, ExactKind>
>,
unknown
>
>Types
[T] any
type any_<$Actual> = Kind.Apply<
ExactKind,
[any, Kind.Apply<Path.ArrayElement, [$Actual]>]
>Pre-curried matcher for any. Extraction chain: T[] → T
Examples:
// ✓ Pass
type _ = Assert.array.exact.any<any[]>
// ✗ Fail
type _ = Assert.array.exact.any<string[]>[T] bigint
type bigint_<$Actual> = Kind.Apply<
ExactKind,
[bigint, Kind.Apply<Path.ArrayElement, [$Actual]>]
>Pre-curried matcher for bigint. Extraction chain: T[] → T
Examples:
// ✓ Pass
type _ = Assert.array.exact.bigint<bigint[]>
// ✗ Fail
type _ = Assert.array.exact.bigint<string[]>[T] boolean
type boolean_<$Actual> = Kind.Apply<
ExactKind,
[boolean, Kind.Apply<Path.ArrayElement, [$Actual]>]
>Pre-curried matcher for boolean. Extraction chain: T[] → T
Examples:
// ✓ Pass
type _ = Assert.array.exact.boolean<boolean[]>
// ✗ Fail
type _ = Assert.array.exact.boolean<string[]>[T] Date
type Date_<$Actual> = Kind.Apply<
ExactKind,
[Date, Kind.Apply<Path.ArrayElement, [$Actual]>]
>Pre-curried matcher for Date. Extraction chain: T[] → T
Examples:
// ✓ Pass
type _ = Assert.array.exact.Date<Date[]>
// ✗ Fail
type _ = Assert.array.exact.Date<string[]>[T] Error
type Error_<$Actual> = Kind.Apply<
ExactKind,
[Error, Kind.Apply<Path.ArrayElement, [$Actual]>]
>Pre-curried matcher for Error. Extraction chain: T[] → T
Examples:
// ✓ Pass
type _ = Assert.array.exact.Error<Error[]>
// ✗ Fail
type _ = Assert.array.exact.Error<string[]>[T] never
type never_<$Actual> = Kind.Apply<
ExactKind,
[never, Kind.Apply<Path.ArrayElement, [$Actual]>]
>Pre-curried matcher for never. Extraction chain: T[] → T
Examples:
// ✓ Pass
type _ = Assert.array.exact.never<never[]>
// ✗ Fail
type _ = Assert.array.exact.never<string[]>[T] noExcess
type noExcess_ = never[T] null
type null_<$Actual> = Kind.Apply<
ExactKind,
[null, Kind.Apply<Path.ArrayElement, [$Actual]>]
>Pre-curried matcher for null. Extraction chain: T[] → T
Examples:
// ✓ Pass
type _ = Assert.array.exact.null<null[]>
// ✗ Fail
type _ = Assert.array.exact.null<string[]>[T] number
type number_<$Actual> = Kind.Apply<
ExactKind,
[number, Kind.Apply<Path.ArrayElement, [$Actual]>]
>Pre-curried matcher for number. Extraction chain: T[] → T
Examples:
// ✓ Pass
type _ = Assert.array.exact.number<number[]>
// ✗ Fail
type _ = Assert.array.exact.number<string[]>[T] of
type of_<$Expected, $Actual> = Kind.Apply<
ExactKind,
[$Expected, Kind.Apply<Path.ArrayElement, [$Actual]>]
>array + exact relation matchers.
Extraction: extracts the element type from an array Relation: exact structural equality
[T] RegExp
type RegExp_<$Actual> = Kind.Apply<
ExactKind,
[RegExp, Kind.Apply<Path.ArrayElement, [$Actual]>]
>Pre-curried matcher for RegExp. Extraction chain: T[] → T
Examples:
// ✓ Pass
type _ = Assert.array.exact.RegExp<RegExp[]>
// ✗ Fail
type _ = Assert.array.exact.RegExp<string[]>[T] string
type string_<$Actual> = Kind.Apply<
ExactKind,
[string, Kind.Apply<Path.ArrayElement, [$Actual]>]
>Pre-curried matcher for string. Extraction chain: T[] → T
Examples:
// ✓ Pass
type _ = Assert.array.exact.string<string[]>
// ✗ Fail
type _ = Assert.array.exact.string<number[]>[T] symbol
type symbol_<$Actual> = Kind.Apply<
ExactKind,
[symbol, Kind.Apply<Path.ArrayElement, [$Actual]>]
>Pre-curried matcher for symbol. Extraction chain: T[] → T
Examples:
// ✓ Pass
type _ = Assert.array.exact.symbol<symbol[]>
// ✗ Fail
type _ = Assert.array.exact.symbol<string[]>[T] undefined
type undefined_<$Actual> = Kind.Apply<
ExactKind,
[undefined, Kind.Apply<Path.ArrayElement, [$Actual]>]
>Pre-curried matcher for undefined. Extraction chain: T[] → T
Examples:
// ✓ Pass
type _ = Assert.array.exact.undefined<undefined[]>
// ✗ Fail
type _ = Assert.array.exact.undefined<string[]>[T] unknown
type unknown_<$Actual> = Kind.Apply<
ExactKind,
[unknown, Kind.Apply<Path.ArrayElement, [$Actual]>]
>Pre-curried matcher for unknown. Extraction chain: T[] → T
Examples:
// ✓ Pass
type _ = Assert.array.exact.unknown<unknown[]>
// ✗ Fail
type _ = Assert.array.exact.unknown<string[]>