Skip to content

Adding an export in one file and using it from in another requires a daemon restart #20

Open
@ItsHarper

Description

@ItsHarper

Environment information

My project has a main.ts entry point, as well as a util.ts file that it uses. util.ts imports nothing from main.ts. I'm using typescript 5.4.5 and tsimp 2.0.11, and the project is set up to be ESM-only.

Reproduction steps

  1. Run TSIMP_DIAG=error tsimp src/main.ts (should work correctly)
  2. Add the line export const greeting = "hi"; to util.ts
  3. Add these lines to main.ts:
 import { greeting } from "./util.js";
 console.log(greeting);
  1. Run TSIMP_DIAG=error tsimp src/main.ts again
    • Now I get an error: src/main.ts:10:10 - error TS2724: '"./util.js"' has no exported member 'greeting'.
  2. Run tsimp --restart
  3. Run TSIMP_DIAG=error tsimp src/main.ts a third time, and now it works again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions