mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* feat(react-dependents): update to ts 2.8 * fix version mismatches * remove package.json * post merge updates * add package.json back again
27 lines
1.1 KiB
TypeScript
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>;
|