Skip to content

Commit 03fd2ee

Browse files
[chore] TS 3.9: convert ts-ignore to ts-expect-error (#69541)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
1 parent 89ba7ff commit 03fd2ee

98 files changed

Lines changed: 164 additions & 220 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

x-pack/plugins/canvas/canvas_plugin_src/functions/browser/markdown.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
Style,
1111
ExpressionFunctionDefinition,
1212
} from 'src/plugins/expressions/common';
13-
// @ts-ignore untyped local
13+
// @ts-expect-error untyped local
1414
import { Handlebars } from '../../../common/lib/handlebars';
1515
import { getFunctionHelp } from '../../../i18n';
1616

x-pack/plugins/canvas/canvas_plugin_src/functions/common/compare.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,25 +59,25 @@ export function compare(): ExpressionFunctionDefinition<'compare', Context, Argu
5959
return a !== b;
6060
case Operation.LT:
6161
if (typesMatch) {
62-
// @ts-ignore #35433 This is a wonky comparison for nulls
62+
// @ts-expect-error #35433 This is a wonky comparison for nulls
6363
return a < b;
6464
}
6565
return false;
6666
case Operation.LTE:
6767
if (typesMatch) {
68-
// @ts-ignore #35433 This is a wonky comparison for nulls
68+
// @ts-expect-error #35433 This is a wonky comparison for nulls
6969
return a <= b;
7070
}
7171
return false;
7272
case Operation.GT:
7373
if (typesMatch) {
74-
// @ts-ignore #35433 This is a wonky comparison for nulls
74+
// @ts-expect-error #35433 This is a wonky comparison for nulls
7575
return a > b;
7676
}
7777
return false;
7878
case Operation.GTE:
7979
if (typesMatch) {
80-
// @ts-ignore #35433 This is a wonky comparison for nulls
80+
// @ts-expect-error #35433 This is a wonky comparison for nulls
8181
return a >= b;
8282
}
8383
return false;

x-pack/plugins/canvas/canvas_plugin_src/functions/common/containerStyle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common';
77
import { ContainerStyle, Overflow, BackgroundRepeat, BackgroundSize } from '../../../types';
88
import { getFunctionHelp, getFunctionErrors } from '../../../i18n';
9-
// @ts-ignore untyped local
9+
// @ts-expect-error untyped local
1010
import { isValidUrl } from '../../../common/lib/url';
1111

1212
interface Output extends ContainerStyle {

x-pack/plugins/canvas/canvas_plugin_src/functions/common/image.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common';
77
import { getFunctionHelp, getFunctionErrors } from '../../../i18n';
88

9-
// @ts-ignore untyped local
9+
// @ts-expect-error untyped local
1010
import { resolveWithMissingImage } from '../../../common/lib/resolve_dataurl';
11-
// @ts-ignore .png file
11+
// @ts-expect-error .png file
1212
import { elasticLogo } from '../../lib/elastic_logo';
1313

1414
export enum ImageMode {

x-pack/plugins/canvas/canvas_plugin_src/functions/common/math.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66

7-
// @ts-ignore no @typed def; Elastic library
7+
// @ts-expect-error no @typed def; Elastic library
88
import { evaluate } from 'tinymath';
9-
// @ts-ignore untyped local
109
import { pivotObjectArray } from '../../../common/lib/pivot_object_array';
1110
import { Datatable, isDatatable, ExpressionFunctionDefinition } from '../../../types';
1211
import { getFunctionHelp, getFunctionErrors } from '../../../i18n';

x-pack/plugins/canvas/canvas_plugin_src/functions/common/palette.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common';
8-
// @ts-ignore untyped local
8+
// @ts-expect-error untyped local
99
import { palettes } from '../../../common/lib/palettes';
1010
import { getFunctionHelp } from '../../../i18n';
1111

x-pack/plugins/canvas/canvas_plugin_src/functions/common/pie.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
*/
66

77
import { get, map, groupBy } from 'lodash';
8-
// @ts-ignore lodash.keyby imports invalid member from @types/lodash
8+
// @ts-expect-error lodash.keyby imports invalid member from @types/lodash
99
import keyBy from 'lodash.keyby';
10-
// @ts-ignore untyped local
10+
// @ts-expect-error untyped local
1111
import { getColorsFromPalette } from '../../../common/lib/get_colors_from_palette';
12-
// @ts-ignore untyped local
12+
// @ts-expect-error untyped local
1313
import { getLegendConfig } from '../../../common/lib/get_legend_config';
1414
import { getFunctionHelp } from '../../../i18n';
1515
import {

x-pack/plugins/canvas/canvas_plugin_src/functions/common/plot/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66

7-
// @ts-ignore no @typed def
7+
// @ts-expect-error no @typed def
88
import keyBy from 'lodash.keyby';
99
import { groupBy, get, set, map, sortBy } from 'lodash';
1010
import { ExpressionFunctionDefinition, Style } from 'src/plugins/expressions';
11-
// @ts-ignore untyped local
11+
// @ts-expect-error untyped local
1212
import { getColorsFromPalette } from '../../../../common/lib/get_colors_from_palette';
13-
// @ts-ignore untyped local
13+
// @ts-expect-error untyped local
1414
import { getLegendConfig } from '../../../../common/lib/get_legend_config';
1515
import { getFlotAxisConfig } from './get_flot_axis_config';
1616
import { getFontSpec } from './get_font_spec';

x-pack/plugins/canvas/canvas_plugin_src/functions/common/render.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common';
88
import { Render, ContainerStyle } from '../../../types';
99
import { getFunctionHelp } from '../../../i18n';
10-
// @ts-ignore unconverted local file
1110
import { DEFAULT_ELEMENT_CSS } from '../../../common/lib/constants';
1211

1312
interface ContainerStyleArgument extends ContainerStyle {

x-pack/plugins/canvas/canvas_plugin_src/functions/common/repeatImage.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
*/
66

77
import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common';
8-
// @ts-ignore untyped local
8+
// @ts-expect-error untyped local
99
import { resolveWithMissingImage } from '../../../common/lib/resolve_dataurl';
10-
// @ts-ignore .png file
10+
// @ts-expect-error .png file
1111
import { elasticOutline } from '../../lib/elastic_outline';
1212
import { Render } from '../../../types';
1313
import { getFunctionHelp } from '../../../i18n';

0 commit comments

Comments
 (0)