* Add new special assignment kinds for recognizing Object.defineProperty calls * Add support for prototype assignments, fix nits * Fix code review comments * Add test documenting behavior in a few more odd scenarios
18 lines
462 B
TypeScript
18 lines
462 B
TypeScript
// @allowJs: true
|
|
// @noEmit: true
|
|
// @checkJs: true
|
|
// @filename: namespacey.js
|
|
const A = {}
|
|
A.bar = class Q {}
|
|
module.exports = A;
|
|
// @filename: namespacer.js
|
|
const B = {}
|
|
B.NS = require("./namespacey");
|
|
Object.defineProperty(B, "NS", { value: "why though", writable: true });
|
|
module.exports = B;
|
|
|
|
// @filename: index.js
|
|
const _item = require("./namespacer");
|
|
module.exports = 12;
|
|
Object.defineProperty(module, "exports", { value: "oh no" });
|