Skip to content

Commit 0b53b8e

Browse files
committed
Merge branch 'master' into enumImplicitIndexSignatures
2 parents a95d18e + 7dc1f40 commit 0b53b8e

File tree

179 files changed

+4625
-937
lines changed

Some content is hidden

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

179 files changed

+4625
-937
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "typescript",
33
"author": "Microsoft Corp.",
44
"homepage": "https://www.typescriptlang.org/",
5-
"version": "3.5.0",
5+
"version": "3.6.0",
66
"license": "Apache-2.0",
77
"description": "TypeScript is a language for application scale JavaScript development",
88
"keywords": [

scripts/open-user-pr.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function padNum(number: number) {
99
}
1010

1111
const userName = process.env.GH_USERNAME;
12-
const reviewers = process.env.requesting_user ? [process.env.requesting_user] : ["weswigham", "sandersn", "RyanCavanaugh"];
12+
const reviewers = process.env.REQUESTING_USER ? [process.env.REQUESTING_USER] : ["weswigham", "sandersn", "RyanCavanaugh"];
1313
const now = new Date();
1414
const branchName = `user-update-${process.env.TARGET_FORK}-${now.getFullYear()}${padNum(now.getMonth())}${padNum(now.getDay())}${process.env.TARGET_BRANCH ? "-" + process.env.TARGET_BRANCH : ""}`;
1515
const remoteUrl = `https://${process.argv[2]}@github.com/${userName}/TypeScript.git`;
@@ -36,14 +36,14 @@ gh.pulls.create({
3636
head: `${userName}:${branchName}`,
3737
base: process.env.TARGET_BRANCH || "master",
3838
body:
39-
`${process.env.source_issue ? `This test run was triggerd by a request on https://github.com/Microsoft/TypeScript/pull/${process.env.source_issue} `+"\n" : ""}Please review the diff and merge if no changes are unexpected.
39+
`${process.env.SOURCE_ISSUE ? `This test run was triggerd by a request on https://github.com/Microsoft/TypeScript/pull/${process.env.SOURCE_ISSUE} `+"\n" : ""}Please review the diff and merge if no changes are unexpected.
4040
You can view the build log [here](https://typescript.visualstudio.com/TypeScript/_build/index?buildId=${process.env.BUILD_BUILDID}&_a=summary).
4141
4242
cc ${reviewers.map(r => "@" + r).join(" ")}`,
4343
}).then(async r => {
4444
const num = r.data.number;
4545
console.log(`Pull request ${num} created.`);
46-
if (!process.env.source_issue) {
46+
if (!process.env.SOURCE_ISSUE) {
4747
await gh.pulls.createReviewRequest({
4848
owner: process.env.TARGET_FORK,
4949
repo: "TypeScript",
@@ -53,7 +53,7 @@ cc ${reviewers.map(r => "@" + r).join(" ")}`,
5353
}
5454
else {
5555
await gh.issues.createComment({
56-
number: +process.env.source_issue,
56+
number: +process.env.SOURCE_ISSUE,
5757
owner: "Microsoft",
5858
repo: "TypeScript",
5959
body: `The user suite test run you requested has finished and _failed_. I've opened a [PR with the baseline diff from master](${r.data.html_url}).`

src/compiler/binder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2515,7 +2515,7 @@ namespace ts {
25152515
break;
25162516

25172517
default:
2518-
Debug.fail(Debug.showSyntaxKind(thisContainer));
2518+
Debug.failBadSyntaxKind(thisContainer);
25192519
}
25202520
}
25212521

src/compiler/checker.ts

Lines changed: 204 additions & 87 deletions
Large diffs are not rendered by default.

src/compiler/core.ts

Lines changed: 1 addition & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
namespace ts {
22
// WARNING: The script `configureNightly.ts` uses a regexp to parse out these values.
33
// If changing the text in this section, be sure to test `configureNightly` too.
4-
export const versionMajorMinor = "3.5";
4+
export const versionMajorMinor = "3.6";
55
/** The version of the TypeScript compiler release */
66
export const version = `${versionMajorMinor}.0-dev`;
77
}
@@ -1686,89 +1686,6 @@ namespace ts {
16861686
export type AnyFunction = (...args: never[]) => void;
16871687
export type AnyConstructor = new (...args: unknown[]) => unknown;
16881688

1689-
export namespace Debug {
1690-
export let currentAssertionLevel = AssertionLevel.None;
1691-
export let isDebugging = false;
1692-
1693-
export function shouldAssert(level: AssertionLevel): boolean {
1694-
return currentAssertionLevel >= level;
1695-
}
1696-
1697-
export function assert(expression: boolean, message?: string, verboseDebugInfo?: string | (() => string), stackCrawlMark?: AnyFunction): void {
1698-
if (!expression) {
1699-
if (verboseDebugInfo) {
1700-
message += "\r\nVerbose Debug Information: " + (typeof verboseDebugInfo === "string" ? verboseDebugInfo : verboseDebugInfo());
1701-
}
1702-
fail(message ? "False expression: " + message : "False expression.", stackCrawlMark || assert);
1703-
}
1704-
}
1705-
1706-
export function assertEqual<T>(a: T, b: T, msg?: string, msg2?: string): void {
1707-
if (a !== b) {
1708-
const message = msg ? msg2 ? `${msg} ${msg2}` : msg : "";
1709-
fail(`Expected ${a} === ${b}. ${message}`);
1710-
}
1711-
}
1712-
1713-
export function assertLessThan(a: number, b: number, msg?: string): void {
1714-
if (a >= b) {
1715-
fail(`Expected ${a} < ${b}. ${msg || ""}`);
1716-
}
1717-
}
1718-
1719-
export function assertLessThanOrEqual(a: number, b: number): void {
1720-
if (a > b) {
1721-
fail(`Expected ${a} <= ${b}`);
1722-
}
1723-
}
1724-
1725-
export function assertGreaterThanOrEqual(a: number, b: number): void {
1726-
if (a < b) {
1727-
fail(`Expected ${a} >= ${b}`);
1728-
}
1729-
}
1730-
1731-
export function fail(message?: string, stackCrawlMark?: AnyFunction): never {
1732-
debugger;
1733-
const e = new Error(message ? `Debug Failure. ${message}` : "Debug Failure.");
1734-
if ((<any>Error).captureStackTrace) {
1735-
(<any>Error).captureStackTrace(e, stackCrawlMark || fail);
1736-
}
1737-
throw e;
1738-
}
1739-
1740-
export function assertDefined<T>(value: T | null | undefined, message?: string): T {
1741-
if (value === undefined || value === null) return fail(message);
1742-
return value;
1743-
}
1744-
1745-
export function assertEachDefined<T, A extends ReadonlyArray<T>>(value: A, message?: string): A {
1746-
for (const v of value) {
1747-
assertDefined(v, message);
1748-
}
1749-
return value;
1750-
}
1751-
1752-
export function assertNever(member: never, message = "Illegal value:", stackCrawlMark?: AnyFunction): never {
1753-
const detail = typeof member === "object" && "kind" in member && "pos" in member ? "SyntaxKind: " + showSyntaxKind(member as Node) : JSON.stringify(member);
1754-
return fail(`${message} ${detail}`, stackCrawlMark || assertNever);
1755-
}
1756-
1757-
export function getFunctionName(func: AnyFunction) {
1758-
if (typeof func !== "function") {
1759-
return "";
1760-
}
1761-
else if (func.hasOwnProperty("name")) {
1762-
return (<any>func).name;
1763-
}
1764-
else {
1765-
const text = Function.prototype.toString.call(func);
1766-
const match = /^function\s+([\w\$]+)\s*\(/.exec(text);
1767-
return match ? match[1] : "";
1768-
}
1769-
}
1770-
}
1771-
17721689
export function equateValues<T>(a: T, b: T) {
17731690
return a === b;
17741691
}

0 commit comments

Comments
 (0)