bupkis
    Preparing search index...

    Type Alias ParsedSubject<Parts>

    ParsedSubject: ParsedValues<Parts> extends readonly [infer Subject, ...any[]]
        ? Subject
        : never

    Type extracting the subject (first argument) from parsed assertion values.

    This utility type extracts the subject of an assertion from the parsed values tuple. The subject is always the first element and represents the value being tested by the assertion.

    Type Parameters

    • Parts extends AssertionParts

      The assertion parts tuple defining the assertion structure

    // For assertion: expect(value, 'to be a string')
    type Subject = ParsedSubject<Parts>; // typeof value

    // For assertion: expect(42, 'to be greater than', 10)
    type NumericSubject = ParsedSubject<NumericParts>; // number