chore: make TS happy

This commit is contained in:
Roman Hotsiy 2018-02-07 23:21:18 +02:00
parent 7ed5bc1573
commit b95f665526
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0
3 changed files with 4 additions and 4 deletions

View File

@ -26,10 +26,10 @@ export const AnimatedChevronButton = ({ open }: { open: boolean }) => {
}; };
// adapted from reactjs.org // adapted from reactjs.org
const ChevronSvg = ({ size = 10, className = '', style = {} }) => ( const ChevronSvg = ({ size = 10, className = '', style }) => (
<svg <svg
className={className} className={className}
style={style} style={style || {}}
viewBox="0 0 926.23699 573.74994" viewBox="0 0 926.23699 573.74994"
version="1.1" version="1.1"
x="0px" x="0px"

View File

@ -1,5 +1,5 @@
import { bind } from 'decko'; import { bind } from 'decko';
import { EventEmitter } from 'eventemitter3'; import * as EventEmitter from 'eventemitter3';
import { isBrowser, querySelector, Throttle } from '../utils'; import { isBrowser, querySelector, Throttle } from '../utils';
import { RedocNormalizedOptions } from './RedocNormalizedOptions'; import { RedocNormalizedOptions } from './RedocNormalizedOptions';

View File

@ -47,7 +47,7 @@ export function flattenByProp<T extends object, P extends keyof T>(
for (const item of items) { for (const item of items) {
res.push(item); res.push(item);
if (item[prop]) { if (item[prop]) {
iterate(item[prop]); iterate((item[prop] as any) as T[]);
} }
} }
}; };