Added tests for interfaces and tagged templates.

This commit is contained in:
Daniel Rosenwasser 2015-06-04 13:49:47 -07:00
parent 64a31e2e51
commit 8c422af4bc
7 changed files with 51 additions and 0 deletions

View file

@ -0,0 +1,6 @@

function declare(x: any, ...ys: any[]) {
}
declare `Hello ${0} world!`;

View file

@ -0,0 +1,6 @@
//@target: es6
function declare(x: any, ...ys: any[]) {
}
declare `Hello ${0} world!`;

View file

@ -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

View file

@ -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
}

View file

@ -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
}

View file

@ -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

View file

@ -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