mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
commit
8911c19f4f
@ -32,7 +32,7 @@ sourceFiles.forEach(f=> {
|
||||
});
|
||||
var compilerSoruces = `var compilerSources = ${JSON.stringify(rawCompilerSources) };`;
|
||||
|
||||
// .js code for the compiler, what we are actuallty testing
|
||||
// .js code for the compiler, what we are actually testing
|
||||
var rawCompilerJavaScript = fs.readFileSync(path.join(tsBuildDir, "tsc.js")).toString();
|
||||
rawCompilerJavaScript = rawCompilerJavaScript.replace("ts.executeCommandLine(ts.sys.args);", "");
|
||||
|
||||
|
||||
@ -14854,7 +14854,7 @@ namespace ts {
|
||||
const declarationContainer = getControlFlowContainer(declaration);
|
||||
let flowContainer = getControlFlowContainer(node);
|
||||
const isOuterVariable = flowContainer !== declarationContainer;
|
||||
const isSpreadDestructuringAsignmentTarget = node.parent && node.parent.parent && isSpreadAssignment(node.parent) && isDestructuringAssignmentTarget(node.parent.parent);
|
||||
const isSpreadDestructuringAssignmentTarget = node.parent && node.parent.parent && isSpreadAssignment(node.parent) && isDestructuringAssignmentTarget(node.parent.parent);
|
||||
// When the control flow originates in a function expression or arrow function and we are referencing
|
||||
// a const variable or parameter from an outer function, we extend the origin of the control flow
|
||||
// analysis to include the immediately enclosing function.
|
||||
@ -14866,7 +14866,7 @@ namespace ts {
|
||||
// We only look for uninitialized variables in strict null checking mode, and only when we can analyze
|
||||
// the entire control flow graph from the variable's declaration (i.e. when the flow container and
|
||||
// declaration container are the same).
|
||||
const assumeInitialized = isParameter || isAlias || isOuterVariable || isSpreadDestructuringAsignmentTarget ||
|
||||
const assumeInitialized = isParameter || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget ||
|
||||
type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & TypeFlags.AnyOrUnknown) !== 0 ||
|
||||
isInTypeQuery(node) || node.parent.kind === SyntaxKind.ExportSpecifier) ||
|
||||
node.parent.kind === SyntaxKind.NonNullExpression ||
|
||||
@ -19598,7 +19598,7 @@ namespace ts {
|
||||
}
|
||||
const specifier = node.arguments[0];
|
||||
const specifierType = checkExpressionCached(specifier);
|
||||
// Even though multiple arugments is grammatically incorrect, type-check extra arguments for completion
|
||||
// Even though multiple arguments is grammatically incorrect, type-check extra arguments for completion
|
||||
for (let i = 1; i < node.arguments.length; ++i) {
|
||||
checkExpressionCached(node.arguments[i]);
|
||||
}
|
||||
|
||||
@ -1855,7 +1855,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
export function getRightMostAssignedExpression(node: Expression): Expression {
|
||||
while (isAssignmentExpression(node, /*excludeCompoundAssignements*/ true)) {
|
||||
while (isAssignmentExpression(node, /*excludeCompoundAssignments*/ true)) {
|
||||
node = node.right;
|
||||
}
|
||||
return node;
|
||||
|
||||
@ -851,7 +851,7 @@ namespace ts.server {
|
||||
configFileExistenceInfo.exists = false;
|
||||
this.removeProject(project);
|
||||
|
||||
// Reload the configured projects for the open files in the map as they are affectected by this config file
|
||||
// Reload the configured projects for the open files in the map as they are affected by this config file
|
||||
// Since the configured project was deleted, we want to reload projects for all the open files including files
|
||||
// that are not root of the inferred project
|
||||
this.logConfigFileWatchUpdate(project.getConfigFilePath(), project.canonicalConfigFilePath, configFileExistenceInfo, ConfigFileWatcherStatus.ReloadingFiles);
|
||||
|
||||
@ -1246,7 +1246,7 @@ namespace ts.server.protocol {
|
||||
/* @internal */
|
||||
export interface ProjectFiles {
|
||||
/**
|
||||
* Information abount project verison
|
||||
* Information about project verison
|
||||
*/
|
||||
info?: ProjectVersionInfo;
|
||||
/**
|
||||
|
||||
@ -498,7 +498,7 @@ namespace ts.FindAllReferences.Core {
|
||||
return this.importTracker(exportSymbol, exportInfo, !!this.options.isForRename);
|
||||
}
|
||||
|
||||
/** @param allSearchSymbols set of additinal symbols for use by `includes`. */
|
||||
/** @param allSearchSymbols set of additional symbols for use by `includes`. */
|
||||
createSearch(location: Node | undefined, symbol: Symbol, comingFrom: ImportExport | undefined, searchOptions: { text?: string, allSearchSymbols?: Symbol[] } = {}): Search {
|
||||
// Note: if this is an external module symbol, the name doesn't include quotes.
|
||||
// Note: getLocalSymbolForExportDefault handles `export default class C {}`, but not `export default C` or `export { C as default }`.
|
||||
|
||||
@ -102,7 +102,7 @@ namespace ts {
|
||||
readDirectory(rootDir: string, extension: string, basePaths?: string, excludeEx?: string, includeFileEx?: string, includeDirEx?: string, depth?: number): string;
|
||||
|
||||
/**
|
||||
* Read arbitary text files on disk, i.e. when resolution procedure needs the content of 'package.json' to determine location of bundled typings for node modules
|
||||
* Read arbitrary text files on disk, i.e. when resolution procedure needs the content of 'package.json' to determine location of bundled typings for node modules
|
||||
*/
|
||||
readFile(fileName: string): string | undefined;
|
||||
realpath?(path: string): string;
|
||||
|
||||
@ -11967,7 +11967,7 @@ declare namespace ts {
|
||||
*/
|
||||
readDirectory(rootDir: string, extension: string, basePaths?: string, excludeEx?: string, includeFileEx?: string, includeDirEx?: string, depth?: number): string;
|
||||
/**
|
||||
* Read arbitary text files on disk, i.e. when resolution procedure needs the content of 'package.json' to determine location of bundled typings for node modules
|
||||
* Read arbitrary text files on disk, i.e. when resolution procedure needs the content of 'package.json' to determine location of bundled typings for node modules
|
||||
*/
|
||||
readFile(fileName: string): string | undefined;
|
||||
realpath?(path: string): string;
|
||||
|
||||
@ -24,7 +24,7 @@ x(
|
||||
// come comment
|
||||
// some other comment
|
||||
|
||||
// @anohter
|
||||
// @another
|
||||
|
||||
x();
|
||||
>x : Symbol(x, Decl(a.js, 0, 3))
|
||||
|
||||
@ -31,7 +31,7 @@ x(
|
||||
// come comment
|
||||
// some other comment
|
||||
|
||||
// @anohter
|
||||
// @another
|
||||
|
||||
x();
|
||||
>x() : any
|
||||
|
||||
@ -23,7 +23,7 @@ x(
|
||||
// come comment
|
||||
// some other comment
|
||||
|
||||
// @anohter
|
||||
// @another
|
||||
|
||||
x();
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
verify.goToDefinition({
|
||||
1: "label1Definition",
|
||||
2: "label2Definition",
|
||||
// labels accross function boundaries
|
||||
// labels across function boundaries
|
||||
3: "label1Definition",
|
||||
// undefined label
|
||||
4: []
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user