Skip to content

Commit 8e8a239

Browse files
Fixed some typos.
1 parent 42740d6 commit 8e8a239

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

scripts/authors.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import child_process = require("child_process");
44

55
type Author = {
66
displayNames: string[];
7-
preferedName?: string;
7+
preferredName?: string;
88
emails: string[];
99
};
1010

@@ -20,7 +20,7 @@ const authorsPath = path.resolve("../AUTHORS.md");
2020

2121
function getKnownAuthors(): Author[] {
2222
const segmentRegExp = /\s?([^<]+)\s+<([^>]+)>/g;
23-
const preferedNameRegeExp = /\s?#\s?([^#]+)$/;
23+
const preferredNameRegeExp = /\s?#\s?([^#]+)$/;
2424
const knownAuthors: Author[] = [];
2525

2626
if (!fs.existsSync(mailMapPath)) {
@@ -37,13 +37,13 @@ function getKnownAuthors(): Author[] {
3737
author.displayNames.push(match[1]);
3838
author.emails.push(match[2]);
3939
}
40-
if (match = preferedNameRegeExp.exec(line)) {
41-
author.preferedName = match[1];
40+
if (match = preferredNameRegeExp.exec(line)) {
41+
author.preferredName = match[1];
4242
}
4343
if (!author.emails) continue;
4444
knownAuthors.push(author);
45-
if (line.indexOf("#") > 0 && !author.preferedName) {
46-
throw new Error("Could not match prefered name for: " + line);
45+
if (line.indexOf("#") > 0 && !author.preferredName) {
46+
throw new Error("Could not match preferred name for: " + line);
4747
}
4848
// console.log("===> line: " + line);
4949
// console.log(JSON.stringify(author, undefined, 2));
@@ -52,7 +52,7 @@ function getKnownAuthors(): Author[] {
5252
}
5353

5454
function getAuthorName(author: Author) {
55-
return author.preferedName || author.displayNames[0];
55+
return author.preferredName || author.displayNames[0];
5656
}
5757

5858
function getKnownAuthorMaps() {

scripts/bisect-test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import cp = require('child_process');
66
import fs = require('fs');
77

8-
// Slice off 'node bisect-test.js' from the commandline args
8+
// Slice off 'node bisect-test.js' from the command line args
99
var args = process.argv.slice(2);
1010

1111
function tsc(tscArgs: string, onExit: (exitCode: number) => void) {

scripts/createBenchmark.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ var rawCompilerSources = "";
3030
sourceFiles.forEach(f=> {
3131
rawCompilerSources += "\r\n" + fs.readFileSync(path.join(tsSourceDir, f)).toString();
3232
});
33-
var compilerSoruces = `var compilerSources = ${JSON.stringify(rawCompilerSources) };`;
33+
var compilerSources = `var compilerSources = ${JSON.stringify(rawCompilerSources) };`;
3434

3535
// .js code for the compiler, what we are actually testing
3636
var rawCompilerJavaScript = fs.readFileSync(path.join(tsBuildDir, "tsc.js")).toString();
3737
rawCompilerJavaScript = rawCompilerJavaScript.replace("ts.executeCommandLine(ts.sys.args);", "");
3838

3939
// lib.d.ts sources
4040
var rawLibSources = fs.readFileSync(path.join(tsBuildDir, "lib.d.ts")).toString();
41-
var libSoruces = `var libSources = ${JSON.stringify(rawLibSources) };`;
41+
var libSources = `var libSources = ${JSON.stringify(rawLibSources) };`;
4242

4343
// write test output
4444
if (!fs.existsSync(testOutputDir)) {
@@ -48,7 +48,7 @@ if (!fs.existsSync(testOutputDir)) {
4848
// 1. compiler ts sources, used to test
4949
fs.writeFileSync(
5050
path.join(testOutputDir, "compilerSources.js"),
51-
`${ compilerSoruces } \r\n ${ libSoruces }`);
51+
`${ compilerSources } \r\n ${ libSources }`);
5252

5353
// 2. the compiler js sources + a call the compiler
5454
fs.writeFileSync(

scripts/generateLocalizedDiagnosticMessages.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function main(): void {
3636
console.error("Unexpected XML file structure. Expected to find result.LCX.$.TgtCul.");
3737
process.exit(1);
3838
}
39-
const outputDirectoryName = getPreferedLocaleName(result.LCX.$.TgtCul);
39+
const outputDirectoryName = getPreferredLocaleName(result.LCX.$.TgtCul);
4040
if (!outputDirectoryName) {
4141
console.error(`Invalid output locale name for '${result.LCX.$.TgtCul}'.`);
4242
process.exit(1);
@@ -64,7 +64,7 @@ function main(): void {
6464
* Most of the languages we support are neutral locales, so we want to use the language name.
6565
* There are three exceptions, zh-CN, zh-TW and pt-BR.
6666
*/
67-
function getPreferedLocaleName(localeName: string) {
67+
function getPreferredLocaleName(localeName: string) {
6868
switch (localeName) {
6969
case "zh-CN":
7070
case "zh-TW":

0 commit comments

Comments
 (0)