Skip to content

Commit 786dbc2

Browse files
docs: fix typos in documentation
1 parent 71586ad commit 786dbc2

File tree

1,303 files changed

+7227
-7227
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,303 files changed

+7227
-7227
lines changed

Herebyfile.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -649,13 +649,13 @@ const copyBuiltLocalDiagnosticMessages = task({
649649

650650
export const otherOutputs = task({
651651
name: "other-outputs",
652-
description: "Builds miscelaneous scripts and documents distributed with the LKG",
652+
description: "Builds miscellaneous scripts and documents distributed with the LKG",
653653
dependencies: [typingsInstaller, watchGuard, generateTypesMap, copyBuiltLocalDiagnosticMessages],
654654
});
655655

656656
export const watchOtherOutputs = task({
657657
name: "watch-other-outputs",
658-
description: "Builds miscelaneous scripts and documents distributed with the LKG",
658+
description: "Builds miscellaneous scripts and documents distributed with the LKG",
659659
hiddenFromTaskList: true,
660660
dependencies: [watchTypingsInstaller, watchWatchGuard, generateTypesMap, copyBuiltLocalDiagnosticMessages],
661661
});
@@ -704,7 +704,7 @@ export const runTestsAndWatch = task({
704704
dependencies: [watchTests],
705705
run: async () => {
706706
if (!cmdLineOptions.tests && !cmdLineOptions.failed) {
707-
console.log(pc.redBright(`You must specifiy either --tests/-t or --failed to use 'runtests-watch'.`));
707+
console.log(pc.redBright(`You must specify either --tests/-t or --failed to use 'runtests-watch'.`));
708708
return;
709709
}
710710

scripts/eslint/rules/argument-trivia.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ module.exports = createRule({
117117
const name = ts.unescapeLeadingUnderscores(expectedName);
118118
// If a parameter is unused, we prepend an underscore. Ignore this
119119
// so that we can switch between used and unused without modifying code,
120-
// requiring that arugments are tagged with the non-underscored name.
120+
// requiring that arguments are tagged with the non-underscored name.
121121
return name.startsWith("_") ? name.slice(1) : name;
122122
}
123123
}

scripts/eslint/tests/support/RuleTester.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const path = require("path");
22
const Mocha = require("mocha");
33
const { RuleTester } = require("@typescript-eslint/rule-tester");
44

5-
RuleTester.afterAll = Mocha.after;
5+
RuleTester.after all = Mocha.after;
66

77
module.exports.ROOT_DIR = path.join(process.cwd(), "scripts", "eslint", "tests", "fixtures");
88
module.exports.FILENAME = path.join(module.exports.ROOT_DIR, "file.ts");

src/compiler/builder.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ function createBuilderProgramState(
340340
let canCopySemanticDiagnostics = useOldState &&
341341
!compilerOptionsAffectSemanticDiagnostics(compilerOptions, oldCompilerOptions!);
342342
// We can only reuse emit signatures (i.e. .d.ts signatures) if the .d.ts file is unchanged,
343-
// which will eg be depedent on change in options like declarationDir and outDir options are unchanged.
343+
// which will eg be dependent on change in options like declarationDir and outDir options are unchanged.
344344
// We need to look in oldState.compilerOptions, rather than oldCompilerOptions (i.e.we need to disregard useOldState) because
345345
// oldCompilerOptions can be undefined if there was change in say module from None to some other option
346346
// which would make useOldState as false since we can now use reference maps that are needed to track what to emit, what to check etc
@@ -359,15 +359,15 @@ function createBuilderProgramState(
359359
}
360360
state.programEmitPending = oldState!.programEmitPending;
361361
// If there is changeSet with --outFile, cannot copy semantic diagnsotics or emitDiagnostics
362-
// as they all need to be calculated again all together since we dont know whats the affected file set because of the way d.ts works
362+
// as they all need to be calculated again all together since we dont know what's the affected file set because of the way d.ts works
363363
if (outFilePath && state.changedFilesSet.size) {
364364
canCopySemanticDiagnostics = false;
365365
canCopyEmitDiagnostics = false;
366366
}
367367
state.hasErrorsFromOldState = oldState!.hasErrors;
368368
}
369369
else {
370-
// We arent using old state, so atleast emit buildInfo with current information
370+
// We aren't using old state, so at least emit buildInfo with current information
371371
state.buildInfoEmitPending = isIncrementalCompilation(compilerOptions);
372372
}
373373

@@ -489,7 +489,7 @@ function createBuilderProgramState(
489489
state.changedFilesSet.add(path);
490490
if (outFilePath) {
491491
// If there is changeSet with --outFile, cannot copy semantic diagnsotics or emitDiagnostics
492-
// as they all need to be calculated again all together since we dont know whats the affected file set because of the way d.ts works
492+
// as they all need to be calculated again all together since we dont know what's the affected file set because of the way d.ts works
493493
canCopySemanticDiagnostics = false;
494494
canCopyEmitDiagnostics = false;
495495
state.semanticDiagnosticsFromOldState = undefined;
@@ -620,7 +620,7 @@ function releaseCache(state: BuilderProgramState) {
620620
}
621621

622622
/**
623-
* Verifies that source file is ok to be used in calls that arent handled by next
623+
* Verifies that source file is ok to be used in calls that aren't handled by next
624624
*/
625625
function assertSourceFileOkWithoutNextAffectedCall(state: BuilderProgramState, sourceFile: SourceFile | undefined) {
626626
Debug.assert(!sourceFile || !state.affectedFiles || state.affectedFiles[state.affectedFilesIndex! - 1] !== sourceFile || !state.semanticDiagnosticsPerFile.has(sourceFile.resolvedPath));
@@ -1063,7 +1063,7 @@ function getBinderAndCheckerDiagnosticsOfFile(
10631063
return filterSemanticDiagnostics(cachedDiagnostics, state.compilerOptions);
10641064
}
10651065

1066-
// Diagnostics werent cached, get them from program, and cache the result
1066+
// Diagnostics weren't cached, get them from program, and cache the result
10671067
const diagnostics = state.program.getBindAndCheckDiagnostics(sourceFile, cancellationToken);
10681068
semanticDiagnosticsPerFile.set(path, diagnostics);
10691069
state.buildInfoEmitPending = true;
@@ -1105,7 +1105,7 @@ export type IncrementalMultiFileEmitBuildInfoBuilderStateFileInfo = Omit<Builder
11051105
};
11061106
/**
11071107
* [fileId, signature] if different from file's signature
1108-
* fileId if file wasnt emitted
1108+
* fileId if file wasn't emitted
11091109
*
11101110
* @internal
11111111
*/
@@ -1254,7 +1254,7 @@ function getBuildInfo(state: BuilderProgramStateWithDefinedProgram): BuildInfo {
12541254
const root: IncrementalBuildInfoRoot[] = [];
12551255
if (state.compilerOptions.outFile) {
12561256
// Copy all fileInfo, version and impliedFormat
1257-
// Affects global scope and signature doesnt matter because with --out they arent calculated or needed to determine upto date ness
1257+
// Affects global scope and signature doesnt matter because with --out they aren't calculated or needed to determine upto date ness
12581258
const fileInfos = arrayFrom(state.fileInfos.entries(), ([key, value]): IncrementalBundleEmitBuildInfoFileInfo => {
12591259
// Ensure fileId
12601260
const fileId = toFileId(key);
@@ -1277,7 +1277,7 @@ function getBuildInfo(state: BuilderProgramStateWithDefinedProgram): BuildInfo {
12771277
pendingEmit: !state.programEmitPending ?
12781278
undefined : // Pending is undefined or None is encoded as undefined
12791279
state.programEmitPending === getBuilderFileEmit(state.compilerOptions) ?
1280-
false : // Pending emit is same as deteremined by compilerOptions
1280+
false : // Pending emit is same as determined by compilerOptions
12811281
state.programEmitPending, // Actual value
12821282
errors: state.hasErrors ? true : undefined,
12831283
checkPending: state.checkPending,
@@ -1319,7 +1319,7 @@ function getBuildInfo(state: BuilderProgramStateWithDefinedProgram): BuildInfo {
13191319
value.version :
13201320
actualSignature !== undefined ? // If signature is not same as version, encode signature in the fileInfo
13211321
oldSignature === undefined ?
1322-
// If we havent computed signature, use fileInfo as is
1322+
// If we haven't computed signature, use fileInfo as is
13231323
value :
13241324
// Serialize fileInfo with new updated signature
13251325
{ version: value.version, signature: actualSignature, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat } :
@@ -1685,7 +1685,7 @@ export function createBuilderProgram(
16851685
const state = createBuilderProgramState(newProgram, oldState);
16861686
newProgram.getBuildInfo = () => getBuildInfo(toBuilderProgramStateWithDefinedProgram(state));
16871687

1688-
// To ensure that we arent storing any references to old program or new program without state
1688+
// To ensure that we aren't storing any references to old program or new program without state
16891689
newProgram = undefined!;
16901690
oldProgram = undefined;
16911691
oldState = undefined;
@@ -1968,7 +1968,7 @@ export function createBuilderProgram(
19681968

19691969
/**
19701970
* Compare to existing computed signature and store it or handle the changes in d.ts map option from before
1971-
* returning undefined means that, we dont need to emit this d.ts file since its contents didnt change
1971+
* returning undefined means that, we dont need to emit this d.ts file since its contents didn't change
19721972
*/
19731973
function handleNewSignature(oldSignatureFormat: EmitSignature | undefined, newSignature: string | undefined) {
19741974
const oldSignature = !oldSignatureFormat || isString(oldSignatureFormat) ? oldSignatureFormat : oldSignatureFormat[0];

src/compiler/builderPublic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ export function createEmitAndSemanticDiagnosticsBuilderProgram(
234234
}
235235

236236
/**
237-
* Creates a builder thats just abstraction over program and can be used with watch
237+
* Creates a builder that's just abstraction over program and can be used with watch
238238
*/
239239
export function createAbstractBuilder(
240240
newProgram: Program,

src/compiler/builderState.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ export namespace BuilderState {
436436
host: HostForComputeHash,
437437
useFileVersionAsSignature: boolean | undefined = state.useFileVersionAsSignature,
438438
): boolean {
439-
// If we have cached the result for this file, that means hence forth we should assume file shape is uptodate
439+
// If we have cached the result for this file, that means hence forth we should assume file shape is up-to-date
440440
if (state.hasCalledUpdateShapeSignature?.has(sourceFile.resolvedPath)) return false;
441441

442442
const info = state.fileInfos.get(sourceFile.resolvedPath)!;

0 commit comments

Comments
 (0)