@@ -2686,8 +2686,103 @@ namespace ts {
2686
2686
2687
2687
/* @internal */ tryFindAmbientModuleWithoutAugmentations ( moduleName : string ) : Symbol | undefined ;
2688
2688
2689
+
2689
2690
/* @internal */ getSymbolWalker ( accept ?: ( symbol : Symbol ) => boolean ) : SymbolWalker ;
2690
2691
2692
+ /**
2693
+ * Two types are considered identical when
2694
+ * - they are both the `any` type,
2695
+ * - they are the same primitive type,
2696
+ * - they are the same type parameter,
2697
+ * - they are union types with identical sets of constituent types, or
2698
+ * - they are intersection types with identical sets of constituent types, or
2699
+ * - they are object types with identical sets of members.
2700
+ *
2701
+ * This relationship is bidirectional.
2702
+ * See [here](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#3.11.2) for more information.
2703
+ */
2704
+ isIdenticalTo ( a : Type , b : Type ) : boolean ;
2705
+ /**
2706
+ * `a` is a ___subtype___ of `b` (and `b` is a ___supertype___ of `a`) if `a` has no excess properties with respect to `b`,
2707
+ * and one of the following is true:
2708
+ * - `a` and `b` are identical types.
2709
+ * - `b` is the `any` type.
2710
+ * - `a` is the `undefined` type.
2711
+ * - `a` is the `null` type and `b` is _not_ the `undefined` type.
2712
+ * - `a` is an enum type and `b` is the primitive type `number`.
2713
+ * - `a` is a string literal type and `b` is the primitive type `string`.
2714
+ * - `a` is a union type and each constituient type of `b` is a subtype of `b`.
2715
+ * - `a` is an intersection type and at least one constituent type of `a` is a subtype of `b`.
2716
+ * - `b` is a union type and `a` is a subtype of at least one constituent type of `b`.
2717
+ * - `b` is an intersection type and `a` is a subtype of each constituent type of `b`.
2718
+ * - `a` is a type parameter and the constraint of `a` is a subtype of `b`.
2719
+ * - `a` has a subset of the structural members of `b`.
2720
+ *
2721
+ * This relationship is directional.
2722
+ * See [here](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#3.11.3) for more information.
2723
+ */
2724
+ isSubtypeOf ( a : Type , b : Type ) : boolean ;
2725
+ /**
2726
+ * The assignable relationship differs only from the subtype relationship in that:
2727
+ * - the `any` type is assignable to, but not a subtype of, all types
2728
+ * - the primitive type `number` is assignable to, but not a subtype of, all enum types, and
2729
+ * - an object type without a particular property is assignable to an object type in which that property is optional.
2730
+ *
2731
+ * This relationship is directional.
2732
+ * See [here](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#3.11.4) for more information.
2733
+ */
2734
+ isAssignableTo ( a : Type , b : Type ) : boolean ;
2735
+ /**
2736
+ * True if `a` is assignable to `b`, or `b` is assignable to `a`. Additionally, all unions with
2737
+ * overlapping constituient types are comparable, and unit types in the same domain are comparable.
2738
+ * This relationship is bidirectional.
2739
+ */
2740
+ isComparableTo ( a : Type , b : Type ) : boolean ;
2741
+ /**
2742
+ * Not a formal relationship - returns true if a is an instantiation of the generic type b
2743
+ */
2744
+ isInstantiationOf ( a : GenericType , b : GenericType ) : boolean ;
2745
+
2746
+ /**
2747
+ * Returns the declared type of the globally named symbol with meaning SymbolFlags.Type
2748
+ * Returns the unknown type on failure.
2749
+ */
2750
+ lookupGlobalType ( name : string ) : Type ;
2751
+ /**
2752
+ * Returns the declared type of the globally named symbol with meaning SymbolFlags.Value
2753
+ * Returns the unknown type on failure.
2754
+ */
2755
+ lookupGlobalValueType ( name : string ) : Type ;
2756
+ /**
2757
+ * Returns the declared type of the named symbol lexically at the position specified with meaning SymbolFlags.Type
2758
+ * Returns the unknown type on failure.
2759
+ */
2760
+ lookupTypeAt ( name : string , position : Node ) : Type ;
2761
+ /**
2762
+ * Returns the declared type of the named symbol lexically at the position specified with meaning SymbolFlags.Value
2763
+ * Returns the unknown type on failure.
2764
+ */
2765
+ lookupValueTypeAt ( name : string , position : Node ) : Type ;
2766
+ /**
2767
+ * Returns the type of a symbol
2768
+ */
2769
+ getTypeOfSymbol ( symbol : Symbol ) : Type ;
2770
+
2771
+ getAnyType ( ) : Type ;
2772
+ getStringType ( ) : Type ;
2773
+ getNumberType ( ) : Type ;
2774
+ getBooleanType ( ) : Type ;
2775
+ getVoidType ( ) : Type ;
2776
+ getUndefinedType ( ) : Type ;
2777
+ getNullType ( ) : Type ;
2778
+ getESSymbolType ( ) : Type ;
2779
+ getNeverType ( ) : Type ;
2780
+ getUnknownType ( ) : Type ;
2781
+ getStringLiteralType ( text : string ) : LiteralType ;
2782
+ getNumberLiteralType ( num : number ) : LiteralType ;
2783
+ getFalseType ( ) : Type ;
2784
+ getTrueType ( ) : Type ;
2785
+
2691
2786
// Should not be called directly. Should only be accessed through the Program instance.
2692
2787
/* @internal */ getDiagnostics ( sourceFile ?: SourceFile , cancellationToken ?: CancellationToken ) : Diagnostic [ ] ;
2693
2788
/* @internal */ getGlobalDiagnostics ( ) : Diagnostic [ ] ;
0 commit comments