object-shape-tester - v5.1.6
    Preparing search index...

    Type Alias SpecifierToRuntimeType<PossiblySpecifier, IsExact, IsReadonly>

    SpecifierToRuntimeType: PossiblySpecifier extends ShapeSpecifier<
        infer Parts,
        infer Type,
    >
        ? Type extends NumericRange
            ? Parts[0]
            : Type extends And
                ? OptionallyReadonly<
                    IsReadonly,
                    UnionToIntersection<ExpandParts<Parts, IsExact, IsReadonly>>,
                >
                : Type extends Class
                    ? Parts[0] extends AnyConstructor
                        ? OptionallyReadonly<IsReadonly, InstanceType<Parts[0]>>
                        : "TypeError: classShape input must be a constructor."
                    : Type extends Or
                        ? OptionallyReadonly<
                            IsReadonly,
                            ExpandParts<Parts, IsExact, IsReadonly>,
                        >
                        : Type extends Exact
                            ? OptionallyReadonly<
                                IsReadonly,
                                WritableDeep<ExpandParts<Parts, true, IsReadonly>>,
                            >
                            : Type extends Enum
                                ? OptionallyReadonly<IsReadonly, Parts[0][keyof (...)[(...)]]>
                                : Type extends IndexedKeys
                                    ? Parts[0] extends {
                                        keys: unknown;
                                        required: boolean;
                                        values: unknown;
                                    }
                                        ? ExpandParts<(...), (...), (...)> extends PropertyKey
                                            ? OptionallyReadonly<(...), (...)>
                                            : "TypeError: indexedKeys keys be a subset of PropertyKey."
                                        : "TypeError: indexedKeys input is invalid."
                                    : Type extends Tuple
                                        ? TupleParts<Parts, IsExact, IsReadonly>
                                        : Type extends Unknown
                                            ? unknown
                                            : (...) extends (...) ? (...) : (...)
        : PossiblySpecifier extends Primitive
            ? IsExact extends true ? PossiblySpecifier : PossiblySpecifier
            : PossiblySpecifier extends object
                ? PossiblySpecifier extends ShapeDefinition<any, any>
                    ? PossiblySpecifier["runtimeType"]
                    : OptionallyReadonly<
                        IsReadonly,
                        {
                            [Prop in keyof PossiblySpecifier]: SpecifierToRuntimeType<
                                PossiblySpecifier[Prop],
                                IsExact,
                                IsReadonly,
                            >
                        },
                    >
                : PossiblySpecifier

    Converts a shape specifier to a runtime type.

    Type Parameters

    • PossiblySpecifier
    • IsExact extends boolean
    • IsReadonly extends boolean