typescript-go icon indicating copy to clipboard operation
typescript-go copied to clipboard

Missing config error for using module=none

Open RyanCavanaugh opened this issue 1 month ago • 2 comments

Steps to reproduce

a.ts

export const n = 0;

Behavior with [email protected]

D:\Throwaway\corsarepro>tsc --module none a.ts
a.ts:1:1 - error TS1148: Cannot use imports, exports, or module augmentations when '--module' is 'none'.

1 export const n = 0;
  ~~~~~~~~~~~~~~~~~~~


Found 1 error in a.ts:1

Behavior with tsgo

D:\Throwaway\corsarepro>tsgo --module none a.ts

D:\Throwaway\corsarepro>

Note: For some reason, I can't repro this in Strada using a tsconfig.json file. Unclear what's going on - probably merits more investigation

RyanCavanaugh avatar Nov 13 '25 23:11 RyanCavanaugh

none should be deprecated, right? in Corsa we use that as the "unset" value (not good).

jakebailey avatar Nov 13 '25 23:11 jakebailey

Found the Strada bug, which explains why Corsa is matching it https://github.com/microsoft/TypeScript/issues/39603

I don't recall discussing deprecating it

RyanCavanaugh avatar Nov 13 '25 23:11 RyanCavanaugh