-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(42238): emit this parameter in function declaration (#46511)
- Loading branch information
1 parent
f11f14b
commit a75f26e
Showing
6 changed files
with
72 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
//// [a.js] | ||
/** @this {string} */ | ||
export function f1() {} | ||
|
||
/** @this */ | ||
export function f2() {} | ||
|
||
|
||
|
||
|
||
//// [a.d.ts] | ||
/** @this {string} */ | ||
export function f1(this: string): void; | ||
/** @this */ | ||
export function f2(this: any): void; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
=== tests/cases/conformance/jsdoc/a.js === | ||
/** @this {string} */ | ||
export function f1() {} | ||
>f1 : Symbol(f1, Decl(a.js, 0, 0)) | ||
|
||
/** @this */ | ||
export function f2() {} | ||
>f2 : Symbol(f2, Decl(a.js, 1, 23)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
=== tests/cases/conformance/jsdoc/a.js === | ||
/** @this {string} */ | ||
export function f1() {} | ||
>f1 : (this: string) => void | ||
|
||
/** @this */ | ||
export function f2() {} | ||
>f2 : (this: any) => void | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// @target: esnext | ||
// @allowJs: true | ||
// @declaration: true | ||
// @emitDeclarationOnly: true | ||
// @filename: a.js | ||
|
||
/** @this {string} */ | ||
export function f1() {} | ||
|
||
/** @this */ | ||
export function f2() {} |