commit
ec9652d9d6
7 changed files with 16 additions and 16 deletions
|
@ -3715,7 +3715,7 @@ the array literal initializer expression is contextually typed by the implied ty
|
|||
|
||||
## <a name="5.3"/>5.3 Let and Const Declarations
|
||||
|
||||
Let and const declarations are exended to include optional type annotations.
|
||||
Let and const declarations are extended to include optional type annotations.
|
||||
|
||||
  *LexicalBinding:* *( Modified )*
|
||||
   *SimpleLexicalBinding*
|
||||
|
|
|
@ -35,8 +35,8 @@ function createCancellationToken(args: string[]): ServerCancellationToken {
|
|||
}
|
||||
// cancellationPipeName is a string without '*' inside that can optionally end with '*'
|
||||
// when client wants to signal cancellation it should create a named pipe with name=<cancellationPipeName>
|
||||
// server will synchronously check the presence of the pipe and treat its existance as indicator that current request should be canceled.
|
||||
// in case if client prefers to use more fine-grained schema than one name for all request it can add '*' to the end of cancelellationPipeName.
|
||||
// server will synchronously check the presence of the pipe and treat its existence as indicator that current request should be canceled.
|
||||
// in case if client prefers to use more fine-grained schema than one name for all request it can add '*' to the end of cancellationPipeName.
|
||||
// in this case pipe name will be build dynamically as <cancellationPipeName><request_seq>.
|
||||
if (cancellationPipeName.charAt(cancellationPipeName.length - 1) === "*") {
|
||||
const namePrefix = cancellationPipeName.slice(0, -1);
|
||||
|
|
|
@ -550,7 +550,7 @@ namespace ts {
|
|||
}
|
||||
}
|
||||
// We create a return control flow graph for IIFEs and constructors. For constructors
|
||||
// we use the return control flow graph in strict property intialization checks.
|
||||
// we use the return control flow graph in strict property initialization checks.
|
||||
currentReturnTarget = isIIFE || node.kind === SyntaxKind.Constructor ? createBranchLabel() : undefined;
|
||||
currentBreakTarget = undefined;
|
||||
currentContinueTarget = undefined;
|
||||
|
@ -3445,7 +3445,7 @@ namespace ts {
|
|||
// If a FunctionDeclaration is generator function and is the body of a
|
||||
// transformed async function, then this node can be transformed to a
|
||||
// down-level generator.
|
||||
// Currently we do not support transforming any other generator fucntions
|
||||
// Currently we do not support transforming any other generator functions
|
||||
// down level.
|
||||
if (node.asteriskToken) {
|
||||
transformFlags |= TransformFlags.AssertGenerator;
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace ts {
|
|||
currentChangedFilePath: Path | undefined;
|
||||
/**
|
||||
* Map of file signatures, with key being file path, calculated while getting current changed file's affected files
|
||||
* These will be commited whenever the iteration through affected files of current changed file is complete
|
||||
* These will be committed whenever the iteration through affected files of current changed file is complete
|
||||
*/
|
||||
currentAffectedFilesSignatures: Map<string> | undefined;
|
||||
/**
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace ts {
|
|||
*/
|
||||
readonly referencedMap: ReadonlyMap<BuilderState.ReferencedSet> | undefined;
|
||||
/**
|
||||
* Contains the map of exported modules ReferencedSet=exorted module files from the file if module emit is enabled
|
||||
* Contains the map of exported modules ReferencedSet=exported module files from the file if module emit is enabled
|
||||
* Otherwise undefined
|
||||
*/
|
||||
readonly exportedModulesMap: Map<BuilderState.ReferencedSet> | undefined;
|
||||
|
@ -268,9 +268,9 @@ namespace ts.BuilderState {
|
|||
*/
|
||||
export function getFilesAffectedBy(state: BuilderState, programOfThisState: Program, path: Path, cancellationToken: CancellationToken | undefined, computeHash: ComputeHash, cacheToUpdateSignature?: Map<string>, exportedModulesMapCache?: ComputingExportedModulesMap): ReadonlyArray<SourceFile> {
|
||||
// Since the operation could be cancelled, the signatures are always stored in the cache
|
||||
// They will be commited once it is safe to use them
|
||||
// They will be committed once it is safe to use them
|
||||
// eg when calling this api from tsserver, if there is no cancellation of the operation
|
||||
// In the other cases the affected files signatures are commited only after the iteration through the result is complete
|
||||
// In the other cases the affected files signatures are committed only after the iteration through the result is complete
|
||||
const signatureCache = cacheToUpdateSignature || createMap();
|
||||
const sourceFile = programOfThisState.getSourceFileByPath(path);
|
||||
if (!sourceFile) {
|
||||
|
|
|
@ -6318,7 +6318,7 @@ namespace ts {
|
|||
return false;
|
||||
}
|
||||
|
||||
/** A type parameter is thisless if its contraint is thisless, or if it has no constraint. */
|
||||
/** A type parameter is thisless if its constraint is thisless, or if it has no constraint. */
|
||||
function isThislessTypeParameter(node: TypeParameterDeclaration) {
|
||||
const constraint = getEffectiveConstraintOfTypeParameter(node);
|
||||
return !constraint || isThislessType(constraint);
|
||||
|
@ -10041,10 +10041,10 @@ namespace ts {
|
|||
if (checkType.flags & TypeFlags.Any) {
|
||||
return getUnionType([instantiateType(root.trueType, combinedMapper || mapper), instantiateType(root.falseType, mapper)]);
|
||||
}
|
||||
// Return falseType for a definitely false extends check. We check an instantations of the two
|
||||
// Return falseType for a definitely false extends check. We check an instantiations of the two
|
||||
// types with type parameters mapped to the wildcard type, the most permissive instantiations
|
||||
// possible (the wildcard type is assignable to and from all types). If those are not related,
|
||||
// then no instatiations will be and we can just return the false branch type.
|
||||
// then no instantiations will be and we can just return the false branch type.
|
||||
if (!isTypeAssignableTo(getPermissiveInstantiation(checkType), getPermissiveInstantiation(inferredExtendsType))) {
|
||||
return instantiateType(root.falseType, mapper);
|
||||
}
|
||||
|
@ -14501,7 +14501,7 @@ namespace ts {
|
|||
// that is _too good_ in projects with complicated constraints (eg, fp-ts). In such cases, if we did not limit ourselves
|
||||
// here, we might produce more valid inferences for types, causing us to do more checks and perform more instantiations
|
||||
// (in addition to the extra stack depth here) which, in turn, can push the already close process over its limit.
|
||||
// TL;DR: If we ever become generally more memory efficienct (or our resource budget ever increases), we should just
|
||||
// TL;DR: If we ever become generally more memory efficient (or our resource budget ever increases), we should just
|
||||
// remove this `allowComplexConstraintInference` flag.
|
||||
allowComplexConstraintInference = false;
|
||||
return inferFromTypes(apparentSource, target);
|
||||
|
@ -18938,7 +18938,7 @@ namespace ts {
|
|||
// if jsx emit was not react as there wont be error being emitted
|
||||
reactSym.isReferenced = SymbolFlags.All;
|
||||
|
||||
// If react symbol is alias, mark it as refereced
|
||||
// If react symbol is alias, mark it as referenced
|
||||
if (reactSym.flags & SymbolFlags.Alias && !isConstEnumOrConstEnumOnlyModule(resolveAlias(reactSym))) {
|
||||
markAliasSymbolAsReferenced(reactSym);
|
||||
}
|
||||
|
@ -28330,7 +28330,7 @@ namespace ts {
|
|||
throwIfNonDiagnosticsProducing();
|
||||
if (sourceFile) {
|
||||
// Some global diagnostics are deferred until they are needed and
|
||||
// may not be reported in the firt call to getGlobalDiagnostics.
|
||||
// may not be reported in the first call to getGlobalDiagnostics.
|
||||
// We should catch these changes and report them.
|
||||
const previousGlobalDiagnostics = diagnostics.getGlobalDiagnostics();
|
||||
const previousGlobalDiagnosticsSize = previousGlobalDiagnostics.length;
|
||||
|
|
|
@ -1935,7 +1935,7 @@ namespace ts {
|
|||
|
||||
function directoryOfCombinedPath(fileName: string, basePath: string) {
|
||||
// Use the `getNormalizedAbsolutePath` function to avoid canonicalizing the path, as it must remain noncanonical
|
||||
// until consistient casing errors are reported
|
||||
// until consistent casing errors are reported
|
||||
return getDirectoryPath(getNormalizedAbsolutePath(fileName, basePath));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue