Skip to content

Imports without import clause don't report that the specifier can't end with .tsΒ #58725

Closed
@Andarist

Description

@Andarist

πŸ”Ž Search Terms

import clause ts extension resolution

πŸ•— Version & Regression Information

  • This is the behavior in every version I tried

⏯ Playground Link

https://www.typescriptlang.org/dev/bug-workbench/?module=1#code/PTAEAEDMEsBsFMB2BDAtvAXKZA6ALgM4BQR8AHgA4D2ATnqAMZWIH3KgC8oA5MtySAgwEKdFgBG+YkWipqdHjmC5C-WfPoBvAL6hINKqkXKp-IA

πŸ’» Code

// @filename: a.ts

export const a = 'a'

// @filename: b.ts

import './a.ts'
import {} from './a.ts'

πŸ™ Actual behavior

We get one error in b.ts

πŸ™‚ Expected behavior

We should get errors on both imports in b.ts

Additional information about the issue

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Not a DefectThis behavior is one of several equally-correct options

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions