mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 21:53:42 -06:00
Illustrate a case that isn't handled correctly
This commit is contained in:
parent
3e256e14dc
commit
4029e70c97
29
tests/cases/fourslash/moveToNewFile_moveJsxImport4.ts
Normal file
29
tests/cases/fourslash/moveToNewFile_moveJsxImport4.ts
Normal file
@ -0,0 +1,29 @@
|
||||
/// <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 />;
|
||||
}
|
||||
`,
|
||||
}
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user