Add test for #11166
This commit is contained in:
parent
cef9d85979
commit
acd574066b
|
@ -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; };
|
14
tests/baselines/reference/nounusedTypeParameterConstraint.js
Normal file
14
tests/baselines/reference/nounusedTypeParameterConstraint.js
Normal 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";
|
8
tests/cases/compiler/nounusedTypeParameterConstraint.ts
Normal file
8
tests/cases/compiler/nounusedTypeParameterConstraint.ts
Normal 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; };
|
Loading…
Reference in a new issue