mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
24 lines
438 B
TypeScript
24 lines
438 B
TypeScript
//// [tests/cases/compiler/genericConstraintDeclaration.ts] ////
|
|
|
|
//// [genericConstraintDeclaration.ts]
|
|
class List<T extends {}>{
|
|
static empty<T extends {}>(): List<T>{return null;}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//// [genericConstraintDeclaration.js]
|
|
"use strict";
|
|
class List {
|
|
static empty() { return null; }
|
|
}
|
|
|
|
|
|
//// [genericConstraintDeclaration.d.ts]
|
|
declare class List<T extends {}> {
|
|
static empty<T extends {}>(): List<T>;
|
|
}
|