Chore: Typescript no-implicit any fixes progress (#17018)

* Chore: Typescript no-implicit any fixes progress

* Fixed tests

* Updated snapshot
This commit is contained in:
Torkel Ödegaard
2019-05-12 14:15:23 +02:00
committed by GitHub
parent 813e3ffc15
commit f12d47ef52
35 changed files with 111 additions and 233 deletions

View File

@@ -55,11 +55,11 @@ export interface CommonProps<T> {
onCloseMenu?: () => void;
}
export interface SelectProps<T> {
export interface SelectProps<T> extends CommonProps<T> {
options: Array<SelectOptionItem<T>>;
}
interface AsyncProps<T> {
interface AsyncProps<T> extends CommonProps<T> {
defaultOptions: boolean;
loadOptions: (query: string) => Promise<Array<SelectOptionItem<T>>>;
loadingMessage?: () => string;
@@ -95,9 +95,8 @@ export const MenuList = (props: any) => {
);
};
export class Select<T> extends PureComponent<CommonProps<T> & SelectProps<T>> {
static defaultProps = {
width: null,
export class Select<T> extends PureComponent<SelectProps<T>> {
static defaultProps: Partial<SelectProps<any>> = {
className: '',
isDisabled: false,
isSearchable: true,
@@ -108,7 +107,7 @@ export class Select<T> extends PureComponent<CommonProps<T> & SelectProps<T>> {
isLoading: false,
backspaceRemovesValue: true,
maxMenuHeight: 300,
menuIsOpen: false,
isOpen: false,
components: {
Option: SelectOption,
SingleValue,
@@ -201,9 +200,8 @@ export class Select<T> extends PureComponent<CommonProps<T> & SelectProps<T>> {
}
}
export class AsyncSelect<T> extends PureComponent<CommonProps<T> & AsyncProps<T>> {
static defaultProps = {
width: null,
export class AsyncSelect<T> extends PureComponent<AsyncProps<T>> {
static defaultProps: Partial<AsyncProps<any>> = {
className: '',
components: {},
loadingMessage: () => 'Loading...',

View File

@@ -7,11 +7,13 @@ export interface NavModelItem {
id?: string;
active?: boolean;
hideFromTabs?: boolean;
hideFromMenu?: boolean;
divider?: boolean;
children?: NavModelItem[];
breadcrumbs?: NavModelBreadcrumb[];
target?: string;
parentItem?: NavModelItem;
showOrgSwitcher?: boolean;
}
export interface NavModel {