Accept error baselines and API breaks

This commit is contained in:
Jason Freeman 2015-03-04 19:33:49 -08:00
parent ed3ab96eed
commit 946dc0e0bc
41 changed files with 366 additions and 19 deletions

View file

@ -940,7 +940,7 @@ declare module "typescript" {
isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult;
isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult;
getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number;
isUnknownIdentifier(location: Node, name: string): boolean;
isUnknownIdentifier(location: Node, name: string, sourceFile: SourceFile): boolean;
getBlockScopedVariableId(node: Identifier): number;
}
const enum SymbolFlags {

View file

@ -3057,11 +3057,13 @@ declare module "typescript" {
>PropertyAccessExpression : PropertyAccessExpression
>ElementAccessExpression : ElementAccessExpression
isUnknownIdentifier(location: Node, name: string): boolean;
>isUnknownIdentifier : (location: Node, name: string) => boolean
isUnknownIdentifier(location: Node, name: string, sourceFile: SourceFile): boolean;
>isUnknownIdentifier : (location: Node, name: string, sourceFile: SourceFile) => boolean
>location : Node
>Node : Node
>name : string
>sourceFile : SourceFile
>SourceFile : SourceFile
getBlockScopedVariableId(node: Identifier): number;
>getBlockScopedVariableId : (node: Identifier) => number

View file

@ -971,7 +971,7 @@ declare module "typescript" {
isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult;
isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult;
getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number;
isUnknownIdentifier(location: Node, name: string): boolean;
isUnknownIdentifier(location: Node, name: string, sourceFile: SourceFile): boolean;
getBlockScopedVariableId(node: Identifier): number;
}
const enum SymbolFlags {

View file

@ -3203,11 +3203,13 @@ declare module "typescript" {
>PropertyAccessExpression : PropertyAccessExpression
>ElementAccessExpression : ElementAccessExpression
isUnknownIdentifier(location: Node, name: string): boolean;
>isUnknownIdentifier : (location: Node, name: string) => boolean
isUnknownIdentifier(location: Node, name: string, sourceFile: SourceFile): boolean;
>isUnknownIdentifier : (location: Node, name: string, sourceFile: SourceFile) => boolean
>location : Node
>Node : Node
>name : string
>sourceFile : SourceFile
>SourceFile : SourceFile
getBlockScopedVariableId(node: Identifier): number;
>getBlockScopedVariableId : (node: Identifier) => number

View file

@ -972,7 +972,7 @@ declare module "typescript" {
isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult;
isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult;
getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number;
isUnknownIdentifier(location: Node, name: string): boolean;
isUnknownIdentifier(location: Node, name: string, sourceFile: SourceFile): boolean;
getBlockScopedVariableId(node: Identifier): number;
}
const enum SymbolFlags {

View file

@ -3153,11 +3153,13 @@ declare module "typescript" {
>PropertyAccessExpression : PropertyAccessExpression
>ElementAccessExpression : ElementAccessExpression
isUnknownIdentifier(location: Node, name: string): boolean;
>isUnknownIdentifier : (location: Node, name: string) => boolean
isUnknownIdentifier(location: Node, name: string, sourceFile: SourceFile): boolean;
>isUnknownIdentifier : (location: Node, name: string, sourceFile: SourceFile) => boolean
>location : Node
>Node : Node
>name : string
>sourceFile : SourceFile
>SourceFile : SourceFile
getBlockScopedVariableId(node: Identifier): number;
>getBlockScopedVariableId : (node: Identifier) => number

View file

@ -1009,7 +1009,7 @@ declare module "typescript" {
isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult;
isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult;
getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number;
isUnknownIdentifier(location: Node, name: string): boolean;
isUnknownIdentifier(location: Node, name: string, sourceFile: SourceFile): boolean;
getBlockScopedVariableId(node: Identifier): number;
}
const enum SymbolFlags {

View file

@ -3326,11 +3326,13 @@ declare module "typescript" {
>PropertyAccessExpression : PropertyAccessExpression
>ElementAccessExpression : ElementAccessExpression
isUnknownIdentifier(location: Node, name: string): boolean;
>isUnknownIdentifier : (location: Node, name: string) => boolean
isUnknownIdentifier(location: Node, name: string, sourceFile: SourceFile): boolean;
>isUnknownIdentifier : (location: Node, name: string, sourceFile: SourceFile) => boolean
>location : Node
>Node : Node
>name : string
>sourceFile : SourceFile
>SourceFile : SourceFile
getBlockScopedVariableId(node: Identifier): number;
>getBlockScopedVariableId : (node: Identifier) => number

View file

@ -0,0 +1,7 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-of1.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of1.ts (1 errors) ====
for (var v of []) { }
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.

View file

@ -0,0 +1,13 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-of10.ts(4,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of10.ts (1 errors) ====
function foo() {
return { x: 0 };
}
for (foo().x of []) {
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
for (foo().x of [])
var p = foo().x;
}

View file

@ -0,0 +1,8 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-of11.ts(2,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of11.ts (1 errors) ====
var v;
for (v of []) { }
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.

View file

@ -0,0 +1,7 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-of12.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of12.ts (1 errors) ====
for ([""] of []) { }
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.

View file

@ -0,0 +1,9 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-of13.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of13.ts (1 errors) ====
for (let v of []) {
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
var x = v;
}

View file

@ -0,0 +1,9 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-of14.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of14.ts (1 errors) ====
for (const v of []) {
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
var x = v;
}

View file

@ -0,0 +1,12 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-of15.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of15.ts (1 errors) ====
for (let v of []) {
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
v;
for (const v of []) {
var x = v;
}
}

View file

@ -0,0 +1,13 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-of16.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of16.ts (1 errors) ====
for (let v of []) {
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
v;
for (let v of []) {
var x = v;
v++;
}
}

View file

@ -0,0 +1,13 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-of17.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of17.ts (1 errors) ====
for (let v of []) {
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
v;
for (let v of [v]) {
var x = v;
v++;
}
}

View file

@ -0,0 +1,16 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-of18.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
tests/cases/conformance/statements/for-ofStatements/ES5For-of18.ts(4,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of18.ts (2 errors) ====
for (let v of []) {
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
v;
}
for (let v of []) {
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
v;
}

View file

@ -0,0 +1,15 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts (1 errors) ====
for (let v of []) {
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
v;
function foo() {
for (const v of []) {
v;
}
}
}

View file

@ -0,0 +1,9 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-of2.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of2.ts (1 errors) ====
for (var v of []) {
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
var x = v;
}

View file

@ -0,0 +1,12 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-of20.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of20.ts (1 errors) ====
for (let v of []) {
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
let v;
for (let v of [v]) {
const v;
}
}

View file

@ -0,0 +1,9 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-of21.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of21.ts (1 errors) ====
for (let v of []) {
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
for (let _i of []) { }
}

View file

@ -0,0 +1,10 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-of22.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of22.ts (1 errors) ====
for (var x of [1, 2, 3]) {
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
let _a = 0;
console.log(x);
}

View file

@ -0,0 +1,10 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-of23.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of23.ts (1 errors) ====
for (var x of [1, 2, 3]) {
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
var _a = 0;
console.log(x);
}

View file

@ -0,0 +1,10 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-of24.ts(2,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of24.ts (1 errors) ====
var a = [1, 2, 3];
for (var v of a) {
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
let a = 0;
}

View file

@ -0,0 +1,11 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-of25.ts(2,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of25.ts (1 errors) ====
var a = [1, 2, 3];
for (var v of a) {
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
v;
a;
}

View file

@ -0,0 +1,10 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-of26.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of26.ts (1 errors) ====
for (var [a = 0, b = 1] of [2, 3]) {
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
a;
b;
}

View file

@ -0,0 +1,10 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-of27.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of27.ts (1 errors) ====
for (var {x: a = 0, y: b = 1} of [2, 3]) {
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
a;
b;
}

View file

@ -0,0 +1,10 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-of28.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of28.ts (1 errors) ====
for (let [a = 0, b = 1] of [2, 3]) {
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
a;
b;
}

View file

@ -0,0 +1,10 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-of29.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of29.ts (1 errors) ====
for (const {x: a = 0, y: b = 1} of [2, 3]) {
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
a;
b;
}

View file

@ -0,0 +1,8 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-of3.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of3.ts (1 errors) ====
for (var v of [])
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
var x = v;

View file

@ -0,0 +1,12 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-of30.ts(3,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of30.ts (1 errors) ====
var a: string, b: number;
var tuple: [number, string] = [2, "3"];
for ([a = 1, b = ""] of tuple) {
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
a;
b;
}

View file

@ -0,0 +1,12 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-of31.ts(3,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of31.ts (1 errors) ====
var a: string, b: number;
for ({ a: b = 1, b: a = ""} of []) {
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
a;
b;
}

View file

@ -0,0 +1,9 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-of4.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of4.ts (1 errors) ====
for (var v of [])
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
var x = v;
var y = v;

View file

@ -0,0 +1,9 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-of5.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of5.ts (1 errors) ====
for (var _a of []) {
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
var x = _a;
}

View file

@ -0,0 +1,11 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-of6.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of6.ts (1 errors) ====
for (var w of []) {
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
for (var v of []) {
var x = [w, v];
}
}

View file

@ -0,0 +1,16 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-of7.ts(1,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
tests/cases/conformance/statements/for-ofStatements/ES5For-of7.ts(5,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of7.ts (2 errors) ====
for (var w of []) {
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
var x = w;
}
for (var v of []) {
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
var x = [w, v];
}

View file

@ -0,0 +1,12 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-of8.ts(4,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of8.ts (1 errors) ====
function foo() {
return { x: 0 };
}
for (foo().x of []) {
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
var p = foo().x;
}

View file

@ -0,0 +1,14 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-of9.ts(4,1): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of9.ts (1 errors) ====
function foo() {
return { x: 0 };
}
for (foo().x of []) {
~~~
!!! error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
for (foo().x of []) {
var p = foo().x;
}
}

View file

@ -1,9 +1,9 @@
tests/cases/compiler/downlevelLetConst16.ts(189,5): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
tests/cases/compiler/downlevelLetConst16.ts(196,5): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
tests/cases/compiler/downlevelLetConst16.ts(203,5): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
tests/cases/compiler/downlevelLetConst16.ts(210,5): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
tests/cases/compiler/downlevelLetConst16.ts(217,5): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
tests/cases/compiler/downlevelLetConst16.ts(224,5): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
tests/cases/compiler/downlevelLetConst16.ts(188,5): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
tests/cases/compiler/downlevelLetConst16.ts(195,5): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
tests/cases/compiler/downlevelLetConst16.ts(202,5): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
tests/cases/compiler/downlevelLetConst16.ts(209,5): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
tests/cases/compiler/downlevelLetConst16.ts(216,5): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
tests/cases/compiler/downlevelLetConst16.ts(223,5): error TS2482: 'for...of' statements are only available when targeting ECMAScript 6 or higher.
==== tests/cases/compiler/downlevelLetConst16.ts (6 errors) ====
@ -193,7 +193,6 @@ tests/cases/compiler/downlevelLetConst16.ts(224,5): error TS2482: 'for...of' sta
use(x);
}
// TODO: once for-of is supported downlevel
function foo7() {
for (let x of []) {
~~~

View file

@ -0,0 +1,4 @@
// @sourcemap: true
for (var a of ['a', 'b', 'c']) {
console.log(a);
}