Andrew Branch
Andrew Branch
@sandersn, can you help parse the multiple issues here?
I know there’s some `rootDirs` stuff in module specifier generation (`src/compiler/moduleSpecifiers.ts`) but I think test coverage of the option is pretty poor for language service code, so this might just...
@nicolo-ribaudo not sure I follow; `export type * from "..."` wouldn’t somehow eliminate the empty CJS module that only exported types, right?
I’m planning to investigate implementing this in the release after 4.9.
> I'd like to be able to export all types in one statement Just to be clear, `export type * from "./gen/client"` would not just export all the types. It...
Yes, that’s the right way to think about it. The only downside I can think of is that you’ll see the values in named import completions. It doesn’t sound like...
> And if the latter, is that actually a deliberate choice, or was it just a fallout from how things are implemented? The first draft of type-only imports filtered symbols...
The correctness of any declaration is determined by the implementation file it types, so you can’t answer that question without looking at the `.cjs` file.
I’m still not sure the question totally makes sense—to ask whether any declaration file should use this or that syntax is just to ask what syntax exists in its implementation...
Because the `.cjs` file says `module.exports = Foo`, `export = Foo` would be correct for the `.d.cts` file, as it sounds like you’ve figured out already. (The reason I couldn’t...