How to each icon (for example add_12.svg.js ) generate the d.ts file with the type import(vue).DeclareComponent?
I'm writing a library of icon components and don't know how to add typescript types to the dist folder (vite-plugin-dts doesn't work).
In total, what do I want to get after the build in the dist folder:
add_12.svg.js (as it is now)
import { createElementBlock as t, openBlock as o, createElementVNode as r } from "vue";
const n = {
xmlns: "http://www.w3.org/2000/svg",
width: "12",
height: "12",
fill: "currentColor",
viewBox: "0 0 12 12"
};
function l(a, e) {
return o(), t("svg", n, e[0] || (e[0] = [
r("path", { d: "M6.75 1.75a.75.75 0 0 0-1.5 0v3.5h-3.5a.75.75 0 0 0 0 1.5h3.5v3.5a.75.75 0 0 0 1.5 0v-3.5h3.5a.75.75 0 0 0 0-1.5h-3.5v-3.5Z" }, null, -1)
]));
}
const h = { render: l };
export {
h as default,
l as render
};
add_12.svg.d.ts (what's not there now)
import type { DefineComponent } from 'vue';
declare const _default: DefineComponent;
export default _default;
How to each icon (for example add_12.svg.js ) generate the d.ts file with the type
import(vue).DeclareComponent?I'm writing a library of icon components and don't know how to add typescript types to the dist folder (vite-plugin-dts doesn't work).
In total, what do I want to get after the build in the dist folder:
add_12.svg.js (as it is now)
add_12.svg.d.ts (what's not there now)