TypeScript/tests/cases/conformance/jsdoc/typeTagOnPropertyAssignment.ts
Nathan Shively-Sanders d5af89c552
Contextual typing checks property assignments for type annotation (#43598)
Property assignments can have a type annotation in JS. This PR adds a
check for it in contextual typing.

Fixes #43379
2021-04-26 09:19:24 -07:00

14 lines
196 B
TypeScript

// @noEmit: true
// @checkJs: true
// @filename: typeTagOnPropertyAssignment.js
const o = {
/**
* @type {"a"}
*/
a: "a",
/** @type {() => 'b'} */
n: () => 'b'
};
o.a
o.n