@@ -1872,6 +1872,100 @@ namespace ts {
1872
1872
getJsxIntrinsicTagNames ( ) : Symbol [ ] ;
1873
1873
isOptionalParameter ( node : ParameterDeclaration ) : boolean ;
1874
1874
1875
+ /**
1876
+ * Two types are considered identical when
1877
+ * - they are both the `any` type,
1878
+ * - they are the same primitive type,
1879
+ * - they are the same type parameter,
1880
+ * - they are union types with identical sets of constituent types, or
1881
+ * - they are intersection types with identical sets of constituent types, or
1882
+ * - they are object types with identical sets of members.
1883
+ *
1884
+ * This relationship is bidirectional.
1885
+ * See [here](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#3.11.2) for more information.
1886
+ */
1887
+ isIdenticalTo ( a : Type , b : Type ) : boolean ;
1888
+ /**
1889
+ * `a` is a ___subtype___ of `b` (and `b` is a ___supertype___ of `a`) if `a` has no excess properties with respect to `b`,
1890
+ * and one of the following is true:
1891
+ * - `a` and `b` are identical types.
1892
+ * - `b` is the `any` type.
1893
+ * - `a` is the `undefined` type.
1894
+ * - `a` is the `null` type and `b` is _not_ the `undefined` type.
1895
+ * - `a` is an enum type and `b` is the primitive type `number`.
1896
+ * - `a` is a string literal type and `b` is the primitive type `string`.
1897
+ * - `a` is a union type and each constituient type of `b` is a subtype of `b`.
1898
+ * - `a` is an intersection type and at least one constituent type of `a` is a subtype of `b`.
1899
+ * - `b` is a union type and `a` is a subtype of at least one constituent type of `b`.
1900
+ * - `b` is an intersection type and `a` is a subtype of each constituent type of `b`.
1901
+ * - `a` is a type parameter and the constraint of `a` is a subtype of `b`.
1902
+ * - `a` has a subset of the structural members of `b`.
1903
+ *
1904
+ * This relationship is directional.
1905
+ * See [here](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#3.11.3) for more information.
1906
+ */
1907
+ isSubtypeOf ( a : Type , b : Type ) : boolean ;
1908
+ /**
1909
+ * The assignable relationship differs only from the subtype relationship in that:
1910
+ * - the `any` type is assignable to, but not a subtype of, all types
1911
+ * - the primitive type `number` is assignable to, but not a subtype of, all enum types, and
1912
+ * - an object type without a particular property is assignable to an object type in which that property is optional.
1913
+ *
1914
+ * This relationship is directional.
1915
+ * See [here](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#3.11.4) for more information.
1916
+ */
1917
+ isAssignableTo ( a : Type , b : Type ) : boolean ;
1918
+ /**
1919
+ * True if `a` is assignable to `b`, or `b` is assignable to `a`. Additionally, all unions with
1920
+ * overlapping constituient types are comparable, and unit types in the same domain are comparable.
1921
+ * This relationship is bidirectional.
1922
+ */
1923
+ isComparableTo ( a : Type , b : Type ) : boolean ;
1924
+ /**
1925
+ * Not a formal relationship - returns true if a is an instantiation of the generic type b
1926
+ */
1927
+ isInstantiationOf ( a : GenericType , b : GenericType ) : boolean ;
1928
+
1929
+ /**
1930
+ * Returns the declared type of the globally named symbol with meaning SymbolFlags.Type
1931
+ * Returns the unknown type on failure.
1932
+ */
1933
+ lookupGlobalType ( name : string ) : Type ;
1934
+ /**
1935
+ * Returns the declared type of the globally named symbol with meaning SymbolFlags.Value
1936
+ * Returns the unknown type on failure.
1937
+ */
1938
+ lookupGlobalValueType ( name : string ) : Type ;
1939
+ /**
1940
+ * Returns the declared type of the named symbol lexically at the position specified with meaning SymbolFlags.Type
1941
+ * Returns the unknown type on failure.
1942
+ */
1943
+ lookupTypeAt ( name : string , position : Node ) : Type ;
1944
+ /**
1945
+ * Returns the declared type of the named symbol lexically at the position specified with meaning SymbolFlags.Value
1946
+ * Returns the unknown type on failure.
1947
+ */
1948
+ lookupValueTypeAt ( name : string , position : Node ) : Type ;
1949
+ /**
1950
+ * Returns the type of a symbol
1951
+ */
1952
+ getTypeOfSymbol ( symbol : Symbol ) : Type ;
1953
+
1954
+ getAnyType ( ) : Type ;
1955
+ getStringType ( ) : Type ;
1956
+ getNumberType ( ) : Type ;
1957
+ getBooleanType ( ) : Type ;
1958
+ getVoidType ( ) : Type ;
1959
+ getUndefinedType ( ) : Type ;
1960
+ getNullType ( ) : Type ;
1961
+ getESSymbolType ( ) : Type ;
1962
+ getNeverType ( ) : Type ;
1963
+ getUnknownType ( ) : Type ;
1964
+ getStringLiteralType ( text : string ) : LiteralType ;
1965
+ getNumberLiteralType ( text : string ) : LiteralType ;
1966
+ getFalseType ( ) : Type ;
1967
+ getTrueType ( ) : Type ;
1968
+
1875
1969
// Should not be called directly. Should only be accessed through the Program instance.
1876
1970
/* @internal */ getDiagnostics ( sourceFile ?: SourceFile , cancellationToken ?: CancellationToken ) : Diagnostic [ ] ;
1877
1971
/* @internal */ getGlobalDiagnostics ( ) : Diagnostic [ ] ;
0 commit comments