Added tests for interfaces and tagged templates.
This commit is contained in:
parent
64a31e2e51
commit
8c422af4bc
|
@ -0,0 +1,6 @@
|
|||
|
||||
|
||||
function declare(x: any, ...ys: any[]) {
|
||||
}
|
||||
|
||||
declare `Hello ${0} world!`;
|
|
@ -0,0 +1,6 @@
|
|||
//@target: es6
|
||||
|
||||
function declare(x: any, ...ys: any[]) {
|
||||
}
|
||||
|
||||
declare `Hello ${0} world!`;
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
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
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
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
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
|
||||
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
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
|
||||
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
|
|
@ -0,0 +1,12 @@
|
|||
"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
|
Loading…
Reference in a new issue