Skip to content

Commit acd5740

Browse files
committed
Add test for microsoft#11166
1 parent cef9d85 commit acd5740

3 files changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
tests/cases/compiler/test.ts(1,10): error TS6133: 'IEventSourcedEntity' is declared but never used.
2+
3+
4+
==== tests/cases/compiler/bar.ts (0 errors) ====
5+
6+
export interface IEventSourcedEntity { }
7+
8+
==== tests/cases/compiler/test.ts (1 errors) ====
9+
import { IEventSourcedEntity } from "./bar";
10+
~~~~~~~~~~~~~~~~~~~
11+
!!! error TS6133: 'IEventSourcedEntity' is declared but never used.
12+
export type DomainEntityConstructor<TEntity extends IEventSourcedEntity> = { new(): TEntity; };
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//// [tests/cases/compiler/nounusedTypeParameterConstraint.ts] ////
2+
3+
//// [bar.ts]
4+
5+
export interface IEventSourcedEntity { }
6+
7+
//// [test.ts]
8+
import { IEventSourcedEntity } from "./bar";
9+
export type DomainEntityConstructor<TEntity extends IEventSourcedEntity> = { new(): TEntity; };
10+
11+
//// [bar.js]
12+
"use strict";
13+
//// [test.js]
14+
"use strict";
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//@noUnusedLocals:true
2+
3+
//@filename: bar.ts
4+
export interface IEventSourcedEntity { }
5+
6+
//@filename: test.ts
7+
import { IEventSourcedEntity } from "./bar";
8+
export type DomainEntityConstructor<TEntity extends IEventSourcedEntity> = { new(): TEntity; };

0 commit comments

Comments
 (0)