mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-26 10:43:51 -05:00
Merge branch 'master' into fixAPISampleTests
This commit is contained in:
19
tests/cases/conformance/jsdoc/thisTag1.ts
Normal file
19
tests/cases/conformance/jsdoc/thisTag1.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
// @noEmit: true
|
||||
// @allowJs: true
|
||||
// @checkJs: true
|
||||
// @strict: true
|
||||
// @Filename: a.js
|
||||
|
||||
/** @this {{ n: number }} Mount Holyoke Preparatory School
|
||||
* @param {string} s
|
||||
* @return {number}
|
||||
*/
|
||||
function f(s) {
|
||||
return this.n + s.length
|
||||
}
|
||||
|
||||
const o = {
|
||||
f,
|
||||
n: 1
|
||||
}
|
||||
o.f('hi')
|
||||
Reference in New Issue
Block a user