Skip to content

TS2691: import .ts file #39965

Closed
Closed
@SancheZz

Description

@SancheZz

TypeScript Version: 3.9.7

Code

import { doSomething } from './utils.ts';

Expected behavior:
It should work :) I can have different files with the same name, e.g. component.ts and component.vue.

Actual behavior:
error TS2691: An import path cannot end with a '.ts' extension. Consider importing './utils' instead.

Related Issues: #27481

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions