* Allow union signatures to merge when they have differing argument counts * Accept updated baselines * Adjust comments io changed tests
26 lines
625 B
TypeScript
26 lines
625 B
TypeScript
// @jsx: react
|
|
/// <reference path="/.lib/react16.d.ts" />
|
|
|
|
import * as React from 'react';
|
|
|
|
declare const Radio: (props: {}) => React.ReactElement<{}>;
|
|
declare const OtherRadio: () => React.ReactElement<{}>;
|
|
declare const Checkbox: React.SFC;
|
|
|
|
declare const condition1: boolean;
|
|
declare const condition2: boolean;
|
|
declare const condition3: boolean;
|
|
|
|
const RandomComponent: React.SFC = () => {
|
|
const Component =
|
|
condition1
|
|
? Radio
|
|
: Checkbox;
|
|
|
|
const OtherComponent =
|
|
condition2
|
|
? OtherRadio
|
|
: Checkbox;
|
|
return condition1 ? <Component /> : <OtherComponent />;
|
|
};
|