2018-01-09 22:15:47 +01:00
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
|
|
|
|
// @allowJs: true
|
2018-04-24 01:05:37 +02:00
|
|
|
// @target: esnext
|
2018-01-09 22:15:47 +01:00
|
|
|
|
|
|
|
// @Filename: /a.js
|
|
|
|
////exports.x = 0;
|
|
|
|
////exports.x;
|
|
|
|
////
|
|
|
|
////const y = 1;
|
2018-02-28 20:16:32 +01:00
|
|
|
////exports.y = y;
|
2018-01-09 22:15:47 +01:00
|
|
|
////exports.y;
|
|
|
|
////
|
|
|
|
////exports.z = 2;
|
2018-04-05 21:33:00 +02:00
|
|
|
////exports.f = function(z) {
|
2018-04-16 22:16:04 +02:00
|
|
|
//// exports.z; z;
|
2018-01-09 22:15:47 +01:00
|
|
|
////}
|
|
|
|
|
2018-02-28 20:16:32 +01:00
|
|
|
verify.codeFix({
|
|
|
|
description: "Convert to ES6 module",
|
|
|
|
newFileContent:
|
|
|
|
`export const x = 0;
|
2018-01-09 22:15:47 +01:00
|
|
|
x;
|
|
|
|
|
|
|
|
const y = 1;
|
|
|
|
const _y = y;
|
|
|
|
export { _y as y };
|
|
|
|
_y;
|
|
|
|
|
2018-04-16 22:16:04 +02:00
|
|
|
const _z = 2;
|
|
|
|
export { _z as z };
|
2018-04-05 21:33:00 +02:00
|
|
|
export function f(z) {
|
2018-04-16 22:16:04 +02:00
|
|
|
_z; z;
|
2018-01-09 22:15:47 +01:00
|
|
|
}`,
|
|
|
|
});
|