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