Documentation
    Preparing search index...

    Type Alias StatusRange<T>

    StatusRange: T extends "2XX"
        ? IntRange<200, 300>
        : T extends "3XX"
            ? IntRange<300, 400>
            : T extends "4XX" ? IntRange<400, 500> : IntRange<500, 600>

    Range of status codes by the first digit, "4XX" for 400 to 499.

    Type Parameters

    • T extends "2XX" | "3XX" | "4XX" | "5XX"

    contracts/common.md#principled-implementation The first-digit spelling maps to the integers from its hundred up to the next hundred, computed by excluding a smaller enumeration from a larger one.

    contracts/common.md#clear-and-simple-design One conditional over the four spellings, using two private helper types.

    contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.

    contracts/common.md#meaningful-documentation The comment gives the range rule with an example.