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
|
2018-02-28 20:16:32 +01:00
|
|
|
////module.exports = function() {}
|
2018-01-09 22:15:47 +01:00
|
|
|
////module.exports = function f() {}
|
|
|
|
////module.exports = class {}
|
|
|
|
////module.exports = class C {}
|
|
|
|
////module.exports = 0;
|
|
|
|
|
|
|
|
// See also `refactorConvertToEs6Module_export_moduleDotExportsEqualsRequire.ts`
|
|
|
|
|
2018-02-28 20:16:32 +01:00
|
|
|
verify.codeFix({
|
|
|
|
description: "Convert to ES6 module",
|
|
|
|
newFileContent:
|
2018-05-08 00:45:43 +02:00
|
|
|
`export default function() {}
|
|
|
|
export default function f() {}
|
|
|
|
export default class {}
|
|
|
|
export default class C {}
|
2018-02-28 20:16:32 +01:00
|
|
|
export default 0;`,
|
2018-01-09 22:15:47 +01:00
|
|
|
});
|