[Management team] Fix the type check errors (#167133)

## Summary

This PR fixes the errors of the type checkers on some of the Management
team's plugins.

The errors were identified by running the command `node
scripts/type_check --project <path-to-tsconfig.json>` with these files
as suggested by the Operations team:

- ./packages/kbn-generate-console-definitions/tsconfig.json
- ./src/plugins/console/tsconfig.json
- ./packages/kbn-management/settings/components/field_row/tsconfig.json
This commit is contained in:
Yulia Čech 2023-09-26 18:36:46 +02:00 committed by GitHub
parent 302ec109ce
commit 090569bb45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 5 deletions

View file

@ -16,7 +16,7 @@ const IMAGE = `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAIAAADTED8
describe('ChangeImageLink', () => {
const defaultProps: ChangeImageLinkProps = {
field: {
name: 'test',
id: 'test',
type: 'image',
ariaAttributes: {
ariaLabel: 'test',

View file

@ -7,4 +7,5 @@
*/
export { FieldInputFooter, type FieldInputFooterProps } from './input_footer';
export { InputResetLink, type FieldResetLinkProps } from './reset_link';
export { InputResetLink } from './reset_link';
export type { InputResetLinkProps } from './reset_link';

View file

@ -998,12 +998,12 @@ export default function ({
) {
// will simulate autocomplete on 'GET /a/b/' with a filter by index
return {
tokenPath: context.urlTokenPath.slice(0, -1),
predicate: (term) => term.meta === 'index',
tokenPath: context.urlTokenPath?.slice(0, -1),
predicate: (term: any) => term.meta === 'index',
};
} else {
// will do nothing special
return { tokenPath: context.urlTokenPath, predicate: (term) => true };
return { tokenPath: context.urlTokenPath, predicate: () => true };
}
})();