diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 0e1f08a69d8..6b325bf6abe 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -3906,6 +3906,7 @@ namespace ts { AlwaysStrict = 1 << 4, // Always use strict rules for contravariant inferences } + /* @internal */ export interface InferenceInfo { typeParameter: TypeParameter; // Type parameter for which inferences are being made candidates: Type[]; // Candidates in covariant positions (or undefined) @@ -3916,6 +3917,7 @@ namespace ts { isFixed: boolean; // True if inferences are fixed } + /* @internal */ export const enum InferenceFlags { None = 0, // No special inference behaviors InferUnionTypes = 1 << 0, // Infer union types for disjoint candidates (otherwise unknownType) @@ -3932,12 +3934,14 @@ namespace ts { * x | y is Maybe if either x or y is Maybe, but neither x or y is True. * x | y is True if either x or y is True. */ + /* @internal */ export const enum Ternary { False = 0, Maybe = 1, True = -1 } + /* @internal */ export type TypeComparer = (s: Type, t: Type, reportErrors?: boolean) => Ternary; /* @internal */ diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index ee3bd07d280..9f5ceb1f0cb 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -2227,36 +2227,6 @@ declare namespace ts { NoConstraints = 8, AlwaysStrict = 16, } - interface InferenceInfo { - typeParameter: TypeParameter; - candidates: Type[]; - contraCandidates: Type[]; - inferredType: Type; - priority: InferencePriority; - topLevel: boolean; - isFixed: boolean; - } - enum InferenceFlags { - None = 0, - InferUnionTypes = 1, - NoDefault = 2, - AnyDefault = 4, - } - /** - * Ternary values are defined such that - * x & y is False if either x or y is False. - * x & y is Maybe if either x or y is Maybe, but neither x or y is False. - * x & y is True if both x and y are True. - * x | y is False if both x and y are False. - * x | y is Maybe if either x or y is Maybe, but neither x or y is True. - * x | y is True if either x or y is True. - */ - enum Ternary { - False = 0, - Maybe = 1, - True = -1, - } - type TypeComparer = (s: Type, t: Type, reportErrors?: boolean) => Ternary; interface JsFileExtensionInfo { extension: string; isMixedContent: boolean; diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 0075da06668..e5fb0b1e169 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -2227,36 +2227,6 @@ declare namespace ts { NoConstraints = 8, AlwaysStrict = 16, } - interface InferenceInfo { - typeParameter: TypeParameter; - candidates: Type[]; - contraCandidates: Type[]; - inferredType: Type; - priority: InferencePriority; - topLevel: boolean; - isFixed: boolean; - } - enum InferenceFlags { - None = 0, - InferUnionTypes = 1, - NoDefault = 2, - AnyDefault = 4, - } - /** - * Ternary values are defined such that - * x & y is False if either x or y is False. - * x & y is Maybe if either x or y is Maybe, but neither x or y is False. - * x & y is True if both x and y are True. - * x | y is False if both x and y are False. - * x | y is Maybe if either x or y is Maybe, but neither x or y is True. - * x | y is True if either x or y is True. - */ - enum Ternary { - False = 0, - Maybe = 1, - True = -1, - } - type TypeComparer = (s: Type, t: Type, reportErrors?: boolean) => Ternary; interface JsFileExtensionInfo { extension: string; isMixedContent: boolean;