Skip to content

Commit

Permalink
feat(typings): accept all HTML and React types as valid ts types
Browse files Browse the repository at this point in the history
  • Loading branch information
Heymdall committed Jun 15, 2018
1 parent da0fe47 commit e939da8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion typings/stringify-component-definition.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,13 @@ function stringifyType(type, componentName, propName, description, typeRefs) {
case 'any':
return 'any';
case 'Event':
case 'HTMLElement':
case 'Date':
case 'File':
return type.name;
default:
if (typeof type.name === 'string' && (type.name.startsWith('React.') || type.name.startsWith('HTML'))) {
return type.name;
}
return 'any' +
`/* Не нашёлся встроенный тип для типа ${JSON.stringify(type)}
* https://github.com/alfa-laboratory/library-utils/issues/new
Expand Down

0 comments on commit e939da8

Please sign in to comment.