unplugin / unplugin-auto-import

Auto import APIs on-demand for Vite, Webpack and Rollup
MIT License
3.21k stars 195 forks source link

How to use interface and type? #249

Closed shuyuTech closed 2 years ago

shuyuTech commented 2 years ago

Describe the bug

export interface Test1 {
  name: string;
}
export type Test2 = {
  name: string;
}

How to use interface and type?

Reproduction

none

System Info

System:
    OS: Linux 5.16 Fedora Linux 35 (Workstation Edition)
    CPU: (6) x64 Intel(R) Core(TM) i5-9400F CPU @ 2.90GHz
    Memory: 13.52 GB / 31.28 GB
    Container: Yes
    Shell: 5.1.8 - /bin/bash
  Binaries:
    Node: 16.15.1 - /usr/local/bin/node
    Yarn: 1.22.10 - /usr/bin/yarn
    npm: 8.11.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 100.0.4896.127
    Firefox: 99.0.1

Used Package Manager

pnpm

Validations

shuyuTech commented 2 years ago

I want 'interface' and 'type' to be exported in 'auto import. D.ts' like' class'

shuyuTech commented 2 years ago

What should I do?

antfu commented 2 years ago

Duplicated https://github.com/antfu/unplugin-auto-import/issues/61