From d1c4710599c67c52c805da1f5f5f0383cbb2e6a4 Mon Sep 17 00:00:00 2001 From: Zuckjet Date: Mon, 18 Jan 2021 19:49:52 +0800 Subject: [PATCH] Fix typos in comments --- lib/tsserver.js | 6 +++--- lib/tsserverlibrary.js | 6 +++--- lib/typescript.js | 6 +++--- lib/typescriptServices.js | 6 +++--- lib/typingsInstaller.js | 6 +++--- src/compiler/builder.ts | 2 +- src/compiler/program.ts | 2 +- src/compiler/resolutionCache.ts | 2 +- src/compiler/utilitiesPublic.ts | 2 +- src/server/project.ts | 2 +- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/lib/tsserver.js b/lib/tsserver.js index da00976fe12d9..fea2c7355c212 100644 --- a/lib/tsserver.js +++ b/lib/tsserver.js @@ -106237,7 +106237,7 @@ var ts; var oldSourceFile = oldSourceFiles_1[_i]; var newFile = getSourceFileByPath(oldSourceFile.resolvedPath); if (shouldCreateNewSourceFile || !newFile || - // old file wasnt redirect but new file is + // old file wasn't redirect but new file is (oldSourceFile.resolvedPath === oldSourceFile.path && newFile.resolvedPath !== oldSourceFile.path)) { host.onReleaseOldSourceFile(oldSourceFile, oldProgram.getCompilerOptions(), !!getSourceFileByPath(oldSourceFile.path)); } @@ -109353,7 +109353,7 @@ var ts; var newReferences; // if not using old state, every file is changed if (!useOldState || - // File wasnt present in old state + // File wasn't present in old state !(oldInfo = oldState.fileInfos.get(sourceFilePath)) || // versions dont match oldInfo.version !== info.version || @@ -110505,7 +110505,7 @@ var ts; var resolvedModules = []; var compilerOptions = resolutionHost.getCompilationSettings(); var hasInvalidatedNonRelativeUnresolvedImport = logChanges && isFileWithInvalidatedNonRelativeUnresolvedImports(path); - // All the resolutions in this file are invalidated if this file wasnt resolved using same redirect + // All the resolutions in this file are invalidated if this file wasn't resolved using same redirect var program = resolutionHost.getCurrentProgram(); var oldRedirect = program && program.getResolvedProjectReferenceToRedirect(containingFile); var unmatchedRedirects = oldRedirect ? diff --git a/lib/tsserverlibrary.js b/lib/tsserverlibrary.js index 1cf869df83039..871fc59961b13 100644 --- a/lib/tsserverlibrary.js +++ b/lib/tsserverlibrary.js @@ -106431,7 +106431,7 @@ var ts; var oldSourceFile = oldSourceFiles_1[_i]; var newFile = getSourceFileByPath(oldSourceFile.resolvedPath); if (shouldCreateNewSourceFile || !newFile || - // old file wasnt redirect but new file is + // old file wasn't redirect but new file is (oldSourceFile.resolvedPath === oldSourceFile.path && newFile.resolvedPath !== oldSourceFile.path)) { host.onReleaseOldSourceFile(oldSourceFile, oldProgram.getCompilerOptions(), !!getSourceFileByPath(oldSourceFile.path)); } @@ -109547,7 +109547,7 @@ var ts; var newReferences; // if not using old state, every file is changed if (!useOldState || - // File wasnt present in old state + // File wasn't present in old state !(oldInfo = oldState.fileInfos.get(sourceFilePath)) || // versions dont match oldInfo.version !== info.version || @@ -110699,7 +110699,7 @@ var ts; var resolvedModules = []; var compilerOptions = resolutionHost.getCompilationSettings(); var hasInvalidatedNonRelativeUnresolvedImport = logChanges && isFileWithInvalidatedNonRelativeUnresolvedImports(path); - // All the resolutions in this file are invalidated if this file wasnt resolved using same redirect + // All the resolutions in this file are invalidated if this file wasn't resolved using same redirect var program = resolutionHost.getCurrentProgram(); var oldRedirect = program && program.getResolvedProjectReferenceToRedirect(containingFile); var unmatchedRedirects = oldRedirect ? diff --git a/lib/typescript.js b/lib/typescript.js index bdb7d8ef61977..48c2fc2c63cea 100644 --- a/lib/typescript.js +++ b/lib/typescript.js @@ -106431,7 +106431,7 @@ var ts; var oldSourceFile = oldSourceFiles_1[_i]; var newFile = getSourceFileByPath(oldSourceFile.resolvedPath); if (shouldCreateNewSourceFile || !newFile || - // old file wasnt redirect but new file is + // old file wasn't redirect but new file is (oldSourceFile.resolvedPath === oldSourceFile.path && newFile.resolvedPath !== oldSourceFile.path)) { host.onReleaseOldSourceFile(oldSourceFile, oldProgram.getCompilerOptions(), !!getSourceFileByPath(oldSourceFile.path)); } @@ -109547,7 +109547,7 @@ var ts; var newReferences; // if not using old state, every file is changed if (!useOldState || - // File wasnt present in old state + // File wasn't present in old state !(oldInfo = oldState.fileInfos.get(sourceFilePath)) || // versions dont match oldInfo.version !== info.version || @@ -110699,7 +110699,7 @@ var ts; var resolvedModules = []; var compilerOptions = resolutionHost.getCompilationSettings(); var hasInvalidatedNonRelativeUnresolvedImport = logChanges && isFileWithInvalidatedNonRelativeUnresolvedImports(path); - // All the resolutions in this file are invalidated if this file wasnt resolved using same redirect + // All the resolutions in this file are invalidated if this file wasn't resolved using same redirect var program = resolutionHost.getCurrentProgram(); var oldRedirect = program && program.getResolvedProjectReferenceToRedirect(containingFile); var unmatchedRedirects = oldRedirect ? diff --git a/lib/typescriptServices.js b/lib/typescriptServices.js index f8c52a49c2096..bf9fd8adc3ce6 100644 --- a/lib/typescriptServices.js +++ b/lib/typescriptServices.js @@ -106431,7 +106431,7 @@ var ts; var oldSourceFile = oldSourceFiles_1[_i]; var newFile = getSourceFileByPath(oldSourceFile.resolvedPath); if (shouldCreateNewSourceFile || !newFile || - // old file wasnt redirect but new file is + // old file wasn't redirect but new file is (oldSourceFile.resolvedPath === oldSourceFile.path && newFile.resolvedPath !== oldSourceFile.path)) { host.onReleaseOldSourceFile(oldSourceFile, oldProgram.getCompilerOptions(), !!getSourceFileByPath(oldSourceFile.path)); } @@ -109547,7 +109547,7 @@ var ts; var newReferences; // if not using old state, every file is changed if (!useOldState || - // File wasnt present in old state + // File wasn't present in old state !(oldInfo = oldState.fileInfos.get(sourceFilePath)) || // versions dont match oldInfo.version !== info.version || @@ -110699,7 +110699,7 @@ var ts; var resolvedModules = []; var compilerOptions = resolutionHost.getCompilationSettings(); var hasInvalidatedNonRelativeUnresolvedImport = logChanges && isFileWithInvalidatedNonRelativeUnresolvedImports(path); - // All the resolutions in this file are invalidated if this file wasnt resolved using same redirect + // All the resolutions in this file are invalidated if this file wasn't resolved using same redirect var program = resolutionHost.getCurrentProgram(); var oldRedirect = program && program.getResolvedProjectReferenceToRedirect(containingFile); var unmatchedRedirects = oldRedirect ? diff --git a/lib/typingsInstaller.js b/lib/typingsInstaller.js index e3a7a2c154dd1..4f9a74223a677 100644 --- a/lib/typingsInstaller.js +++ b/lib/typingsInstaller.js @@ -106226,7 +106226,7 @@ var ts; var oldSourceFile = oldSourceFiles_1[_i]; var newFile = getSourceFileByPath(oldSourceFile.resolvedPath); if (shouldCreateNewSourceFile || !newFile || - // old file wasnt redirect but new file is + // old file wasn't redirect but new file is (oldSourceFile.resolvedPath === oldSourceFile.path && newFile.resolvedPath !== oldSourceFile.path)) { host.onReleaseOldSourceFile(oldSourceFile, oldProgram.getCompilerOptions(), !!getSourceFileByPath(oldSourceFile.path)); } @@ -109342,7 +109342,7 @@ var ts; var newReferences; // if not using old state, every file is changed if (!useOldState || - // File wasnt present in old state + // File wasn't present in old state !(oldInfo = oldState.fileInfos.get(sourceFilePath)) || // versions dont match oldInfo.version !== info.version || @@ -110494,7 +110494,7 @@ var ts; var resolvedModules = []; var compilerOptions = resolutionHost.getCompilationSettings(); var hasInvalidatedNonRelativeUnresolvedImport = logChanges && isFileWithInvalidatedNonRelativeUnresolvedImports(path); - // All the resolutions in this file are invalidated if this file wasnt resolved using same redirect + // All the resolutions in this file are invalidated if this file wasn't resolved using same redirect var program = resolutionHost.getCurrentProgram(); var oldRedirect = program && program.getResolvedProjectReferenceToRedirect(containingFile); var unmatchedRedirects = oldRedirect ? diff --git a/src/compiler/builder.ts b/src/compiler/builder.ts index 8d09baa270540..45db667aa99ea 100644 --- a/src/compiler/builder.ts +++ b/src/compiler/builder.ts @@ -216,7 +216,7 @@ namespace ts { // if not using old state, every file is changed if (!useOldState || - // File wasnt present in old state + // File wasn't present in old state !(oldInfo = oldState!.fileInfos.get(sourceFilePath)) || // versions dont match oldInfo.version !== info.version || diff --git a/src/compiler/program.ts b/src/compiler/program.ts index bc7e006801d94..c1c34d1eef0cd 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1016,7 +1016,7 @@ namespace ts { for (const oldSourceFile of oldSourceFiles) { const newFile = getSourceFileByPath(oldSourceFile.resolvedPath); if (shouldCreateNewSourceFile || !newFile || - // old file wasnt redirect but new file is + // old file wasn't redirect but new file is (oldSourceFile.resolvedPath === oldSourceFile.path && newFile.resolvedPath !== oldSourceFile.path)) { host.onReleaseOldSourceFile(oldSourceFile, oldProgram.getCompilerOptions(), !!getSourceFileByPath(oldSourceFile.path)); } diff --git a/src/compiler/resolutionCache.ts b/src/compiler/resolutionCache.ts index 6848ecb4bc911..3242a44ee220c 100644 --- a/src/compiler/resolutionCache.ts +++ b/src/compiler/resolutionCache.ts @@ -361,7 +361,7 @@ namespace ts { const compilerOptions = resolutionHost.getCompilationSettings(); const hasInvalidatedNonRelativeUnresolvedImport = logChanges && isFileWithInvalidatedNonRelativeUnresolvedImports(path); - // All the resolutions in this file are invalidated if this file wasnt resolved using same redirect + // All the resolutions in this file are invalidated if this file wasn't resolved using same redirect const program = resolutionHost.getCurrentProgram(); const oldRedirect = program && program.getResolvedProjectReferenceToRedirect(containingFile); const unmatchedRedirects = oldRedirect ? diff --git a/src/compiler/utilitiesPublic.ts b/src/compiler/utilitiesPublic.ts index 6722e7ad5be1f..fcb82c377e3e7 100644 --- a/src/compiler/utilitiesPublic.ts +++ b/src/compiler/utilitiesPublic.ts @@ -311,7 +311,7 @@ namespace ts { // nodes like variable declarations and binding elements can returned a view of their flags // that includes the modifiers from their container. i.e. flags like export/declare aren't // stored on the variable declaration directly, but on the containing variable statement - // (if it has one). Similarly, flags for let/const are store on the variable declaration + // (if it has one). Similarly, flags for let/const are stored on the variable declaration // list. By calling this function, all those flags are combined so that the client can treat // the node as if it actually had those flags. export function getCombinedNodeFlags(node: Node): NodeFlags { diff --git a/src/server/project.ts b/src/server/project.ts index 6323e458227cb..21f3f55eb2696 100644 --- a/src/server/project.ts +++ b/src/server/project.ts @@ -102,7 +102,7 @@ namespace ts.server { /** * The project root can be script info - if root is present, - * or it could be just normalized path if root wasnt present on the host(only for non inferred project) + * or it could be just normalized path if root wasn't present on the host(only for non inferred project) */ /* @internal */ export interface ProjectRootFile {