mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-12 12:57:11 -06:00
parent
45ba67d36f
commit
f8c3a550ca
@ -17418,6 +17418,7 @@ namespace ts {
|
||||
checkGrammarDecorators(node) || checkGrammarModifiers(node);
|
||||
|
||||
checkTypeNameIsReserved(node.name, Diagnostics.Type_alias_name_cannot_be_0);
|
||||
checkTypeParameters(node.typeParameters);
|
||||
checkSourceElement(node.type);
|
||||
}
|
||||
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
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; };
|
||||
@ -0,0 +1,15 @@
|
||||
=== tests/cases/compiler/bar.ts ===
|
||||
|
||||
export interface IEventSourcedEntity { }
|
||||
>IEventSourcedEntity : Symbol(IEventSourcedEntity, Decl(bar.ts, 0, 0))
|
||||
|
||||
=== tests/cases/compiler/test.ts ===
|
||||
import { IEventSourcedEntity } from "./bar";
|
||||
>IEventSourcedEntity : Symbol(IEventSourcedEntity, Decl(test.ts, 0, 8))
|
||||
|
||||
export type DomainEntityConstructor<TEntity extends IEventSourcedEntity> = { new(): TEntity; };
|
||||
>DomainEntityConstructor : Symbol(DomainEntityConstructor, Decl(test.ts, 0, 44))
|
||||
>TEntity : Symbol(TEntity, Decl(test.ts, 1, 36))
|
||||
>IEventSourcedEntity : Symbol(IEventSourcedEntity, Decl(test.ts, 0, 8))
|
||||
>TEntity : Symbol(TEntity, Decl(test.ts, 1, 36))
|
||||
|
||||
@ -0,0 +1,15 @@
|
||||
=== tests/cases/compiler/bar.ts ===
|
||||
|
||||
export interface IEventSourcedEntity { }
|
||||
>IEventSourcedEntity : IEventSourcedEntity
|
||||
|
||||
=== tests/cases/compiler/test.ts ===
|
||||
import { IEventSourcedEntity } from "./bar";
|
||||
>IEventSourcedEntity : any
|
||||
|
||||
export type DomainEntityConstructor<TEntity extends IEventSourcedEntity> = { new(): TEntity; };
|
||||
>DomainEntityConstructor : new () => TEntity
|
||||
>TEntity : TEntity
|
||||
>IEventSourcedEntity : IEventSourcedEntity
|
||||
>TEntity : TEntity
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
tests/cases/compiler/typeAliasDeclarationEmit.ts(4,37): error TS2314: Generic type 'callback' requires 1 type argument(s).
|
||||
|
||||
|
||||
==== tests/cases/compiler/typeAliasDeclarationEmit.ts (1 errors) ====
|
||||
|
||||
export type callback<T> = () => T;
|
||||
|
||||
export type CallbackArray<T extends callback> = () => T;
|
||||
~~~~~~~~
|
||||
!!! error TS2314: Generic type 'callback' requires 1 type argument(s).
|
||||
Loading…
x
Reference in New Issue
Block a user