unplugin / unplugin-auto-import

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

Improve clarity in the documentation. #521

Closed TianYa-Q closed 3 months ago

TianYa-Q commented 3 months ago

Describe the bug

    AutoImport({
      imports: [
        "vue",
        {
          "lodash-es": [["*", "_"]],
        },
      ],
    }),

The documentation only uses default to include one module, but this causes TypeScript to infer its type as any. Using * can fix this problem. I hope we can include this example in the documentation. Thanks a lot. Maybe this is the problem of my TypeScript🥸

Find a solution to deal it https://github.com/unplugin/unplugin-auto-import/issues/162#issuecomment-1128461108

Reproduction

None

System Info

None

Used Package Manager

npm

Validations