mmkal / pgkit

PostgreSQL🤝TypeScript monorepo. SQL client/admin UI/smart migrator/type generator/schema inspector
https://pgkit.dev
175 stars 24 forks source link

fix: double import if using import type #396

Closed antonmihaylov closed 2 years ago

antonmihaylov commented 2 years ago

Made a small fix for a particular use case. No breaking changes, the usual import statement is imported as it was before

What's changed

Why

If using type-only imports (especially if configured automatically with @typescript-eslint/consistent-type-imports) the types get doubled when running the generator

image
codecov-commenter commented 2 years ago

Codecov Report

Merging #396 (918081c) into master (f761e93) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #396   +/-   ##
=======================================
  Coverage   96.78%   96.78%           
=======================================
  Files          32       32           
  Lines        1151     1152    +1     
  Branches      222      218    -4     
=======================================
+ Hits         1114     1115    +1     
  Misses         33       33           
  Partials        4        4           
Impacted Files Coverage Δ
packages/typegen/src/write/inline.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f761e93...918081c. Read the comment docs.