* Type check `@this` tags No special support in fourslash yet, so quickinfo probably doesn't work. * Do no require braces and update API baselines
19 lines
282 B
TypeScript
19 lines
282 B
TypeScript
// @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')
|