Skip to content

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

@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