Accepted baselines.
This commit is contained in:
parent
8c422af4bc
commit
8af07ee0c0
10
tests/baselines/reference/asiPreventsParsingAsInterface01.js
Normal file
10
tests/baselines/reference/asiPreventsParsingAsInterface01.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
//// [asiPreventsParsingAsInterface01.ts]
|
||||
|
||||
var interface: number, I: string;
|
||||
|
||||
interface // This should be the identifier 'interface'
|
||||
I // This should be the identifier 'I'
|
||||
{} // This should be a block body
|
||||
|
||||
//// [asiPreventsParsingAsInterface01.js]
|
||||
var interface, I;
|
|
@ -0,0 +1,11 @@
|
|||
=== tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface01.ts ===
|
||||
|
||||
var interface: number, I: string;
|
||||
>interface : Symbol(interface, Decl(asiPreventsParsingAsInterface01.ts, 1, 3))
|
||||
>I : Symbol(I, Decl(asiPreventsParsingAsInterface01.ts, 1, 22), Decl(asiPreventsParsingAsInterface01.ts, 1, 33))
|
||||
|
||||
interface // This should be the identifier 'interface'
|
||||
I // This should be the identifier 'I'
|
||||
>I : Symbol(I, Decl(asiPreventsParsingAsInterface01.ts, 1, 22), Decl(asiPreventsParsingAsInterface01.ts, 1, 33))
|
||||
|
||||
{} // This should be a block body
|
|
@ -0,0 +1,11 @@
|
|||
=== tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface01.ts ===
|
||||
|
||||
var interface: number, I: string;
|
||||
>interface : number
|
||||
>I : string
|
||||
|
||||
interface // This should be the identifier 'interface'
|
||||
I // This should be the identifier 'I'
|
||||
>I : I
|
||||
|
||||
{} // This should be a block body
|
11
tests/baselines/reference/asiPreventsParsingAsInterface02.js
Normal file
11
tests/baselines/reference/asiPreventsParsingAsInterface02.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
//// [asiPreventsParsingAsInterface02.ts]
|
||||
|
||||
function f(interface: number, I: string) {
|
||||
interface // This should be the identifier 'interface'
|
||||
I // This should be the identifier 'I'
|
||||
{} // This should be a block body
|
||||
}
|
||||
|
||||
//// [asiPreventsParsingAsInterface02.js]
|
||||
function f(interface, I) {
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
=== tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface02.ts ===
|
||||
|
||||
function f(interface: number, I: string) {
|
||||
>f : Symbol(f, Decl(asiPreventsParsingAsInterface02.ts, 0, 0))
|
||||
>interface : Symbol(interface, Decl(asiPreventsParsingAsInterface02.ts, 1, 11))
|
||||
>I : Symbol(I, Decl(asiPreventsParsingAsInterface02.ts, 1, 29), Decl(asiPreventsParsingAsInterface02.ts, 1, 42))
|
||||
|
||||
interface // This should be the identifier 'interface'
|
||||
I // This should be the identifier 'I'
|
||||
>I : Symbol(I, Decl(asiPreventsParsingAsInterface02.ts, 1, 29), Decl(asiPreventsParsingAsInterface02.ts, 1, 42))
|
||||
|
||||
{} // This should be a block body
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
=== tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface02.ts ===
|
||||
|
||||
function f(interface: number, I: string) {
|
||||
>f : (interface: number, I: string) => void
|
||||
>interface : number
|
||||
>I : string
|
||||
|
||||
interface // This should be the identifier 'interface'
|
||||
I // This should be the identifier 'I'
|
||||
>I : I
|
||||
|
||||
{} // This should be a block body
|
||||
}
|
12
tests/baselines/reference/asiPreventsParsingAsInterface03.js
Normal file
12
tests/baselines/reference/asiPreventsParsingAsInterface03.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
//// [asiPreventsParsingAsInterface03.ts]
|
||||
|
||||
var interface: number, I: string;
|
||||
|
||||
namespace n {
|
||||
interface // This should be the identifier 'interface'
|
||||
I // This should be the identifier 'I'
|
||||
{} // This should be a block body
|
||||
}
|
||||
|
||||
//// [asiPreventsParsingAsInterface03.js]
|
||||
var interface, I;
|
|
@ -0,0 +1,15 @@
|
|||
=== tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface03.ts ===
|
||||
|
||||
var interface: number, I: string;
|
||||
>interface : Symbol(interface, Decl(asiPreventsParsingAsInterface03.ts, 1, 3))
|
||||
>I : Symbol(I, Decl(asiPreventsParsingAsInterface03.ts, 1, 22))
|
||||
|
||||
namespace n {
|
||||
>n : Symbol(n, Decl(asiPreventsParsingAsInterface03.ts, 1, 33))
|
||||
|
||||
interface // This should be the identifier 'interface'
|
||||
I // This should be the identifier 'I'
|
||||
>I : Symbol(I, Decl(asiPreventsParsingAsInterface03.ts, 3, 13))
|
||||
|
||||
{} // This should be a block body
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
=== tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface03.ts ===
|
||||
|
||||
var interface: number, I: string;
|
||||
>interface : number
|
||||
>I : string
|
||||
|
||||
namespace n {
|
||||
>n : any
|
||||
|
||||
interface // This should be the identifier 'interface'
|
||||
I // This should be the identifier 'I'
|
||||
>I : I
|
||||
|
||||
{} // This should be a block body
|
||||
}
|
12
tests/baselines/reference/asiPreventsParsingAsInterface04.js
Normal file
12
tests/baselines/reference/asiPreventsParsingAsInterface04.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
//// [asiPreventsParsingAsInterface04.ts]
|
||||
|
||||
var declare: boolean, interface: number, I: string;
|
||||
|
||||
declare // This should be the identifier 'declare'
|
||||
interface // This should be the identifier 'interface'
|
||||
I // This should be the identifier 'I'
|
||||
{} // This should be a block body
|
||||
|
||||
//// [asiPreventsParsingAsInterface04.js]
|
||||
var declare, interface, I;
|
||||
declare; // This should be the identifier 'declare'
|
|
@ -0,0 +1,15 @@
|
|||
=== tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface04.ts ===
|
||||
|
||||
var declare: boolean, interface: number, I: string;
|
||||
>declare : Symbol(declare, Decl(asiPreventsParsingAsInterface04.ts, 1, 3))
|
||||
>interface : Symbol(interface, Decl(asiPreventsParsingAsInterface04.ts, 1, 21))
|
||||
>I : Symbol(I, Decl(asiPreventsParsingAsInterface04.ts, 1, 40), Decl(asiPreventsParsingAsInterface04.ts, 3, 7))
|
||||
|
||||
declare // This should be the identifier 'declare'
|
||||
>declare : Symbol(declare, Decl(asiPreventsParsingAsInterface04.ts, 1, 3))
|
||||
|
||||
interface // This should be the identifier 'interface'
|
||||
I // This should be the identifier 'I'
|
||||
>I : Symbol(I, Decl(asiPreventsParsingAsInterface04.ts, 1, 40), Decl(asiPreventsParsingAsInterface04.ts, 3, 7))
|
||||
|
||||
{} // This should be a block body
|
|
@ -0,0 +1,15 @@
|
|||
=== tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface04.ts ===
|
||||
|
||||
var declare: boolean, interface: number, I: string;
|
||||
>declare : boolean
|
||||
>interface : number
|
||||
>I : string
|
||||
|
||||
declare // This should be the identifier 'declare'
|
||||
>declare : boolean
|
||||
|
||||
interface // This should be the identifier 'interface'
|
||||
I // This should be the identifier 'I'
|
||||
>I : I
|
||||
|
||||
{} // This should be a block body
|
|
@ -0,0 +1,18 @@
|
|||
tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface05.ts(3,5): error TS1212: Identifier expected. 'interface' is a reserved word in strict mode
|
||||
|
||||
|
||||
==== tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface05.ts (1 errors) ====
|
||||
"use strict"
|
||||
|
||||
var interface: number;
|
||||
~~~~~~~~~
|
||||
!!! error TS1212: Identifier expected. 'interface' is a reserved word in strict mode
|
||||
|
||||
// 'interface' is a strict mode reserved word, and so it would be permissible
|
||||
// to allow 'interface' and the name of the interface to be on separate lines;
|
||||
// however, this complicates things, and so it is preferable to restrict interface
|
||||
// declarations such that their identifier must follow 'interface' on the same line.
|
||||
|
||||
interface // This should be the identifier 'interface'
|
||||
I // This should be the identifier 'I'
|
||||
{ } // This should be a block body
|
17
tests/baselines/reference/asiPreventsParsingAsInterface05.js
Normal file
17
tests/baselines/reference/asiPreventsParsingAsInterface05.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
//// [asiPreventsParsingAsInterface05.ts]
|
||||
"use strict"
|
||||
|
||||
var interface: number;
|
||||
|
||||
// 'interface' is a strict mode reserved word, and so it would be permissible
|
||||
// to allow 'interface' and the name of the interface to be on separate lines;
|
||||
// however, this complicates things, and so it is preferable to restrict interface
|
||||
// declarations such that their identifier must follow 'interface' on the same line.
|
||||
|
||||
interface // This should be the identifier 'interface'
|
||||
I // This should be the identifier 'I'
|
||||
{ } // This should be a block body
|
||||
|
||||
//// [asiPreventsParsingAsInterface05.js]
|
||||
"use strict";
|
||||
var interface;
|
|
@ -0,0 +1,17 @@
|
|||
//// [taggedTemplateStringsWithTagNamedDeclare.ts]
|
||||
|
||||
|
||||
function declare(x: any, ...ys: any[]) {
|
||||
}
|
||||
|
||||
declare `Hello ${0} world!`;
|
||||
|
||||
//// [taggedTemplateStringsWithTagNamedDeclare.js]
|
||||
function declare(x) {
|
||||
var ys = [];
|
||||
for (var _i = 1; _i < arguments.length; _i++) {
|
||||
ys[_i - 1] = arguments[_i];
|
||||
}
|
||||
}
|
||||
(_a = ["Hello ", " world!"], _a.raw = ["Hello ", " world!"], declare(_a, 0));
|
||||
var _a;
|
|
@ -0,0 +1,12 @@
|
|||
=== tests/cases/conformance/es6/templates/taggedTemplateStringsWithTagNamedDeclare.ts ===
|
||||
|
||||
|
||||
function declare(x: any, ...ys: any[]) {
|
||||
>declare : Symbol(declare, Decl(taggedTemplateStringsWithTagNamedDeclare.ts, 0, 0))
|
||||
>x : Symbol(x, Decl(taggedTemplateStringsWithTagNamedDeclare.ts, 2, 17))
|
||||
>ys : Symbol(ys, Decl(taggedTemplateStringsWithTagNamedDeclare.ts, 2, 24))
|
||||
}
|
||||
|
||||
declare `Hello ${0} world!`;
|
||||
>declare : Symbol(declare, Decl(taggedTemplateStringsWithTagNamedDeclare.ts, 0, 0))
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
=== tests/cases/conformance/es6/templates/taggedTemplateStringsWithTagNamedDeclare.ts ===
|
||||
|
||||
|
||||
function declare(x: any, ...ys: any[]) {
|
||||
>declare : (x: any, ...ys: any[]) => void
|
||||
>x : any
|
||||
>ys : any[]
|
||||
}
|
||||
|
||||
declare `Hello ${0} world!`;
|
||||
>declare `Hello ${0} world!` : void
|
||||
>declare : (x: any, ...ys: any[]) => void
|
||||
>`Hello ${0} world!` : string
|
||||
>0 : number
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
//// [taggedTemplateStringsWithTagNamedDeclareES6.ts]
|
||||
|
||||
function declare(x: any, ...ys: any[]) {
|
||||
}
|
||||
|
||||
declare `Hello ${0} world!`;
|
||||
|
||||
//// [taggedTemplateStringsWithTagNamedDeclareES6.js]
|
||||
function declare(x, ...ys) {
|
||||
}
|
||||
declare `Hello ${0} world!`;
|
|
@ -0,0 +1,11 @@
|
|||
=== tests/cases/conformance/es6/templates/taggedTemplateStringsWithTagNamedDeclareES6.ts ===
|
||||
|
||||
function declare(x: any, ...ys: any[]) {
|
||||
>declare : Symbol(declare, Decl(taggedTemplateStringsWithTagNamedDeclareES6.ts, 0, 0))
|
||||
>x : Symbol(x, Decl(taggedTemplateStringsWithTagNamedDeclareES6.ts, 1, 17))
|
||||
>ys : Symbol(ys, Decl(taggedTemplateStringsWithTagNamedDeclareES6.ts, 1, 24))
|
||||
}
|
||||
|
||||
declare `Hello ${0} world!`;
|
||||
>declare : Symbol(declare, Decl(taggedTemplateStringsWithTagNamedDeclareES6.ts, 0, 0))
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
=== tests/cases/conformance/es6/templates/taggedTemplateStringsWithTagNamedDeclareES6.ts ===
|
||||
|
||||
function declare(x: any, ...ys: any[]) {
|
||||
>declare : (x: any, ...ys: any[]) => void
|
||||
>x : any
|
||||
>ys : any[]
|
||||
}
|
||||
|
||||
declare `Hello ${0} world!`;
|
||||
>declare `Hello ${0} world!` : void
|
||||
>declare : (x: any, ...ys: any[]) => void
|
||||
>`Hello ${0} world!` : string
|
||||
>0 : number
|
||||
|
Loading…
Reference in a new issue