Add test for #11166

This commit is contained in:
Sheetal Nandi 2016-10-21 16:15:19 -07:00
parent cef9d85979
commit acd574066b
3 changed files with 34 additions and 0 deletions

View file

@ -0,0 +1,12 @@
tests/cases/compiler/test.ts(1,10): error TS6133: 'IEventSourcedEntity' is declared but never used.
==== tests/cases/compiler/bar.ts (0 errors) ====
export interface IEventSourcedEntity { }
==== tests/cases/compiler/test.ts (1 errors) ====
import { IEventSourcedEntity } from "./bar";
~~~~~~~~~~~~~~~~~~~
!!! error TS6133: 'IEventSourcedEntity' is declared but never used.
export type DomainEntityConstructor<TEntity extends IEventSourcedEntity> = { new(): TEntity; };

View file

@ -0,0 +1,14 @@
//// [tests/cases/compiler/nounusedTypeParameterConstraint.ts] ////
//// [bar.ts]
export interface IEventSourcedEntity { }
//// [test.ts]
import { IEventSourcedEntity } from "./bar";
export type DomainEntityConstructor<TEntity extends IEventSourcedEntity> = { new(): TEntity; };
//// [bar.js]
"use strict";
//// [test.js]
"use strict";

View file

@ -0,0 +1,8 @@
//@noUnusedLocals:true
//@filename: bar.ts
export interface IEventSourcedEntity { }
//@filename: test.ts
import { IEventSourcedEntity } from "./bar";
export type DomainEntityConstructor<TEntity extends IEventSourcedEntity> = { new(): TEntity; };