Skip to content

Commit

Permalink
Use type casting instead of recurring to any
Browse files Browse the repository at this point in the history
  • Loading branch information
sabarasaba committed May 11, 2021
1 parent 3e25668 commit 36bb550
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const fieldsConfig: FieldsConfig = {
},
};

type Props = Partial<FieldConfig<any>>;
type Props = Partial<FieldConfig>;

export const IgnoreMissingField: FunctionComponent<Props> = (props) => (
<UseField
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
import React, { FunctionComponent } from 'react';
import { i18n } from '@kbn/i18n';

import { from } from './shared';
import { FieldNameField } from './common_fields/field_name_field';
import { TargetField } from './common_fields/target_field';
import { IgnoreMissingField } from './common_fields/ignore_missing_field';
import { from } from './shared';
import { SerializerFunc } from '../../../../../../shared_imports';

export const RegisteredDomain: FunctionComponent = () => {
return (
Expand All @@ -25,7 +26,7 @@ export const RegisteredDomain: FunctionComponent = () => {

<TargetField />

<IgnoreMissingField defaultValue={true} serializer={from.undefinedIfValue(true)} />
<IgnoreMissingField defaultValue={true} serializer={from.undefinedIfValue(true) as SerializerFunc<boolean>} />
</>
);
};
1 change: 1 addition & 0 deletions x-pack/plugins/ingest_pipelines/public/shared_imports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export {
ValidationConfig,
useFormData,
FormOptions,
SerializerFunc,
} from '../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib';

export {
Expand Down

0 comments on commit 36bb550

Please sign in to comment.