Skip to content

Emit dts not respecting abs path #2182

@ghostdevv

Description

@ghostdevv

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcontributions welcomepull requests for this issue welcome

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions