Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit c1b06b8

Browse files
committed
test: add a failing test for oneOfType with func and bool
1 parent 55ea29e commit c1b06b8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/es6-class.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ declare module 'component' {
1212
fontSize?: number;
1313
}
1414

15-
export type ComponentRequiredUnion = any[] | boolean;
15+
export type ComponentRequiredUnion = ((...args: any[])=>any) | boolean;
1616

1717
export interface ComponentRequiredArrayOfObjectsWithShape {
1818
color?: string;

tests/es6-class.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Component.propTypes = {
3737
requiredFunc: React.PropTypes.func.isRequired,
3838
requiredAny: React.PropTypes.any.isRequired,
3939
requiredUnion: React.PropTypes.oneOfType([
40-
React.PropTypes.array,
40+
React.PropTypes.func,
4141
React.PropTypes.bool
4242
]).isRequired,
4343
requiredArrayOf: React.PropTypes.arrayOf(React.PropTypes.string).isRequired,

0 commit comments

Comments
 (0)