Emit dts not respecting abs path

#2182

Issue

Open
G
ghostdevv
Oct 17, 2023, 2:14 AM

Describe the bug

When I use emitDts with an absolute path, and I am in a subfolder from my project it weirdly saves it to a path like this: /workspace/extractinator/workspace/extractinator/.temp

await emitDts({
	svelteShimsPath: require.resolve('svelte2tsx/svelte-shims-v4.d.ts'),
	declarationDir: '/workspace/extractinator/.temp',
	libRoot: '/workspace/extractinator/playground',
})

Reproduction

I can provide a repo if this isn't just user error or expected - which I worry it is

Expected behaviour

It to save it at the given path

System Info

  • OS: ubuntu docker
  • IDE: vscode

Which package is the issue about?

svelte2tsx

Additional Information, eg. Screenshots

No response

Info

Assignees None
Labels bug, contributions welcome
Milestone None