Skip to content

Commit

Permalink
Fix vue TypeScript declarations. (#608)
Browse files Browse the repository at this point in the history
  • Loading branch information
TiBianMod committed Feb 24, 2022
1 parent 63fa47e commit 7134b92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/build.js
Expand Up @@ -94,7 +94,7 @@ async function buildIcons(package, style, format) {
let types =
package === 'react'
? `import * as React from 'react';\ndeclare function ${componentName}(props: React.ComponentProps<'svg'>): JSX.Element;\nexport default ${componentName};\n`
: `import { RenderFunction } from 'vue';\ndeclare const ${componentName}: RenderFunction;\nexport default ${componentName};\n`
: `import type { FunctionalComponent, HTMLAttributes, VNodeProps } from 'vue';\ndeclare const ${componentName}: FunctionalComponent<HTMLAttributes & VNodeProps>;\nexport default ${componentName};\n`

return [
ensureWrite(`${outDir}/${componentName}.js`, content),
Expand Down

0 comments on commit 7134b92

Please sign in to comment.