Skip to content

Commit

Permalink
Fix vue TS declarations
Browse files Browse the repository at this point in the history
The declarations generated by tailwindlabs#254 aren't correct, leading to tsc errors as
seen in tailwindlabs#318.
  • Loading branch information
zmwangx committed Aug 1, 2021
1 parent 29bfad1 commit 8c6bd52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,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`
: `export default import("vue").DefineComponent;`
: `import { DefineComponent } from 'vue';\ndeclare const ${componentName}: DefineComponent;\nexport default ${componentName};\n`

return [
fs.writeFile(`${outDir}/${componentName}.js`, content, 'utf8'),
Expand Down

0 comments on commit 8c6bd52

Please sign in to comment.