10000 Merge pull request #7028 from jsoref/spelling · creatio/TypeScript@02e3abe · GitHub
[go: up one dir, main page]

Skip to content

Commit 02e3abe

Browse files
Merge pull request microsoft#7028 from jsoref/spelling
spelling fixes (round 5)
2 parents 713c0e0 + bb85817 commit 02e3abe

23 files changed

+87
-87
lines changed

src/harness/compilerRunner.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ class CompilerBaselineRunner extends RunnerBase {
262262
// different order with 'pull' operations, and thus can produce slightly differing
263263
// output.
264264
//
265-
// For example, with a full type check, we may see a type outputed as: number | string
266-
// But with a pull type check, we may see it as: string | number
265+
// For example, with a full type check, we may see a type displayed as: number | string
266+
// But with a pull type check, we may see it as: string | number
267267
//
268268
// These types are equivalent, but depend on what order the compiler observed
269269
// certain parts of the program.

src/harness/external/node.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,7 @@ declare module "crypto" {
10731073
update(data: any): void;
10741074
sign(private_key: string, output_format: string): string;
10751075
}
1076-
export function createVerify(algorith: string): Verify;
1076+
export function createVerify(algorithm: string): Verify;
10771077
interface Verify {
10781078
update(data: any): void;
10791079
verify(object: string, signature: string, signature_format?: string): boolean;
@@ -1237,7 +1237,7 @@ declare module "assert" {
12371237
export function equal(actual: any, expected: any, message?: string): void;
12381238
export function notEqual(actual: any, expected: any, message?: string): void;
12391239
export function deepEqual(actual: any, expected: any, message?: string): void;
1240-
export function notDeepEqual(acutal: any, expected: any, message?: string): void;
1240+
export function notDeepEqual(actual: any, expected: any, message?: string): void;
12411241
export function strictEqual(actual: any, expected: any, message?: string): void;
12421242
export function notStrictEqual(actual: any, expected: any, message?: string): void;
12431243
export var throws: {

src/harness/fourslash.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -231,13 +231,13 @@ namespace FourSlash {
231231
private getLanguageServiceAdapter(testType: FourSlashTestType, cancellationToken: TestCancellationToken, compilationOptions: ts.CompilerOptions): Harness.LanguageService.LanguageServiceAdapter {
232232
switch (testType) {
233233
case FourSlashTestType.Native:
234-
return new Harness.LanguageService.NativeLanugageServiceAdapter(cancellationToken, compilationOptions);
234+
return new Harness.LanguageService.NativeLanguageServiceAdapter(cancellationToken, compilationOptions);
235235
case FourSlashTestType.Shims:
236-
return new Harness.LanguageService.ShimLanugageServiceAdapter(/*preprocessToResolve*/ false, cancellationToken, compilationOptions);
236+
return new Harness.LanguageService.ShimLanguageServiceAdapter(/*preprocessToResolve*/ false, cancellationToken, compilationOptions);
237237
case FourSlashTestType.ShimsWithPreprocess:
238-
return new Harness.LanguageService.ShimLanugageServiceAdapter(/*preprocessToResolve*/ true, cancellationToken, compilationOptions);
238+
return new Harness.LanguageService.ShimLanguageServiceAdapter(/*preprocessToResolve*/ true, cancellationToken, compilationOptions);
239239
case FourSlashTestType.Server:
240-
return new Harness.LanguageService.ServerLanugageServiceAdapter(cancellationToken, compilationOptions);
240+
return new Harness.LanguageService.ServerLanguageServiceAdapter(cancellationToken, compilationOptions);
241241
default:
242242
throw new Error("Unknown FourSlash test type: ");
243243
}
@@ -1279,7 +1279,7 @@ namespace FourSlash {
12791279
const edits = this.languageService.getFormattingEditsAfterKeystroke(this.activeFile.fileName, offset, ch, this.formatCodeOptions);
12801280
if (edits.length) {
12811281
offset += this.applyEdits(this.activeFile.fileName, edits, /*isFormattingEdit*/ true);
1282-
// this.checkPostEditInletiants();
1282+
// this.checkPostEditInvariants();
12831283
}
12841284
}
12851285
}
@@ -1370,7 +1370,7 @@ namespace FourSlash {
13701370
const edits = this.languageService.getFormattingEditsAfterKeystroke(this.activeFile.fileName, offset, ch, this.formatCodeOptions);
13711371
if (edits.length) {
13721372
offset += this.applyEdits(this.activeFile.fileName, edits, /*isFormattingEdit*/ true);
1373-
// this.checkPostEditInletiants();
1373+
// this.checkPostEditInvariants();
13741374
}
13751375
}
13761376
}
@@ -2771,12 +2771,12 @@ namespace FourSlashInterface {
27712771

27722772
// Verifies the member list contains the specified symbol. The
27732773
// member list is brought up if necessary
2774-
public memberListContains(symbol: string, text?: string, documenation?: string, kind?: string) {
2774+
public memberListContains(symbol: string, text?: string, documentation?: string, kind?: string) {
27752775
if (this.negative) {
27762776
this.state.verifyMemberListDoesNotContain(symbol);
27772777
}
27782778
else {
2779-
this.state.verifyMemberListContains(symbol, text, documenation, kind);
2779+
this.state.verifyMemberListContains(symbol, text, documentation, kind);
27802780
}
27812781
}
27822782

src/harness/harness.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1330,7 +1330,7 @@ namespace Harness {
13301330

13311331
public getSourceMapRecord() {
13321332
if (this.sourceMapData) {
1333-
return Harness.SourceMapRecoder.getSourceMapRecord(this.sourceMapData, this.program, this.files);
1333+
return Harness.SourceMapRecorder.getSourceMapRecord(this.sourceMapData, this.program, this.files);
13341334
}
13351335
}
13361336
}

src/harness/harnessLanguageService.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ namespace Harness.LanguageService {
194194
error(s: string): void { }
195195
}
196196

197-
export class NativeLanugageServiceAdapter implements LanguageServiceAdapter {
197+
export class NativeLanguageServiceAdapter implements LanguageServiceAdapter {
198198
private host: NativeLanguageServiceHost;
199199
constructor(cancellationToken?: ts.HostCancellationToken, options?: ts.CompilerOptions) {
200200
this.host = new NativeLanguageServiceHost(cancellationToken, options);
@@ -429,7 +429,7 @@ namespace Harness.LanguageService {
429429
dispose(): void { this.shim.dispose({}); }
430430
}
431431

432-
export class ShimLanugageServiceAdapter implements LanguageServiceAdapter {
432+
export class ShimLanguageServiceAdapter implements LanguageServiceAdapter {
433433
private host: ShimLanguageServiceHost;
434434
private factory: ts.TypeScriptServicesFactory;
435435
constructor(preprocessToResolve: boolean, cancellationToken?: ts.HostCancellationToken, options?: ts.CompilerOptions) {
@@ -611,7 +611,7 @@ namespace Harness.LanguageService {
611611
}
612612
}
613613

614-
export class ServerLanugageServiceAdapter implements LanguageServiceAdapter {
614+
export class ServerLanguageServiceAdapter implements LanguageServiceAdapter {
615615
private host: SessionClientHost;
616616
private client: ts.server.SessionClient;
617617
constructor(cancellationToken?: ts.HostCancellationToken, options?: ts.CompilerOptions) {

src/harness/loggedIO.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ namespace Playback {
136136
};
137137
wrapper.startReplayFromData = log => {
138138
replayLog = log;
139-
// Remove non-found files from the log (shouldn't really need them, but we still record them for diganostic purposes)
139+
// Remove non-found files from the log (shouldn't really need them, but we still record them for diagnostic purposes)
140140
replayLog.filesRead = replayLog.filesRead.filter(f => f.result.contents !== undefined);
141141
};
142142

src/harness/projectsRunner.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -370,14 +370,14 @@ class ProjectRunner extends RunnerBase {
370370
}
371371

372372
const outputDtsFileName = emitOutputFilePathWithoutExtension + ".d.ts";
373-
const file = findOutpuDtsFile(outputDtsFileName);
373+
const file = findOutputDtsFile(outputDtsFileName);
374374
if (file) {
375375
allInputFiles.unshift(file);
376376
}
377377
}
378378
else {
379379
const outputDtsFileName = ts.removeFileExtension(compilerOptions.outFile || compilerOptions.out) + ".d.ts";
380-
const outputDtsFile = findOutpuDtsFile(outputDtsFileName);
380+
const outputDtsFile = findOutputDtsFile(outputDtsFileName);
381381
if (!ts.contains(allInputFiles, outputDtsFile)) {
382382
allInputFiles.unshift(outputDtsFile);
383383
}
@@ -387,7 +387,7 @@ class ProjectRunner extends RunnerBase {
387387
// Dont allow config files since we are compiling existing source options
388388
return compileProjectFiles(compilerResult.moduleKind, getInputFiles, getSourceFileText, writeFile, compilerResult.compilerOptions);
389389

390-
function findOutpuDtsFile(fileName: string) {
390+
function findOutputDtsFile(fileName: string) {
391391
return ts.forEach(compilerResult.outputFiles, outputFile => outputFile.emittedFileName === fileName ? outputFile : undefined);
392392
}
393393
function getInputFiles() {
@@ -484,7 +484,7 @@ class ProjectRunner extends RunnerBase {
484484
it("SourceMapRecord for (" + moduleNameToString(moduleKind) + "): " + testCaseFileName, () => {
485485
if (compilerResult.sourceMapData) {
486486
Harness.Baseline.runBaseline("SourceMapRecord for (" + moduleNameToString(compilerResult.moduleKind) + "): " + testCaseFileName, getBaselineFolder(compilerResult.moduleKind) + testCaseJustName + ".sourcemap.txt", () => {
487-
return Harness.SourceMapRecoder.getSourceMapRecord(compilerResult.sourceMapData, compilerResult.program,
487+
return Harness.SourceMapRecorder.getSourceMapRecord(compilerResult.sourceMapData, compilerResult.program,
488488
ts.filter(compilerResult.outputFiles, outputFile => Harness.Compiler.isJS(outputFile.emittedFileName)));
489489
});
490490
}

src/harness/sourceMapRecorder.ts

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
///<reference path="harness.ts"/>
1717

18-
namespace Harness.SourceMapRecoder {
18+
namespace Harness.SourceMapRecorder {
1919

2020
interface SourceMapSpanWithDecodeErrors {
2121
sourceMapSpan: ts.SourceMapSpan;
@@ -202,7 +202,7 @@ namespace Harness.SourceMapRecoder {
202202
}
203203

204204
namespace SourceMapSpanWriter {
205-
let sourceMapRecoder: Compiler.WriterAggregator;
205+
let sourceMapRecorder: Compiler.WriterAggregator;
206206
let sourceMapSources: string[];
207207
let sourceMapNames: string[];
208208

@@ -216,8 +216,8 @@ namespace Harness.SourceMapRecoder {
216216
let prevWrittenJsLine: number;
217217
let spanMarkerContinues: boolean;
218218

219-
export function intializeSourceMapSpanWriter(sourceMapRecordWriter: Compiler.WriterAggregator, sourceMapData: ts.SourceMapData, currentJsFile: Compiler.GeneratedFile) {
220-
sourceMapRecoder = sourceMapRecordWriter;
219+
export function initializeSourceMapSpanWriter(sourceMapRecordWriter: Compiler.WriterAggregator, sourceMapData: ts.SourceMapData, currentJsFile: Compiler.GeneratedFile) {
220+
sourceMapRecorder = sourceMapRecordWriter;
221221
sourceMapSources = sourceMapData.sourceMapSources;
222222
sourceMapNames = sourceMapData.sourceMapNames;
223223

@@ -231,15 +231,15 @@ namespace Harness.SourceMapRecoder {
231231

232232
SourceMapDecoder.initializeSourceMapDecoding(sourceMapData);
233233

234-
sourceMapRecoder.WriteLine("===================================================================");
235-
sourceMapRecoder.WriteLine("JsFile: " + sourceMapData.sourceMapFile);
236-
sourceMapRecoder.WriteLine("mapUrl: " + sourceMapData.jsSourceMappingURL);
237-
sourceMapRecoder.WriteLine("sourceRoot: " + sourceMapData.sourceMapSourceRoot);
238-
sourceMapRecoder.WriteLine("sources: " + sourceMapData.sourceMapSources);
234+
sourceMapRecorder.WriteLine("===================================================================");
235+
sourceMapRecorder.WriteLine("JsFile: " + sourceMapData.sourceMapFile);
236+
sourceMapRecorder.WriteLine("mapUrl: " + sourceMapData.jsSourceMappingURL);
237+
sourceMapRecorder.WriteLine("sourceRoot: " + sourceMapData.sourceMapSourceRoot);
238+
sourceMapRecorder.WriteLine("sources: " + sourceMapData.sourceMapSources);
239239
if (sourceMapData.sourceMapSourcesContent) {
240-
sourceMapRecoder.WriteLine("sourcesContent: " + JSON.stringify(sourceMapData.sourceMapSourcesContent));
240+
sourceMapRecorder.WriteLine("sourcesContent: " + JSON.stringify(sourceMapData.sourceMapSourcesContent));
241241
}
242-
sourceMapRecoder.WriteLine("===================================================================");
242+
sourceMapRecorder.WriteLine("===================================================================");
243243
}
244244

245245
function getSourceMapSpanString(mapEntry: ts.SourceMapSpan, getAbsentNameIndex?: boolean) {
@@ -291,10 +291,10 @@ namespace Harness.SourceMapRecoder {
291291
recordSourceMapSpan(sourceMapSpan);
292292

293293
assert.isTrue(spansOnSingleLine.length === 1);
294-
sourceMapRecoder.WriteLine("-------------------------------------------------------------------");
295-
sourceMapRecoder.WriteLine("emittedFile:" + jsFile.fileName);
296-
sourceMapRecoder.WriteLine("sourceFile:" + sourceMapSources[spansOnSingleLine[0].sourceMapSpan.sourceIndex]);
297-
sourceMapRecoder.WriteLine("-------------------------------------------------------------------");
294+
sourceMapRecorder.WriteLine("-------------------------------------------------------------------");
295+
sourceMapRecorder.WriteLine("emittedFile:" + jsFile.fileName);
296+
sourceMapRecorder.WriteLine("sourceFile:" + sourceMapSources[spansOnSingleLine[0].sourceMapSpan.sourceIndex]);
297+
sourceMapRecorder.WriteLine("-------------------------------------------------------------------");
298298

299299
tsLineMap = ts.computeLineStarts(newSourceFileCode);
300300
tsCode = newSourceFileCode;
@@ -306,8 +306,8 @@ namespace Harness.SourceMapRecoder {
306306
writeRecordedSpans();
307307

308308
if (!SourceMapDecoder.hasCompletedDecoding()) {
309-
sourceMapRecoder.WriteLine("!!!! **** There are more source map entries in the sourceMap's mapping than what was encoded");
310-
sourceMapRecoder.WriteLine("!!!! **** Remaining decoded string: " + SourceMapDecoder.getRemainingDecodeString());
309+
sourceMapRecorder.WriteLine("!!!! **** There are more source map entries in the sourceMap's mapping than what was encoded");
310+
sourceMapRecorder.WriteLine("!!!! **** Remaining decoded string: " + SourceMapDecoder.getRemainingDecodeString());
311311

312312
}
313313

@@ -323,7 +323,7 @@ namespace Harness.SourceMapRecoder {
323323

324324
function writeJsFileLines(endJsLine: number) {
325325
for (; prevWrittenJsLine < endJsLine; prevWrittenJsLine++) {
326-
sourceMapRecoder.Write(">>>" + getTextOfLine(prevWrittenJsLine, jsLineMap, jsFile.code));
326+
sourceMapRecorder.Write(">>>" + getTextOfLine(prevWrittenJsLine, jsLineMap, jsFile.code));
327327
}
328328
}
329329

@@ -356,9 +356,9 @@ namespace Harness.SourceMapRecoder {
356356
}
357357

358358
function writeSourceMapIndent(indentLength: number, indentPrefix: string) {
359-
sourceMapRecoder.Write(indentPrefix);
359+
sourceMapRecorder.Write(indentPrefix);
360360
for (let i = 1; i < indentLength; i++) {
361-
sourceMapRecoder.Write(" ");
361+
sourceMapRecorder.Write(" ");
362362
}
363363
}
364364

@@ -369,12 +369,12 @@ namespace Harness.SourceMapRecoder {
369369
writeSourceMapIndent(prevEmittedCol, markerId);
370370

371371
for (let i = prevEmittedCol; i < endColumn; i++) {
372-
sourceMapRecoder.Write("^");
372+
sourceMapRecorder.Write("^");
373373
}
374374
if (endContinues) {
375-
sourceMapRecoder.Write("->");
375+
sourceMapRecorder.Write("->");
376376
}
377-
sourceMapRecoder.WriteLine("");
377+
sourceMapRecorder.WriteLine("");
378378
spanMarkerContinues = endContinues;
379379
}
380380

@@ -390,24 +390,24 @@ namespace Harness.SourceMapRecoder {
390390
// If there are decode errors, write
391391
for (let i = 0; i < currentSpan.decodeErrors.length; i++) {
392392
writeSourceMapIndent(prevEmittedCol, markerIds[index]);
393-
sourceMapRecoder.WriteLine(currentSpan.decodeErrors[i]);
393+
sourceMapRecorder.WriteLine(currentSpan.decodeErrors[i]);
394394
}
395395
}
396396

397397
const tsCodeLineMap = ts.computeLineStarts(sourceText);
398398
for (let i = 0; i < tsCodeLineMap.length; i++) {
399399
writeSourceMapIndent(prevEmittedCol, i === 0 ? markerIds[index] : " >");
400-
sourceMapRecoder.Write(getTextOfLine(i, tsCodeLineMap, sourceText));
400+
sourceMapRecorder.Write(getTextOfLine(i, tsCodeLineMap, sourceText));
401401
if (i === tsCodeLineMap.length - 1) {
402-
sourceMapRecoder.WriteLine("");
402+
sourceMapRecorder.WriteLine("");
403403
}
404404
}
405405

406406
prevWrittenSourcePos = sourcePos;
407407
}
408408

409409
function writeSpanDetails(currentSpan: SourceMapSpanWithDecodeErrors, index: number) {
410-
sourceMapRecoder.WriteLine(markerIds[index] + getSourceMapSpanString(currentSpan.sourceMapSpan));
410+
sourceMapRecorder.WriteLine(markerIds[index] + getSourceMapSpanString(currentSpan.sourceMapSpan));
411411
}
412412

413413
if (spansOnSingleLine.length) {
@@ -431,19 +431,19 @@ namespace Harness.SourceMapRecoder {
431431
// Emit column number etc
432432
iterateSpans(writeSpanDetails);
433433

434-
sourceMapRecoder.WriteLine("---");
434+
sourceMapRecorder.WriteLine("---");
435435
}
436436
}
437437
}
438438

439439
export function getSourceMapRecord(sourceMapDataList: ts.SourceMapData[], program: ts.Program, jsFiles: Compiler.GeneratedFile[]) {
440-
const sourceMapRecoder = new Compiler.WriterAggregator();
440+
const sourceMapRecorder = new Compiler.WriterAggregator();
441441

442442
for (let i = 0; i < sourceMapDataList.length; i++) {
443443
const sourceMapData = sourceMapDataList[i];
444444
let prevSourceFile: ts.SourceFile;
445445

446-
SourceMapSpanWriter.intializeSourceMapSpanWriter(sourceMapRecoder, sourceMapData, jsFiles[i]);
446+
SourceMapSpanWriter.initializeSourceMapSpanWriter(sourceMapRecorder, sourceMapData, jsFiles[i]);
447447
for (let j = 0; j < sourceMapData.sourceMapDecodedMappings.length; j++) {
448448
const decodedSourceMapping = sourceMapData.sourceMapDecodedMappings[j];
449449
const currentSourceFile = program.getSourceFile(sourceMapData.inputSourceFileNames[decodedSourceMapping.sourceIndex]);
@@ -457,7 +457,7 @@ namespace Harness.SourceMapRecoder {
457457
}
458458
SourceMapSpanWriter.close(); // If the last spans werent emitted, emit them
459459
}
460-
sourceMapRecoder.Close();
461-
return sourceMapRecoder.lines.join("\r\n");
460+
sourceMapRecorder.Close();
461+
return sourceMapRecorder.lines.join("\r\n");
462462
}
463463
}

0 commit comments

Comments
 (0)
0