mirror of
https://github.com/swc-project/swc.git
synced 2024-12-18 19:21:33 +03:00
b887b30092
**Description:** This is required for https://github.com/swc-project/swc/pull/6981 and https://github.com/swc-project/swc/pull/6950
32 lines
395 B
TypeScript
32 lines
395 B
TypeScript
// @noEmit: true
|
|
// @allowJs: true
|
|
// @checkJs: true
|
|
// @filename: /a.js
|
|
|
|
export class C {
|
|
/**
|
|
* @template T
|
|
* @this {T}
|
|
* @return {T}
|
|
*/
|
|
static a() {
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* @template T
|
|
* @this {T}
|
|
* @return {T}
|
|
*/
|
|
b() {
|
|
return this;
|
|
}
|
|
}
|
|
|
|
const a = C.a();
|
|
a; // typeof C
|
|
|
|
const c = new C();
|
|
const b = c.b();
|
|
b; // C
|