d5af89c552
Property assignments can have a type annotation in JS. This PR adds a check for it in contextual typing. Fixes #43379
14 lines
196 B
TypeScript
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
|