Interface SubType

Analyzes, whether there is a sub type-relationship between two types.

The sub-type relationship might be direct or indirect (transitive). If both types are the same, no problems will be reported, since a type is considered as sub-type of itself (by definition).

interface SubType {
    getSubTypeProblem(
        subType: Type,
        superType: Type,
    ): undefined | SubTypeProblem;
    getSubTypeResult(subType: Type, superType: Type): SubTypeResult;
    isSubType(subType: Type, superType: Type): boolean;
    markAsSubType(
        subType: Type,
        superType: Type,
        options?: Partial<MarkSubTypeOptions>,
    ): void;
}

Implemented by

Methods