Make some internal types @internal (#22190)

This commit is contained in:
Andy 2018-02-26 12:37:45 -08:00 committed by GitHub
parent e4e4b17669
commit 95dfd271e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 60 deletions

View File

@ -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 */

View File

@ -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;

View File

@ -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;