2018-05-10 20:17:04 +02:00
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
|
2020-02-28 23:34:20 +01:00
|
|
|
// @module: esnext
|
2018-05-10 20:17:04 +02:00
|
|
|
// @allowJs: true
|
|
|
|
|
|
|
|
// @Filename: /a.js
|
|
|
|
////const { a, b } = require("./other");
|
|
|
|
////const p = 0;
|
|
|
|
////[|const y = p + b;
|
|
|
|
////const z = 0;
|
|
|
|
////exports.z = 0;|]
|
|
|
|
////a; y; z;
|
|
|
|
|
|
|
|
// @Filename: /user.ts
|
|
|
|
////const { x, y } = require("./a");
|
|
|
|
|
|
|
|
verify.moveToNewFile({
|
|
|
|
newFileContents: {
|
|
|
|
"/a.js":
|
2020-02-28 23:34:20 +01:00
|
|
|
`const { a, } = require("./other");
|
|
|
|
const { y, z } = require("./y");
|
2018-05-10 20:17:04 +02:00
|
|
|
const p = 0;
|
|
|
|
exports.p = p;
|
|
|
|
a; y; z;`,
|
|
|
|
|
|
|
|
"/y.js":
|
|
|
|
`const { b } = require("./other");
|
|
|
|
const { p } = require("./a");
|
2020-07-22 19:31:42 +02:00
|
|
|
|
2018-05-10 20:17:04 +02:00
|
|
|
const y = p + b;
|
|
|
|
exports.y = y;
|
|
|
|
const z = 0;
|
2018-10-24 01:10:26 +02:00
|
|
|
exports.z = 0;
|
|
|
|
`,
|
2018-05-10 20:17:04 +02:00
|
|
|
},
|
|
|
|
});
|