Skip to content

Commit

Permalink
fix(react-grid): correct types for components (#902)
Browse files Browse the repository at this point in the history
  • Loading branch information
gsobolev committed Apr 10, 2018
1 parent aaa2c4c commit 3666b7e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/ts-generator.js
Expand Up @@ -166,7 +166,8 @@ const getThemesTypeScript = (data, componentName) => {
+ getFormattedLine(line)
.replace(/\w+\.(\w+:\s)(.+);/, '$1React.ComponentType<$2>;')
.replace(`${componentName}.`, `${componentName}Base.`)
.replace('Table.', 'TableBase.'), '');
.replace('Table.', 'TableBase.'), '')
.replace(/(\w+: React\.ComponentType<.*)>/g, '$1 & { [x: string]: any }>');

return 'import {\n'
+ ` ${componentName} as ${componentName}Base,\n`
Expand Down

0 comments on commit 3666b7e

Please sign in to comment.