Skip to content

Incorrect "Import may be converted to a default import" suggestion #26239

@grantwwu

Description

@grantwwu

TypeScript Version: 3.1.0-dev. 20180804

Search Terms: "Import may be converted to a default import"

Code
https://github.com/grantwwu/typescript-default-imports-test

Expected behavior:
Both test cases exit successfully.

Actual behavior:
npm run fail fails.

I am reporting this as an issue because VSCode is reporting that ts is suggesting that I convert the code in sinon-pass.ts to sinon-fail.ts, and provides a CodeFix for doing so. I'm not 100% sure, but it does seem like that's under this repo's purview, judging from https://github.com/Microsoft/TypeScript/blob/13bc46d9707036928e51be91d8d6aeaf95e63132/src/services/codefixes/useDefaultImport.ts

Playground Link: None; I don't know of any other packages which demonstrate this issue, and TS Playground doesn't seem to have sinon

Related Issues:
No

Metadata

Metadata

Assignees

No one assigned

    Labels

    QuestionAn issue which isn't directly actionable in codeWorking as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions