@@ -2629,6 +2629,100 @@ namespace ts {
2629
2629
2630
2630
/* @internal */ tryFindAmbientModuleWithoutAugmentations ( moduleName : string ) : Symbol | undefined ;
2631
2631
2632
+ /**
2633
+ * Two types are considered identical when
2634
+ * - they are both the `any` type,
2635
+ * - they are the same primitive type,
2636
+ * - they are the same type parameter,
2637
+ * - they are union types with identical sets of constituent types, or
2638
+ * - they are intersection types with identical sets of constituent types, or
2639
+ * - they are object types with identical sets of members.
2640
+ *
2641
+ * This relationship is bidirectional.
2642
+ * See [here](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#3.11.2) for more information.
2643
+ */
2644
+ isIdenticalTo ( a : Type , b : Type ) : boolean ;
2645
+ /**
2646
+ * `a` is a ___subtype___ of `b` (and `b` is a ___supertype___ of `a`) if `a` has no excess properties with respect to `b`,
2647
+ * and one of the following is true:
2648
+ * - `a` and `b` are identical types.
2649
+ * - `b` is the `any` type.
2650
+ * - `a` is the `undefined` type.
2651
+ * - `a` is the `null` type and `b` is _not_ the `undefined` type.
2652
+ * - `a` is an enum type and `b` is the primitive type `number`.
2653
+ * - `a` is a string literal type and `b` is the primitive type `string`.
2654
+ * - `a` is a union type and each constituient type of `b` is a subtype of `b`.
2655
+ * - `a` is an intersection type and at least one constituent type of `a` is a subtype of `b`.
2656
+ * - `b` is a union type and `a` is a subtype of at least one constituent type of `b`.
2657
+ * - `b` is an intersection type and `a` is a subtype of each constituent type of `b`.
2658
+ * - `a` is a type parameter and the constraint of `a` is a subtype of `b`.
2659
+ * - `a` has a subset of the structural members of `b`.
2660
+ *
2661
+ * This relationship is directional.
2662
+ * See [here](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#3.11.3) for more information.
2663
+ */
2664
+ isSubtypeOf ( a : Type , b : Type ) : boolean ;
2665
+ /**
2666
+ * The assignable relationship differs only from the subtype relationship in that:
2667
+ * - the `any` type is assignable to, but not a subtype of, all types
2668
+ * - the primitive type `number` is assignable to, but not a subtype of, all enum types, and
2669
+ * - an object type without a particular property is assignable to an object type in which that property is optional.
2670
+ *
2671
+ * This relationship is directional.
2672
+ * See [here](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#3.11.4) for more information.
2673
+ */
2674
+ isAssignableTo ( a : Type , b : Type ) : boolean ;
2675
+ /**
2676
+ * True if `a` is assignable to `b`, or `b` is assignable to `a`. Additionally, all unions with
2677
+ * overlapping constituient types are comparable, and unit types in the same domain are comparable.
2678
+ * This relationship is bidirectional.
2679
+ */
2680
+ isComparableTo ( a : Type , b : Type ) : boolean ;
2681
+ /**
2682
+ * Not a formal relationship - returns true if a is an instantiation of the generic type b
2683
+ */
2684
+ isInstantiationOf ( a : GenericType , b : GenericType ) : boolean ;
2685
+
2686
+ /**
2687
+ * Returns the declared type of the globally named symbol with meaning SymbolFlags.Type
2688
+ * Returns the unknown type on failure.
2689
+ */
2690
+ lookupGlobalType ( name : string ) : Type ;
2691
+ /**
2692
+ * Returns the declared type of the globally named symbol with meaning SymbolFlags.Value
2693
+ * Returns the unknown type on failure.
2694
+ */
2695
+ lookupGlobalValueType ( name : string ) : Type ;
2696
+ /**
2697
+ * Returns the declared type of the named symbol lexically at the position specified with meaning SymbolFlags.Type
2698
+ * Returns the unknown type on failure.
2699
+ */
2700
+ lookupTypeAt ( name : string , position : Node ) : Type ;
2701
+ /**
2702
+ * Returns the declared type of the named symbol lexically at the position specified with meaning SymbolFlags.Value
2703
+ * Returns the unknown type on failure.
2704
+ */
2705
+ lookupValueTypeAt ( name : string , position : Node ) : Type ;
2706
+ /**
2707
+ * Returns the type of a symbol
2708
+ */
2709
+ getTypeOfSymbol ( symbol : Symbol ) : Type ;
2710
+
2711
+ getAnyType ( ) : Type ;
2712
+ getStringType ( ) : Type ;
2713
+ getNumberType ( ) : Type ;
2714
+ getBooleanType ( ) : Type ;
2715
+ getVoidType ( ) : Type ;
2716
+ getUndefinedType ( ) : Type ;
2717
+ getNullType ( ) : Type ;
2718
+ getESSymbolType ( ) : Type ;
2719
+ getNeverType ( ) : Type ;
2720
+ getUnknownType ( ) : Type ;
2721
+ getStringLiteralType ( text : string ) : LiteralType ;
2722
+ getNumberLiteralType ( text : string ) : LiteralType ;
2723
+ getFalseType ( ) : Type ;
2724
+ getTrueType ( ) : Type ;
2725
+
2632
2726
// Should not be called directly. Should only be accessed through the Program instance.
2633
2727
/* @internal */ getDiagnostics ( sourceFile ?: SourceFile , cancellationToken ?: CancellationToken ) : Diagnostic [ ] ;
2634
2728
/* @internal */ getGlobalDiagnostics ( ) : Diagnostic [ ] ;
0 commit comments