* Allow emitter to write multiple newlines in node lists * Progress * Progress * Fix recomputeIndentation * Add tests, fix leading line terminator count * Do a bit less work when `preserveNewlines` is off * Fix accidental find/replace rename * Restore some monomorphism * Fix single line writer * Fix other writers * Revert "Fix other writers" This reverts commit21b0cb8f3b
. * Revert "Fix single line writer" This reverts commite535e279f9
. * Revert "Restore some monomorphism" This reverts commite3ef42743a
. * Add equal position optimization to getLinesBetweenRangeEndAndRangeStart * Add one more test * Actually save the test file * Rename preserveNewlines to preserveSourceNewlines * Make ignoreSourceNewlines internal * Optimize lines-between functions * Add comment; * Fix trailing line terminator count bug for function parameters * Preserve newlines around parenthesized expressions * Back to speculative microoptimizations, yay * Don’t call getEffectiveLines during tsc emit at all
27 lines
503 B
TypeScript
27 lines
503 B
TypeScript
/// <reference path='fourslash.ts' />
|
|
|
|
// @allowJs: true
|
|
// @target: esnext
|
|
|
|
// @Filename: /a.js
|
|
////module.exports = {
|
|
//// x: 0,
|
|
//// f: function() {},
|
|
//// g: () => {},
|
|
//// h() {},
|
|
//// C: class {},
|
|
////};
|
|
|
|
// @Filename: /b.js
|
|
////const a = require("./a.js");
|
|
|
|
verify.codeFix({
|
|
description: "Convert to ES6 module",
|
|
newFileContent:
|
|
`export const x = 0;
|
|
export function f() { }
|
|
export function g() { }
|
|
export function h() { }
|
|
export class C { }`,
|
|
});
|