[chore] TS 3.9: convert ts-ignore to ts-expect-error (#69541)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
Clint Andrew Hall 2020-06-23 14:13:21 -05:00 committed by GitHub
parent 29714aa614
commit f3fbf31f3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
98 changed files with 164 additions and 220 deletions

View file

@ -10,7 +10,7 @@ import {
Style,
ExpressionFunctionDefinition,
} from 'src/plugins/expressions/common';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { Handlebars } from '../../../common/lib/handlebars';
import { getFunctionHelp } from '../../../i18n';

View file

@ -59,25 +59,25 @@ export function compare(): ExpressionFunctionDefinition<'compare', Context, Argu
return a !== b;
case Operation.LT:
if (typesMatch) {
// @ts-ignore #35433 This is a wonky comparison for nulls
// @ts-expect-error #35433 This is a wonky comparison for nulls
return a < b;
}
return false;
case Operation.LTE:
if (typesMatch) {
// @ts-ignore #35433 This is a wonky comparison for nulls
// @ts-expect-error #35433 This is a wonky comparison for nulls
return a <= b;
}
return false;
case Operation.GT:
if (typesMatch) {
// @ts-ignore #35433 This is a wonky comparison for nulls
// @ts-expect-error #35433 This is a wonky comparison for nulls
return a > b;
}
return false;
case Operation.GTE:
if (typesMatch) {
// @ts-ignore #35433 This is a wonky comparison for nulls
// @ts-expect-error #35433 This is a wonky comparison for nulls
return a >= b;
}
return false;

View file

@ -6,7 +6,7 @@
import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common';
import { ContainerStyle, Overflow, BackgroundRepeat, BackgroundSize } from '../../../types';
import { getFunctionHelp, getFunctionErrors } from '../../../i18n';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { isValidUrl } from '../../../common/lib/url';
interface Output extends ContainerStyle {

View file

@ -6,9 +6,9 @@
import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common';
import { getFunctionHelp, getFunctionErrors } from '../../../i18n';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { resolveWithMissingImage } from '../../../common/lib/resolve_dataurl';
// @ts-ignore .png file
// @ts-expect-error .png file
import { elasticLogo } from '../../lib/elastic_logo';
export enum ImageMode {

View file

@ -4,9 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/
// @ts-ignore no @typed def; Elastic library
// @ts-expect-error no @typed def; Elastic library
import { evaluate } from 'tinymath';
// @ts-ignore untyped local
import { pivotObjectArray } from '../../../common/lib/pivot_object_array';
import { Datatable, isDatatable, ExpressionFunctionDefinition } from '../../../types';
import { getFunctionHelp, getFunctionErrors } from '../../../i18n';

View file

@ -5,7 +5,7 @@
*/
import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { palettes } from '../../../common/lib/palettes';
import { getFunctionHelp } from '../../../i18n';

View file

@ -5,11 +5,11 @@
*/
import { get, map, groupBy } from 'lodash';
// @ts-ignore lodash.keyby imports invalid member from @types/lodash
// @ts-expect-error lodash.keyby imports invalid member from @types/lodash
import keyBy from 'lodash.keyby';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { getColorsFromPalette } from '../../../common/lib/get_colors_from_palette';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { getLegendConfig } from '../../../common/lib/get_legend_config';
import { getFunctionHelp } from '../../../i18n';
import {

View file

@ -4,13 +4,13 @@
* you may not use this file except in compliance with the Elastic License.
*/
// @ts-ignore no @typed def
// @ts-expect-error no @typed def
import keyBy from 'lodash.keyby';
import { groupBy, get, set, map, sortBy } from 'lodash';
import { ExpressionFunctionDefinition, Style } from 'src/plugins/expressions';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { getColorsFromPalette } from '../../../../common/lib/get_colors_from_palette';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { getLegendConfig } from '../../../../common/lib/get_legend_config';
import { getFlotAxisConfig } from './get_flot_axis_config';
import { getFontSpec } from './get_font_spec';

View file

@ -7,7 +7,6 @@
import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common';
import { Render, ContainerStyle } from '../../../types';
import { getFunctionHelp } from '../../../i18n';
// @ts-ignore unconverted local file
import { DEFAULT_ELEMENT_CSS } from '../../../common/lib/constants';
interface ContainerStyleArgument extends ContainerStyle {

View file

@ -5,9 +5,9 @@
*/
import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { resolveWithMissingImage } from '../../../common/lib/resolve_dataurl';
// @ts-ignore .png file
// @ts-expect-error .png file
import { elasticOutline } from '../../lib/elastic_outline';
import { Render } from '../../../types';
import { getFunctionHelp } from '../../../i18n';

View file

@ -5,9 +5,9 @@
*/
import { ExpressionFunctionDefinition, ExpressionValueRender } from 'src/plugins/expressions';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { resolveWithMissingImage } from '../../../common/lib/resolve_dataurl';
// @ts-ignore .png file
// @ts-expect-error .png file
import { elasticOutline } from '../../lib/elastic_outline';
import { getFunctionHelp, getFunctionErrors } from '../../../i18n';

View file

@ -78,7 +78,7 @@ export function savedVisualization(): ExpressionFunctionDefinition<
}
if (hideLegend === true) {
// @ts-ignore LegendOpen missing on VisualizeInput
// @ts-expect-error LegendOpen missing on VisualizeInput
visOptions.legendOpen = false;
}

View file

@ -4,7 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
// @ts-ignore untyped Elastic library
import { getType } from '@kbn/interpreter/common';
import {
ExpressionFunctionDefinition,

View file

@ -6,7 +6,7 @@
import { sortBy } from 'lodash';
import { ExpressionFunctionDefinition } from 'src/plugins/expressions';
// @ts-ignore unconverted lib file
// @ts-expect-error unconverted lib file
import { queryDatatable } from '../../../../common/lib/datatable/query';
import { DemoRows } from './demo_rows_types';
import { getDemoRows } from './get_demo_rows';

View file

@ -9,7 +9,7 @@ import {
ExpressionValueFilter,
} from 'src/plugins/expressions/common';
/* eslint-disable */
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { buildESRequest } from '../../../server/lib/build_es_request';
/* eslint-enable */
import { getFunctionHelp } from '../../../i18n';

View file

@ -7,7 +7,7 @@
import squel from 'squel';
import { ExpressionFunctionDefinition } from 'src/plugins/expressions';
/* eslint-disable */
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { queryEsSQL } from '../../../server/lib/query_es_sql';
/* eslint-enable */
import { ExpressionValueFilter } from '../../../types';

View file

@ -6,7 +6,7 @@
import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common';
/* eslint-disable */
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { queryEsSQL } from '../../../server/lib/query_es_sql';
/* eslint-enable */
import { ExpressionValueFilter } from '../../../types';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
// @ts-ignore untyped library
// @ts-expect-error untyped library
import { parse } from 'tinymath';
import { getFieldNames } from './pointseries/lib/get_field_names';

View file

@ -4,9 +4,9 @@
* you may not use this file except in compliance with the Elastic License.
*/
// @ts-ignore Untyped library
// @ts-expect-error untyped library
import uniqBy from 'lodash.uniqby';
// @ts-ignore Untyped Elastic library
// @ts-expect-error untyped Elastic library
import { evaluate } from 'tinymath';
import { groupBy, zipObject, omit } from 'lodash';
import moment from 'moment';
@ -18,13 +18,10 @@ import {
PointSeriesColumnName,
PointSeriesColumns,
} from 'src/plugins/expressions/common';
// @ts-ignore Untyped local
import { pivotObjectArray } from '../../../../common/lib/pivot_object_array';
// @ts-ignore Untyped local
import { unquoteString } from '../../../../common/lib/unquote_string';
// @ts-ignore Untyped local
import { isColumnReference } from './lib/is_column_reference';
// @ts-ignore Untyped local
// @ts-expect-error untyped local
import { getExpressionType } from './lib/get_expression_type';
import { getFunctionHelp, getFunctionErrors } from '../../../../i18n';
@ -125,7 +122,7 @@ export function pointseries(): ExpressionFunctionDefinition<
col.role = 'measure';
}
// @ts-ignore untyped local: get_expression_type
// @ts-expect-error untyped local: get_expression_type
columns[argName] = col;
}
});

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
// @ts-ignore Untyped Library
// @ts-expect-error untyped library
import { parse } from 'tinymath';
export function isColumnReference(mathExpression: string | null): boolean {

View file

@ -12,17 +12,16 @@ import { Start as InspectorStart } from '../../../../src/plugins/inspector/publi
import { functions } from './functions/browser';
import { typeFunctions } from './expression_types';
// @ts-ignore: untyped local
// @ts-expect-error: untyped local
import { renderFunctions, renderFunctionFactories } from './renderers';
import { initializeElements } from './elements';
// @ts-ignore Untyped Local
// @ts-expect-error untyped local
import { transformSpecs } from './uis/transforms';
// @ts-ignore Untyped Local
// @ts-expect-error untyped local
import { datasourceSpecs } from './uis/datasources';
// @ts-ignore Untyped Local
// @ts-expect-error untyped local
import { modelSpecs } from './uis/models';
import { initializeViews } from './uis/views';
// @ts-ignore Untyped Local
import { initializeArgs } from './uis/arguments';
import { tagSpecs } from './uis/tags';
import { templateSpecs } from './templates';

View file

@ -26,7 +26,7 @@ export function toExpression(input: VisualizeInput): string {
.reduce((_, part) => expressionParts.push(part), 0);
}
// @ts-ignore LegendOpen missing on VisualizeInput type
// @ts-expect-error LegendOpen missing on VisualizeInput type
if (input.vis?.legendOpen !== undefined && input.vis.legendOpen === false) {
expressionParts.push(`hideLegend=true`);
}

View file

@ -7,7 +7,6 @@
import { compose, withProps } from 'recompose';
import moment from 'moment';
import { DateFormatArgInput as Component, Props as ComponentProps } from './date_format';
// @ts-ignore untyped local lib
import { templateFromReactComponent } from '../../../../public/lib/template_from_react_component';
import { ArgumentFactory } from '../../../../types/arguments';
import { ArgumentStrings } from '../../../../i18n';

View file

@ -5,31 +5,31 @@
*/
import { axisConfig } from './axis_config';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { datacolumn } from './datacolumn';
import { dateFormatInitializer } from './date_format';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { filterGroup } from './filter_group';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { imageUpload } from './image_upload';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { number } from './number';
import { numberFormatInitializer } from './number_format';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { palette } from './palette';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { percentage } from './percentage';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { range } from './range';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { select } from './select';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { shape } from './shape';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { string } from './string';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { textarea } from './textarea';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { toggle } from './toggle';
import { SetupInitializer } from '../../plugin';

View file

@ -6,7 +6,6 @@
import { compose, withProps } from 'recompose';
import { NumberFormatArgInput as Component, Props as ComponentProps } from './number_format';
// @ts-ignore untyped local lib
import { templateFromReactComponent } from '../../../../public/lib/template_from_react_component';
import { ArgumentFactory } from '../../../../types/arguments';
import { ArgumentStrings } from '../../../../i18n';

View file

@ -4,33 +4,32 @@
* you may not use this file except in compliance with the Elastic License.
*/
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { dropdownControl } from './dropdownControl';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { getCell } from './getCell';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { image } from './image';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { markdown } from './markdown';
// @ts-ignore untyped local
import { metricInitializer } from './metric';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { pie } from './pie';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { plot } from './plot';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { progress } from './progress';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { repeatImage } from './repeatImage';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { revealImage } from './revealImage';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { render } from './render';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { shape } from './shape';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { table } from './table';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { timefilterControl } from './timefilterControl';
import { SetupInitializer } from '../../plugin';

View file

@ -5,7 +5,7 @@
*/
import { uniq } from 'lodash';
// @ts-ignore Untyped Library
// @ts-expect-error untyped library
import { parse } from '@kbn/interpreter/common';
import {
ExpressionAstExpression,

View file

@ -6,7 +6,7 @@
import { fromByteArray } from 'base64-js';
// @ts-ignore @types/mime doesn't resolve mime/lite for some reason.
// @ts-expect-error @types/mime doesn't resolve mime/lite for some reason.
import mime from 'mime/lite';
const dataurlRegex = /^data:([a-z]+\/[a-z0-9-+.]+)(;[a-z-]+=[a-z0-9-]+)?(;([a-z0-9]+))?,/;

View file

@ -4,39 +4,33 @@
* you may not use this file except in compliance with the Elastic License.
*/
// @ts-ignore missing local definition
// @ts-expect-error missing local definition
export * from './datatable';
// @ts-ignore missing local definition
export * from './autocomplete';
export * from './constants';
export * from './dataurl';
// @ts-ignore missing local definition
// @ts-expect-error missing local definition
export * from './errors';
// @ts-ignore missing local definition
// @ts-expect-error missing local definition
export * from './expression_form_handlers';
// @ts-ignore missing local definition
export * from './fetch';
export * from './fonts';
// @ts-ignore missing local definition
// @ts-expect-error missing local definition
export * from './get_colors_from_palette';
// @ts-ignore missing local definition
export * from './get_field_type';
// @ts-ignore missing local definition
// @ts-expect-error missing local definition
export * from './get_legend_config';
// @ts-ignore missing local definition
// @ts-expect-error missing local definition
export * from './handlebars';
export * from './hex_to_rgb';
// @ts-ignore missing local definition
export * from './httpurl';
// @ts-ignore missing local definition
// @ts-expect-error missing local definition
export * from './missing_asset';
// @ts-ignore missing local definition
// @ts-expect-error missing local definition
export * from './palettes';
// @ts-ignore missing local definition
export * from './pivot_object_array';
// @ts-ignore missing local definition
// @ts-expect-error missing local definition
export * from './resolve_dataurl';
// @ts-ignore missing local definition
export * from './unquote_string';
// @ts-ignore missing local definition
// @ts-expect-error missing local definition
export * from './url';

View file

@ -55,7 +55,7 @@ describe('pivotObjectArray', () => {
});
it('throws when given an invalid column list', () => {
// @ts-ignore testing potential calls from legacy code that should throw
// @ts-expect-error testing potential calls from legacy code that should throw
const check = () => pivotObjectArray(rows, [{ name: 'price' }, { name: 'missing' }]);
expect(check).toThrowError('Columns should be an array of strings');
});

View file

@ -15,14 +15,14 @@ import { BehaviorSubject } from 'rxjs';
import { AppMountParameters, CoreStart, CoreSetup, AppUpdater } from 'kibana/public';
import { CanvasStartDeps, CanvasSetupDeps } from './plugin';
// @ts-ignore Untyped local
// @ts-expect-error untyped local
import { App } from './components/app';
import { KibanaContextProvider } from '../../../../src/plugins/kibana_react/public';
import { registerLanguage } from './lib/monaco_language_def';
import { SetupRegistries } from './plugin_api';
import { initRegistries, populateRegistries, destroyRegistries } from './registries';
import { getDocumentationLinks } from './lib/documentation_links';
// @ts-ignore untyped component
// @ts-expect-error untyped component
import { HelpMenu } from './components/help_menu/help_menu';
import { createStore } from './store';
@ -32,12 +32,12 @@ import { init as initStatsReporter } from './lib/ui_metric';
import { CapabilitiesStrings } from '../i18n';
import { startServices, services } from './services';
// @ts-ignore Untyped local
// @ts-expect-error untyped local
import { createHistory, destroyHistory } from './lib/history_provider';
// @ts-ignore Untyped local
// @ts-expect-error untyped local
import { stopRouter } from './lib/router_provider';
import { initFunctions } from './functions';
// @ts-ignore Untyped local
// @ts-expect-error untyped local
import { appUnload } from './state/actions/app';
import './style/index.scss';

View file

@ -6,7 +6,7 @@
import React from 'react';
import { mount } from 'enzyme';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { ExportApp } from '../export_app';
jest.mock('style-it', () => ({

View file

@ -6,11 +6,8 @@
import React, { useState, useEffect } from 'react';
import { connect, ConnectedProps } from 'react-redux';
// @ts-ignore: Local Untyped
import { trackCanvasUiMetric, METRIC_TYPE } from '../../../lib/ui_metric';
// @ts-ignore: Local Untyped
import { getElementCounts } from '../../../state/selectors/workpad';
// @ts-ignore: Local Untyped
import { getArgs } from '../../../state/selectors/resolved_args';
const WorkpadLoadedMetric = 'workpad-loaded';

View file

@ -7,11 +7,11 @@
import React from 'react';
import PropTypes from 'prop-types';
import { EuiButtonIcon } from '@elastic/eui';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { Popover, PopoverChildrenProps } from '../popover';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { ArgAdd } from '../arg_add';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { Arg } from '../../expression_types/arg';
import { ComponentStrings } from '../../../i18n';

View file

@ -7,7 +7,6 @@ import {
EuiButtonIcon,
EuiFlexGroup,
EuiFlexItem,
// @ts-ignore (elastic/eui#1262) EuiImage is not exported yet
EuiImage,
EuiPanel,
EuiSpacer,

View file

@ -6,7 +6,6 @@
import {
EuiButton,
EuiEmptyPrompt,
// @ts-ignore (elastic/eui#1557) EuiFilePicker is not exported yet
EuiFilePicker,
EuiFlexGrid,
EuiFlexGroup,
@ -27,7 +26,6 @@ import React, { FunctionComponent } from 'react';
import { ComponentStrings } from '../../../i18n';
// @ts-ignore
import { ASSET_MAX_SIZE } from '../../../common/lib/constants';
import { Loading } from '../loading';
import { Asset } from './asset';

View file

@ -9,16 +9,16 @@ import { compose, withProps } from 'recompose';
import { set, get } from 'lodash';
import { fromExpression, toExpression } from '@kbn/interpreter/common';
import { getAssets } from '../../state/selectors/assets';
// @ts-ignore Untyped local
// @ts-expect-error untyped local
import { removeAsset, createAsset } from '../../state/actions/assets';
// @ts-ignore Untyped local
// @ts-expect-error untyped local
import { elementsRegistry } from '../../lib/elements_registry';
// @ts-ignore Untyped local
// @ts-expect-error untyped local
import { addElement } from '../../state/actions/elements';
import { getSelectedPage } from '../../state/selectors/workpad';
import { encode } from '../../../common/lib/dataurl';
import { getId } from '../../lib/get_id';
// @ts-ignore Untyped Local
// @ts-expect-error untyped local
import { findExistingAsset } from '../../lib/find_existing_asset';
import { VALID_IMAGE_TYPES } from '../../../common/lib/constants';
import { withKibana } from '../../../../../../src/plugins/kibana_react/public';

View file

@ -6,14 +6,7 @@
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import {
EuiFlexGrid,
EuiFlexItem,
EuiLink,
// @ts-ignore (elastic/eui#1557) EuiImage is not exported yet
EuiImage,
EuiIcon,
} from '@elastic/eui';
import { EuiFlexGrid, EuiFlexItem, EuiLink, EuiImage, EuiIcon } from '@elastic/eui';
import { CanvasAsset } from '../../../types';

View file

@ -12,7 +12,6 @@ import {
EuiButton,
EuiButtonEmpty,
EuiFieldText,
// @ts-ignore hasn't been converted to TypeScript yet
EuiFilePicker,
EuiFlexGroup,
EuiFlexItem,
@ -27,7 +26,6 @@ import {
EuiTextArea,
EuiTitle,
} from '@elastic/eui';
// @ts-ignore converting /libs/constants to TS breaks CI
import { VALID_IMAGE_TYPES } from '../../../common/lib/constants';
import { encode } from '../../../common/lib/dataurl';
import { ElementCard } from '../element_card';

View file

@ -10,7 +10,7 @@ import { compose } from 'recompose';
import { connect } from 'react-redux';
import { Dispatch } from 'redux';
import { AddEmbeddableFlyout, Props } from './flyout';
// @ts-ignore Untyped Local
// @ts-expect-error untyped local
import { addElement } from '../../state/actions/elements';
import { getSelectedPage } from '../../state/selectors/workpad';
import { EmbeddableTypes } from '../../../canvas_plugin_src/expression_types/embeddable';

View file

@ -4,7 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
// @ts-ignore (elastic/eui#1262) EuiFilePicker is not exported yet
import { EuiFilePicker } from '@elastic/eui';
import PropTypes from 'prop-types';
import React, { FunctionComponent } from 'react';

View file

@ -4,7 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
// @ts-ignore (elastic/eui#1262) EuiSuperSelect is not exported yet
import { EuiSuperSelect } from '@elastic/eui';
import PropTypes from 'prop-types';
import React, { FunctionComponent } from 'react';

View file

@ -5,14 +5,14 @@
*/
import { connect } from 'react-redux';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { setFullscreen } from '../../state/actions/transient';
import {
enableAutoplay,
setRefreshInterval,
setAutoplayInterval,
} from '../../state/actions/workpad';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { Router as Component } from './router';
import { State } from '../../../types';

View file

@ -8,14 +8,13 @@ import { connect } from 'react-redux';
import { Dispatch } from 'redux';
import { compose, withState } from 'recompose';
import { camelCase } from 'lodash';
// @ts-ignore Untyped local
import { cloneSubgraphs } from '../../lib/clone_subgraphs';
import * as customElementService from '../../lib/custom_element_service';
import { withKibana } from '../../../../../../src/plugins/kibana_react/public';
import { WithKibanaProps } from '../../';
// @ts-ignore Untyped local
// @ts-expect-error untyped local
import { selectToplevelNodes } from '../../state/actions/transient';
// @ts-ignore Untyped local
// @ts-expect-error untyped local
import { insertNodes } from '../../state/actions/elements';
import { getSelectedPage } from '../../state/selectors/workpad';
import { trackCanvasUiMetric, METRIC_TYPE } from '../../lib/ui_metric';

View file

@ -7,9 +7,9 @@
import React, { FunctionComponent } from 'react';
import PropTypes from 'prop-types';
import { EuiTabbedContent } from '@elastic/eui';
// @ts-ignore unconverted component
// @ts-expect-error unconverted component
import { Datasource } from '../../datasource';
// @ts-ignore unconverted component
// @ts-expect-error unconverted component
import { FunctionFormList } from '../../function_form_list';
import { PositionedElement } from '../../../../types';
import { ComponentStrings } from '../../../../i18n';

View file

@ -5,13 +5,12 @@
*/
import React, { Fragment, FunctionComponent } from 'react';
// @ts-ignore unconverted component
// @ts-expect-error unconverted component
import { ElementConfig } from '../element_config';
// @ts-ignore unconverted component
// @ts-expect-error unconverted component
import { PageConfig } from '../page_config';
// @ts-ignore unconverted component
import { WorkpadConfig } from '../workpad_config';
// @ts-ignore unconverted component
// @ts-expect-error unconverted component
import { SidebarSection } from './sidebar_section';
export const GlobalConfig: FunctionComponent = () => (

View file

@ -5,7 +5,7 @@
*/
import React, { FunctionComponent } from 'react';
// @ts-ignore unconverted component
// @ts-expect-error unconverted component
import { SidebarContent } from './sidebar_content';
interface Props {

View file

@ -20,13 +20,13 @@ import { CanvasElement } from '../../../types';
import { ComponentStrings } from '../../../i18n';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { Navbar } from '../navbar';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { WorkpadManager } from '../workpad_manager';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { PageManager } from '../page_manager';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { Expression } from '../expression';
import { Tray } from './tray';

View file

@ -9,17 +9,17 @@ import { compose, withHandlers, withProps } from 'recompose';
import { Dispatch } from 'redux';
import { State, PositionedElement } from '../../../../types';
import { getClipboardData } from '../../../lib/clipboard';
// @ts-ignore Untyped local
// @ts-expect-error untyped local
import { flatten } from '../../../lib/aeroelastic/functional';
// @ts-ignore Untyped local
// @ts-expect-error untyped local
import { globalStateUpdater } from '../../workpad_page/integration_utils';
// @ts-ignore Untyped local
// @ts-expect-error untyped local
import { crawlTree } from '../../workpad_page/integration_utils';
// @ts-ignore Untyped local
// @ts-expect-error untyped local
import { insertNodes, elementLayer, removeElements } from '../../../state/actions/elements';
// @ts-ignore Untyped local
// @ts-expect-error untyped local
import { undoHistory, redoHistory } from '../../../state/actions/history';
// @ts-ignore Untyped local
// @ts-expect-error untyped local
import { selectToplevelNodes } from '../../../state/actions/transient';
import {
getSelectedPage,

View file

@ -19,7 +19,6 @@ import { ElementSpec } from '../../../../types';
import { flattenPanelTree } from '../../../lib/flatten_panel_tree';
import { getId } from '../../../lib/get_id';
import { Popover, ClosePopoverFn } from '../../popover';
// @ts-ignore Untyped local
import { AssetManager } from '../../asset_manager';
import { SavedElementsModal } from '../../saved_elements_modal';

View file

@ -10,10 +10,10 @@ import { compose, withProps } from 'recompose';
import { Dispatch } from 'redux';
import { withKibana } from '../../../../../../../src/plugins/kibana_react/public/';
import { State, ElementSpec } from '../../../../types';
// @ts-ignore Untyped local
// @ts-expect-error untyped local
import { elementsRegistry } from '../../../lib/elements_registry';
import { ElementMenu as Component, Props as ComponentProps } from './element_menu';
// @ts-ignore Untyped local
// @ts-expect-error untyped local
import { addElement } from '../../../state/actions/elements';
import { getSelectedPage } from '../../../state/selectors/workpad';
import { AddEmbeddablePanel } from '../../embeddable_flyout';

View file

@ -6,7 +6,7 @@
import React, { ReactNode, KeyboardEvent } from 'react';
import PropTypes from 'prop-types';
// @ts-ignore no @types definition
// @ts-expect-error no @types definition
import { Shortcuts } from 'react-shortcuts';
import { isTextInput } from '../../../lib/is_text_input';

View file

@ -6,11 +6,8 @@
import { connect } from 'react-redux';
import { Dispatch } from 'redux';
// @ts-ignore untyped local
import { canUserWrite } from '../../state/selectors/app';
// @ts-ignore untyped local
import { getSelectedPage, isWriteable } from '../../state/selectors/workpad';
// @ts-ignore untyped local
import { setWriteable } from '../../state/actions/workpad';
import { State } from '../../../types';
import { WorkpadHeader as Component, Props as ComponentProps } from './workpad_header';

View file

@ -5,9 +5,8 @@
*/
import { connect } from 'react-redux';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { fetchAllRenderables } from '../../../state/actions/elements';
// @ts-ignore untyped local
import { getInFlight } from '../../../state/selectors/resolved_args';
import { State } from '../../../../types';
import { RefreshControl as Component } from './refresh_control';

View file

@ -11,7 +11,6 @@ import {
getRenderedWorkpad,
getRenderedWorkpadExpressions,
} from '../../../../state/selectors/workpad';
// @ts-ignore Untyped local
import {
downloadRenderedWorkpad,
downloadRuntime,

View file

@ -5,7 +5,6 @@
*/
import rison from 'rison-node';
// @ts-ignore Untyped local.
import { IBasePath } from 'kibana/public';
import { fetch } from '../../../../common/lib/fetch';
import { CanvasWorkpad } from '../../../../types';

View file

@ -10,9 +10,9 @@ import { Dispatch } from 'redux';
import { withKibana } from '../../../../../../../src/plugins/kibana_react/public/';
import { zoomHandlerCreators } from '../../../lib/app_handler_creators';
import { State, CanvasWorkpadBoundingBox } from '../../../../types';
// @ts-ignore Untyped local
// @ts-expect-error untyped local
import { fetchAllRenderables } from '../../../state/actions/elements';
// @ts-ignore Untyped local
// @ts-expect-error untyped local
import { setZoomScale, setFullscreen, selectToplevelNodes } from '../../../state/actions/transient';
import {
setWriteable,

View file

@ -6,14 +6,13 @@
import React, { FunctionComponent } from 'react';
import PropTypes from 'prop-types';
// @ts-ignore no @types definition
// @ts-expect-error no @types definition
import { Shortcuts } from 'react-shortcuts';
import { EuiFlexItem, EuiFlexGroup, EuiButtonIcon, EuiToolTip } from '@elastic/eui';
import { ComponentStrings } from '../../../i18n';
import { ToolTipShortcut } from '../tool_tip_shortcut/';
// @ts-ignore untyped local
import { RefreshControl } from './refresh_control';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { FullscreenControl } from './fullscreen_control';
import { EditMenu } from './edit_menu';
import { ElementMenu } from './element_menu';

View file

@ -5,7 +5,7 @@
*/
import React, { CSSProperties, PureComponent } from 'react';
// @ts-ignore Untyped local
// @ts-expect-error untyped local
import { WORKPAD_CONTAINER_ID } from '../../../apps/workpad/workpad_app';
interface State {

View file

@ -7,7 +7,7 @@
import React, { Component, KeyboardEvent } from 'react';
import isEqual from 'react-fast-compare';
// @ts-ignore no @types definition
// @ts-expect-error no @types definition
import { Shortcuts } from 'react-shortcuts';
import { isTextInput } from '../../lib/is_text_input';

View file

@ -7,7 +7,7 @@
import { action } from '@storybook/addon-actions';
import { storiesOf } from '@storybook/react';
import React from 'react';
// @ts-ignore Untyped local
// @ts-expect-error untyped local
import { getDefaultWorkpad } from '../../../../state/defaults';
import { Arguments, ArgumentTypes, BorderStyle, ExtendedTemplate } from '../extended_template';

View file

@ -7,7 +7,7 @@
import { action } from '@storybook/addon-actions';
import { storiesOf } from '@storybook/react';
import React from 'react';
// @ts-ignore Untyped local
// @ts-expect-error untyped local
import { getDefaultWorkpad } from '../../../../state/defaults';
import { Argument, Arguments, SimpleTemplate } from '../simple_template';

View file

@ -7,7 +7,7 @@
import { action } from '@storybook/addon-actions';
import { storiesOf } from '@storybook/react';
import React from 'react';
// @ts-ignore Untyped local
// @ts-expect-error untyped local
import { getDefaultWorkpad } from '../../../../state/defaults';
import { SimpleTemplate } from '../simple_template';

View file

@ -5,7 +5,7 @@
*/
import { ExpressionFunctionDefinition } from 'src/plugins/expressions/public';
// @ts-ignore unconverted local lib
// @ts-expect-error unconverted local lib
import { getState } from '../state/store';
import { getAssetById } from '../state/selectors/assets';
import { getFunctionHelp, getFunctionErrors } from '../../i18n';

View file

@ -8,7 +8,7 @@ import { fromExpression } from '@kbn/interpreter/common';
import { get } from 'lodash';
import { ExpressionFunctionDefinition } from 'src/plugins/expressions/public';
import { interpretAst } from '../lib/run_interpreter';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { getState } from '../state/store';
import { getGlobalFilters } from '../state/selectors/workpad';
import { ExpressionValueFilter } from '../../types';

View file

@ -9,7 +9,7 @@ import moment from 'moment-timezone';
import { TimeRange } from 'src/plugins/data/common';
import { ExpressionFunctionDefinition, DatatableRow } from 'src/plugins/expressions/public';
import { fetch } from '../../common/lib/fetch';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { buildBoolArray } from '../../public/lib/build_bool_array';
import { Datatable, ExpressionValueFilter } from '../../types';
import { getFunctionHelp } from '../../i18n';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
// @ts-ignore untyped Elastic library
// @ts-expect-error untyped Elastic library
import { castProvider } from '@kbn/interpreter/common';
import { ExpressionFunctionDefinition } from 'src/plugins/expressions/public';
import { getFunctionHelp, getFunctionErrors } from '../../i18n';

View file

@ -6,12 +6,12 @@
import { parse } from 'query-string';
import { get } from 'lodash';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { getInitialState } from '../state/initial_state';
import { getWindow } from './get_window';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { historyProvider } from './history_provider';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { routerProvider } from './router_provider';
import { createTimeInterval, isValidTimeInterval, getTimeInterval } from './time_interval';
import { AppState, AppStateKeys } from '../../types';

View file

@ -5,7 +5,7 @@
*/
import { ExpressionValueFilter } from '../../types';
// @ts-ignore Untyped Local
// @ts-expect-error untyped local
import { buildBoolArray } from './build_bool_array';
import { TimeRange, esFilters, Filter as DataFilter } from '../../../../../src/plugins/data/public';

View file

@ -15,7 +15,7 @@ const get = jest.fn();
describe('clipboard', () => {
beforeAll(() => {
// @ts-ignore
// @ts-expect-error
Storage.mockImplementation(() => ({
set,
get,

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
// @ts-ignore Untyped local
// @ts-expect-error untyped local
import { arrayToMap } from './aeroelastic/functional';
import { getId } from './get_id';
import { PositionedElement } from '../../types';

View file

@ -5,7 +5,7 @@
*/
import { Dispatch, Action } from 'redux';
// @ts-ignore untyped dependency
// @ts-expect-error untyped dependency
import { createThunk as createThunkFn } from 'redux-thunks/cjs';
import { State } from '../../types';

View file

@ -7,7 +7,7 @@ import fileSaver from 'file-saver';
import { API_ROUTE_SHAREABLE_RUNTIME_DOWNLOAD } from '../../common/lib/constants';
import { ErrorStrings } from '../../i18n';
import { notifyService } from '../services';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import * as workpadService from './workpad_service';
import { CanvasRenderedWorkpad } from '../../shareable_runtime/types';

View file

@ -5,9 +5,7 @@
*/
import { camelCase } from 'lodash';
// @ts-ignore unconverted local file
import { getClipboardData, setClipboardData } from './clipboard';
// @ts-ignore unconverted local file
import { cloneSubgraphs } from './clone_subgraphs';
import { notifyService } from '../services';
import * as customElementService from './custom_element_service';

View file

@ -7,7 +7,6 @@
import { IndexPatternAttributes } from 'src/plugins/data/public';
import { API_ROUTE } from '../../common/lib/constants';
// @ts-ignore untyped local
import { fetch } from '../../common/lib/fetch';
import { ErrorStrings } from '../../i18n';
import { notifyService } from '../services';

View file

@ -4,7 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
// @ts-ignore internal untyped
import { fromExpression } from '@kbn/interpreter/common';
import immutable from 'object-path-immutable';
import { get } from 'lodash';

View file

@ -24,7 +24,7 @@ import { UiActionsStart } from '../../../../src/plugins/ui_actions/public';
import { EmbeddableStart } from '../../../../src/plugins/embeddable/public';
import { UsageCollectionSetup } from '../../../../src/plugins/usage_collection/public';
import { Start as InspectorStart } from '../../../../src/plugins/inspector/public';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { argTypeSpecs } from './expression_types/arg_types';
import { transitions } from './transitions';
import { getPluginApi, CanvasApi } from './plugin_api';

View file

@ -4,14 +4,14 @@
* you may not use this file except in compliance with the Elastic License.
*/
// @ts-ignore untyped module
// @ts-expect-error untyped module
import { addRegistries, register } from '@kbn/interpreter/common';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { elementsRegistry } from './lib/elements_registry';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { templatesRegistry } from './lib/templates_registry';
import { tagsRegistry } from './lib/tags_registry';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { transitionsRegistry } from './lib/transitions_registry';
import {
@ -20,7 +20,7 @@ import {
modelRegistry,
transformRegistry,
viewRegistry,
// @ts-ignore untyped local
// @ts-expect-error untyped local
} from './expression_types';
import { SetupRegistries } from './plugin_api';

View file

@ -7,7 +7,7 @@
import { Dispatch } from 'redux';
import { createAction } from 'redux-actions';
import { createThunk } from '../../lib/create_thunk';
// @ts-ignore Untyped Local
// @ts-expect-error untyped local
import { fetchRenderable } from './elements';
import { State } from '../../../types';

View file

@ -8,7 +8,7 @@ import { createAction } from 'redux-actions';
import { without, includes } from 'lodash';
import { createThunk } from '../../lib/create_thunk';
import { getWorkpadColors } from '../selectors/workpad';
// @ts-ignore
// @ts-expect-error
import { fetchAllRenderables } from './elements';
import { CanvasWorkpad } from '../../../types';

View file

@ -10,7 +10,7 @@ jest.mock('../../../lib/router_provider');
import { workpadAutoplay } from '../workpad_autoplay';
import { setAutoplayInterval } from '../../../lib/app_state';
import { createTimeInterval } from '../../../lib/time_interval';
// @ts-ignore Untyped local
// @ts-expect-error untyped local
import { routerProvider } from '../../../lib/router_provider';
const next = jest.fn();

View file

@ -9,7 +9,6 @@ jest.mock('../../../lib/app_state');
import { workpadRefresh } from '../workpad_refresh';
import { inFlightComplete } from '../../actions/resolved_args';
// @ts-ignore untyped local
import { setRefreshInterval } from '../../actions/workpad';
import { setRefreshInterval as setAppStateRefreshInterval } from '../../../lib/app_state';

View file

@ -9,7 +9,7 @@ import {
loadingIndicator as defaultLoadingIndicator,
LoadingIndicatorInterface,
} from '../../lib/loading_indicator';
// @ts-ignore
// @ts-expect-error
import { convert } from '../../lib/modify_path';
interface InFlightMiddlewareOptions {

View file

@ -9,9 +9,9 @@ import { State } from '../../../types';
import { getFullscreen } from '../selectors/app';
import { getInFlight } from '../selectors/resolved_args';
import { getWorkpad, getPages, getSelectedPageIndex, getAutoplay } from '../selectors/workpad';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { appUnload } from '../actions/app';
// @ts-ignore Untyped Local
// @ts-expect-error untyped local
import { routerProvider } from '../../lib/router_provider';
import { setAutoplayInterval } from '../../lib/app_state';
import { createTimeInterval } from '../../lib/time_interval';

View file

@ -6,11 +6,10 @@
import { Middleware } from 'redux';
import { State } from '../../../types';
// @ts-ignore Untyped Local
// @ts-expect-error untyped local
import { fetchAllRenderables } from '../actions/elements';
// @ts-ignore Untyped Local
import { setRefreshInterval } from '../actions/workpad';
// @ts-ignore Untyped Local
// @ts-expect-error untyped local
import { appUnload } from '../actions/app';
import { inFlightComplete } from '../actions/resolved_args';
import { getInFlight } from '../selectors/resolved_args';

View file

@ -13,7 +13,7 @@ import {
UpdateEmbeddableExpressionPayload,
} from '../actions/embeddable';
// @ts-ignore untyped local
// @ts-expect-error untyped local
import { assignNodeProperties } from './elements';
export const embeddableReducer = handleActions<

View file

@ -5,9 +5,9 @@
*/
import { get } from 'lodash';
// @ts-ignore Untyped Local
// @ts-expect-error untyped local
import * as argHelper from '../../lib/resolved_arg';
// @ts-ignore Untyped Local
// @ts-expect-error untyped local
import { prepend } from '../../lib/modify_path';
import { State } from '../../../types';

View file

@ -5,9 +5,9 @@
*/
import { get, omit } from 'lodash';
// @ts-ignore Untyped Local
// @ts-expect-error untyped local
import { safeElementFromExpression, fromExpression } from '@kbn/interpreter/common';
// @ts-ignore Untyped Local
// @ts-expect-error untyped local
import { append } from '../../lib/modify_path';
import { getAssets } from './assets';
import { State, CanvasWorkpad, CanvasPage, CanvasElement, ResolvedArgType } from '../../../types';

View file

@ -9,9 +9,9 @@ import {
destroyStore as destroy,
getStore,
cloneStore,
// @ts-ignore Untyped local
// @ts-expect-error untyped local
} from './state/store';
// @ts-ignore Untyped local
// @ts-expect-error untyped local
import { getInitialState } from './state/initial_state';
import { CoreSetup } from '../../../../src/core/public';

View file

@ -8,7 +8,7 @@ import { mapValues, keys } from 'lodash';
import { schema } from '@kbn/config-schema';
import { API_ROUTE } from '../../../common/lib';
import { catchErrorHandler } from '../catch_error_handler';
// @ts-ignore unconverted lib
// @ts-expect-error unconverted lib
import { normalizeType } from '../../lib/normalize_type';
import { RouteInitializerDeps } from '..';

View file

@ -21,7 +21,6 @@ export function initializeDownloadShareableWorkpadRoute(deps: RouteInitializerDe
//
// The option setting is not for typical use. We're using it here to avoid
// problems in Cloud environments. See elastic/kibana#47405.
// @ts-ignore No type for inert Hapi handler
// const file = handler.file(SHAREABLE_RUNTIME_FILE, { confine: false });
const file = readFileSync(SHAREABLE_RUNTIME_FILE);
return response.ok({

View file

@ -6,7 +6,6 @@
import { SampleDataRegistrySetup } from 'src/plugins/home/server';
import { CANVAS as label } from '../../i18n';
// @ts-ignore Untyped local
import { ecommerceSavedObjects, flightsSavedObjects, webLogsSavedObjects } from './index';
export function loadSampleData(
@ -16,9 +15,9 @@ export function loadSampleData(
const now = new Date();
const nowTimestamp = now.toISOString();
// @ts-ignore: Untyped local
// @ts-expect-error: untyped local
function updateCanvasWorkpadTimestamps(savedObjects) {
// @ts-ignore: Untyped local
// @ts-expect-error: untyped local
return savedObjects.map((savedObject) => {
if (savedObject.type === 'canvas-workpad') {
savedObject.attributes['@timestamp'] = nowTimestamp;

View file

@ -15,7 +15,7 @@ jest.mock('../../supported_renderers');
describe('Canvas Shareable Workpad API', () => {
// Mock the AJAX load of the workpad.
beforeEach(function () {
// @ts-ignore Applying a global in Jest is alright.
// @ts-expect-error Applying a global in Jest is alright.
global.fetch = jest.fn().mockImplementation(() => {
const p = new Promise((resolve, _reject) => {
resolve({

View file

@ -7,7 +7,7 @@ import { storiesOf } from '@storybook/react';
import React from 'react';
import { ExampleContext } from '../../test/context_example';
// @ts-ignore
// @ts-expect-error
import { image } from '../../../canvas_plugin_src/renderers/image';
import { sharedWorkpads } from '../../test';
import { RenderedElement, RenderedElementComponent } from '../rendered_element';

View file

@ -12,7 +12,6 @@ import {
setAutoplayIntervalAction,
} from '../../../context';
import { createTimeInterval } from '../../../../public/lib/time_interval';
// @ts-ignore Untyped local
import { CustomInterval } from '../../../../public/components/workpad_header/view_menu/custom_interval';
export type onSetAutoplayFn = (autoplay: boolean) => void;

View file

@ -5,11 +5,11 @@
*/
import React, { FC, PureComponent } from 'react';
// @ts-ignore Untyped library
// @ts-expect-error untyped library
import Style from 'style-it';
// @ts-ignore Untyped local
// @ts-expect-error untyped local
import { Positionable } from '../../public/components/positionable/positionable';
// @ts-ignore Untyped local
// @ts-expect-error untyped local
import { elementToShape } from '../../public/components/workpad_page/utils';
import { CanvasRenderedElement } from '../types';
import { CanvasShareableContext, useCanvasShareableState } from '../context';

View file

@ -4,10 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
// This is a JS file because the renderers are not strongly-typed yet. Tagging for
// visibility.
// @ts-ignore Untyped local
import { debug } from '../canvas_plugin_src/renderers/debug';
import { error } from '../canvas_plugin_src/renderers/error';
import { image } from '../canvas_plugin_src/renderers/image';

View file

@ -5,7 +5,7 @@
*/
import { RefObject } from 'react';
// @ts-ignore Unlinked Webpack Type
// @ts-expect-error Unlinked Webpack Type
import ContainerStyle from 'types/interpreter';
import { SavedObject, SavedObjectAttributes } from 'src/core/public';