DefinitelyTyped/types/react-radio-group/index.d.ts
Ferdy Budhidharma bc0c933415 feat(react-dependents): update to TS 2.8 (part 2 of 2) (#27744)
* feat(react-dependents): update to ts 2.8

* fix version mismatches

* remove package.json

* post merge updates

* add package.json back again
2018-08-06 06:28:42 +01:00

27 lines
1.1 KiB
TypeScript

// Type definitions for react-radio-group 3.0
// Project: https://github.com/chenglou/react-radio-group
// Definitions by: Jason Unger <https://github.com/jsonunger>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import * as React from 'react';
// Omit taken from https://github.com/Microsoft/TypeScript/issues/12215#issuecomment-311923766
export type Omit<T, K extends keyof T> = Pick<T, ({ [P in keyof T]: P } & { [P in K]: never } & { [x: string]: never, [x: number]: never })[keyof T]>;
export namespace Radio {
type RadioProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'name' | 'role' | 'type' | 'aria-checked'> & {
value: any;
};
}
export const Radio: React.ComponentClass<Radio.RadioProps>;
export namespace RadioGroup {
type RadioGroupProps = Omit<React.HTMLProps<any>, 'onChange'> & {
selectedValue?: any;
onChange?: (value: any) => void;
Component?: React.ReactType<Omit<React.HTMLProps<any>, 'onChange' | 'role'>>;
};
}
export const RadioGroup: React.ComponentClass<RadioGroup.RadioGroupProps>;