* Fix #37948 * Fix formatter skipping tab/space fixup on comments, handle trailing commas in list closing line count. Fixes #37944 * Add newline between imports and main body of new file in moveToNewFile Fixes #37941 * Update baseline (probably broken before?)
31 lines
645 B
TypeScript
31 lines
645 B
TypeScript
/// <reference path='fourslash.ts' />
|
|
|
|
// @jsx: preserve
|
|
// @noLib: true
|
|
// @libFiles: react.d.ts,lib.d.ts,leftpad.d.ts
|
|
|
|
// @Filename: file.tsx
|
|
//// import React = require('leftpad');
|
|
//// [|function F() {
|
|
//// const React = import("react");
|
|
//// <div/>;
|
|
//// }|]
|
|
//// React;
|
|
|
|
verify.moveToNewFile({
|
|
newFileContents: {
|
|
"/tests/cases/fourslash/file.tsx":
|
|
`import React = require('leftpad');
|
|
React;`,
|
|
// NB: A perfect implementation would not copy over the import
|
|
"/tests/cases/fourslash/F.tsx":
|
|
`import React = require('leftpad');
|
|
|
|
function F() {
|
|
const React = import("react");
|
|
<div />;
|
|
}
|
|
`,
|
|
}
|
|
});
|