Skip to content

Importing types doesn't trigger an error in checkJs #22159

Closed

Description

// ./a.ts
export type Hello = string;
import { Hello } from "./a";

Expected: Error: Types cannot be imported in a JavaScript file.
Actual: No error.

Activity

  1. added this to the milestone on Mar 9, 2018
  2. mhegazy commented on Mar 9, 2018

    @mhegazy
    Contributor

    PRs welcomed.

  3. added
    Domain: JavaScript
    and removed
    Domain: JavaScript
    on Nov 29, 2018
  4. added
    Effort: Casual
    on Apr 6, 2022
  5. added
    Fix Available
    on Jun 16, 2022
  6. locked as resolved and limited conversation to collaborators on Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugDomain: JavaScriptEffort: CasualFix Available

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions