Skip to content

Commit

Permalink
Fix typings
Browse files Browse the repository at this point in the history
  • Loading branch information
jen-huang committed Apr 8, 2020
1 parent 17a7449 commit dd7b9fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
import { validateDatasource, validationHasErrors } from './validate_datasource';

describe('Ingest Manager - validateDatasource()', () => {
const mockPackage: PackageInfo = {
const mockPackage = ({
name: 'mock-package',
title: 'Mock package',
version: '0.0.0',
Expand Down Expand Up @@ -109,7 +109,7 @@ describe('Ingest Manager - validateDatasource()', () => {
],
},
],
};
} as unknown) as PackageInfo;

const validDatasource: NewDatasource = {
name: 'datasource1-1',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export const StepConfigureDatasource: React.FunctionComponent<{
name: newValue,
});
}}
errors={validationResults.name}
errors={validationResults!.name}
forceShowErrors={submitAttempted}
/>
</EuiFlexItem>
Expand All @@ -141,7 +141,7 @@ export const StepConfigureDatasource: React.FunctionComponent<{
description: newValue,
});
}}
errors={validationResults.description}
errors={validationResults!.description}
forceShowErrors={submitAttempted}
/>
</EuiFlexItem>
Expand Down Expand Up @@ -224,7 +224,7 @@ export const StepConfigureDatasource: React.FunctionComponent<{
inputs: newInputs,
});
}}
inputValidationResults={validationResults.inputs[datasourceInput.type]}
inputValidationResults={validationResults!.inputs![datasourceInput.type]}
forceShowErrors={submitAttempted}
/>
</EuiFlexItem>
Expand Down

0 comments on commit dd7b9fd

Please sign in to comment.