Skip to content

Paste with imports should not add imports when pasting into a stringΒ #59464

Open
@mjbvz

Description

πŸ”Ž Search Terms

  • Paste with imports

πŸ•— Version & Regression Information

5.6.0-dev.20240729

⏯ Playground Link

No response

πŸ’» Code

For a project

// abc.ts
export const abc =123;

console.log(abc);

Copy and paste abc into a file:

const str = "|"

Where | is the cursor position

πŸ™ Actual behavior

An import is added:

import { abc } from "./abc";

const a = 'abc'

πŸ™‚ Expected behavior

No import added

Additional information about the issue

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issueHelp WantedYou can do this

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions