Add another test

This commit is contained in:
Andy Hanson 2016-06-06 12:00:53 -07:00
parent 094f97e366
commit f215ac94c2
3 changed files with 20 additions and 8 deletions

View file

@ -1,10 +1,10 @@
tests/cases/conformance/ambient/declarations.d.ts(6,16): error TS5061: Pattern 'too*many*asterisks' can have at most one '*' character
tests/cases/conformance/ambient/declarations.d.ts(10,16): error TS5061: Pattern 'too*many*asterisks' can have at most one '*' character
==== tests/cases/conformance/ambient/user.ts (0 errors) ====
///<reference path="declarations.d.ts" />
import {foo} from "foobarbaz";
foo(0);
import {foo, baz} from "foobarbaz";
foo(baz);
import {foos} from "foosball";
@ -12,6 +12,10 @@ tests/cases/conformance/ambient/declarations.d.ts(6,16): error TS5061: Pattern '
declare module "foo*baz" {
export function foo(n: number): void;
}
// Augmentations still work
declare module "foo*baz" {
export const baz: number;
}
// Should be an error
declare module "too*many*asterisks" { }

View file

@ -4,6 +4,10 @@
declare module "foo*baz" {
export function foo(n: number): void;
}
// Augmentations still work
declare module "foo*baz" {
export const baz: number;
}
// Should be an error
declare module "too*many*asterisks" { }
@ -15,8 +19,8 @@ declare module "foos*" {
//// [user.ts]
///<reference path="declarations.d.ts" />
import {foo} from "foobarbaz";
foo(0);
import {foo, baz} from "foobarbaz";
foo(baz);
import {foos} from "foosball";
@ -25,4 +29,4 @@ import {foos} from "foosball";
"use strict";
///<reference path="declarations.d.ts" />
var foobarbaz_1 = require("foobarbaz");
foobarbaz_1.foo(0);
foobarbaz_1.foo(foobarbaz_1.baz);

View file

@ -2,6 +2,10 @@
declare module "foo*baz" {
export function foo(n: number): void;
}
// Augmentations still work
declare module "foo*baz" {
export const baz: number;
}
// Should be an error
declare module "too*many*asterisks" { }
@ -13,7 +17,7 @@ declare module "foos*" {
// @Filename: user.ts
///<reference path="declarations.d.ts" />
import {foo} from "foobarbaz";
foo(0);
import {foo, baz} from "foobarbaz";
foo(baz);
import {foos} from "foosball";