From the user tests: ```js const x = require('y').z.ka ``` would cause the crash because I forgot to call getLeftMmostPropertyAccessExpression in one place. Note that this doesn't fix the alias, it just stops the crash.
14 lines
242 B
TypeScript
14 lines
242 B
TypeScript
// @declaration
|
|
// @outdir: out
|
|
// @checkjs: true
|
|
// @allowjs: true
|
|
// @filename: mod.js
|
|
module.exports = {
|
|
x: {
|
|
y: "value"
|
|
}
|
|
}
|
|
// @filename: requireTwoPropertyAccesses.js
|
|
const value = require("./mod").x.y
|
|
console.log(value)
|