Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partial type imports does not work #330

Closed
ottoville opened this issue Oct 30, 2022 · 4 comments · Fixed by #321
Closed

Partial type imports does not work #330

ottoville opened this issue Oct 30, 2022 · 4 comments · Fixed by #321
Labels
bug core dependency tree generation
Milestone

Comments

@ottoville
Copy link

ottoville commented Oct 30, 2022

When typescript file has import with this style

import { getResponse, type APIResponseType} from "./api";
Magde will not resolve any dependencies, running with --debug will print this error

  tree error getting dependencies: ',' expected. +30ms
  tree TSError: ',' expected.
@vikingair
Copy link
Collaborator

@kamiazya might this be fixed with V6 release?

@PabloLION PabloLION added bug core dependency tree generation labels Jan 28, 2023
@PabloLION
Copy link
Collaborator

I had the same issue and my work around was to split the line like this

import { getResponse } from "./api"; 
import type { APIResponseType } from "./api"; 

@kamiazya kamiazya added this to the 6.0.0 milestone Jan 28, 2023
@kamiazya
Copy link
Collaborator

@fdc-viktor-luft cc @PabloLION
Thank you!

madge v6 will update detective-typescript to 9.0.0, and it's depends on typescript@^4.5.5.

Type-Only Imports and Export syntax is implemented in [email protected].

So this issue will be resolved.

@kamiazya
Copy link
Collaborator

resolved in #321

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug core dependency tree generation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants