diff --git a/.eslintrc.js b/.eslintrc.js index 4b65e37a58236..a338632f1a389 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1174,13 +1174,13 @@ module.exports = { }, { files: [ - 'x-pack/solutions/observability/plugins/apm/**/*.{js,mjs,ts,tsx}', - 'x-pack/solutions/observability/plugins/apm_data_access/**/*.{js,mjs,ts,tsx}', - 'x-pack/solutions/observability/plugins/infra/**/*.{js,mjs,ts,tsx}', - 'x-pack/solutions/observability/plugins/inventory/**/*.{js,mjs,ts,tsx}', - 'x-pack/solutions/observability/plugins/metrics_data_access/**/*.{js,mjs,ts,tsx}', - 'x-pack/solutions/observability/plugins/profiling/**/*.{js,mjs,ts,tsx}', - 'x-pack/solutions/observability/plugins/profiling_data_access/**/*.{js,mjs,ts,tsx}', + 'x-pack/solutions/observability/plugins/apm/**/*.{ts,tsx}', + 'x-pack/solutions/observability/plugins/apm_data_access/**/*.{ts,tsx}', + 'x-pack/solutions/observability/plugins/infra/**/*.{ts,tsx}', + 'x-pack/solutions/observability/plugins/inventory/**/*.{ts,tsx}', + 'x-pack/solutions/observability/plugins/metrics_data_access/**/*.{ts,tsx}', + 'x-pack/solutions/observability/plugins/profiling/**/*.{ts,tsx}', + 'x-pack/solutions/observability/plugins/profiling_data_access/**/*.{ts,tsx}', ], rules: { '@typescript-eslint/consistent-type-imports': 'error', @@ -1195,7 +1195,6 @@ module.exports = { plugins: ['testing-library'], rules: { 'testing-library/await-async-utils': 'error', - '@typescript-eslint/consistent-type-imports': 'error', 'import/order': [ 'warn', { @@ -1218,8 +1217,7 @@ module.exports = { rules: { 'import/no-nodejs-modules': 'error', 'no-duplicate-imports': 'off', - '@typescript-eslint/no-duplicate-imports': 'error', - '@typescript-eslint/consistent-type-imports': 'error', + 'import/no-duplicates': 'error', 'no-restricted-imports': [ 'error', { @@ -1230,19 +1228,28 @@ module.exports = { ], }, }, + { + files: [ + 'x-pack/platform/plugins/shared/automatic_import/public/**/*.{ts,tsx}', + 'x-pack/platform/plugins/shared/automatic_import/common/**/*.{ts,tsx}', + ], + rules: { + '@typescript-eslint/consistent-type-imports': 'error', + }, + }, /** * ML overrides */ { files: [ - 'x-pack/platform/plugins/shared/aiops/**/*.{js,mjs,ts,tsx}', - 'x-pack/platform/plugins/private/data_visualizer/**/*.{js,mjs,ts,tsx}', - 'x-pack/platform/plugins/shared/ml/**/*.{js,mjs,ts,tsx}', - 'x-pack/platform/plugins/private/transform/**/*.{js,mjs,ts,tsx}', - 'x-pack/platform/packages/shared/ml/**/*.{js,mjs,ts,tsx}', - 'x-pack/platform/packages/private/ml/**/*.{js,mjs,ts,tsx}', - 'x-pack/platform/plugins/private/file_upload/**/*.{js,mjs,ts,tsx}', + 'x-pack/platform/plugins/shared/aiops/**/*.{ts,tsx}', + 'x-pack/platform/plugins/private/data_visualizer/**/*.{ts,tsx}', + 'x-pack/platform/plugins/shared/ml/**/*.{ts,tsx}', + 'x-pack/platform/plugins/private/transform/**/*.{ts,tsx}', + 'x-pack/platform/packages/shared/ml/**/*.{ts,tsx}', + 'x-pack/platform/packages/private/ml/**/*.{ts,tsx}', + 'x-pack/platform/plugins/private/file_upload/**/*.{ts,tsx}', ], rules: { '@typescript-eslint/consistent-type-imports': 'error', @@ -1280,7 +1287,7 @@ module.exports = { rules: { 'import/no-nodejs-modules': 'error', 'no-duplicate-imports': 'off', - '@typescript-eslint/no-duplicate-imports': ['error'], + 'import/no-duplicates': ['error'], 'no-restricted-imports': [ 'error', { @@ -1466,20 +1473,20 @@ module.exports = { 'require-atomic-updates': 'error', 'symbol-description': 'error', 'vars-on-top': 'error', - '@typescript-eslint/no-duplicate-imports': ['error'], + 'import/no-duplicates': ['error'], }, overrides: [ { files: [ - 'x-pack/platform/plugins/shared/cases/**/*.{js,mjs,ts,tsx}', - 'x-pack/solutions/security/plugins/ecs_data_quality_dashboard/**/*.{js,mjs,ts,tsx}', - 'x-pack/solutions/security/plugins/security_solution/**/*.{js,mjs,ts,tsx}', - 'x-pack/solutions/security/plugins/security_solution_ess/**/*.{js,mjs,ts,tsx}', - 'x-pack/solutions/security/plugins/security_solution_serverless/**/*.{js,mjs,ts,tsx}', - 'x-pack/solutions/security/packages/data-stream-adapter/**/*.{js,mjs,ts,tsx}', - 'x-pack/solutions/security/packages/features/**/*.{js,mjs,ts,tsx}', - 'x-pack/solutions/security/packages/navigation/**/*.{js,mjs,ts,tsx}', - 'src/platform/packages/shared/kbn-cell-actions/**/*.{js,mjs,ts,tsx}', + 'x-pack/platform/plugins/shared/cases/**/*.{ts,tsx}', + 'x-pack/solutions/security/plugins/ecs_data_quality_dashboard/**/*.{ts,tsx}', + 'x-pack/solutions/security/plugins/security_solution/**/*.{ts,tsx}', + 'x-pack/solutions/security/plugins/security_solution_ess/**/*.{ts,tsx}', + 'x-pack/solutions/security/plugins/security_solution_serverless/**/*.{ts,tsx}', + 'x-pack/solutions/security/packages/data-stream-adapter/**/*.{ts,tsx}', + 'x-pack/solutions/security/packages/features/**/*.{ts,tsx}', + 'x-pack/solutions/security/packages/navigation/**/*.{ts,tsx}', + 'src/platform/packages/shared/kbn-cell-actions/**/*.{ts,tsx}', ], rules: { '@typescript-eslint/consistent-type-imports': 'error', @@ -1842,7 +1849,6 @@ module.exports = { 'src/platform/plugins/shared/saved_search/**/*.{js,mjs,ts,tsx}', ], rules: { - '@typescript-eslint/consistent-type-imports': 'error', '@typescript-eslint/no-explicit-any': 'error', '@typescript-eslint/ban-ts-comment': [ 'error', @@ -1852,6 +1858,15 @@ module.exports = { ], }, }, + { + files: [ + 'src/platform/plugins/shared/discover/**/*.{ts,tsx}', + 'src/platform/plugins/shared/saved_search/**/*.{ts,tsx}', + ], + rules: { + '@typescript-eslint/consistent-type-imports': 'error', + }, + }, /** * Enterprise Search overrides @@ -2080,8 +2095,18 @@ module.exports = { 'prefer-arrow-callback': 'error', 'no-unused-vars': 'off', 'react/prop-types': 'off', - '@typescript-eslint/consistent-type-imports': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', + '@typescript-eslint/no-empty-object-type': 'off', + '@typescript-eslint/no-unsafe-function-type': 'off', + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-unused-vars': 'off', + '@typescript-eslint/no-require-imports': 'off', + }, + }, + { + files: ['x-pack/platform/plugins/shared/osquery/**/*.{ts,tsx}'], + rules: { + '@typescript-eslint/consistent-type-imports': 'error', }, }, { @@ -2123,7 +2148,6 @@ module.exports = { 'x-pack/platform/test/spaces_api_integration/**/*.{js,mjs,ts,tsx}', ], rules: { - '@typescript-eslint/consistent-type-imports': 1, 'import/order': [ // This rule sorts import declarations 'error', @@ -2163,6 +2187,33 @@ module.exports = { ], }, }, + { + files: [ + 'src/platform/plugins/private/interactive_setup/**/*.{ts,tsx}', + 'src/platform/test/interactive_setup_api_integration/**/*.{ts,tsx}', + 'src/platform/test/interactive_setup_functional/**/*.{ts,tsx}', + + 'packages/kbn-mock-idp-plugin/**/*.{ts,tsx}', + 'src/platform/packages/private/kbn-mock-idp-utils/**/*.{ts,tsx}', + 'src/platform/packages/shared/kbn-security-hardening/**/*.{ts,tsx}', + 'src/platform/packages/shared/kbn-user-profile-components/**/*.{ts,tsx}', + + 'x-pack/platform/plugins/shared/encrypted_saved_objects/**/*.{ts,tsx}', + 'x-pack/platform/test/encrypted_saved_objects_api_integration/**/*.{ts,tsx}', + + 'x-pack/platform/plugins/shared/security/**/*.{ts,tsx}', + 'x-pack/platform/packages/private/security/**/*.{ts,tsx}', + 'x-pack/platform/packages/shared/security/**/*.{ts,tsx}', + 'x-pack/test/security_api_integration/**/*.{ts,tsx}', + 'x-pack/test/security_functional/**/*.{ts,tsx}', + + 'x-pack/platform/plugins/shared/spaces/**/*.{ts,tsx}', + 'x-pack/platform/test/spaces_api_integration/**/*.{ts,tsx}', + ], + rules: { + '@typescript-eslint/consistent-type-imports': 1, + }, + }, /** * Do not allow `any` diff --git a/package.json b/package.json index 729c9a38928de..54824585588e1 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "**/@langchain/core": "^0.3.57", "**/@langchain/google-common": "^0.1.8", "**/@types/node": "22.15.3", - "**/@typescript-eslint/utils": "5.62.0", + "**/@typescript-eslint/utils": "8.16.0", "**/chokidar": "^3.5.3", "**/d3-scale/**/d3-color": "npm:@elastic/kibana-d3-color@2.0.1", "**/globule/minimatch": "^3.1.2", @@ -92,7 +92,7 @@ "**/langchain": "^0.3.15", "**/remark-parse/trim": "1.0.1", "**/sharp": "0.32.6", - "**/typescript": "5.1.6", + "**/typescript": "5.4.5", "**/util": "^0.12.5", "**/yauzl": "^3.2.0", "@aws-sdk/client-bedrock-agent-runtime": "^3.744.0", @@ -1802,9 +1802,9 @@ "@types/yargs": "^15.0.0", "@types/yauzl": "^2.10.3", "@types/yazl": "^2.4.2", - "@typescript-eslint/eslint-plugin": "^5.62.0", - "@typescript-eslint/parser": "^5.62.0", - "@typescript-eslint/typescript-estree": "^5.62.0", + "@typescript-eslint/eslint-plugin": "^8.16.0", + "@typescript-eslint/parser": "^8.16.0", + "@typescript-eslint/typescript-estree": "^8.16.0", "@wojtekmaj/enzyme-adapter-react-17": "^0.6.7", "@yarnpkg/lockfile": "^1.1.0", "aggregate-error": "^3.1.0", @@ -1980,7 +1980,7 @@ "tree-kill": "^1.2.2", "ts-morph": "^15.1.0", "tsd": "^0.32.0", - "typescript": "5.1.6", + "typescript": "5.4.5", "val-loader": "^6.0.0", "vinyl-fs": "^4.0.0", "watchpack": "^1.6.0", diff --git a/packages/kbn-docs-utils/src/count_eslint_disable.test.ts b/packages/kbn-docs-utils/src/count_eslint_disable.test.ts index 1a31c1f3eb288..6bd081a13f049 100644 --- a/packages/kbn-docs-utils/src/count_eslint_disable.test.ts +++ b/packages/kbn-docs-utils/src/count_eslint_disable.test.ts @@ -34,7 +34,7 @@ describe('countEslintDisableLines', () => { expect(counts).toMatchInlineSnapshot(` Object { "eslintDisableFileCount": 3, - "eslintDisableLineCount": 8, + "eslintDisableLineCount": 9, } `); }); diff --git a/packages/kbn-docs-utils/src/types.ts b/packages/kbn-docs-utils/src/types.ts index 66eb0cdbf0403..020a96cf75586 100644 --- a/packages/kbn-docs-utils/src/types.ts +++ b/packages/kbn-docs-utils/src/types.ts @@ -47,6 +47,7 @@ export enum TypeKind { * Maps to the typescript syntax kind `TypeReferences`. For example, * export type FooFn = () => string will be a TypeKind, not a FunctionKind. */ + // eslint-disable-next-line @typescript-eslint/no-shadow TypeKind = 'Type', /** * Uncategorized is used if a type is encountered that isn't handled. diff --git a/packages/kbn-eslint-config/typescript.js b/packages/kbn-eslint-config/typescript.js index d1503a196439b..73b26cd8694b0 100644 --- a/packages/kbn-eslint-config/typescript.js +++ b/packages/kbn-eslint-config/typescript.js @@ -55,43 +55,30 @@ module.exports = { // // Old recommended tslint rules '@typescript-eslint/adjacent-overload-signatures': 'error', - '@typescript-eslint/array-type': [ - 'error', - { default: 'array-simple', readonly: 'array-simple' }, - ], - '@typescript-eslint/ban-types': [ + '@typescript-eslint/array-type': 'off', + // ## + // Replacing old @typescript-eslint/ban-types + '@typescript-eslint/no-restricted-types': [ 'error', { types: { - SFC: { - message: 'Use FC or FunctionComponent instead.', - fixWith: 'FC', - }, - 'React.SFC': { - message: 'Use FC or FunctionComponent instead.', - fixWith: 'React.FC', - }, - StatelessComponent: { - message: 'Use FunctionComponent instead.', - fixWith: 'FunctionComponent', - }, - 'React.StatelessComponent': { - message: 'Use FunctionComponent instead.', - fixWith: 'React.FunctionComponent', - }, - // used in the codebase in the wild - '{}': false, - object: false, - Function: false, + SFC: 'Use FC or FunctionComponent instead.', + 'React.SFC': 'Use React.FC instead.', + StatelessComponent: 'Use FunctionComponent instead.', + 'React.StatelessComponent': 'Use React.FunctionComponent instead.', }, }, ], + '@typescript-eslint/no-unsafe-function-type': 'off', + '@typescript-eslint/no-wrapper-object-types': 'off', + '@typescript-eslint/no-empty-object-type': 'off', + // ## camelcase: 'off', '@typescript-eslint/naming-convention': [ 'error', { selector: 'default', - format: ['camelCase'], + format: ['camelCase', 'PascalCase', 'UPPER_CASE', 'snake_case'], filter: { regex: allowedNameRegexp, match: false, diff --git a/packages/kbn-eslint-plugin-eslint/rules/no_export_all.js b/packages/kbn-eslint-plugin-eslint/rules/no_export_all.js index 49330bd25771c..212c3e1b5bcfc 100644 --- a/packages/kbn-eslint-plugin-eslint/rules/no_export_all.js +++ b/packages/kbn-eslint-plugin-eslint/rules/no_export_all.js @@ -7,10 +7,9 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -const Fs = require('fs'); +const fs = require('fs'); const ts = require('typescript'); const { getExportCode, getExportNamedNamespaceCode } = require('../helpers/codegen'); -const tsEstree = require('@typescript-eslint/typescript-estree'); const { getExportNamesDeep } = require('../helpers/exports'); @@ -25,6 +24,8 @@ const { getExportNamesDeep } = require('../helpers/exports'); const ERROR_MSG = '`export *` is not allowed in the index files of plugins to prevent accidentally exporting too many APIs'; +const sourceFileCache = new Map(); + /** @type {Rule} */ module.exports = { meta: { @@ -40,13 +41,15 @@ module.exports = { /** @type Parser */ const parser = (path) => { - const code = Fs.readFileSync(path, 'utf-8'); - const result = tsEstree.parseAndGenerateServices(code, { - ...context.parserOptions, - comment: false, - filePath: path, - }); - return result.services.program.getSourceFile(path); + if (sourceFileCache.has(path)) { + return sourceFileCache.get(path); + } + + const code = fs.readFileSync(path, 'utf-8'); + const sourceFile = ts.createSourceFile(path, code, ts.ScriptTarget.ESNext, true); + + sourceFileCache.set(path, sourceFile); + return sourceFile; }; const exportSet = getExportNamesDeep(parser, context.getFilename(), tsnode); diff --git a/packages/kbn-eslint-plugin-eui-a11y/helpers/get_intent_from_node.ts b/packages/kbn-eslint-plugin-eui-a11y/helpers/get_intent_from_node.ts index 4d6a6e35f0457..e9f955e9f4a3f 100644 --- a/packages/kbn-eslint-plugin-eui-a11y/helpers/get_intent_from_node.ts +++ b/packages/kbn-eslint-plugin-eui-a11y/helpers/get_intent_from_node.ts @@ -12,11 +12,11 @@ import { TSESTree } from '@typescript-eslint/typescript-estree'; /* Attempts to get a string representation of the intent out of an array of nodes. - + Currently supported node types in the array: * String literal text (JSXText) * Translated text via component -> uses prop `defaultMessage` - * Translated text via {i18n.translate} call -> uses passed options object key `defaultMessage` + * Translated text via {i18n.translate} call -> uses passed options object key `defaultMessage` */ export function getIntentFromNode(originalNode: TSESTree.JSXOpeningElement): string { if (!originalNode.parent) return ''; @@ -79,7 +79,8 @@ export function getIntentFromNode(originalNode: TSESTree.JSXOpeningElement): str } const args: TSESTree.CallExpressionArgument[] = expression.arguments; - const callee: TSESTree.LeftHandSideExpression = expression.callee; + const callee: TSESTree.LeftHandSideExpression = + expression.callee as TSESTree.LeftHandSideExpression; if (!('object' in callee)) { return ''; diff --git a/packages/kbn-eslint-plugin-eui-a11y/helpers/get_prop_values.test.ts b/packages/kbn-eslint-plugin-eui-a11y/helpers/get_prop_values.test.ts index 191ca42264537..dbea7b913cbc9 100644 --- a/packages/kbn-eslint-plugin-eui-a11y/helpers/get_prop_values.test.ts +++ b/packages/kbn-eslint-plugin-eui-a11y/helpers/get_prop_values.test.ts @@ -34,7 +34,7 @@ describe('getPropValues', () => { } as any), } as any, }) - ).toEqual({ + ).toMatchObject({ prop1: { type: 'Literal', value: 'bar', raw: '"bar"' }, prop2: element.openingElement.attributes[1].value, }); diff --git a/packages/kbn-eslint-plugin-eui-a11y/helpers/get_prop_values.ts b/packages/kbn-eslint-plugin-eui-a11y/helpers/get_prop_values.ts index e5478023f18be..ccf3cbbf57fa7 100644 --- a/packages/kbn-eslint-plugin-eui-a11y/helpers/get_prop_values.ts +++ b/packages/kbn-eslint-plugin-eui-a11y/helpers/get_prop_values.ts @@ -20,7 +20,7 @@ export function getPropValues({ sourceCode: EsLint.SourceCode; }): Record< (typeof propNames)[number], - TypescriptEsTree.TSESTree.Literal | TypescriptEsTree.TSESTree.JSXExpression + TypescriptEsTree.TSESTree.Literal | TypescriptEsTree.TSESTree.JSXExpressionContainer > { const scope = sourceCode.getScope(jsxOpeningElement as any); @@ -33,7 +33,9 @@ export function getPropValues({ if ( prop.type === TypescriptEsTree.AST_NODE_TYPES.JSXAttribute && propName === prop.name.name && - prop.value + prop.value && + (prop.value.type === TypescriptEsTree.AST_NODE_TYPES.Literal || + prop.value.type === TypescriptEsTree.AST_NODE_TYPES.JSXExpressionContainer) ) { acc[propName] = prop.value; // can be a string or an function } @@ -73,5 +75,5 @@ export function getPropValues({ } } return acc; - }, {} as Record<(typeof propNames)[number], TypescriptEsTree.TSESTree.Literal | TypescriptEsTree.TSESTree.JSXExpression>); + }, {} as Record<(typeof propNames)[number], TypescriptEsTree.TSESTree.Literal | TypescriptEsTree.TSESTree.JSXExpressionContainer>); } diff --git a/packages/kbn-eslint-plugin-imports/src/rules/exports_moved_packages.ts b/packages/kbn-eslint-plugin-imports/src/rules/exports_moved_packages.ts index 6a843050c3d77..7384a15f9e636 100644 --- a/packages/kbn-eslint-plugin-imports/src/rules/exports_moved_packages.ts +++ b/packages/kbn-eslint-plugin-imports/src/rules/exports_moved_packages.ts @@ -161,7 +161,9 @@ function inspectImports( ) { const name = T.isStringLiteral(specifier.imported) ? specifier.imported.value - : specifier.imported.name; + : specifier.imported?.type === 'Identifier' + ? specifier.imported.name + : 'name'; const local = specifier.local.name; return { node: specifier, @@ -177,8 +179,10 @@ function inspectImports( ) { const name = T.isStringLiteral(specifier.exported) ? specifier.exported.value - : specifier.exported.name; - const local = specifier.local.name; + : specifier.exported?.type === 'Identifier' + ? specifier.exported.name + : 'name'; + const local = specifier.local.type === 'Identifier' ? specifier.local.name : ''; return { node: specifier, name: local, diff --git a/packages/kbn-eslint-plugin-telemetry/helpers/get_intent_from_node.ts b/packages/kbn-eslint-plugin-telemetry/helpers/get_intent_from_node.ts index 43c1c07817ff2..57f5530428765 100644 --- a/packages/kbn-eslint-plugin-telemetry/helpers/get_intent_from_node.ts +++ b/packages/kbn-eslint-plugin-telemetry/helpers/get_intent_from_node.ts @@ -13,11 +13,11 @@ import { camelCase } from 'lodash'; /* Attempts to get a string representation of the intent out of an array of nodes. - + Currently supported node types in the array: * String literal text (JSXText) * Translated text via component -> uses prop `defaultMessage` - * Translated text via {i18n.translate} call -> uses passed options object key `defaultMessage` + * Translated text via {i18n.translate} call -> uses passed options object key `defaultMessage` */ export function getIntentFromNode(originalNode: TSESTree.JSXOpeningElement): string { const parent = originalNode.parent as TSESTree.JSXElement; @@ -76,7 +76,8 @@ export function getIntentFromNode(originalNode: TSESTree.JSXOpeningElement): str } const args: TSESTree.CallExpressionArgument[] = expression.arguments; - const callee: TSESTree.LeftHandSideExpression = expression.callee; + const callee: TSESTree.LeftHandSideExpression = + expression.callee as TSESTree.LeftHandSideExpression; if (!('object' in callee)) { return ''; diff --git a/src/core/packages/http/router-server-internal/src/route.ts b/src/core/packages/http/router-server-internal/src/route.ts index fc7e4041a3240..72a5e03008bdb 100644 --- a/src/core/packages/http/router-server-internal/src/route.ts +++ b/src/core/packages/http/router-server-internal/src/route.ts @@ -115,10 +115,10 @@ export function validateHapiRequest( ): { ok: AnyKibanaRequest; error?: never } | { ok?: never; error: IKibanaResponse } { let kibanaRequest: Mutable; try { - kibanaRequest = CoreKibanaRequest.from(request, routeSchemas); + kibanaRequest = CoreKibanaRequest.from(request, routeSchemas) as Mutable; kibanaRequest.apiVersion = version; } catch (error) { - kibanaRequest = CoreKibanaRequest.from(request); + kibanaRequest = CoreKibanaRequest.from(request) as Mutable; kibanaRequest.apiVersion = version; log.error('400 Bad Request', formatErrorMeta(400, { request, error })); diff --git a/src/core/packages/usage-data/server/src/core_usage_data.ts b/src/core/packages/usage-data/server/src/core_usage_data.ts index 8824d75ea4bc5..a0f007c273dfb 100644 --- a/src/core/packages/usage-data/server/src/core_usage_data.ts +++ b/src/core/packages/usage-data/server/src/core_usage_data.ts @@ -15,7 +15,6 @@ export interface CoreServicesUsageData { savedObjects: { // scripts/telemetry_check.js does not support parsing Array<{...}> types // so we have to disable eslint here and use {...}[] - // eslint-disable-next-line @typescript-eslint/array-type indices: { alias: string; docsCount: number; diff --git a/src/platform/packages/private/kbn-ambient-ftr-types/index.d.ts b/src/platform/packages/private/kbn-ambient-ftr-types/index.d.ts index ffc0f85058d29..38f69c8ef3947 100644 --- a/src/platform/packages/private/kbn-ambient-ftr-types/index.d.ts +++ b/src/platform/packages/private/kbn-ambient-ftr-types/index.d.ts @@ -162,14 +162,16 @@ declare namespace Mocha { * * @see https://mochajs.org/api/Runnable.html#currentRetry */ - protected currentRetry(): number; + // protected + currentRetry(): number; /** * Set or get current retry * * @see https://mochajs.org/api/Runnable.html#currentRetry */ - protected currentRetry(n: number): void; + // protected + currentRetry(n: number): void; /** * Return the full title generated by recursively concatenating the parent's full title. diff --git a/src/platform/packages/private/kbn-import-resolver/index.ts b/src/platform/packages/private/kbn-import-resolver/index.ts index ddaff72ca8fd1..1d9286dab7894 100644 --- a/src/platform/packages/private/kbn-import-resolver/index.ts +++ b/src/platform/packages/private/kbn-import-resolver/index.ts @@ -9,4 +9,4 @@ export * from './src/import_resolver'; export * from './src/helpers/import_req'; -export * from './src/resolve_result'; +export type * from './src/resolve_result'; diff --git a/src/platform/packages/private/kbn-import-resolver/src/import_resolver.ts b/src/platform/packages/private/kbn-import-resolver/src/import_resolver.ts index 98b74cf3d0514..ffe487357a57c 100644 --- a/src/platform/packages/private/kbn-import-resolver/src/import_resolver.ts +++ b/src/platform/packages/private/kbn-import-resolver/src/import_resolver.ts @@ -155,6 +155,10 @@ export class ImportResolver { return Path.resolve(REPO_ROOT, `node_modules/@elastic/opentelemetry-node/lib/sdk.js`); } + if (req.startsWith('@typescript-eslint/parser')) { + return Path.resolve(REPO_ROOT, `node_modules/@typescript-eslint/parser/dist/index.js`); + } + // turn root-relative paths into relative paths if ( req.startsWith('src/') || diff --git a/src/platform/packages/private/kbn-reporting/common/types.ts b/src/platform/packages/private/kbn-reporting/common/types.ts index b9778b11b3659..64a6acb0f2c96 100644 --- a/src/platform/packages/private/kbn-reporting/common/types.ts +++ b/src/platform/packages/private/kbn-reporting/common/types.ts @@ -15,7 +15,7 @@ import type { ConcreteTaskInstance, RruleSchedule } from '@kbn/task-manager-plug import { JOB_STATUS } from './constants'; import type { LocatorParams } from './url'; -export * from './url'; +export type * from './url'; export interface CsvMetrics { rows: number; diff --git a/src/platform/packages/private/kbn-reporting/server/index.ts b/src/platform/packages/private/kbn-reporting/server/index.ts index 4282075860e4f..fbf9ae61b6f96 100644 --- a/src/platform/packages/private/kbn-reporting/server/index.ts +++ b/src/platform/packages/private/kbn-reporting/server/index.ts @@ -17,4 +17,4 @@ export type { BaseExportTypeSetupDeps, BaseExportTypeStartDeps } from './export_ export { ConfigSchema } from './config_schema'; export * from './constants'; -export * from './types'; +export type * from './types'; diff --git a/src/platform/packages/shared/cloud/connection_details/index.ts b/src/platform/packages/shared/cloud/connection_details/index.ts index d00ebd4e9e668..74336db2c3f69 100644 --- a/src/platform/packages/shared/cloud/connection_details/index.ts +++ b/src/platform/packages/shared/cloud/connection_details/index.ts @@ -7,7 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './types'; +export type * from './types'; export { ConnectionDetailsOptsProvider } from './context'; export { ConnectionDetails } from './connection_details'; export { ConnectionDetailsFlyoutContent } from './connection_details_flyout_content'; diff --git a/src/platform/packages/shared/kbn-actions-types/index.ts b/src/platform/packages/shared/kbn-actions-types/index.ts index 802714a67866b..57f7e41de20a2 100644 --- a/src/platform/packages/shared/kbn-actions-types/index.ts +++ b/src/platform/packages/shared/kbn-actions-types/index.ts @@ -7,5 +7,5 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './rewrite_request_case_types'; +export type * from './rewrite_request_case_types'; export * from './action_types'; diff --git a/src/platform/packages/shared/kbn-alerting-types/index.ts b/src/platform/packages/shared/kbn-alerting-types/index.ts index dc660e1a2f8a9..3f96d0b0d6d24 100644 --- a/src/platform/packages/shared/kbn-alerting-types/index.ts +++ b/src/platform/packages/shared/kbn-alerting-types/index.ts @@ -7,18 +7,18 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './action_group_types'; -export * from './action_variable'; -export * from './alert_fields_type'; -export * from './alerts_types'; +export type * from './action_group_types'; +export type * from './action_variable'; +export type * from './alert_fields_type'; +export type * from './alerts_types'; export * from './alerting_framework_health_types'; export * from './builtin_action_groups_types'; export * from './circuit_breaker_message_header'; -export * from './r_rule_types'; +export type * from './r_rule_types'; export * from './rule_notify_when_type'; -export * from './rule_type_types'; +export type * from './rule_type_types'; export * from './rule_types'; -export * from './rule_settings'; -export * from './search_strategy_types'; -export * from './alert_delete_types'; -export * from './browser_fields_response'; +export type * from './rule_settings'; +export type * from './search_strategy_types'; +export type * from './alert_delete_types'; +export type * from './browser_fields_response'; diff --git a/src/platform/packages/shared/kbn-alerts-ui-shared/index.ts b/src/platform/packages/shared/kbn-alerts-ui-shared/index.ts index 2663295ebbccc..6b872db2dc1a1 100644 --- a/src/platform/packages/shared/kbn-alerts-ui-shared/index.ts +++ b/src/platform/packages/shared/kbn-alerts-ui-shared/index.ts @@ -18,7 +18,7 @@ export { AlertsSearchBar } from './src/alerts_search_bar'; export type { AlertsSearchBarProps } from './src/alerts_search_bar/types'; export * from './src/alert_fields_table'; -export * from './src/alert_filter_controls/types'; +export type * from './src/alert_filter_controls/types'; export * from './src/common/types'; export * from './src/check_action_type_enabled'; export * from './src/action_variables'; diff --git a/src/platform/packages/shared/kbn-alerts-ui-shared/src/common/apis/fetch_alerts_fields/index.ts b/src/platform/packages/shared/kbn-alerts-ui-shared/src/common/apis/fetch_alerts_fields/index.ts index 156eb967b34a1..6097e357cc3e4 100644 --- a/src/platform/packages/shared/kbn-alerts-ui-shared/src/common/apis/fetch_alerts_fields/index.ts +++ b/src/platform/packages/shared/kbn-alerts-ui-shared/src/common/apis/fetch_alerts_fields/index.ts @@ -8,4 +8,4 @@ */ export * from './fetch_alerts_fields'; -export * from './types'; +export type * from './types'; diff --git a/src/platform/packages/shared/kbn-alerts-ui-shared/src/common/apis/fetch_alerts_index_names/index.ts b/src/platform/packages/shared/kbn-alerts-ui-shared/src/common/apis/fetch_alerts_index_names/index.ts index 9e72695a69f45..f4889a2ae320b 100644 --- a/src/platform/packages/shared/kbn-alerts-ui-shared/src/common/apis/fetch_alerts_index_names/index.ts +++ b/src/platform/packages/shared/kbn-alerts-ui-shared/src/common/apis/fetch_alerts_index_names/index.ts @@ -8,4 +8,4 @@ */ export * from './fetch_alerts_index_names'; -export * from './types'; +export type * from './types'; diff --git a/src/platform/packages/shared/kbn-alerts-ui-shared/src/common/types/index.ts b/src/platform/packages/shared/kbn-alerts-ui-shared/src/common/types/index.ts index 97316cf58ab29..b6ad072b56c8b 100644 --- a/src/platform/packages/shared/kbn-alerts-ui-shared/src/common/types/index.ts +++ b/src/platform/packages/shared/kbn-alerts-ui-shared/src/common/types/index.ts @@ -8,4 +8,4 @@ */ export * from './action_types'; -export * from './rule_types'; +export type * from './rule_types'; diff --git a/src/platform/packages/shared/kbn-apm-types-shared/index.ts b/src/platform/packages/shared/kbn-apm-types-shared/index.ts index 4b894f81d8b03..f7b4a37fe64b1 100644 --- a/src/platform/packages/shared/kbn-apm-types-shared/index.ts +++ b/src/platform/packages/shared/kbn-apm-types-shared/index.ts @@ -8,5 +8,5 @@ */ export * from './src/enums'; -export * from './src/types'; -export * from './src/interfaces'; +export type * from './src/types'; +export type * from './src/interfaces'; diff --git a/src/platform/packages/shared/kbn-apm-types-shared/src/interfaces/index.ts b/src/platform/packages/shared/kbn-apm-types-shared/src/interfaces/index.ts index 6bc21865846d7..f5213fe9f06cd 100644 --- a/src/platform/packages/shared/kbn-apm-types-shared/src/interfaces/index.ts +++ b/src/platform/packages/shared/kbn-apm-types-shared/src/interfaces/index.ts @@ -7,4 +7,4 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './correlations'; +export type * from './correlations'; diff --git a/src/platform/packages/shared/kbn-apm-types-shared/src/types/index.ts b/src/platform/packages/shared/kbn-apm-types-shared/src/types/index.ts index be8c5bbc8246c..d570fb4439366 100644 --- a/src/platform/packages/shared/kbn-apm-types-shared/src/types/index.ts +++ b/src/platform/packages/shared/kbn-apm-types-shared/src/types/index.ts @@ -7,4 +7,4 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './common'; +export type * from './common'; diff --git a/src/platform/packages/shared/kbn-cell-actions/index.ts b/src/platform/packages/shared/kbn-cell-actions/index.ts index d0bc1a558a7ce..cced04fa10546 100644 --- a/src/platform/packages/shared/kbn-cell-actions/index.ts +++ b/src/platform/packages/shared/kbn-cell-actions/index.ts @@ -7,7 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './src/types'; +export type * from './src/types'; export * from './src/context'; export * from './src/components'; diff --git a/src/platform/packages/shared/kbn-cell-actions/src/actions/index.ts b/src/platform/packages/shared/kbn-cell-actions/src/actions/index.ts index 6f4ea2e3cc84f..4875e15333efb 100644 --- a/src/platform/packages/shared/kbn-cell-actions/src/actions/index.ts +++ b/src/platform/packages/shared/kbn-cell-actions/src/actions/index.ts @@ -7,7 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './types'; +export type * from './types'; export { createCellActionFactory } from './factory'; diff --git a/src/platform/packages/shared/kbn-cell-actions/src/hooks/use_data_grid_column_cell_actions.test.tsx b/src/platform/packages/shared/kbn-cell-actions/src/hooks/use_data_grid_column_cell_actions.test.tsx index b55587ad887d0..ba8d15459fedb 100644 --- a/src/platform/packages/shared/kbn-cell-actions/src/hooks/use_data_grid_column_cell_actions.test.tsx +++ b/src/platform/packages/shared/kbn-cell-actions/src/hooks/use_data_grid_column_cell_actions.test.tsx @@ -9,12 +9,18 @@ import type { JSXElementConstructor, MutableRefObject } from 'react'; import React from 'react'; -import type { EuiDataGridColumnCellActionProps, EuiDataGridRefProps } from '@elastic/eui'; -import { EuiButtonEmpty, type EuiDataGridColumnCellAction } from '@elastic/eui'; +import { + EuiButtonEmpty, + type EuiDataGridColumnCellAction, + type EuiDataGridColumnCellActionProps, + type EuiDataGridRefProps, +} from '@elastic/eui'; import { render, waitFor, renderHook } from '@testing-library/react'; import { makeAction } from '../mocks/helpers'; -import type { UseDataGridColumnsCellActionsProps } from './use_data_grid_column_cell_actions'; -import { useDataGridColumnsCellActions } from './use_data_grid_column_cell_actions'; +import { + type UseDataGridColumnsCellActionsProps, + useDataGridColumnsCellActions, +} from './use_data_grid_column_cell_actions'; const action1 = makeAction('action-1', 'icon1', 1); action1.execute = jest.fn(); diff --git a/src/platform/packages/shared/kbn-cell-actions/src/hooks/use_data_grid_column_cell_actions.tsx b/src/platform/packages/shared/kbn-cell-actions/src/hooks/use_data_grid_column_cell_actions.tsx index 49b607c3bc887..067fd090606ef 100644 --- a/src/platform/packages/shared/kbn-cell-actions/src/hooks/use_data_grid_column_cell_actions.tsx +++ b/src/platform/packages/shared/kbn-cell-actions/src/hooks/use_data_grid_column_cell_actions.tsx @@ -9,8 +9,7 @@ import type { MutableRefObject } from 'react'; import React, { useCallback, useMemo, useRef, useState, useEffect } from 'react'; -import type { EuiDataGridRefProps } from '@elastic/eui'; -import { type EuiDataGridColumnCellAction } from '@elastic/eui'; +import { type EuiDataGridColumnCellAction, type EuiDataGridRefProps } from '@elastic/eui'; import type { FieldSpec } from '@kbn/data-views-plugin/common'; import type { CellAction, diff --git a/src/platform/packages/shared/kbn-cell-actions/src/types.ts b/src/platform/packages/shared/kbn-cell-actions/src/types.ts index 3a8985f36e5cd..c67e224a4eeb6 100644 --- a/src/platform/packages/shared/kbn-cell-actions/src/types.ts +++ b/src/platform/packages/shared/kbn-cell-actions/src/types.ts @@ -18,7 +18,7 @@ import type { Serializable } from '@kbn/utility-types'; import type { EuiButtonIconProps } from '@elastic/eui'; import type { CellActionsMode } from './constants'; -export * from './actions/types'; +export type * from './actions/types'; export type CellActionsProviderProps = PropsWithChildren<{ /** diff --git a/src/platform/packages/shared/kbn-coloring/src/palettes/index.ts b/src/platform/packages/shared/kbn-coloring/src/palettes/index.ts index e670492dbb860..ed8715e920b30 100644 --- a/src/platform/packages/shared/kbn-coloring/src/palettes/index.ts +++ b/src/platform/packages/shared/kbn-coloring/src/palettes/index.ts @@ -8,5 +8,5 @@ */ export * from './utils'; -export * from './types'; +export type * from './types'; export * from './constants'; diff --git a/src/platform/packages/shared/kbn-coloring/src/shared_components/color_mapping/config/index.ts b/src/platform/packages/shared/kbn-coloring/src/shared_components/color_mapping/config/index.ts index 237cbb3b5557f..3d91361520336 100644 --- a/src/platform/packages/shared/kbn-coloring/src/shared_components/color_mapping/config/index.ts +++ b/src/platform/packages/shared/kbn-coloring/src/shared_components/color_mapping/config/index.ts @@ -7,4 +7,4 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * as ColorMapping from './types'; +export type * as ColorMapping from './types'; diff --git a/src/platform/packages/shared/kbn-coloring/src/shared_components/color_mapping/config/types.ts b/src/platform/packages/shared/kbn-coloring/src/shared_components/color_mapping/config/types.ts index a16df40156a27..243bbdc033c3e 100644 --- a/src/platform/packages/shared/kbn-coloring/src/shared_components/color_mapping/config/types.ts +++ b/src/platform/packages/shared/kbn-coloring/src/shared_components/color_mapping/config/types.ts @@ -79,5 +79,5 @@ export type Config = BaseConfig & { export type Assignment = Config['assignments'][number]; export type SpecialAssignment = BaseConfig['specialAssignments'][number]; -export * from './colors'; -export * from './rules'; +export type * from './colors'; +export type * from './rules'; diff --git a/src/platform/packages/shared/kbn-content-management-utils/index.ts b/src/platform/packages/shared/kbn-content-management-utils/index.ts index 616f894304fdf..46499af9736ce 100644 --- a/src/platform/packages/shared/kbn-content-management-utils/index.ts +++ b/src/platform/packages/shared/kbn-content-management-utils/index.ts @@ -7,7 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './src/types'; +export type * from './src/types'; export * from './src/schema'; export * from './src/saved_object_content_storage'; export * from './src/utils'; diff --git a/src/platform/packages/shared/kbn-cypress-test-helper/src/index.ts b/src/platform/packages/shared/kbn-cypress-test-helper/src/index.ts index 95bdd5321e97b..f33db8e902548 100644 --- a/src/platform/packages/shared/kbn-cypress-test-helper/src/index.ts +++ b/src/platform/packages/shared/kbn-cypress-test-helper/src/index.ts @@ -19,4 +19,4 @@ export { createRuntimeServices } from './services/stack_services'; export { waitForAlertsToPopulate } from './services/alerting_services'; export * from './api'; export { createToolingLogger } from './logger'; -export * from './utils'; +export type * from './utils'; diff --git a/src/platform/packages/shared/kbn-data-view-validation/index.ts b/src/platform/packages/shared/kbn-data-view-validation/index.ts index 6ebb599fc346a..eed5b5d0e8c3f 100644 --- a/src/platform/packages/shared/kbn-data-view-validation/index.ts +++ b/src/platform/packages/shared/kbn-data-view-validation/index.ts @@ -9,4 +9,4 @@ export * from './src/constants'; export * from './src/validation'; -export * from './src/types'; +export type * from './src/types'; diff --git a/src/platform/packages/shared/kbn-discover-utils/src/data_types/logs/index.ts b/src/platform/packages/shared/kbn-discover-utils/src/data_types/logs/index.ts index 30b023b6328bb..8ec1a8e87034a 100644 --- a/src/platform/packages/shared/kbn-discover-utils/src/data_types/logs/index.ts +++ b/src/platform/packages/shared/kbn-discover-utils/src/data_types/logs/index.ts @@ -7,7 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './types'; +export type * from './types'; export * from './utils'; export * from './logs_context_service'; diff --git a/src/platform/packages/shared/kbn-discover-utils/src/data_types/traces/index.ts b/src/platform/packages/shared/kbn-discover-utils/src/data_types/traces/index.ts index 8546450c50551..503aceeaab834 100644 --- a/src/platform/packages/shared/kbn-discover-utils/src/data_types/traces/index.ts +++ b/src/platform/packages/shared/kbn-discover-utils/src/data_types/traces/index.ts @@ -7,5 +7,5 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './types'; +export type * from './types'; export * from './traces_context_service'; diff --git a/src/platform/packages/shared/kbn-dom-drag-drop/src/index.ts b/src/platform/packages/shared/kbn-dom-drag-drop/src/index.ts index eb330dc23352f..f3b23d0c534b5 100644 --- a/src/platform/packages/shared/kbn-dom-drag-drop/src/index.ts +++ b/src/platform/packages/shared/kbn-dom-drag-drop/src/index.ts @@ -7,7 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './types'; +export type * from './types'; export * from './providers'; export * from './draggable'; export * from './droppable'; diff --git a/src/platform/packages/shared/kbn-dom-drag-drop/src/providers/index.tsx b/src/platform/packages/shared/kbn-dom-drag-drop/src/providers/index.tsx index 1df4a34cacb74..95b3606a6032d 100644 --- a/src/platform/packages/shared/kbn-dom-drag-drop/src/providers/index.tsx +++ b/src/platform/packages/shared/kbn-dom-drag-drop/src/providers/index.tsx @@ -9,5 +9,5 @@ export * from './providers'; export * from './reorder_provider'; -export * from './types'; +export type * from './types'; export * from './announcements'; diff --git a/src/platform/packages/shared/kbn-encrypted-saved-objects-shared/index.ts b/src/platform/packages/shared/kbn-encrypted-saved-objects-shared/index.ts index 78ee432010303..3c9e22e7233bd 100644 --- a/src/platform/packages/shared/kbn-encrypted-saved-objects-shared/index.ts +++ b/src/platform/packages/shared/kbn-encrypted-saved-objects-shared/index.ts @@ -7,4 +7,4 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './src/encrypted_saved_objects_client_types'; +export type * from './src/encrypted_saved_objects_client_types'; diff --git a/src/platform/packages/shared/kbn-es-query/src/filters/helpers/index.ts b/src/platform/packages/shared/kbn-es-query/src/filters/helpers/index.ts index 1787a79b34651..fb1dd43eed2b3 100644 --- a/src/platform/packages/shared/kbn-es-query/src/filters/helpers/index.ts +++ b/src/platform/packages/shared/kbn-es-query/src/filters/helpers/index.ts @@ -16,4 +16,4 @@ export * from './only_disabled'; export * from './extract_time_filter'; export * from './convert_range_filter'; export * from './update_filter_references'; -export * from './types'; +export type * from './types'; diff --git a/src/platform/packages/shared/kbn-es-types/src/search.ts b/src/platform/packages/shared/kbn-es-types/src/search.ts index c27b40a04719a..b3ac2d8fdc807 100644 --- a/src/platform/packages/shared/kbn-es-types/src/search.ts +++ b/src/platform/packages/shared/kbn-es-types/src/search.ts @@ -43,9 +43,9 @@ type Source = estypes.SearchSourceFilter | boolean | estypes.Fields; type TopMetricKeysOf = TAggregationContainer extends { top_metrics: { metrics: { field: infer TField } } } - ? TField + ? Extract : TAggregationContainer extends { top_metrics: { metrics: Array<{ field: infer TField }> } } - ? TField + ? Extract : string; type ValueTypeOfField = T extends Record diff --git a/src/platform/packages/shared/kbn-esql-ast/src/mutate/index.ts b/src/platform/packages/shared/kbn-esql-ast/src/mutate/index.ts index da312eb79418a..8e34cb9ecc8e8 100644 --- a/src/platform/packages/shared/kbn-esql-ast/src/mutate/index.ts +++ b/src/platform/packages/shared/kbn-esql-ast/src/mutate/index.ts @@ -7,7 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './types'; +export type * from './types'; import * as generic from './generic'; import * as commands from './commands'; diff --git a/src/platform/packages/shared/kbn-esql-ast/src/visitor/index.ts b/src/platform/packages/shared/kbn-esql-ast/src/visitor/index.ts index 735327359a2f4..4d55c07d46775 100644 --- a/src/platform/packages/shared/kbn-esql-ast/src/visitor/index.ts +++ b/src/platform/packages/shared/kbn-esql-ast/src/visitor/index.ts @@ -7,7 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './types'; +export type * from './types'; export { Visitor, type VisitorOptions } from './visitor'; export { GlobalVisitorContext, type SharedData } from './global_visitor_context'; export * from './contexts'; diff --git a/src/platform/packages/shared/kbn-grouping/src/containers/index.ts b/src/platform/packages/shared/kbn-grouping/src/containers/index.ts index bceb33493b1fb..00307a3df3124 100644 --- a/src/platform/packages/shared/kbn-grouping/src/containers/index.ts +++ b/src/platform/packages/shared/kbn-grouping/src/containers/index.ts @@ -8,4 +8,4 @@ */ export * from './query'; -export * from './query/types'; +export type * from './query/types'; diff --git a/src/platform/packages/shared/kbn-interpreter/src/common/lib/registry.ts b/src/platform/packages/shared/kbn-interpreter/src/common/lib/registry.ts index 3a1662b270af6..71fb0ec08ba1e 100644 --- a/src/platform/packages/shared/kbn-interpreter/src/common/lib/registry.ts +++ b/src/platform/packages/shared/kbn-interpreter/src/common/lib/registry.ts @@ -11,7 +11,6 @@ import { clone } from 'lodash'; export class Registry { private readonly _prop: string; - // eslint-disable-next-line @typescript-eslint/ban-types private _indexed: Object; constructor(prop = 'name') { diff --git a/src/platform/packages/shared/kbn-lens-embeddable-utils/index.ts b/src/platform/packages/shared/kbn-lens-embeddable-utils/index.ts index 9684164b0219e..323173c6e5584 100644 --- a/src/platform/packages/shared/kbn-lens-embeddable-utils/index.ts +++ b/src/platform/packages/shared/kbn-lens-embeddable-utils/index.ts @@ -7,7 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './attribute_builder/types'; +export type * from './attribute_builder/types'; export type { MetricLayerOptions, diff --git a/src/platform/packages/shared/kbn-monaco/index.ts b/src/platform/packages/shared/kbn-monaco/index.ts index f0ea89197a450..8150f9aae2a4b 100644 --- a/src/platform/packages/shared/kbn-monaco/index.ts +++ b/src/platform/packages/shared/kbn-monaco/index.ts @@ -19,7 +19,7 @@ import * as BarePluginApi from 'monaco-editor/esm/vs/editor/editor.api'; export * from './src/languages'; export { BarePluginApi }; -export * from './src/types'; +export type * from './src/types'; export { defaultThemesResolvers, diff --git a/src/platform/packages/shared/kbn-monaco/src/languages/painless/index.ts b/src/platform/packages/shared/kbn-monaco/src/languages/painless/index.ts index 1f57066286218..da05858a28f17 100644 --- a/src/platform/packages/shared/kbn-monaco/src/languages/painless/index.ts +++ b/src/platform/packages/shared/kbn-monaco/src/languages/painless/index.ts @@ -23,4 +23,4 @@ export const PainlessLang: CompleteLangModuleType = { validation$, }; -export * from './types'; +export type * from './types'; diff --git a/src/platform/packages/shared/kbn-palettes/classes/index.ts b/src/platform/packages/shared/kbn-palettes/classes/index.ts index 6cc89dc1cc1fe..8825c8b56f941 100644 --- a/src/platform/packages/shared/kbn-palettes/classes/index.ts +++ b/src/platform/packages/shared/kbn-palettes/classes/index.ts @@ -7,5 +7,5 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './types'; +export type * from './types'; export { KbnPalettes } from './palettes'; diff --git a/src/platform/packages/shared/kbn-scout/src/types/index.ts b/src/platform/packages/shared/kbn-scout/src/types/index.ts index 5f79c9ba17b88..ee3b90e1c40b0 100644 --- a/src/platform/packages/shared/kbn-scout/src/types/index.ts +++ b/src/platform/packages/shared/kbn-scout/src/types/index.ts @@ -7,7 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './server_config'; -export * from './cli'; -export * from './test_config'; -export * from './services'; +export type * from './server_config'; +export type * from './cli'; +export type * from './test_config'; +export type * from './services'; diff --git a/src/platform/packages/shared/kbn-search-connectors/types/index.ts b/src/platform/packages/shared/kbn-search-connectors/types/index.ts index aaf98748cfcbd..add4059e7c7d6 100644 --- a/src/platform/packages/shared/kbn-search-connectors/types/index.ts +++ b/src/platform/packages/shared/kbn-search-connectors/types/index.ts @@ -7,12 +7,12 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './connector_definition'; +export type * from './connector_definition'; export * from './connectors'; -export * from './connectors_api'; -export * from './connector_stats'; +export type * from './connectors_api'; +export type * from './connector_stats'; export * from './native_connectors'; -export * from './optimistic_concurrency'; -export * from './pagination'; -export * from './cron_editor'; +export type * from './optimistic_concurrency'; +export type * from './pagination'; +export type * from './cron_editor'; export * from './indices'; diff --git a/src/platform/packages/shared/kbn-test/src/jest/resolver.js b/src/platform/packages/shared/kbn-test/src/jest/resolver.js index 8184c399fc44d..7d36beaf8f8dd 100644 --- a/src/platform/packages/shared/kbn-test/src/jest/resolver.js +++ b/src/platform/packages/shared/kbn-test/src/jest/resolver.js @@ -70,6 +70,13 @@ module.exports = (request, options) => { }); } + if (request === 'ts-api-utils') { + return resolve.sync('ts-api-utils/lib/index.cjs', { + basedir: options.basedir, + extensions: options.extensions, + }); + } + if (request === `elastic-apm-node`) { return APM_AGENT_MOCK; } diff --git a/src/platform/packages/shared/kbn-triggers-actions-ui-types/index.ts b/src/platform/packages/shared/kbn-triggers-actions-ui-types/index.ts index 55e2fcbad93e9..d19fd54f815ae 100644 --- a/src/platform/packages/shared/kbn-triggers-actions-ui-types/index.ts +++ b/src/platform/packages/shared/kbn-triggers-actions-ui-types/index.ts @@ -7,6 +7,6 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './rule_types'; +export type * from './rule_types'; export * from './action_variable_types'; -export * from './action_group_types'; +export type * from './action_group_types'; diff --git a/src/platform/packages/shared/kbn-typed-react-router-config/index.ts b/src/platform/packages/shared/kbn-typed-react-router-config/index.ts index 3efecb2d77d43..0ab7a48b1b159 100644 --- a/src/platform/packages/shared/kbn-typed-react-router-config/index.ts +++ b/src/platform/packages/shared/kbn-typed-react-router-config/index.ts @@ -9,7 +9,7 @@ export * from './src/create_router'; export * from './src/encode_path'; -export * from './src/types'; +export type * from './src/types'; export * from './src/outlet'; export * from './src/route_renderer'; export * from './src/router_provider'; diff --git a/src/platform/packages/shared/kbn-typed-react-router-config/src/use_router.tsx b/src/platform/packages/shared/kbn-typed-react-router-config/src/use_router.tsx index af92e33b8952a..0bf6d080a29c7 100644 --- a/src/platform/packages/shared/kbn-typed-react-router-config/src/use_router.tsx +++ b/src/platform/packages/shared/kbn-typed-react-router-config/src/use_router.tsx @@ -10,7 +10,7 @@ import React, { createContext, useContext } from 'react'; import { RouteMap, Router } from './types'; -const RouterContext = createContext | undefined>(undefined); +const RouterContext = createContext | undefined>(undefined); export const RouterContextProvider = ({ router, @@ -27,5 +27,5 @@ export function useRouter(): Router; } diff --git a/src/platform/packages/shared/kbn-ui-actions-browser/index.ts b/src/platform/packages/shared/kbn-ui-actions-browser/index.ts index f48545a2b2ef8..ed49fd7e354be 100644 --- a/src/platform/packages/shared/kbn-ui-actions-browser/index.ts +++ b/src/platform/packages/shared/kbn-ui-actions-browser/index.ts @@ -7,7 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './src/types'; +export type * from './src/types'; export type { Trigger, RowClickContext } from './src/triggers'; export { VISUALIZE_FIELD_TRIGGER, diff --git a/src/platform/packages/shared/kbn-ui-actions-browser/src/index.ts b/src/platform/packages/shared/kbn-ui-actions-browser/src/index.ts index c458e4a099ff0..aaa4f8a335715 100644 --- a/src/platform/packages/shared/kbn-ui-actions-browser/src/index.ts +++ b/src/platform/packages/shared/kbn-ui-actions-browser/src/index.ts @@ -7,5 +7,5 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './types'; +export type * from './types'; export * from './triggers'; diff --git a/src/platform/packages/shared/kbn-ui-actions-browser/src/triggers/index.ts b/src/platform/packages/shared/kbn-ui-actions-browser/src/triggers/index.ts index 5e931dc8dba46..01251638c3ad5 100644 --- a/src/platform/packages/shared/kbn-ui-actions-browser/src/triggers/index.ts +++ b/src/platform/packages/shared/kbn-ui-actions-browser/src/triggers/index.ts @@ -7,7 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './trigger'; +export type * from './trigger'; export * from './row_click_trigger'; export * from './default_trigger'; export * from './visualize_field_trigger'; diff --git a/src/platform/packages/shared/kbn-ui-actions-browser/src/types/index.ts b/src/platform/packages/shared/kbn-ui-actions-browser/src/types/index.ts index d4cf15cb4044f..520c590ada481 100644 --- a/src/platform/packages/shared/kbn-ui-actions-browser/src/types/index.ts +++ b/src/platform/packages/shared/kbn-ui-actions-browser/src/types/index.ts @@ -7,4 +7,4 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './presentable'; +export type * from './presentable'; diff --git a/src/platform/packages/shared/kbn-unified-data-table/index.ts b/src/platform/packages/shared/kbn-unified-data-table/index.ts index 49753b0b9ba7b..4391e1fadac1e 100644 --- a/src/platform/packages/shared/kbn-unified-data-table/index.ts +++ b/src/platform/packages/shared/kbn-unified-data-table/index.ts @@ -20,7 +20,7 @@ export { ROWS_HEIGHT_OPTIONS, DataGridDensity, DEFAULT_PAGINATION_MODE } from '. export { JSONCodeEditorCommonMemoized } from './src/components/json_code_editor/json_code_editor_common'; export { SourceDocument } from './src/components/source_document'; -export * from './src/types'; +export type * from './src/types'; export * as columnActions from './src/components/actions/columns'; export { getRowsPerPageOptions } from './src/utils/rows_per_page'; diff --git a/src/platform/packages/shared/response-ops/rule_form/index.ts b/src/platform/packages/shared/response-ops/rule_form/index.ts index be50d1c09085d..7591b73cf5e8c 100644 --- a/src/platform/packages/shared/response-ops/rule_form/index.ts +++ b/src/platform/packages/shared/response-ops/rule_form/index.ts @@ -7,7 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './src/types'; +export type * from './src/types'; export * from './src/rule_type_modal'; export { RuleForm, type RuleFormProps } from './src/rule_form'; diff --git a/src/platform/packages/shared/response-ops/rule_form/src/common/apis/create_rule/index.ts b/src/platform/packages/shared/response-ops/rule_form/src/common/apis/create_rule/index.ts index 50b433afe9795..63f6cc248f3db 100644 --- a/src/platform/packages/shared/response-ops/rule_form/src/common/apis/create_rule/index.ts +++ b/src/platform/packages/shared/response-ops/rule_form/src/common/apis/create_rule/index.ts @@ -7,6 +7,6 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './types'; +export type * from './types'; export * from './create_rule'; export * from './transform_create_rule_body'; diff --git a/src/platform/packages/shared/response-ops/rule_form/src/common/apis/fetch_ui_config/index.ts b/src/platform/packages/shared/response-ops/rule_form/src/common/apis/fetch_ui_config/index.ts index abcecfa9c5323..6b2e68fa1357b 100644 --- a/src/platform/packages/shared/response-ops/rule_form/src/common/apis/fetch_ui_config/index.ts +++ b/src/platform/packages/shared/response-ops/rule_form/src/common/apis/fetch_ui_config/index.ts @@ -7,5 +7,5 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './types'; +export type * from './types'; export * from './fetch_ui_config'; diff --git a/src/platform/packages/shared/response-ops/rule_form/src/common/apis/update_rule/index.ts b/src/platform/packages/shared/response-ops/rule_form/src/common/apis/update_rule/index.ts index 311c7211a9eed..fab0ac651426e 100644 --- a/src/platform/packages/shared/response-ops/rule_form/src/common/apis/update_rule/index.ts +++ b/src/platform/packages/shared/response-ops/rule_form/src/common/apis/update_rule/index.ts @@ -7,6 +7,6 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './types'; +export type * from './types'; export * from './transform_update_rule_body'; export * from './update_rule'; diff --git a/src/platform/packages/shared/response-ops/rule_form/src/common/index.ts b/src/platform/packages/shared/response-ops/rule_form/src/common/index.ts index c8095bb78ca05..b07e8548ac7ab 100644 --- a/src/platform/packages/shared/response-ops/rule_form/src/common/index.ts +++ b/src/platform/packages/shared/response-ops/rule_form/src/common/index.ts @@ -7,5 +7,5 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './types'; +export type * from './types'; export * from './services/dashboard_service'; diff --git a/src/platform/packages/shared/response-ops/rule_form/src/common/types/index.ts b/src/platform/packages/shared/response-ops/rule_form/src/common/types/index.ts index a9486c387724a..e47f235dba53d 100644 --- a/src/platform/packages/shared/response-ops/rule_form/src/common/types/index.ts +++ b/src/platform/packages/shared/response-ops/rule_form/src/common/types/index.ts @@ -7,4 +7,4 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from '@kbn/alerts-ui-shared/src/common/types/rule_types'; +export type * from '@kbn/alerts-ui-shared/src/common/types/rule_types'; diff --git a/src/platform/packages/shared/response-ops/rule_form/src/types.ts b/src/platform/packages/shared/response-ops/rule_form/src/types.ts index 865b586d2b7ee..677676a760764 100644 --- a/src/platform/packages/shared/response-ops/rule_form/src/types.ts +++ b/src/platform/packages/shared/response-ops/rule_form/src/types.ts @@ -39,7 +39,7 @@ import type { RuleUiAction, } from './common/types'; -export * from './common/types'; +export type * from './common/types'; export interface RuleFormData { name: Rule['name']; diff --git a/src/platform/plugins/private/event_annotation/common/content_management/index.ts b/src/platform/plugins/private/event_annotation/common/content_management/index.ts index 4176949a1d750..4c3d332315d24 100644 --- a/src/platform/plugins/private/event_annotation/common/content_management/index.ts +++ b/src/platform/plugins/private/event_annotation/common/content_management/index.ts @@ -31,4 +31,4 @@ export type { EventAnnotationGroupCrudTypes, } from './latest'; -export * as EventAnnotationGroupV1 from './v1'; +export type * as EventAnnotationGroupV1 from './v1'; diff --git a/src/platform/plugins/private/event_annotation/common/content_management/latest.ts b/src/platform/plugins/private/event_annotation/common/content_management/latest.ts index f278309c22b03..0ad6e45e5a3c7 100644 --- a/src/platform/plugins/private/event_annotation/common/content_management/latest.ts +++ b/src/platform/plugins/private/event_annotation/common/content_management/latest.ts @@ -7,4 +7,4 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './v1'; +export type * from './v1'; diff --git a/src/platform/plugins/private/event_annotation/common/fetch_event_annotations/index.ts b/src/platform/plugins/private/event_annotation/common/fetch_event_annotations/index.ts index e06f73f41d73a..14a6619efb5d1 100644 --- a/src/platform/plugins/private/event_annotation/common/fetch_event_annotations/index.ts +++ b/src/platform/plugins/private/event_annotation/common/fetch_event_annotations/index.ts @@ -9,4 +9,4 @@ export { getFetchEventAnnotationsMeta } from './fetch_event_annotations_fn'; export { requestEventAnnotations } from './request_event_annotations'; -export * from './types'; +export type * from './types'; diff --git a/src/platform/plugins/private/kibana_usage_collection/server/collectors/cloud/cloud_provider_collector.ts b/src/platform/plugins/private/kibana_usage_collection/server/collectors/cloud/cloud_provider_collector.ts index dbb2f7dd5a844..3f00cea534d19 100644 --- a/src/platform/plugins/private/kibana_usage_collection/server/collectors/cloud/cloud_provider_collector.ts +++ b/src/platform/plugins/private/kibana_usage_collection/server/collectors/cloud/cloud_provider_collector.ts @@ -24,7 +24,7 @@ export function registerCloudProviderUsageCollector( ) { const ac = new AbortController(); // we are stopping, we need to cancel async requests - firstValueFrom(pluginStop$).finally(() => ac.abort()); + void firstValueFrom(pluginStop$).finally(() => ac.abort()); const cloudDetector = new CloudDetector(); // determine the cloud service in the background diff --git a/src/platform/plugins/private/links/server/content_management/schema/v1/index.ts b/src/platform/plugins/private/links/server/content_management/schema/v1/index.ts index 71bc4a5695064..3f6e34aa2ab2e 100644 --- a/src/platform/plugins/private/links/server/content_management/schema/v1/index.ts +++ b/src/platform/plugins/private/links/server/content_management/schema/v1/index.ts @@ -9,4 +9,4 @@ export * from './cm_services'; export * from './transform_utils'; -export * from './types'; +export type * from './types'; diff --git a/src/platform/plugins/private/vis_types/pie/public/types/index.ts b/src/platform/plugins/private/vis_types/pie/public/types/index.ts index 34d385a3f5d62..9b6ee5bbc44a7 100644 --- a/src/platform/plugins/private/vis_types/pie/public/types/index.ts +++ b/src/platform/plugins/private/vis_types/pie/public/types/index.ts @@ -7,4 +7,4 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './types'; +export type * from './types'; diff --git a/src/platform/plugins/private/vis_types/xy/public/types/index.ts b/src/platform/plugins/private/vis_types/xy/public/types/index.ts index 348d4bdc94a8a..a0d67d76c51f4 100644 --- a/src/platform/plugins/private/vis_types/xy/public/types/index.ts +++ b/src/platform/plugins/private/vis_types/xy/public/types/index.ts @@ -8,4 +8,4 @@ */ export * from './constants'; -export * from './param'; +export type * from './param'; diff --git a/src/platform/plugins/shared/chart_expressions/expression_gauge/common/types/index.ts b/src/platform/plugins/shared/chart_expressions/expression_gauge/common/types/index.ts index ef0f1de057100..5c9eddc441a63 100644 --- a/src/platform/plugins/shared/chart_expressions/expression_gauge/common/types/index.ts +++ b/src/platform/plugins/shared/chart_expressions/expression_gauge/common/types/index.ts @@ -7,5 +7,5 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './expression_functions'; -export * from './expression_renderers'; +export type * from './expression_functions'; +export type * from './expression_renderers'; diff --git a/src/platform/plugins/shared/chart_expressions/expression_heatmap/common/types/index.ts b/src/platform/plugins/shared/chart_expressions/expression_heatmap/common/types/index.ts index ef0f1de057100..5c9eddc441a63 100644 --- a/src/platform/plugins/shared/chart_expressions/expression_heatmap/common/types/index.ts +++ b/src/platform/plugins/shared/chart_expressions/expression_heatmap/common/types/index.ts @@ -7,5 +7,5 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './expression_functions'; -export * from './expression_renderers'; +export type * from './expression_functions'; +export type * from './expression_renderers'; diff --git a/src/platform/plugins/shared/chart_expressions/expression_legacy_metric/common/types/index.ts b/src/platform/plugins/shared/chart_expressions/expression_legacy_metric/common/types/index.ts index ef0f1de057100..e154e772cec66 100644 --- a/src/platform/plugins/shared/chart_expressions/expression_legacy_metric/common/types/index.ts +++ b/src/platform/plugins/shared/chart_expressions/expression_legacy_metric/common/types/index.ts @@ -7,5 +7,5 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './expression_functions'; +export type * from './expression_functions'; export * from './expression_renderers'; diff --git a/src/platform/plugins/shared/chart_expressions/expression_metric/common/types/index.ts b/src/platform/plugins/shared/chart_expressions/expression_metric/common/types/index.ts index ef0f1de057100..e154e772cec66 100644 --- a/src/platform/plugins/shared/chart_expressions/expression_metric/common/types/index.ts +++ b/src/platform/plugins/shared/chart_expressions/expression_metric/common/types/index.ts @@ -7,5 +7,5 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './expression_functions'; +export type * from './expression_functions'; export * from './expression_renderers'; diff --git a/src/platform/plugins/shared/chart_expressions/expression_tagcloud/common/types/index.ts b/src/platform/plugins/shared/chart_expressions/expression_tagcloud/common/types/index.ts index ef0f1de057100..5c9eddc441a63 100644 --- a/src/platform/plugins/shared/chart_expressions/expression_tagcloud/common/types/index.ts +++ b/src/platform/plugins/shared/chart_expressions/expression_tagcloud/common/types/index.ts @@ -7,5 +7,5 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './expression_functions'; -export * from './expression_renderers'; +export type * from './expression_functions'; +export type * from './expression_renderers'; diff --git a/src/platform/plugins/shared/chart_expressions/expression_xy/common/types/index.ts b/src/platform/plugins/shared/chart_expressions/expression_xy/common/types/index.ts index ef0f1de057100..5c9eddc441a63 100644 --- a/src/platform/plugins/shared/chart_expressions/expression_xy/common/types/index.ts +++ b/src/platform/plugins/shared/chart_expressions/expression_xy/common/types/index.ts @@ -7,5 +7,5 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './expression_functions'; -export * from './expression_renderers'; +export type * from './expression_functions'; +export type * from './expression_renderers'; diff --git a/src/platform/plugins/shared/charts/common/static/overrides/index.ts b/src/platform/plugins/shared/charts/common/static/overrides/index.ts index f7b2ae1de5bf1..79d8a926bd047 100644 --- a/src/platform/plugins/shared/charts/common/static/overrides/index.ts +++ b/src/platform/plugins/shared/charts/common/static/overrides/index.ts @@ -7,4 +7,4 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './settings'; +export type * from './settings'; diff --git a/src/platform/plugins/shared/console/common/types/index.ts b/src/platform/plugins/shared/console/common/types/index.ts index 20481d0c7090e..892792ff25df8 100644 --- a/src/platform/plugins/shared/console/common/types/index.ts +++ b/src/platform/plugins/shared/console/common/types/index.ts @@ -7,6 +7,6 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './models'; -export * from './plugin_config'; -export * from './autocomplete_definitions'; +export type * from './models'; +export type * from './plugin_config'; +export type * from './autocomplete_definitions'; diff --git a/src/platform/plugins/shared/console/public/types/index.ts b/src/platform/plugins/shared/console/public/types/index.ts index 222282ede4d0f..8bdd319f5df74 100644 --- a/src/platform/plugins/shared/console/public/types/index.ts +++ b/src/platform/plugins/shared/console/public/types/index.ts @@ -7,10 +7,10 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './plugin_dependencies'; +export type * from './plugin_dependencies'; export * from './core_editor'; -export * from './token'; -export * from './tokens_provider'; +export type * from './token'; +export type * from './tokens_provider'; export * from './common'; export * from './embeddable_console'; export type { ClientConfigType } from './config'; diff --git a/src/platform/plugins/shared/content_management/server/event_stream/index.ts b/src/platform/plugins/shared/content_management/server/event_stream/index.ts index 97f97cc82bd4e..a6f6522c9310b 100644 --- a/src/platform/plugins/shared/content_management/server/event_stream/index.ts +++ b/src/platform/plugins/shared/content_management/server/event_stream/index.ts @@ -7,6 +7,6 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './types'; +export type * from './types'; export * from './es'; export { EventStreamService } from './event_stream_service'; diff --git a/src/platform/plugins/shared/data/common/query/index.ts b/src/platform/plugins/shared/data/common/query/index.ts index c1c6ee8b3db22..cc925b74e8f4e 100644 --- a/src/platform/plugins/shared/data/common/query/index.ts +++ b/src/platform/plugins/shared/data/common/query/index.ts @@ -8,8 +8,8 @@ */ export * from './timefilter'; -export * from './types'; +export type * from './types'; export * from './is_query'; -export * from './query_state'; +export type * from './query_state'; export { textBasedQueryStateToAstWithValidation } from './text_based_query_state_to_ast_with_validation'; export { textBasedQueryStateToExpressionAst } from './text_based_query_state_to_ast'; diff --git a/src/platform/plugins/shared/data/common/search/aggs/index.ts b/src/platform/plugins/shared/data/common/search/aggs/index.ts index 126e1e85bedd2..05c93512abcd0 100644 --- a/src/platform/plugins/shared/data/common/search/aggs/index.ts +++ b/src/platform/plugins/shared/data/common/search/aggs/index.ts @@ -17,5 +17,5 @@ export * from './aggs_service'; export * from './buckets'; export * from './metrics'; export * from './param_types'; -export * from './types'; +export type * from './types'; export * from './utils'; diff --git a/src/platform/plugins/shared/data/common/search/expressions/index.ts b/src/platform/plugins/shared/data/common/search/expressions/index.ts index 5eaccf33d6f56..efde058d66baf 100644 --- a/src/platform/plugins/shared/data/common/search/expressions/index.ts +++ b/src/platform/plugins/shared/data/common/search/expressions/index.ts @@ -22,7 +22,7 @@ export * from './ip_prefix_to_ast'; export * from './ip_range'; export * from './ip_range_to_ast'; export * from './kibana'; -export * from './kibana_context'; +export type * from './kibana_context'; export * from './kql'; export * from './lucene'; export * from './numerical_range'; @@ -32,7 +32,7 @@ export * from './query_filter_to_ast'; export * from './query_to_ast'; export * from './aggregate_query_to_ast'; export * from './timerange_to_ast'; -export * from './kibana_context_type'; +export type * from './kibana_context_type'; export * from './esaggs'; export * from './utils'; export * from './range'; diff --git a/src/platform/plugins/shared/data/common/search/search_source/fetch/index.ts b/src/platform/plugins/shared/data/common/search/search_source/fetch/index.ts index 3f621c66eeaa3..b83d6dda26c70 100644 --- a/src/platform/plugins/shared/data/common/search/search_source/fetch/index.ts +++ b/src/platform/plugins/shared/data/common/search/search_source/fetch/index.ts @@ -9,4 +9,4 @@ export { getSearchParamsFromRequest, getEsPreference } from './get_search_params'; export { RequestFailure } from './request_error'; -export * from './types'; +export type * from './types'; diff --git a/src/platform/plugins/shared/data/common/types.ts b/src/platform/plugins/shared/data/common/types.ts index b4458675e35d5..1ac62dfe19c73 100644 --- a/src/platform/plugins/shared/data/common/types.ts +++ b/src/platform/plugins/shared/data/common/types.ts @@ -9,5 +9,5 @@ export type { GetConfigFn } from '@kbn/data-service/src/types'; export type { RefreshInterval } from '@kbn/data-service-server'; -export * from './query/types'; +export type * from './query/types'; export * from './kbn_field_types/types'; diff --git a/src/platform/plugins/shared/data/public/query/timefilter/index.ts b/src/platform/plugins/shared/data/public/query/timefilter/index.ts index bb772de63f78e..cd7387c750a2e 100644 --- a/src/platform/plugins/shared/data/public/query/timefilter/index.ts +++ b/src/platform/plugins/shared/data/public/query/timefilter/index.ts @@ -10,7 +10,7 @@ export type { TimefilterSetup } from './timefilter_service'; export { TimefilterService } from './timefilter_service'; -export * from './types'; +export type * from './types'; export type { TimefilterContract, AutoRefreshDoneFn } from './timefilter'; export { Timefilter } from './timefilter'; export type { TimeHistoryContract } from './time_history'; diff --git a/src/platform/plugins/shared/data/public/search/aggs/index.ts b/src/platform/plugins/shared/data/public/search/aggs/index.ts index 171e9e080d9c9..42a9ba7c59144 100644 --- a/src/platform/plugins/shared/data/public/search/aggs/index.ts +++ b/src/platform/plugins/shared/data/public/search/aggs/index.ts @@ -8,4 +8,4 @@ */ export * from './aggs_service'; -export * from './types'; +export type * from './types'; diff --git a/src/platform/plugins/shared/data/server/search/aggs/index.ts b/src/platform/plugins/shared/data/server/search/aggs/index.ts index 171e9e080d9c9..42a9ba7c59144 100644 --- a/src/platform/plugins/shared/data/server/search/aggs/index.ts +++ b/src/platform/plugins/shared/data/server/search/aggs/index.ts @@ -8,4 +8,4 @@ */ export * from './aggs_service'; -export * from './types'; +export type * from './types'; diff --git a/src/platform/plugins/shared/data/server/search/index.ts b/src/platform/plugins/shared/data/server/search/index.ts index b483167035f88..5b50cff9bea79 100644 --- a/src/platform/plugins/shared/data/server/search/index.ts +++ b/src/platform/plugins/shared/data/server/search/index.ts @@ -7,7 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './types'; +export type * from './types'; export * from './strategies/es_search'; export * from './strategies/ese_search'; export * from './strategies/eql_search'; diff --git a/src/platform/plugins/shared/data/server/search/strategies/ese_search/index.ts b/src/platform/plugins/shared/data/server/search/strategies/ese_search/index.ts index a2763ef9a621a..8d22acac614e3 100644 --- a/src/platform/plugins/shared/data/server/search/strategies/ese_search/index.ts +++ b/src/platform/plugins/shared/data/server/search/strategies/ese_search/index.ts @@ -8,4 +8,4 @@ */ export { enhancedEsSearchStrategyProvider } from './ese_search_strategy'; -export * from './types'; +export type * from './types'; diff --git a/src/platform/plugins/shared/discover/public/application/main/components/top_nav/app_menu_actions/index.ts b/src/platform/plugins/shared/discover/public/application/main/components/top_nav/app_menu_actions/index.ts index 6a5c2f31946a2..670607bddaca2 100644 --- a/src/platform/plugins/shared/discover/public/application/main/components/top_nav/app_menu_actions/index.ts +++ b/src/platform/plugins/shared/discover/public/application/main/components/top_nav/app_menu_actions/index.ts @@ -13,4 +13,4 @@ export { getOpenSearchAppMenuItem } from './get_open_search'; export { getShareAppMenuItem } from './get_share'; export { getInspectAppMenuItem } from './get_inspect'; export { convertAppMenuItemToTopNavItem } from './convert_to_top_nav_item'; -export * from './types'; +export type * from './types'; diff --git a/src/platform/plugins/shared/discover/public/customizations/customization_types/index.ts b/src/platform/plugins/shared/discover/public/customizations/customization_types/index.ts index d9c5148d62d05..c4d781197ca12 100644 --- a/src/platform/plugins/shared/discover/public/customizations/customization_types/index.ts +++ b/src/platform/plugins/shared/discover/public/customizations/customization_types/index.ts @@ -7,9 +7,9 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './flyout_customization'; -export * from './search_bar_customization'; -export * from './top_nav_customization'; -export * from './histogram_customization'; -export * from './data_table_customisation'; -export * from './field_list_customisation'; +export type * from './flyout_customization'; +export type * from './search_bar_customization'; +export type * from './top_nav_customization'; +export type * from './histogram_customization'; +export type * from './data_table_customisation'; +export type * from './field_list_customisation'; diff --git a/src/platform/plugins/shared/discover/public/customizations/index.ts b/src/platform/plugins/shared/discover/public/customizations/index.ts index 523533b0a0b3c..3d4a4bcdb84d1 100644 --- a/src/platform/plugins/shared/discover/public/customizations/index.ts +++ b/src/platform/plugins/shared/discover/public/customizations/index.ts @@ -7,7 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './customization_types'; +export type * from './customization_types'; export * from './customization_provider'; -export * from './types'; +export type * from './types'; export type { DiscoverCustomization, DiscoverCustomizationService } from './customization_service'; diff --git a/src/platform/plugins/shared/discover_shared/public/services/discover_features/index.ts b/src/platform/plugins/shared/discover_shared/public/services/discover_features/index.ts index 3e5db541997c4..6be2f9e05b6aa 100644 --- a/src/platform/plugins/shared/discover_shared/public/services/discover_features/index.ts +++ b/src/platform/plugins/shared/discover_shared/public/services/discover_features/index.ts @@ -8,4 +8,4 @@ */ export * from './discover_features_service'; -export * from './types'; +export type * from './types'; diff --git a/src/platform/plugins/shared/expressions/common/ast/index.ts b/src/platform/plugins/shared/expressions/common/ast/index.ts index 3398b8f01b328..5c37e3eac0857 100644 --- a/src/platform/plugins/shared/expressions/common/ast/index.ts +++ b/src/platform/plugins/shared/expressions/common/ast/index.ts @@ -13,4 +13,4 @@ export * from './format_expression'; export * from './format'; export * from './parse_expression'; export * from './parse'; -export * from './types'; +export type * from './types'; diff --git a/src/platform/plugins/shared/expressions/common/execution/index.ts b/src/platform/plugins/shared/expressions/common/execution/index.ts index 0f7afc2c6bd34..311b1f6238b46 100644 --- a/src/platform/plugins/shared/expressions/common/execution/index.ts +++ b/src/platform/plugins/shared/expressions/common/execution/index.ts @@ -7,7 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './types'; +export type * from './types'; export * from './container'; export * from './execution'; export * from './execution_contract'; diff --git a/src/platform/plugins/shared/expressions/common/expression_functions/index.ts b/src/platform/plugins/shared/expressions/common/expression_functions/index.ts index 63171cc386450..50cdbc0f07741 100644 --- a/src/platform/plugins/shared/expressions/common/expression_functions/index.ts +++ b/src/platform/plugins/shared/expressions/common/expression_functions/index.ts @@ -7,8 +7,8 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './types'; -export * from './arguments'; +export type * from './types'; +export type * from './arguments'; export * from './expression_function_parameter'; export * from './expression_function'; export * from './specs'; diff --git a/src/platform/plugins/shared/expressions/common/expression_renderers/index.ts b/src/platform/plugins/shared/expressions/common/expression_renderers/index.ts index 4892de2c25360..4630ccdfc84a3 100644 --- a/src/platform/plugins/shared/expressions/common/expression_renderers/index.ts +++ b/src/platform/plugins/shared/expressions/common/expression_renderers/index.ts @@ -7,6 +7,6 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './types'; +export type * from './types'; export * from './expression_renderer'; export * from './expression_renderer_registry'; diff --git a/src/platform/plugins/shared/expressions/common/expression_types/index.ts b/src/platform/plugins/shared/expressions/common/expression_types/index.ts index 5b328c9c778b2..b2f1145a461e4 100644 --- a/src/platform/plugins/shared/expressions/common/expression_types/index.ts +++ b/src/platform/plugins/shared/expressions/common/expression_types/index.ts @@ -7,7 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './types'; +export type * from './types'; export * from './get_type'; export * from './serialize_provider'; export * from './expression_type'; diff --git a/src/platform/plugins/shared/expressions/common/types/index.ts b/src/platform/plugins/shared/expressions/common/types/index.ts index 1303722381624..68852646f20fc 100644 --- a/src/platform/plugins/shared/expressions/common/types/index.ts +++ b/src/platform/plugins/shared/expressions/common/types/index.ts @@ -10,4 +10,4 @@ export type { TypeToString, KnownTypeToString, TypeString, UnmappedTypeStrings } from './common'; export * from './style'; -export * from './registry'; +export type * from './registry'; diff --git a/src/platform/plugins/shared/inspector/common/adapters/index.ts b/src/platform/plugins/shared/inspector/common/adapters/index.ts index f724c68f8dd0d..c7f9713c67f5e 100644 --- a/src/platform/plugins/shared/inspector/common/adapters/index.ts +++ b/src/platform/plugins/shared/inspector/common/adapters/index.ts @@ -8,4 +8,4 @@ */ export * from './request'; -export * from './types'; +export type * from './types'; diff --git a/src/platform/plugins/shared/kibana_react/public/overlays/index.tsx b/src/platform/plugins/shared/kibana_react/public/overlays/index.tsx index 179b8b027a625..44bd47efd3ba7 100644 --- a/src/platform/plugins/shared/kibana_react/public/overlays/index.tsx +++ b/src/platform/plugins/shared/kibana_react/public/overlays/index.tsx @@ -7,5 +7,5 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './types'; +export type * from './types'; export * from './create_react_overlays'; diff --git a/src/platform/plugins/shared/kibana_utils/public/ui/index.ts b/src/platform/plugins/shared/kibana_utils/public/ui/index.ts index 4fee96664f4b8..24396fe1c9b29 100644 --- a/src/platform/plugins/shared/kibana_utils/public/ui/index.ts +++ b/src/platform/plugins/shared/kibana_utils/public/ui/index.ts @@ -7,4 +7,4 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './configurable'; +export type * from './configurable'; diff --git a/src/platform/plugins/shared/presentation_util/public/components/index.tsx b/src/platform/plugins/shared/presentation_util/public/components/index.tsx index 4195ef39f90b4..d1ce4032972d3 100644 --- a/src/platform/plugins/shared/presentation_util/public/components/index.tsx +++ b/src/platform/plugins/shared/presentation_util/public/components/index.tsx @@ -66,4 +66,4 @@ export { */ export const LazyExpressionInput = React.lazy(() => import('./expression_input')); -export * from './types'; +export type * from './types'; diff --git a/src/platform/plugins/shared/saved_objects_management/common/types/latest.ts b/src/platform/plugins/shared/saved_objects_management/common/types/latest.ts index f278309c22b03..0ad6e45e5a3c7 100644 --- a/src/platform/plugins/shared/saved_objects_management/common/types/latest.ts +++ b/src/platform/plugins/shared/saved_objects_management/common/types/latest.ts @@ -7,4 +7,4 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './v1'; +export type * from './v1'; diff --git a/src/platform/plugins/shared/share/common/url_service/index.ts b/src/platform/plugins/shared/share/common/url_service/index.ts index 63ab282d6a589..8f78a2c8c0c5b 100644 --- a/src/platform/plugins/shared/share/common/url_service/index.ts +++ b/src/platform/plugins/shared/share/common/url_service/index.ts @@ -9,4 +9,4 @@ export * from './url_service'; export * from './locators'; -export * from './short_urls'; +export type * from './short_urls'; diff --git a/src/platform/plugins/shared/share/common/url_service/locators/index.ts b/src/platform/plugins/shared/share/common/url_service/locators/index.ts index a1146a0fd2e79..fbd4f642413d8 100644 --- a/src/platform/plugins/shared/share/common/url_service/locators/index.ts +++ b/src/platform/plugins/shared/share/common/url_service/locators/index.ts @@ -7,7 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './types'; +export type * from './types'; export * from './locator'; export * from './locator_client'; export * from './redirect'; diff --git a/src/platform/plugins/shared/share/common/url_service/locators/redirect/index.ts b/src/platform/plugins/shared/share/common/url_service/locators/redirect/index.ts index 7e37c2b8b6d23..b15b62f01ece3 100644 --- a/src/platform/plugins/shared/share/common/url_service/locators/redirect/index.ts +++ b/src/platform/plugins/shared/share/common/url_service/locators/redirect/index.ts @@ -7,7 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './types'; +export type * from './types'; export * from './format_search_params'; export * from './parse_search_params'; export * from './space_url_parser'; diff --git a/src/platform/plugins/shared/share/common/url_service/short_urls/index.ts b/src/platform/plugins/shared/share/common/url_service/short_urls/index.ts index 34d385a3f5d62..9b6ee5bbc44a7 100644 --- a/src/platform/plugins/shared/share/common/url_service/short_urls/index.ts +++ b/src/platform/plugins/shared/share/common/url_service/short_urls/index.ts @@ -7,4 +7,4 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './types'; +export type * from './types'; diff --git a/src/platform/plugins/shared/share/server/url_service/index.ts b/src/platform/plugins/shared/share/server/url_service/index.ts index 4e1def301f570..b015c1d3e1cb9 100644 --- a/src/platform/plugins/shared/share/server/url_service/index.ts +++ b/src/platform/plugins/shared/share/server/url_service/index.ts @@ -7,7 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './types'; +export type * from './types'; export * from './short_urls'; export { registerUrlServiceRoutes } from './http/register_url_service_routes'; export { registerUrlServiceSavedObjectType } from './saved_objects/register_url_service_saved_object_type'; diff --git a/src/platform/plugins/shared/share/server/url_service/short_urls/index.ts b/src/platform/plugins/shared/share/server/url_service/short_urls/index.ts index 35dff9abc8df7..2480969054bb1 100644 --- a/src/platform/plugins/shared/share/server/url_service/short_urls/index.ts +++ b/src/platform/plugins/shared/share/server/url_service/short_urls/index.ts @@ -7,6 +7,6 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './types'; +export type * from './types'; export * from './short_url_client'; export * from './short_url_client_factory'; diff --git a/src/platform/plugins/shared/telemetry/common/types/index.ts b/src/platform/plugins/shared/telemetry/common/types/index.ts index 60cf572a6867e..b15316274d8bd 100644 --- a/src/platform/plugins/shared/telemetry/common/types/index.ts +++ b/src/platform/plugins/shared/telemetry/common/types/index.ts @@ -7,7 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './latest'; +export type * from './latest'; -export * as v1 from './v2'; // Just so v1 can also be used (but for some reason telemetry endpoints have always been v2 :shrug:) -export * as v2 from './v2'; +export type * as v1 from './v2'; // Just so v1 can also be used (but for some reason telemetry endpoints have always been v2 :shrug:) +export type * as v2 from './v2'; diff --git a/src/platform/plugins/shared/telemetry/common/types/latest.ts b/src/platform/plugins/shared/telemetry/common/types/latest.ts index eb42cc01e6710..e142da1b367d0 100644 --- a/src/platform/plugins/shared/telemetry/common/types/latest.ts +++ b/src/platform/plugins/shared/telemetry/common/types/latest.ts @@ -7,4 +7,4 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './v2'; +export type * from './v2'; diff --git a/src/platform/plugins/shared/ui_actions/public/actions/index.ts b/src/platform/plugins/shared/ui_actions/public/actions/index.ts index bd08ab98e9226..5673bf3102433 100644 --- a/src/platform/plugins/shared/ui_actions/public/actions/index.ts +++ b/src/platform/plugins/shared/ui_actions/public/actions/index.ts @@ -7,7 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './action'; +export type * from './action'; export * from './action_internal'; export * from './create_action'; export * from './incompatible_action_error'; diff --git a/src/platform/plugins/shared/ui_actions_enhanced/public/drilldowns/drilldown_manager/index.ts b/src/platform/plugins/shared/ui_actions_enhanced/public/drilldowns/drilldown_manager/index.ts index af7220f9805bd..4b25b3e40714d 100644 --- a/src/platform/plugins/shared/ui_actions_enhanced/public/drilldowns/drilldown_manager/index.ts +++ b/src/platform/plugins/shared/ui_actions_enhanced/public/drilldowns/drilldown_manager/index.ts @@ -7,5 +7,5 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './types'; +export type * from './types'; export * from './containers'; diff --git a/src/platform/plugins/shared/ui_actions_enhanced/public/drilldowns/index.ts b/src/platform/plugins/shared/ui_actions_enhanced/public/drilldowns/index.ts index bea9c2307c69c..263e387a86c46 100644 --- a/src/platform/plugins/shared/ui_actions_enhanced/public/drilldowns/index.ts +++ b/src/platform/plugins/shared/ui_actions_enhanced/public/drilldowns/index.ts @@ -7,5 +7,5 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './drilldown_definition'; +export type * from './drilldown_definition'; export * from './drilldown_manager'; diff --git a/src/platform/plugins/shared/ui_actions_enhanced/public/dynamic_actions/index.ts b/src/platform/plugins/shared/ui_actions_enhanced/public/dynamic_actions/index.ts index f15a6ff1357d0..28fa852634276 100644 --- a/src/platform/plugins/shared/ui_actions_enhanced/public/dynamic_actions/index.ts +++ b/src/platform/plugins/shared/ui_actions_enhanced/public/dynamic_actions/index.ts @@ -7,9 +7,9 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './types'; +export type * from './types'; export * from './action_factory'; -export * from './action_factory_definition'; +export type * from './action_factory_definition'; export * from './dynamic_action_storage'; export * from './dynamic_action_manager_state'; export * from './dynamic_action_manager'; diff --git a/src/platform/plugins/shared/usage_collection/common/types/index.ts b/src/platform/plugins/shared/usage_collection/common/types/index.ts index a4c830df93545..68c53e014de66 100644 --- a/src/platform/plugins/shared/usage_collection/common/types/index.ts +++ b/src/platform/plugins/shared/usage_collection/common/types/index.ts @@ -7,6 +7,6 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * as Stats from './stats'; -export * as UiCounters from './ui_counters'; -export * as UsageCounters from './usage_counters'; +export type * as Stats from './stats'; +export type * as UiCounters from './ui_counters'; +export type * as UsageCounters from './usage_counters'; diff --git a/src/platform/plugins/shared/usage_collection/common/types/stats/index.ts b/src/platform/plugins/shared/usage_collection/common/types/stats/index.ts index 0983bcbbe5968..1ba99617e99b5 100644 --- a/src/platform/plugins/shared/usage_collection/common/types/stats/index.ts +++ b/src/platform/plugins/shared/usage_collection/common/types/stats/index.ts @@ -7,5 +7,5 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * as v1 from './v1'; -export * from './latest'; +export type * as v1 from './v1'; +export type * from './latest'; diff --git a/src/platform/plugins/shared/usage_collection/common/types/stats/latest.ts b/src/platform/plugins/shared/usage_collection/common/types/stats/latest.ts index 19ed487561f57..79bf04a003750 100644 --- a/src/platform/plugins/shared/usage_collection/common/types/stats/latest.ts +++ b/src/platform/plugins/shared/usage_collection/common/types/stats/latest.ts @@ -7,5 +7,5 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * as OpsMetricsCopy from './core_metrics'; -export * from './v1'; +export type * as OpsMetricsCopy from './core_metrics'; +export type * from './v1'; diff --git a/src/platform/plugins/shared/usage_collection/common/types/ui_counters/index.ts b/src/platform/plugins/shared/usage_collection/common/types/ui_counters/index.ts index 0983bcbbe5968..1ba99617e99b5 100644 --- a/src/platform/plugins/shared/usage_collection/common/types/ui_counters/index.ts +++ b/src/platform/plugins/shared/usage_collection/common/types/ui_counters/index.ts @@ -7,5 +7,5 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * as v1 from './v1'; -export * from './latest'; +export type * as v1 from './v1'; +export type * from './latest'; diff --git a/src/platform/plugins/shared/usage_collection/common/types/ui_counters/latest.ts b/src/platform/plugins/shared/usage_collection/common/types/ui_counters/latest.ts index 717c5b9800eae..5cd18d7ca4672 100644 --- a/src/platform/plugins/shared/usage_collection/common/types/ui_counters/latest.ts +++ b/src/platform/plugins/shared/usage_collection/common/types/ui_counters/latest.ts @@ -7,4 +7,4 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * as v1 from './v1'; +export type * as v1 from './v1'; diff --git a/src/platform/plugins/shared/usage_collection/common/types/usage_counters/index.ts b/src/platform/plugins/shared/usage_collection/common/types/usage_counters/index.ts index 0983bcbbe5968..1ba99617e99b5 100644 --- a/src/platform/plugins/shared/usage_collection/common/types/usage_counters/index.ts +++ b/src/platform/plugins/shared/usage_collection/common/types/usage_counters/index.ts @@ -7,5 +7,5 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * as v1 from './v1'; -export * from './latest'; +export type * as v1 from './v1'; +export type * from './latest'; diff --git a/src/platform/plugins/shared/usage_collection/common/types/usage_counters/latest.ts b/src/platform/plugins/shared/usage_collection/common/types/usage_counters/latest.ts index f278309c22b03..0ad6e45e5a3c7 100644 --- a/src/platform/plugins/shared/usage_collection/common/types/usage_counters/latest.ts +++ b/src/platform/plugins/shared/usage_collection/common/types/usage_counters/latest.ts @@ -7,4 +7,4 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './v1'; +export type * from './v1'; diff --git a/src/platform/plugins/shared/usage_collection/server/collector/collector_set.ts b/src/platform/plugins/shared/usage_collection/server/collector/collector_set.ts index 0aa65e9e3b000..b9e32231f901a 100644 --- a/src/platform/plugins/shared/usage_collection/server/collector/collector_set.ts +++ b/src/platform/plugins/shared/usage_collection/server/collector/collector_set.ts @@ -249,7 +249,7 @@ export class CollectorSet implements ICollectorSet { this.fetchingCollectors.set(collector, wrappedPromise); - wrappedPromise.finally(() => this.fetchingCollectors.delete(collector)); + void wrappedPromise.finally(() => this.fetchingCollectors.delete(collector)); return await wrappedPromise; }) diff --git a/src/platform/plugins/shared/vis_types/timeseries/public/convert_to_lens/lib/convert/index.ts b/src/platform/plugins/shared/vis_types/timeseries/public/convert_to_lens/lib/convert/index.ts index 578db27a73d6b..8ecb4950fb7a4 100644 --- a/src/platform/plugins/shared/vis_types/timeseries/public/convert_to_lens/lib/convert/index.ts +++ b/src/platform/plugins/shared/vis_types/timeseries/public/convert_to_lens/lib/convert/index.ts @@ -34,4 +34,4 @@ export { convertToCounterRateColumn } from './counter_rate'; export { convertToStandartDeviationColumn } from './std_deviation'; export { convertVarianceToFormulaColumn } from './variance'; -export * from './types'; +export type * from './types'; diff --git a/src/platform/plugins/shared/visualizations/common/content_management/index.ts b/src/platform/plugins/shared/visualizations/common/content_management/index.ts index 580465a5e97f5..edd72bd21270c 100644 --- a/src/platform/plugins/shared/visualizations/common/content_management/index.ts +++ b/src/platform/plugins/shared/visualizations/common/content_management/index.ts @@ -31,4 +31,4 @@ export type { VisualizationCrudTypes, } from './latest'; -export * as VisualizationV1 from './v1'; +export type * as VisualizationV1 from './v1'; diff --git a/src/platform/plugins/shared/visualizations/common/content_management/latest.ts b/src/platform/plugins/shared/visualizations/common/content_management/latest.ts index f278309c22b03..0ad6e45e5a3c7 100644 --- a/src/platform/plugins/shared/visualizations/common/content_management/latest.ts +++ b/src/platform/plugins/shared/visualizations/common/content_management/latest.ts @@ -7,4 +7,4 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './v1'; +export type * from './v1'; diff --git a/src/platform/plugins/shared/visualizations/common/convert_to_lens/lib/convert/index.ts b/src/platform/plugins/shared/visualizations/common/convert_to_lens/lib/convert/index.ts index d77bd07ad6168..299869ca18da6 100644 --- a/src/platform/plugins/shared/visualizations/common/convert_to_lens/lib/convert/index.ts +++ b/src/platform/plugins/shared/visualizations/common/convert_to_lens/lib/convert/index.ts @@ -18,7 +18,7 @@ export * from './percentile'; export * from './sibling_pipeline'; export * from './std_deviation'; export * from './terms'; -export * from './types'; +export type * from './types'; export * from './last_value'; export * from './range'; export * from './percentage_mode'; diff --git a/src/platform/plugins/shared/visualizations/common/convert_to_lens/types/index.ts b/src/platform/plugins/shared/visualizations/common/convert_to_lens/types/index.ts index 14b475cd307fa..b964f54f71696 100644 --- a/src/platform/plugins/shared/visualizations/common/convert_to_lens/types/index.ts +++ b/src/platform/plugins/shared/visualizations/common/convert_to_lens/types/index.ts @@ -7,9 +7,9 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './common'; -export * from './params'; -export * from './operations'; -export * from './columns'; -export * from './context'; +export type * from './common'; +export type * from './params'; +export type * from './operations'; +export type * from './columns'; +export type * from './context'; export * from './configurations'; diff --git a/tsconfig.base.json b/tsconfig.base.json index 76b5ec4c001ed..f7af272ef9fc4 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -2298,6 +2298,7 @@ // We need the custom typings "proxy" because our current import-resolver doesn't support "exports" in package.json. // We should be able to remove this once we support cjs/esm interop. "@elastic/opentelemetry-node/sdk": ["typings/@elastic/opentelemetry-node/sdk"], + "@typescript-eslint/parser": ["typings/@typescript-eslint/parser"], }, // Support .tsx files and transform JSX into calls to React.createElement "jsx": "react", diff --git a/typings/@typescript-eslint/parser.d.ts b/typings/@typescript-eslint/parser.d.ts new file mode 100644 index 0000000000000..da246cb95bf70 --- /dev/null +++ b/typings/@typescript-eslint/parser.d.ts @@ -0,0 +1,12 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side + * Public License v 1"; you may not use this file except in compliance with, at + * your election, the "Elastic License 2.0", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +declare module '@typescript-eslint/parser' { + export * from '@typescript-eslint/parser/dist'; +} diff --git a/x-pack/platform/packages/shared/ai-assistant/common/src/index.ts b/x-pack/platform/packages/shared/ai-assistant/common/src/index.ts index 1c7792630d1ba..42dde155a17ec 100644 --- a/x-pack/platform/packages/shared/ai-assistant/common/src/index.ts +++ b/x-pack/platform/packages/shared/ai-assistant/common/src/index.ts @@ -5,5 +5,5 @@ * 2.0. */ -export * from './types'; +export type * from './types'; export * from './utils'; diff --git a/x-pack/platform/packages/shared/index-lifecycle-management/index_lifecycle_management_common_shared/index.ts b/x-pack/platform/packages/shared/index-lifecycle-management/index_lifecycle_management_common_shared/index.ts index 238f7211204a0..58aa6c063b504 100644 --- a/x-pack/platform/packages/shared/index-lifecycle-management/index_lifecycle_management_common_shared/index.ts +++ b/x-pack/platform/packages/shared/index-lifecycle-management/index_lifecycle_management_common_shared/index.ts @@ -6,5 +6,5 @@ */ export const ILM_LOCATOR_ID = 'ILM_LOCATOR_ID'; -export * from './src/policies'; -export * from './src/locator'; +export type * from './src/policies'; +export type * from './src/locator'; diff --git a/x-pack/platform/packages/shared/index-management/index_management_shared_types/index.ts b/x-pack/platform/packages/shared/index-management/index_management_shared_types/index.ts index d89dd466bd272..fb9e907f279b6 100644 --- a/x-pack/platform/packages/shared/index-management/index_management_shared_types/index.ts +++ b/x-pack/platform/packages/shared/index-management/index_management_shared_types/index.ts @@ -5,6 +5,6 @@ * 2.0. */ -export * from './src/types'; +export type * from './src/types'; export * from './src/home_sections'; -export * from './src/services'; +export type * from './src/services'; diff --git a/x-pack/platform/packages/shared/index-management/index_management_shared_types/src/services/index.ts b/x-pack/platform/packages/shared/index-management/index_management_shared_types/src/services/index.ts index 1a3d90ef568e2..27d90be281841 100644 --- a/x-pack/platform/packages/shared/index-management/index_management_shared_types/src/services/index.ts +++ b/x-pack/platform/packages/shared/index-management/index_management_shared_types/src/services/index.ts @@ -4,5 +4,5 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -export * from './extensions_service'; -export * from './public_api_service'; +export type * from './extensions_service'; +export type * from './public_api_service'; diff --git a/x-pack/platform/packages/shared/kbn-apm-types/es_schemas_raw.ts b/x-pack/platform/packages/shared/kbn-apm-types/es_schemas_raw.ts index 659ad735667e5..9682b7bae5be1 100644 --- a/x-pack/platform/packages/shared/kbn-apm-types/es_schemas_raw.ts +++ b/x-pack/platform/packages/shared/kbn-apm-types/es_schemas_raw.ts @@ -5,5 +5,5 @@ * 2.0. */ -export * from './src/es_schemas/raw'; -export * from './src/es_schemas/raw/fields'; +export type * from './src/es_schemas/raw'; +export type * from './src/es_schemas/raw/fields'; diff --git a/x-pack/platform/packages/shared/kbn-apm-types/es_schemas_ui.ts b/x-pack/platform/packages/shared/kbn-apm-types/es_schemas_ui.ts index be99b3d38bcd0..8e25198744b51 100644 --- a/x-pack/platform/packages/shared/kbn-apm-types/es_schemas_ui.ts +++ b/x-pack/platform/packages/shared/kbn-apm-types/es_schemas_ui.ts @@ -5,5 +5,5 @@ * 2.0. */ -export * from './src/es_schemas/ui'; -export * from './src/es_schemas/ui/fields'; +export type * from './src/es_schemas/ui'; +export type * from './src/es_schemas/ui/fields'; diff --git a/x-pack/platform/packages/shared/kbn-apm-types/index.ts b/x-pack/platform/packages/shared/kbn-apm-types/index.ts index d6e086e17b8ea..cff2a634130d6 100644 --- a/x-pack/platform/packages/shared/kbn-apm-types/index.ts +++ b/x-pack/platform/packages/shared/kbn-apm-types/index.ts @@ -6,5 +6,5 @@ */ export * from './es_fields'; -export * from './es_schemas_raw'; -export * from './es_schemas_ui'; +export type * from './es_schemas_raw'; +export type * from './es_schemas_ui'; diff --git a/x-pack/platform/packages/shared/kbn-apm-types/src/es_schemas/raw/fields/index.ts b/x-pack/platform/packages/shared/kbn-apm-types/src/es_schemas/raw/fields/index.ts index 6a3dab613e447..bee73fc91b48b 100644 --- a/x-pack/platform/packages/shared/kbn-apm-types/src/es_schemas/raw/fields/index.ts +++ b/x-pack/platform/packages/shared/kbn-apm-types/src/es_schemas/raw/fields/index.ts @@ -5,21 +5,21 @@ * 2.0. */ -export * from './cloud'; -export * from './container'; -export * from './event_outcome'; -export * from './faas'; -export * from './host'; -export * from './http'; -export * from './kubernetes'; -export * from './observer'; -export * from './page'; -export * from './process'; -export * from './service'; -export * from './span_links'; -export * from './stackframe'; -export * from './timestamp_us'; -export * from './url'; -export * from './user_agent'; -export * from './user'; -export * from './otel'; +export type * from './cloud'; +export type * from './container'; +export type * from './event_outcome'; +export type * from './faas'; +export type * from './host'; +export type * from './http'; +export type * from './kubernetes'; +export type * from './observer'; +export type * from './page'; +export type * from './process'; +export type * from './service'; +export type * from './span_links'; +export type * from './stackframe'; +export type * from './timestamp_us'; +export type * from './url'; +export type * from './user_agent'; +export type * from './user'; +export type * from './otel'; diff --git a/x-pack/platform/packages/shared/kbn-apm-types/src/es_schemas/raw/fields/otel/index.ts b/x-pack/platform/packages/shared/kbn-apm-types/src/es_schemas/raw/fields/otel/index.ts index eabadcb33b3ad..46f4c5a631b1e 100644 --- a/x-pack/platform/packages/shared/kbn-apm-types/src/es_schemas/raw/fields/otel/index.ts +++ b/x-pack/platform/packages/shared/kbn-apm-types/src/es_schemas/raw/fields/otel/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './status_code'; +export type * from './status_code'; diff --git a/x-pack/platform/packages/shared/kbn-apm-types/src/es_schemas/raw/index.ts b/x-pack/platform/packages/shared/kbn-apm-types/src/es_schemas/raw/index.ts index 0074a036d6c91..6e274a1db34f9 100644 --- a/x-pack/platform/packages/shared/kbn-apm-types/src/es_schemas/raw/index.ts +++ b/x-pack/platform/packages/shared/kbn-apm-types/src/es_schemas/raw/index.ts @@ -5,9 +5,9 @@ * 2.0. */ -export * from './apm_base_doc'; -export * from './error_raw'; -export * from './event_raw'; -export * from './metric_raw'; -export * from './span_raw'; -export * from './transaction_raw'; +export type * from './apm_base_doc'; +export type * from './error_raw'; +export type * from './event_raw'; +export type * from './metric_raw'; +export type * from './span_raw'; +export type * from './transaction_raw'; diff --git a/x-pack/platform/packages/shared/kbn-apm-types/src/es_schemas/ui/fields/index.ts b/x-pack/platform/packages/shared/kbn-apm-types/src/es_schemas/ui/fields/index.ts index 483a206d58084..ac2961e9c8742 100644 --- a/x-pack/platform/packages/shared/kbn-apm-types/src/es_schemas/ui/fields/index.ts +++ b/x-pack/platform/packages/shared/kbn-apm-types/src/es_schemas/ui/fields/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './agent'; +export type * from './agent'; diff --git a/x-pack/platform/packages/shared/kbn-apm-types/src/es_schemas/ui/index.ts b/x-pack/platform/packages/shared/kbn-apm-types/src/es_schemas/ui/index.ts index 062ee79906641..c615b5627b990 100644 --- a/x-pack/platform/packages/shared/kbn-apm-types/src/es_schemas/ui/index.ts +++ b/x-pack/platform/packages/shared/kbn-apm-types/src/es_schemas/ui/index.ts @@ -5,8 +5,8 @@ * 2.0. */ -export * from './apm_error'; -export * from './event'; -export * from './metric'; -export * from './span'; -export * from './transaction'; +export type * from './apm_error'; +export type * from './event'; +export type * from './metric'; +export type * from './span'; +export type * from './transaction'; diff --git a/x-pack/platform/packages/shared/kbn-slo-schema/src/models/index.ts b/x-pack/platform/packages/shared/kbn-slo-schema/src/models/index.ts index d281720a1a6a2..5df5b4a786ece 100644 --- a/x-pack/platform/packages/shared/kbn-slo-schema/src/models/index.ts +++ b/x-pack/platform/packages/shared/kbn-slo-schema/src/models/index.ts @@ -5,5 +5,5 @@ * 2.0. */ -export * from './pagination'; +export type * from './pagination'; export * from './duration'; diff --git a/x-pack/platform/packages/shared/kbn-slo-schema/src/rest_specs/index.ts b/x-pack/platform/packages/shared/kbn-slo-schema/src/rest_specs/index.ts index 48a2d88e0c1bb..a699d4dbd2648 100644 --- a/x-pack/platform/packages/shared/kbn-slo-schema/src/rest_specs/index.ts +++ b/x-pack/platform/packages/shared/kbn-slo-schema/src/rest_specs/index.ts @@ -7,5 +7,5 @@ export * from './slo'; export * from './routes'; -export * from './indicators'; -export * from './common'; +export type * from './indicators'; +export type * from './common'; diff --git a/x-pack/platform/packages/shared/kbn-streams-schema/src/models/ingest/processors/index.ts b/x-pack/platform/packages/shared/kbn-streams-schema/src/models/ingest/processors/index.ts index 9257fd54827f9..14109e6540922 100644 --- a/x-pack/platform/packages/shared/kbn-streams-schema/src/models/ingest/processors/index.ts +++ b/x-pack/platform/packages/shared/kbn-streams-schema/src/models/ingest/processors/index.ts @@ -397,5 +397,5 @@ export function getProcessorConfig { updateProps: (newProps: Props) => void; } +// eslint-disable-next-line @typescript-eslint/no-shadow export interface ArgumentSpec { /** The argument type */ name: string; @@ -54,6 +55,7 @@ export interface ArgumentSpec { ) => void; } +// eslint-disable-next-line @typescript-eslint/no-shadow export type ArgumentFactory = () => ArgumentSpec; // Settings for the argument to display in the sidebar diff --git a/x-pack/platform/plugins/private/canvas/types/index.ts b/x-pack/platform/plugins/private/canvas/types/index.ts index 2932aea617b16..388fb41d62b1d 100644 --- a/x-pack/platform/plugins/private/canvas/types/index.ts +++ b/x-pack/platform/plugins/private/canvas/types/index.ts @@ -6,15 +6,15 @@ */ export * from '@kbn/expressions-plugin/common'; -export * from './assets'; -export * from './canvas'; -export * from './elements'; -export * from './embeddables'; +export type * from './assets'; +export type * from './canvas'; +export type * from './elements'; +export type * from './embeddables'; export * from './filters'; export * from './functions'; -export * from './renderers'; -export * from './shortcuts'; +export type * from './renderers'; +export type * from './shortcuts'; export * from './state'; -export * from './strategy'; +export type * from './strategy'; export * from './style'; -export * from './telemetry'; +export type * from './telemetry'; diff --git a/x-pack/platform/plugins/private/data_usage/server/types/index.ts b/x-pack/platform/plugins/private/data_usage/server/types/index.ts index 6cc0ccaa93a6d..d6aaa0f3a4aad 100644 --- a/x-pack/platform/plugins/private/data_usage/server/types/index.ts +++ b/x-pack/platform/plugins/private/data_usage/server/types/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './types'; +export type * from './types'; diff --git a/x-pack/platform/plugins/private/data_visualizer/server/types/index.ts b/x-pack/platform/plugins/private/data_visualizer/server/types/index.ts index 2fc0fb2a6173b..afa3bba9fc14c 100644 --- a/x-pack/platform/plugins/private/data_visualizer/server/types/index.ts +++ b/x-pack/platform/plugins/private/data_visualizer/server/types/index.ts @@ -4,4 +4,4 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -export * from './deps'; +export type * from './deps'; diff --git a/x-pack/platform/plugins/private/file_upload/public/importer/index.ts b/x-pack/platform/plugins/private/file_upload/public/importer/index.ts index 238adb3afa6b7..ea13ed89fe5bf 100644 --- a/x-pack/platform/plugins/private/file_upload/public/importer/index.ts +++ b/x-pack/platform/plugins/private/file_upload/public/importer/index.ts @@ -7,5 +7,5 @@ export { importerFactory } from './importer_factory'; export { validateFile } from './validate_file'; -export * from './types'; +export type * from './types'; export { MessageImporter } from './message_importer'; diff --git a/x-pack/platform/plugins/private/graph/common/content_management/index.ts b/x-pack/platform/plugins/private/graph/common/content_management/index.ts index cdaef8264125d..45d8cdd9c6c77 100644 --- a/x-pack/platform/plugins/private/graph/common/content_management/index.ts +++ b/x-pack/platform/plugins/private/graph/common/content_management/index.ts @@ -29,4 +29,4 @@ export type { GraphCrudTypes, } from './latest'; -export * as GraphV1 from './v1'; +export type * as GraphV1 from './v1'; diff --git a/x-pack/platform/plugins/private/graph/common/content_management/latest.ts b/x-pack/platform/plugins/private/graph/common/content_management/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/private/graph/common/content_management/latest.ts +++ b/x-pack/platform/plugins/private/graph/common/content_management/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/private/graph/public/types/index.ts b/x-pack/platform/plugins/private/graph/public/types/index.ts index b50d27703fbe4..c2982fba43afa 100644 --- a/x-pack/platform/plugins/private/graph/public/types/index.ts +++ b/x-pack/platform/plugins/private/graph/public/types/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -export * from './config'; -export * from './app_state'; -export * from './workspace_state'; -export * from './persistence'; +export type * from './config'; +export type * from './app_state'; +export type * from './workspace_state'; +export type * from './persistence'; diff --git a/x-pack/platform/plugins/private/index_lifecycle_management/common/types/index.ts b/x-pack/platform/plugins/private/index_lifecycle_management/common/types/index.ts index ee5939e328ce5..001abc6673242 100644 --- a/x-pack/platform/plugins/private/index_lifecycle_management/common/types/index.ts +++ b/x-pack/platform/plugins/private/index_lifecycle_management/common/types/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -export * from './api'; +export type * from './api'; export * from '@kbn/index-lifecycle-management-common-shared'; diff --git a/x-pack/platform/plugins/private/monitoring/server/lib/pagination/filter.ts b/x-pack/platform/plugins/private/monitoring/server/lib/pagination/filter.ts index d6d5f55dcdd3c..09ad2165a2944 100644 --- a/x-pack/platform/plugins/private/monitoring/server/lib/pagination/filter.ts +++ b/x-pack/platform/plugins/private/monitoring/server/lib/pagination/filter.ts @@ -22,6 +22,7 @@ export function filter( ): T[] { return data.filter((item) => { for (const field of fields) { + // @ts-expect-error upgrade typescript v5.4.5 if (filterFn(get(item, field, ''), queryText)) { return true; } diff --git a/x-pack/platform/plugins/private/monitoring/server/rules/rules_factory.ts b/x-pack/platform/plugins/private/monitoring/server/rules/rules_factory.ts index 72aea1b57ea6e..9876c12af8f3b 100644 --- a/x-pack/platform/plugins/private/monitoring/server/rules/rules_factory.ts +++ b/x-pack/platform/plugins/private/monitoring/server/rules/rules_factory.ts @@ -64,6 +64,7 @@ export class RulesFactory { type: string, rulesClient: RulesClient | undefined ): Promise { + // @ts-expect-error upgrade typescript v5.4.5 const ruleCls = BY_TYPE[type]; if (!ruleCls || !rulesClient) { return []; diff --git a/x-pack/platform/plugins/private/rollup/server/collectors/helpers.ts b/x-pack/platform/plugins/private/rollup/server/collectors/helpers.ts index c4c9187307031..c1d2f32240278 100644 --- a/x-pack/platform/plugins/private/rollup/server/collectors/helpers.ts +++ b/x-pack/platform/plugins/private/rollup/server/collectors/helpers.ts @@ -106,7 +106,7 @@ export async function fetchRollupSavedSearches( while (savedSearchesList.hits.hits && savedSearchesList.hits.hits.length !== 0) { const savedSearches = get(savedSearchesList, 'hits.hits', []); - savedSearches.map(async (savedSearch: any) => { + void savedSearches.map(async (savedSearch: any) => { const { _id: savedObjectId } = savedSearch; const references: Array<{ name: string; id: string; type: string }> | undefined = get( savedSearch, diff --git a/x-pack/platform/plugins/private/snapshot_restore/common/types/index.ts b/x-pack/platform/plugins/private/snapshot_restore/common/types/index.ts index 7a3ffd6ad6bac..03b169b5a8324 100644 --- a/x-pack/platform/plugins/private/snapshot_restore/common/types/index.ts +++ b/x-pack/platform/plugins/private/snapshot_restore/common/types/index.ts @@ -5,8 +5,8 @@ * 2.0. */ -export * from './repository'; -export * from './snapshot'; -export * from './restore'; -export * from './policy'; -export * from './indices'; +export type * from './repository'; +export type * from './snapshot'; +export type * from './restore'; +export type * from './policy'; +export type * from './indices'; diff --git a/x-pack/platform/plugins/shared/actions/common/routes/connector/apis/connector_types/types/latest.ts b/x-pack/platform/plugins/shared/actions/common/routes/connector/apis/connector_types/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/actions/common/routes/connector/apis/connector_types/types/latest.ts +++ b/x-pack/platform/plugins/shared/actions/common/routes/connector/apis/connector_types/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/actions/common/routes/connector/apis/create/types/latest.ts b/x-pack/platform/plugins/shared/actions/common/routes/connector/apis/create/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/actions/common/routes/connector/apis/create/types/latest.ts +++ b/x-pack/platform/plugins/shared/actions/common/routes/connector/apis/create/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/actions/common/routes/connector/apis/delete/types/latest.ts b/x-pack/platform/plugins/shared/actions/common/routes/connector/apis/delete/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/actions/common/routes/connector/apis/delete/types/latest.ts +++ b/x-pack/platform/plugins/shared/actions/common/routes/connector/apis/delete/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/actions/common/routes/connector/apis/execute/types/latest.ts b/x-pack/platform/plugins/shared/actions/common/routes/connector/apis/execute/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/actions/common/routes/connector/apis/execute/types/latest.ts +++ b/x-pack/platform/plugins/shared/actions/common/routes/connector/apis/execute/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/actions/common/routes/connector/apis/get/types/latest.ts b/x-pack/platform/plugins/shared/actions/common/routes/connector/apis/get/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/actions/common/routes/connector/apis/get/types/latest.ts +++ b/x-pack/platform/plugins/shared/actions/common/routes/connector/apis/get/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/actions/common/routes/connector/apis/update/types/latest.ts b/x-pack/platform/plugins/shared/actions/common/routes/connector/apis/update/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/actions/common/routes/connector/apis/update/types/latest.ts +++ b/x-pack/platform/plugins/shared/actions/common/routes/connector/apis/update/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/actions/common/routes/connector/response/types/latest.ts b/x-pack/platform/plugins/shared/actions/common/routes/connector/response/types/latest.ts index dce95e7328199..ca233e28b7864 100644 --- a/x-pack/platform/plugins/shared/actions/common/routes/connector/response/types/latest.ts +++ b/x-pack/platform/plugins/shared/actions/common/routes/connector/response/types/latest.ts @@ -4,4 +4,4 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/actions/server/sub_action_framework/helpers/validators.ts b/x-pack/platform/plugins/shared/actions/server/sub_action_framework/helpers/validators.ts index 5f0ace91cf704..f40e49239dea5 100644 --- a/x-pack/platform/plugins/shared/actions/server/sub_action_framework/helpers/validators.ts +++ b/x-pack/platform/plugins/shared/actions/server/sub_action_framework/helpers/validators.ts @@ -30,7 +30,7 @@ export const urlAllowListValidator = (urlKey: string) => { return (obj: T, validatorServices: ValidatorServices) => { const { configurationUtilities } = validatorServices; try { - const url = get(obj, urlKey, ''); + const url = get(obj, urlKey, '') as string; configurationUtilities.ensureUriAllowed(url); } catch (allowListError) { diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/alert_delete/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/alert_delete/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/alert_delete/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/alert_delete/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/backfill/apis/delete/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/backfill/apis/delete/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/backfill/apis/delete/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/backfill/apis/delete/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/backfill/apis/find/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/backfill/apis/find/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/backfill/apis/find/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/backfill/apis/find/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/backfill/apis/get/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/backfill/apis/get/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/backfill/apis/get/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/backfill/apis/get/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/backfill/apis/schedule/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/backfill/apis/schedule/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/backfill/apis/schedule/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/backfill/apis/schedule/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/backfill/response/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/backfill/response/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/backfill/response/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/backfill/response/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/framework/apis/health/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/framework/apis/health/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/framework/apis/health/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/framework/apis/health/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/gaps/apis/fill/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/gaps/apis/fill/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/gaps/apis/fill/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/gaps/apis/fill/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/gaps/apis/find/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/gaps/apis/find/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/gaps/apis/find/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/gaps/apis/find/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/gaps/apis/get_gaps_summary_by_rule_ids/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/gaps/apis/get_gaps_summary_by_rule_ids/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/gaps/apis/get_gaps_summary_by_rule_ids/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/gaps/apis/get_gaps_summary_by_rule_ids/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/gaps/apis/get_rules_with_gaps/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/gaps/apis/get_rules_with_gaps/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/gaps/apis/get_rules_with_gaps/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/gaps/apis/get_rules_with_gaps/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/gaps/response/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/gaps/response/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/gaps/response/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/gaps/response/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/maintenance_window/external/response/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/maintenance_window/external/response/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/maintenance_window/external/response/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/maintenance_window/external/response/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/maintenance_window/internal/apis/find/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/maintenance_window/internal/apis/find/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/maintenance_window/internal/apis/find/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/maintenance_window/internal/apis/find/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/maintenance_window/internal/response/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/maintenance_window/internal/response/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/maintenance_window/internal/response/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/maintenance_window/internal/response/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/r_rule/request/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/r_rule/request/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/r_rule/request/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/r_rule/request/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/r_rule/response/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/r_rule/response/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/r_rule/response/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/r_rule/response/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/aggregate/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/aggregate/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/aggregate/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/aggregate/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/bulk_delete/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/bulk_delete/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/bulk_delete/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/bulk_delete/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/bulk_disable/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/bulk_disable/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/bulk_disable/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/bulk_disable/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/bulk_edit/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/bulk_edit/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/bulk_edit/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/bulk_edit/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/bulk_enable/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/bulk_enable/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/bulk_enable/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/bulk_enable/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/clone/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/clone/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/clone/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/clone/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/create/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/create/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/create/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/create/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/delete/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/delete/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/delete/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/delete/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/disable/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/disable/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/disable/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/disable/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/enable/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/enable/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/enable/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/enable/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/find/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/find/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/find/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/find/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/get/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/get/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/get/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/get/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/get_schedule_frequency/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/get_schedule_frequency/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/get_schedule_frequency/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/get_schedule_frequency/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/global_execution_summary/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/global_execution_summary/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/global_execution_summary/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/global_execution_summary/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/list_types/external/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/list_types/external/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/list_types/external/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/list_types/external/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/list_types/internal/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/list_types/internal/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/list_types/internal/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/list_types/internal/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/mute_all/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/mute_all/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/mute_all/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/mute_all/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/resolve/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/resolve/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/resolve/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/resolve/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/snooze/external/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/snooze/external/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/snooze/external/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/snooze/external/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/unmute_all/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/unmute_all/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/unmute_all/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/unmute_all/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/unsnooze/external/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/unsnooze/external/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/unsnooze/external/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/unsnooze/external/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/update/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/update/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/update/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/update/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/update_api_key/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/update_api_key/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/update_api_key/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/rule/apis/update_api_key/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/rule/common/flapping/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/rule/common/flapping/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/rule/common/flapping/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/rule/common/flapping/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/rule/response/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/rule/response/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/rule/response/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/rule/response/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/rules_settings/apis/update/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/rules_settings/apis/update/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/rules_settings/apis/update/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/rules_settings/apis/update/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/rules_settings/response/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/rules_settings/response/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/rules_settings/response/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/rules_settings/response/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/common/routes/schedule/types/latest.ts b/x-pack/platform/plugins/shared/alerting/common/routes/schedule/types/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/alerting/common/routes/schedule/types/latest.ts +++ b/x-pack/platform/plugins/shared/alerting/common/routes/schedule/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/alerting/public/alert_navigation_registry/index.ts b/x-pack/platform/plugins/shared/alerting/public/alert_navigation_registry/index.ts index 7e8f2595e271d..d53f320aba645 100644 --- a/x-pack/platform/plugins/shared/alerting/public/alert_navigation_registry/index.ts +++ b/x-pack/platform/plugins/shared/alerting/public/alert_navigation_registry/index.ts @@ -5,5 +5,5 @@ * 2.0. */ -export * from './types'; +export type * from './types'; export * from './alert_navigation_registry'; diff --git a/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/bulk_enable/types/index.ts b/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/bulk_enable/types/index.ts index 9e031635dcb58..66e179f539e80 100644 --- a/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/bulk_enable/types/index.ts +++ b/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/bulk_enable/types/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './bulk_enable_rules_types'; +export type * from './bulk_enable_rules_types'; diff --git a/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/bulk_get/types/index.ts b/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/bulk_get/types/index.ts index eb4d3d9e4e47e..a653bcb94b4f5 100644 --- a/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/bulk_get/types/index.ts +++ b/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/bulk_get/types/index.ts @@ -5,5 +5,5 @@ * 2.0. */ -export * from './bulk_get_rules_params'; -export * from './bulk_get_rules_response'; +export type * from './bulk_get_rules_params'; +export type * from './bulk_get_rules_response'; diff --git a/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/clone/types/index.ts b/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/clone/types/index.ts index ee06b36713cf7..6dfb43396c298 100644 --- a/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/clone/types/index.ts +++ b/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/clone/types/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './clone_rule_params'; +export type * from './clone_rule_params'; diff --git a/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/delete/types/index.ts b/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/delete/types/index.ts index f67d751e9ad37..f3fab69a52d6a 100644 --- a/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/delete/types/index.ts +++ b/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/delete/types/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './delete_rule_params'; +export type * from './delete_rule_params'; diff --git a/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/enable_rule/types/index.ts b/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/enable_rule/types/index.ts index 2fd460423606f..5616bfd9ee983 100644 --- a/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/enable_rule/types/index.ts +++ b/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/enable_rule/types/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './enable_rule_types'; +export type * from './enable_rule_types'; diff --git a/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/fill_gap_by_id/types/index.ts b/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/fill_gap_by_id/types/index.ts index 36e73c473481b..0dfa1ba7b886b 100644 --- a/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/fill_gap_by_id/types/index.ts +++ b/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/fill_gap_by_id/types/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './fill_gap_by_id'; +export type * from './fill_gap_by_id'; diff --git a/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/find/types/index.ts b/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/find/types/index.ts index cf7f87036c904..6a457cd441321 100644 --- a/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/find/types/index.ts +++ b/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/find/types/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './find_rules_types'; +export type * from './find_rules_types'; diff --git a/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/get/types/index.ts b/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/get/types/index.ts index 553499a994ff6..b4cde89ac8794 100644 --- a/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/get/types/index.ts +++ b/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/get/types/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './get_rule_params'; +export type * from './get_rule_params'; diff --git a/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/get_gaps_summary_by_rule_ids/types/index.ts b/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/get_gaps_summary_by_rule_ids/types/index.ts index 68c15c4c8cbe6..5488cfb9cc803 100644 --- a/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/get_gaps_summary_by_rule_ids/types/index.ts +++ b/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/get_gaps_summary_by_rule_ids/types/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './get_gaps_summary_by_rule_ids'; +export type * from './get_gaps_summary_by_rule_ids'; diff --git a/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/get_rule_ids_with_gaps/types/index.ts b/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/get_rule_ids_with_gaps/types/index.ts index 2b3b33f812c16..5ab869cdcdea4 100644 --- a/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/get_rule_ids_with_gaps/types/index.ts +++ b/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/get_rule_ids_with_gaps/types/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './get_rules_with_gaps'; +export type * from './get_rules_with_gaps'; diff --git a/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/mute_all/types/index.ts b/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/mute_all/types/index.ts index c2d2f7401b350..fa89f5b6ad1c2 100644 --- a/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/mute_all/types/index.ts +++ b/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/mute_all/types/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './mute_all_rule_types'; +export type * from './mute_all_rule_types'; diff --git a/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/resolve/types/index.ts b/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/resolve/types/index.ts index a4b7c56caab19..6a162a5c3e6fc 100644 --- a/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/resolve/types/index.ts +++ b/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/resolve/types/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './resolved_rule'; +export type * from './resolved_rule'; diff --git a/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/snooze/types/index.ts b/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/snooze/types/index.ts index ce69db70c3b8b..54e4b26ba8069 100644 --- a/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/snooze/types/index.ts +++ b/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/snooze/types/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './snooze_rule_options'; +export type * from './snooze_rule_options'; diff --git a/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/unmute_all/types/index.ts b/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/unmute_all/types/index.ts index 36ee54afdda07..94a973c8db0c4 100644 --- a/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/unmute_all/types/index.ts +++ b/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/unmute_all/types/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './unmute_all_rule_types'; +export type * from './unmute_all_rule_types'; diff --git a/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/update_api_key/types/index.ts b/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/update_api_key/types/index.ts index 3c9f9b1552ccf..aabcd4d152b31 100644 --- a/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/update_api_key/types/index.ts +++ b/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/update_api_key/types/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './update_rule_api_key_types'; +export type * from './update_rule_api_key_types'; diff --git a/x-pack/platform/plugins/shared/alerting/server/application/rule/types/index.ts b/x-pack/platform/plugins/shared/alerting/server/application/rule/types/index.ts index 3048d127109ad..e24c7256f0c22 100644 --- a/x-pack/platform/plugins/shared/alerting/server/application/rule/types/index.ts +++ b/x-pack/platform/plugins/shared/alerting/server/application/rule/types/index.ts @@ -5,5 +5,5 @@ * 2.0. */ -export * from './rule'; -export * from './action'; +export type * from './rule'; +export type * from './action'; diff --git a/x-pack/platform/plugins/shared/alerting/server/rules_client/index.ts b/x-pack/platform/plugins/shared/alerting/server/rules_client/index.ts index ed2b5a8558368..413bc02b4e45c 100644 --- a/x-pack/platform/plugins/shared/alerting/server/rules_client/index.ts +++ b/x-pack/platform/plugins/shared/alerting/server/rules_client/index.ts @@ -6,4 +6,4 @@ */ export * from './rules_client'; -export * from './types'; +export type * from './types'; diff --git a/x-pack/platform/plugins/shared/alerting/server/saved_objects/schemas/raw_rule/index.ts b/x-pack/platform/plugins/shared/alerting/server/saved_objects/schemas/raw_rule/index.ts index 1d1438ad01bec..b89a7104b3067 100644 --- a/x-pack/platform/plugins/shared/alerting/server/saved_objects/schemas/raw_rule/index.ts +++ b/x-pack/platform/plugins/shared/alerting/server/saved_objects/schemas/raw_rule/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -export * from './latest'; +export type * from './latest'; export { rawRuleSchema as rawRuleSchemaV1 } from './v1'; export { rawRuleSchema as rawRuleSchemaV2 } from './v2'; diff --git a/x-pack/platform/plugins/shared/automatic_import/public/components/create_integration/create_automatic_import/flyout/cel_configuration/create_cel_config.tsx b/x-pack/platform/plugins/shared/automatic_import/public/components/create_integration/create_automatic_import/flyout/cel_configuration/create_cel_config.tsx index 8cdef7753e0f8..8ecdbf25085bf 100644 --- a/x-pack/platform/plugins/shared/automatic_import/public/components/create_integration/create_automatic_import/flyout/cel_configuration/create_cel_config.tsx +++ b/x-pack/platform/plugins/shared/automatic_import/public/components/create_integration/create_automatic_import/flyout/cel_configuration/create_cel_config.tsx @@ -21,8 +21,7 @@ import { useGeneratedHtmlId, } from '@elastic/eui'; import { css } from '@emotion/react'; -import type { CelInput } from '../../../../../../common'; -import { type CelAuthType } from '../../../../../../common'; +import { type CelAuthType, type CelInput } from '../../../../../../common'; import { useActions, type State } from '../../state'; import * as i18n from './translations'; import { UploadSpecStep } from './steps/upload_spec_step'; diff --git a/x-pack/platform/plugins/shared/automatic_import/public/components/create_integration/create_automatic_import/steps/data_stream_step/use_generation.tsx b/x-pack/platform/plugins/shared/automatic_import/public/components/create_integration/create_automatic_import/steps/data_stream_step/use_generation.tsx index 9692408da65e8..1b2503469022c 100644 --- a/x-pack/platform/plugins/shared/automatic_import/public/components/create_integration/create_automatic_import/steps/data_stream_step/use_generation.tsx +++ b/x-pack/platform/plugins/shared/automatic_import/public/components/create_integration/create_automatic_import/steps/data_stream_step/use_generation.tsx @@ -8,12 +8,15 @@ import { isEmpty } from 'lodash/fp'; import { useCallback, useEffect, useState } from 'react'; import type { HttpSetup } from '@kbn/core-http-browser'; -import type { Docs, ESProcessorItem, Pipeline, SamplesFormat } from '../../../../../../common'; import { type AnalyzeLogsRequestBody, type CategorizationRequestBody, + type Docs, type EcsMappingRequestBody, + type ESProcessorItem, + type Pipeline, type RelatedRequestBody, + type SamplesFormat, } from '../../../../../../common'; import { isGenerationErrorBody } from '../../../../../../common/api/generation_error'; import { diff --git a/x-pack/platform/plugins/shared/automatic_import/public/services/index.ts b/x-pack/platform/plugins/shared/automatic_import/public/services/index.ts index 11303da5ba2cb..d7cc2e580d688 100644 --- a/x-pack/platform/plugins/shared/automatic_import/public/services/index.ts +++ b/x-pack/platform/plugins/shared/automatic_import/public/services/index.ts @@ -4,6 +4,6 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -export * from './types'; +export type * from './types'; export { Telemetry } from './telemetry/service'; export { ExperimentalFeaturesService } from './experimental_features_service'; diff --git a/x-pack/platform/plugins/shared/cases/public/components/add_comment/index.tsx b/x-pack/platform/plugins/shared/cases/public/components/add_comment/index.tsx index 3bd7dbbcfccfa..74a58db1943a3 100644 --- a/x-pack/platform/plugins/shared/cases/public/components/add_comment/index.tsx +++ b/x-pack/platform/plugins/shared/cases/public/components/add_comment/index.tsx @@ -48,7 +48,6 @@ export interface AddCommentRefObject { editor: MarkdownEditorRef | null; } -/* eslint-disable react/no-unused-prop-types */ export interface AddCommentProps { id: string; caseId: string; @@ -57,7 +56,6 @@ export interface AddCommentProps { showLoading?: boolean; statusActionButton: JSX.Element | null; } -/* eslint-enable react/no-unused-prop-types */ export const AddComment = React.memo( forwardRef( diff --git a/x-pack/platform/plugins/shared/cases/public/components/connectors/index.ts b/x-pack/platform/plugins/shared/cases/public/components/connectors/index.ts index 66681b8dd547a..e890120195028 100644 --- a/x-pack/platform/plugins/shared/cases/public/components/connectors/index.ts +++ b/x-pack/platform/plugins/shared/cases/public/components/connectors/index.ts @@ -22,7 +22,7 @@ import type { TheHiveFieldsType, } from '../../../common/types/domain'; -export * from './types'; +export type * from './types'; interface GetCaseConnectorsReturn { caseConnectorsRegistry: CaseConnectorsRegistry; diff --git a/x-pack/platform/plugins/shared/cases/public/components/connectors/jira/index.ts b/x-pack/platform/plugins/shared/cases/public/components/connectors/jira/index.ts index 28d5a49fa5ff1..f57ac8d320f5f 100644 --- a/x-pack/platform/plugins/shared/cases/public/components/connectors/jira/index.ts +++ b/x-pack/platform/plugins/shared/cases/public/components/connectors/jira/index.ts @@ -12,7 +12,7 @@ import type { JiraFieldsType } from '../../../../common/types/domain'; import { ConnectorTypes } from '../../../../common/types/domain'; import * as i18n from './translations'; -export * from './types'; +export type * from './types'; export const getCaseConnector = (): CaseConnector => ({ id: ConnectorTypes.jira, diff --git a/x-pack/platform/plugins/shared/cases/public/components/connectors/resilient/index.ts b/x-pack/platform/plugins/shared/cases/public/components/connectors/resilient/index.ts index 87745d82d22fb..7fa8d93fd08c1 100644 --- a/x-pack/platform/plugins/shared/cases/public/components/connectors/resilient/index.ts +++ b/x-pack/platform/plugins/shared/cases/public/components/connectors/resilient/index.ts @@ -12,7 +12,7 @@ import type { ResilientFieldsType } from '../../../../common/types/domain'; import { ConnectorTypes } from '../../../../common/types/domain'; import * as i18n from './translations'; -export * from './types'; +export type * from './types'; export const getCaseConnector = (): CaseConnector => ({ id: ConnectorTypes.resilient, diff --git a/x-pack/platform/plugins/shared/cases/public/components/markdown_editor/eui_form.tsx b/x-pack/platform/plugins/shared/cases/public/components/markdown_editor/eui_form.tsx index 041e846c82163..a578591b185d5 100644 --- a/x-pack/platform/plugins/shared/cases/public/components/markdown_editor/eui_form.tsx +++ b/x-pack/platform/plugins/shared/cases/public/components/markdown_editor/eui_form.tsx @@ -24,7 +24,6 @@ import { useMarkdownSessionStorage } from './use_markdown_session_storage'; import { type MarkdownEditorRef } from './types'; import { CommentEditor } from './comment_editor'; -/* eslint-disable react/no-unused-prop-types */ type MarkdownEditorFormProps = EuiMarkdownEditorProps & { id: string; field: FieldHook; diff --git a/x-pack/platform/plugins/shared/cases/public/components/markdown_editor/index.tsx b/x-pack/platform/plugins/shared/cases/public/components/markdown_editor/index.tsx index 214779263f773..f4b8c1394aaea 100644 --- a/x-pack/platform/plugins/shared/cases/public/components/markdown_editor/index.tsx +++ b/x-pack/platform/plugins/shared/cases/public/components/markdown_editor/index.tsx @@ -5,7 +5,7 @@ * 2.0. */ -export * from './types'; +export type * from './types'; export * from './renderer'; export * from './editor'; export * from './eui_form'; diff --git a/x-pack/platform/plugins/shared/cases/public/components/markdown_editor/paste_upload/use_image_paste_upload.tsx b/x-pack/platform/plugins/shared/cases/public/components/markdown_editor/paste_upload/use_image_paste_upload.tsx index 3648e6616d9d4..7e5691560fa11 100644 --- a/x-pack/platform/plugins/shared/cases/public/components/markdown_editor/paste_upload/use_image_paste_upload.tsx +++ b/x-pack/platform/plugins/shared/cases/public/components/markdown_editor/paste_upload/use_image_paste_upload.tsx @@ -8,8 +8,8 @@ import { useCallback, useLayoutEffect, useMemo, useRef, useReducer } from 'react'; import type { FieldHook } from '@kbn/es-ui-shared-plugin/static/forms/hook_form_lib'; import { useFilesContext } from '@kbn/shared-ux-file-context'; -import type { DoneNotification } from '@kbn/shared-ux-file-upload/src/upload_state'; -import { createUploadState, type UploadState } from '@kbn/shared-ux-file-upload/src/upload_state'; +import type { DoneNotification, UploadState } from '@kbn/shared-ux-file-upload/src/upload_state'; +import { createUploadState } from '@kbn/shared-ux-file-upload/src/upload_state'; import type { MarkdownEditorRef } from '../types'; import { NO_SIMULTANEOUS_UPLOADS_MESSAGE, UNSUPPORTED_MIME_TYPE_MESSAGE } from '../translations'; import { SUPPORTED_PASTE_MIME_TYPES } from '../constants'; diff --git a/x-pack/platform/plugins/shared/cases/public/components/status/index.ts b/x-pack/platform/plugins/shared/cases/public/components/status/index.ts index defeb3b8b0f15..22ccb40973811 100644 --- a/x-pack/platform/plugins/shared/cases/public/components/status/index.ts +++ b/x-pack/platform/plugins/shared/cases/public/components/status/index.ts @@ -8,4 +8,4 @@ export * from './status_popover_button'; export * from './config'; export * from './status_stats'; -export * from './types'; +export type * from './types'; diff --git a/x-pack/platform/plugins/shared/cases/server/connectors/cases/attack_discovery/index.ts b/x-pack/platform/plugins/shared/cases/server/connectors/cases/attack_discovery/index.ts index f16b2951f0725..b1f9532106199 100644 --- a/x-pack/platform/plugins/shared/cases/server/connectors/cases/attack_discovery/index.ts +++ b/x-pack/platform/plugins/shared/cases/server/connectors/cases/attack_discovery/index.ts @@ -7,4 +7,4 @@ export * from './constants'; export * from './group_alerts'; -export * from './types'; +export type * from './types'; diff --git a/x-pack/platform/plugins/shared/cases/server/connectors/index.ts b/x-pack/platform/plugins/shared/cases/server/connectors/index.ts index aeca83581f2b5..43cf121a67c97 100644 --- a/x-pack/platform/plugins/shared/cases/server/connectors/index.ts +++ b/x-pack/platform/plugins/shared/cases/server/connectors/index.ts @@ -14,7 +14,7 @@ import type { ServerlessProjectType } from '../../common/constants/types'; import type { CasesClient } from '../client'; import { getCasesConnectorAdapter, getCasesConnectorType } from './cases'; -export * from './types'; +export type * from './types'; export { casesConnectors } from './factory'; export function registerConnectorTypes({ diff --git a/x-pack/platform/plugins/shared/cases/server/custom_fields/index.ts b/x-pack/platform/plugins/shared/cases/server/custom_fields/index.ts index ace73a6014106..ee6b8fcaf4fa4 100644 --- a/x-pack/platform/plugins/shared/cases/server/custom_fields/index.ts +++ b/x-pack/platform/plugins/shared/cases/server/custom_fields/index.ts @@ -5,5 +5,5 @@ * 2.0. */ -export * from './types'; +export type * from './types'; export { casesCustomFields } from './factory'; diff --git a/x-pack/platform/plugins/shared/cases/server/routes/api/register_routes.test.ts b/x-pack/platform/plugins/shared/cases/server/routes/api/register_routes.test.ts index 70c0b2b1b7bc7..72c6c09f9fc3d 100644 --- a/x-pack/platform/plugins/shared/cases/server/routes/api/register_routes.test.ts +++ b/x-pack/platform/plugins/shared/cases/server/routes/api/register_routes.test.ts @@ -11,7 +11,7 @@ import { httpServerMock, httpServiceMock, loggingSystemMock } from '@kbn/core/se import { usageCollectionPluginMock } from '@kbn/usage-collection-plugin/server/mocks'; -import type { CasesRouter } from '../../types'; +import type { CasesRequestHandlerContext, CasesRouter } from '../../types'; import { createCasesRoute } from './create_cases_route'; import { registerRoutes } from './register_routes'; import type { CaseRoute } from './types'; @@ -80,12 +80,12 @@ describe('registerRoutes', () => { const simulateRequest = async ({ method, path, - context = { cases: {} }, + context = { cases: {} } as CasesRequestHandlerContext, headers = {}, }: { method: keyof Pick; path: string; - context?: Record; + context?: CasesRequestHandlerContext; headers?: Record; }) => { const [, registeredRouteHandler] = @@ -94,8 +94,11 @@ describe('registerRoutes', () => { return call[0].path === path; }) ?? []; + if (!registeredRouteHandler) return; + const result = await registeredRouteHandler( context, + // @ts-ignore we don't need to pass a real request object here { headers }, { customError, badRequest } ); @@ -289,7 +292,9 @@ describe('registerRoutes', () => { it('adds the warning header', async () => { response.ok.mockReturnValue({ status: 200, options: {} }); const res = await initAndSimulateDeprecationEndpoint(); + // @ts-expect-error upgrade typescript v5.4.5 const warningHeader = res.options.headers.warning; + // @ts-expect-error upgrade typescript v5.4.5 const warningValue = extractWarningValueFromWarningHeader(warningHeader); expect(warningValue).toBe('Deprecated endpoint'); }); @@ -317,7 +322,7 @@ describe('registerRoutes', () => { await simulateRequest({ method: 'get', path: '/foo/{case_id}', - context: {}, + context: {} as CasesRequestHandlerContext, }); expect(badRequest).toBeCalledWith({ diff --git a/x-pack/platform/plugins/shared/content_connectors/public/api/api_logic/create_api_logic.ts b/x-pack/platform/plugins/shared/content_connectors/public/api/api_logic/create_api_logic.ts index c8ce07da88ad9..d2df9aa9500b0 100644 --- a/x-pack/platform/plugins/shared/content_connectors/public/api/api_logic/create_api_logic.ts +++ b/x-pack/platform/plugins/shared/content_connectors/public/api/api_logic/create_api_logic.ts @@ -85,25 +85,21 @@ export const createApiLogic = ( }, }), path: ['content_connectors', 'api', ...path], - // @ts-expect-error upgrade typescript v5.1.6 reducers: () => ({ apiStatus: [ { status: Status.IDLE, }, { - // @ts-expect-error upgrade typescript v5.1.6 apiError: (_, error) => ({ error, status: Status.ERROR, }), apiReset: () => ({ status: Status.IDLE }), - // @ts-expect-error upgrade typescript v5.1.6 apiSuccess: (_, data) => ({ data, status: Status.SUCCESS, }), - // @ts-expect-error upgrade typescript v5.1.6 makeRequest: ({ data }) => { return { data, diff --git a/x-pack/platform/plugins/shared/content_connectors/public/api/connector/cached_fetch_connector_by_id_api_logic.ts b/x-pack/platform/plugins/shared/content_connectors/public/api/connector/cached_fetch_connector_by_id_api_logic.ts index 93edf988e28ea..ef9ed308bc47a 100644 --- a/x-pack/platform/plugins/shared/content_connectors/public/api/connector/cached_fetch_connector_by_id_api_logic.ts +++ b/x-pack/platform/plugins/shared/content_connectors/public/api/connector/cached_fetch_connector_by_id_api_logic.ts @@ -117,7 +117,6 @@ export const CachedFetchConnectorByIdApiLogic = kea< null, { apiReset: () => null, - // @ts-expect-error upgrade typescript v5.1.6 apiSuccess: (currentState, newConnectorData) => { return isEqual(currentState, newConnectorData.connector) ? currentState @@ -129,7 +128,6 @@ export const CachedFetchConnectorByIdApiLogic = kea< '', { apiReset: () => '', - // @ts-expect-error upgrade typescript v5.1.6 startPolling: (_, { connectorId }) => connectorId, }, ], @@ -137,7 +135,6 @@ export const CachedFetchConnectorByIdApiLogic = kea< null, { clearPollTimeout: () => null, - // @ts-expect-error upgrade typescript v5.1.6 setTimeoutId: (_, { id }) => id, }, ], diff --git a/x-pack/platform/plugins/shared/content_connectors/public/api/index/cached_fetch_index_api_logic.ts b/x-pack/platform/plugins/shared/content_connectors/public/api/index/cached_fetch_index_api_logic.ts index eee14e5926197..05e193b0973b5 100644 --- a/x-pack/platform/plugins/shared/content_connectors/public/api/index/cached_fetch_index_api_logic.ts +++ b/x-pack/platform/plugins/shared/content_connectors/public/api/index/cached_fetch_index_api_logic.ts @@ -125,7 +125,6 @@ export const CachedFetchIndexApiLogic = kea< null, { apiReset: () => null, - // @ts-expect-error upgrade typescript v5.1.6 apiSuccess: (currentState, newIndexData) => { return isEqual(currentState, newIndexData) ? currentState : newIndexData; }, @@ -135,7 +134,6 @@ export const CachedFetchIndexApiLogic = kea< null, { clearPollTimeout: () => null, - // @ts-expect-error upgrade typescript v5.1.6 setTimeoutId: (_, { id }) => id, }, ], diff --git a/x-pack/platform/plugins/shared/content_connectors/public/components/connector_detail/attach_index_logic.ts b/x-pack/platform/plugins/shared/content_connectors/public/components/connector_detail/attach_index_logic.ts index 473d0da72cea1..a34767e10db14 100644 --- a/x-pack/platform/plugins/shared/content_connectors/public/components/connector_detail/attach_index_logic.ts +++ b/x-pack/platform/plugins/shared/content_connectors/public/components/connector_detail/attach_index_logic.ts @@ -122,14 +122,12 @@ export const AttachIndexLogic = kea< connector: [ null, { - // @ts-expect-error upgrade typescript v5.1.6 setConnector: (_, connector) => connector, }, ], indexExists: [ {}, { - // @ts-expect-error upgrade typescript v5.1.6 checkIndexExistsApiSuccess: (state, { exists, indexName }) => ({ ...state, [indexName]: exists, diff --git a/x-pack/platform/plugins/shared/content_connectors/public/components/connector_detail/connector_name_and_description_logic.ts b/x-pack/platform/plugins/shared/content_connectors/public/components/connector_detail/connector_name_and_description_logic.ts index a008b536f81d7..9779d30d703c6 100644 --- a/x-pack/platform/plugins/shared/content_connectors/public/components/connector_detail/connector_name_and_description_logic.ts +++ b/x-pack/platform/plugins/shared/content_connectors/public/components/connector_detail/connector_name_and_description_logic.ts @@ -73,7 +73,6 @@ export const ConnectorNameAndDescriptionLogic = kea< connector: [ null, { - // @ts-expect-error upgrade typescript v5.1.6 setConnector: (_, connector) => connector, }, ], diff --git a/x-pack/platform/plugins/shared/content_connectors/public/components/connectors/connectors_logic.ts b/x-pack/platform/plugins/shared/content_connectors/public/components/connectors/connectors_logic.ts index 0f3564f0c2850..32e1e160947cd 100644 --- a/x-pack/platform/plugins/shared/content_connectors/public/components/connectors/connectors_logic.ts +++ b/x-pack/platform/plugins/shared/content_connectors/public/components/connectors/connectors_logic.ts @@ -137,13 +137,11 @@ export const ConnectorsLogic = kea ({ deleteModalConnectorId: [ '', { closeDeleteModal: () => '', - // @ts-expect-error upgrade typescript v5.1.6 openDeleteModal: (_, { connectorId }) => connectorId, }, ], @@ -151,7 +149,6 @@ export const ConnectorsLogic = kea '', - // @ts-expect-error upgrade typescript v5.1.6 openDeleteModal: (_, { connectorName }) => connectorName, }, ], @@ -159,7 +156,6 @@ export const ConnectorsLogic = kea null, - // @ts-expect-error upgrade typescript v5.1.6 openDeleteModal: (_, { indexName }) => indexName, }, ], @@ -186,20 +182,17 @@ export const ConnectorsLogic = kea ({ fetchCrawlersOnly, from: meta.page.from, searchQuery, size: meta.page.size, }), - // @ts-expect-error upgrade typescript v5.1.6 fetchConnectors: (state, payload) => ({ ...state, ...payload, http: props.http, }), - // @ts-expect-error upgrade typescript v5.1.6 onPaginate: (state, { newPageIndex }) => ({ ...state, from: (newPageIndex - 1) * state.size, diff --git a/x-pack/platform/plugins/shared/content_connectors/public/components/new_index/method_connector/new_connector_logic.ts b/x-pack/platform/plugins/shared/content_connectors/public/components/new_index/method_connector/new_connector_logic.ts index 07b27adbce4d1..1c6cd388c7b23 100644 --- a/x-pack/platform/plugins/shared/content_connectors/public/components/new_index/method_connector/new_connector_logic.ts +++ b/x-pack/platform/plugins/shared/content_connectors/public/components/new_index/method_connector/new_connector_logic.ts @@ -237,14 +237,12 @@ export const NewConnectorLogic = kea< isFormDirty: [ false, // Initial state (form is not dirty) { - // @ts-expect-error upgrade typescript v5.1.6 setFormDirty: (_, { isDirty }) => isDirty, }, ], rawName: [ '', { - // @ts-expect-error upgrade typescript v5.1.6 setRawName: (_, { rawName }) => rawName, }, ], diff --git a/x-pack/platform/plugins/shared/content_connectors/public/components/search_index/connector/connector_name_and_description/connector_name_and_description_logic.ts b/x-pack/platform/plugins/shared/content_connectors/public/components/search_index/connector/connector_name_and_description/connector_name_and_description_logic.ts index 6f055889a39d7..e343cc6a1c8b5 100644 --- a/x-pack/platform/plugins/shared/content_connectors/public/components/search_index/connector/connector_name_and_description/connector_name_and_description_logic.ts +++ b/x-pack/platform/plugins/shared/content_connectors/public/components/search_index/connector/connector_name_and_description/connector_name_and_description_logic.ts @@ -105,16 +105,13 @@ export const ConnectorNameAndDescriptionLogic = kea< false, { apiSuccess: () => false, - // @ts-expect-error upgrade typescript v5.1.6 setIsEditing: (_, { isEditing }) => isEditing, }, ], localNameAndDescription: [ {}, { - // @ts-expect-error upgrade typescript v5.1.6 setLocalNameAndDescription: (_, nameAndDescription) => nameAndDescription, - // @ts-expect-error upgrade typescript v5.1.6 updateLocalNameAndDescription: (localNameAndDescription, nameAndDescription) => ({ ...localNameAndDescription, ...nameAndDescription, @@ -124,9 +121,7 @@ export const ConnectorNameAndDescriptionLogic = kea< nameAndDescription: [ {}, { - // @ts-expect-error upgrade typescript v5.1.6 apiSuccess: (_, { description, name }) => ({ description, name }), - // @ts-expect-error upgrade typescript v5.1.6 setNameAndDescription: (_, nameAndDescription) => nameAndDescription, }, ], diff --git a/x-pack/platform/plugins/shared/content_connectors/public/components/search_index/connector/sync_rules/connector_filtering_logic.tsx b/x-pack/platform/plugins/shared/content_connectors/public/components/search_index/connector/sync_rules/connector_filtering_logic.tsx index 912a96b0a25a9..f7e404e27b882 100644 --- a/x-pack/platform/plugins/shared/content_connectors/public/components/search_index/connector/sync_rules/connector_filtering_logic.tsx +++ b/x-pack/platform/plugins/shared/content_connectors/public/components/search_index/connector/sync_rules/connector_filtering_logic.tsx @@ -205,7 +205,6 @@ export const ConnectorFilteringLogic = kea< filteringConfig: [ null, { - // @ts-expect-error upgrade typescript v5.1.6 apiSuccess: (filteringConfig, filteringRules) => filteringConfig ? { @@ -213,7 +212,6 @@ export const ConnectorFilteringLogic = kea< active: filteringRules, } : null, - // @ts-expect-error upgrade typescript v5.1.6 draftApiSuccess: (filteringConfig, filteringRules) => filteringConfig ? { @@ -221,7 +219,6 @@ export const ConnectorFilteringLogic = kea< draft: filteringRules, } : null, - // @ts-expect-error upgrade typescript v5.1.6 setFilteringConfig: (_, filteringConfig) => filteringConfig, }, ], @@ -230,21 +227,18 @@ export const ConnectorFilteringLogic = kea< { draftApiError: () => false, draftApiSuccess: () => false, - // @ts-expect-error upgrade typescript v5.1.6 setIsEditing: (_, { isEditing }) => isEditing, }, ], localAdvancedSnippet: [ '', { - // @ts-expect-error upgrade typescript v5.1.6 setLocalAdvancedSnippet: (_, { advancedSnippet }) => advancedSnippet, }, ], localFilteringRules: [ [], { - // @ts-expect-error upgrade typescript v5.1.6 addFilteringRule: (filteringRules, filteringRule) => { const newFilteringRules: FilteringRule[] = filteringRules.length ? [ @@ -255,22 +249,16 @@ export const ConnectorFilteringLogic = kea< : [filteringRule, createDefaultRule(1)]; return newFilteringRules.map((rule, index) => ({ ...rule, order: index })); }, - // @ts-expect-error upgrade typescript v5.1.6 deleteFilteringRule: (filteringRules, filteringRule) => - // @ts-expect-error upgrade typescript v5.1.6 filteringRules.filter((rule) => rule.id !== filteringRule.id), - // @ts-expect-error upgrade typescript v5.1.6 reorderFilteringRules: (filteringRules, newFilteringRules) => { const lastItem = filteringRules.length ? filteringRules[filteringRules.length - 1] : createDefaultRule(0); return [...newFilteringRules, lastItem].map((rule, index) => ({ ...rule, order: index })); }, - // @ts-expect-error upgrade typescript v5.1.6 setLocalFilteringRules: (_, filteringRules) => filteringRules, - // @ts-expect-error upgrade typescript v5.1.6 updateFilteringRule: (filteringRules, filteringRule) => - // @ts-expect-error upgrade typescript v5.1.6 filteringRules.map((rule) => (rule.id === filteringRule.id ? filteringRule : rule)), }, ], diff --git a/x-pack/platform/plugins/shared/content_connectors/public/components/search_index/index_name_logic.ts b/x-pack/platform/plugins/shared/content_connectors/public/components/search_index/index_name_logic.ts index 6c00e94470a63..e2f264d49f8b7 100644 --- a/x-pack/platform/plugins/shared/content_connectors/public/components/search_index/index_name_logic.ts +++ b/x-pack/platform/plugins/shared/content_connectors/public/components/search_index/index_name_logic.ts @@ -27,7 +27,6 @@ export const IndexNameLogic = kea indexName, }, ], diff --git a/x-pack/platform/plugins/shared/content_connectors/public/components/search_index/sync_jobs/sync_jobs_view_logic.ts b/x-pack/platform/plugins/shared/content_connectors/public/components/search_index/sync_jobs/sync_jobs_view_logic.ts index c7c110c4a9854..c30c98d3d8055 100644 --- a/x-pack/platform/plugins/shared/content_connectors/public/components/search_index/sync_jobs/sync_jobs_view_logic.ts +++ b/x-pack/platform/plugins/shared/content_connectors/public/components/search_index/sync_jobs/sync_jobs_view_logic.ts @@ -182,14 +182,12 @@ export const SyncJobsViewLogic = kea< connectorId: [ null, { - // @ts-expect-error upgrade typescript v5.1.6 setConnectorId: (_, { connectorId }) => connectorId, }, ], selectedSyncJobCategory: [ 'content', { - // @ts-expect-error upgrade typescript v5.1.6 setSelectedSyncJobCategory: (_, { category }) => category, }, ], @@ -197,17 +195,14 @@ export const SyncJobsViewLogic = kea< null, { resetCancelSyncJobApi: () => null, - // @ts-expect-error upgrade typescript v5.1.6 setCancelSyncJob: (_, { syncJobId }) => syncJobId ?? null, }, ], syncJobs: [ [], { - // @ts-expect-error upgrade typescript v5.1.6 fetchSyncJobsApiSuccess: (currentState, { data }) => { const newState = - // @ts-expect-error upgrade typescript v5.1.6 data?.map((syncJob) => { return { ...syncJob, diff --git a/x-pack/platform/plugins/shared/content_connectors/public/components/settings/settings_logic.ts b/x-pack/platform/plugins/shared/content_connectors/public/components/settings/settings_logic.ts index 49efb589e84ab..1309c4bbb3170 100644 --- a/x-pack/platform/plugins/shared/content_connectors/public/components/settings/settings_logic.ts +++ b/x-pack/platform/plugins/shared/content_connectors/public/components/settings/settings_logic.ts @@ -92,7 +92,6 @@ export const SettingsLogic = kea pipeline, }, ], diff --git a/x-pack/platform/plugins/shared/content_connectors/public/components/shared/flash_messages/flash_messages_logic.ts b/x-pack/platform/plugins/shared/content_connectors/public/components/shared/flash_messages/flash_messages_logic.ts index 2c8552d7409dd..8ddc6cc34300b 100644 --- a/x-pack/platform/plugins/shared/content_connectors/public/components/shared/flash_messages/flash_messages_logic.ts +++ b/x-pack/platform/plugins/shared/content_connectors/public/components/shared/flash_messages/flash_messages_logic.ts @@ -50,7 +50,6 @@ export const FlashMessagesLogic = kea< historyListener: [ null, { - // @ts-expect-error upgrade typescript v5.1.6 setHistoryListener: (_, { historyListener }) => historyListener, }, ], @@ -58,7 +57,6 @@ export const FlashMessagesLogic = kea< [], { clearFlashMessages: () => [], - // @ts-expect-error upgrade typescript v5.1.6 setFlashMessages: (_, { messages }) => messages, }, ], @@ -68,7 +66,6 @@ export const FlashMessagesLogic = kea< [], { clearQueuedMessages: () => [], - // @ts-expect-error upgrade typescript v5.1.6 setQueuedMessages: (_, { messages }) => messages, }, ], diff --git a/x-pack/platform/plugins/shared/content_connectors/public/components/shared/react_router_helpers/index.ts b/x-pack/platform/plugins/shared/content_connectors/public/components/shared/react_router_helpers/index.ts index 03f507def13fe..d5862726932c4 100644 --- a/x-pack/platform/plugins/shared/content_connectors/public/components/shared/react_router_helpers/index.ts +++ b/x-pack/platform/plugins/shared/content_connectors/public/components/shared/react_router_helpers/index.ts @@ -21,4 +21,4 @@ export { EuiBadgeTo, } from './eui_components'; -export * from './types'; +export type * from './types'; diff --git a/x-pack/platform/plugins/shared/content_connectors/public/components/shared/tables/inline_editable_table/inline_editable_table_logic.ts b/x-pack/platform/plugins/shared/content_connectors/public/components/shared/tables/inline_editable_table/inline_editable_table_logic.ts index 8693087011c3b..1cabee5470b3c 100644 --- a/x-pack/platform/plugins/shared/content_connectors/public/components/shared/tables/inline_editable_table/inline_editable_table_logic.ts +++ b/x-pack/platform/plugins/shared/content_connectors/public/components/shared/tables/inline_editable_table/inline_editable_table_logic.ts @@ -88,9 +88,7 @@ export const InlineEditableTableLogic = kea item, - // @ts-expect-error upgrade typescript v5.1.6 setEditingItemValue: (_, { item }) => item, }, ], @@ -99,7 +97,6 @@ export const InlineEditableTableLogic = kea ({}), setEditingItemValue: () => ({}), - // @ts-expect-error upgrade typescript v5.1.6 setFieldErrors: (_, { fieldErrors }) => fieldErrors, }, ], @@ -108,7 +105,6 @@ export const InlineEditableTableLogic = kea [], setEditingItemValue: () => [], - // @ts-expect-error upgrade typescript v5.1.6 setRowErrors: (_, { rowErrors }) => rowErrors, }, ], diff --git a/x-pack/platform/plugins/shared/content_connectors/server/config.ts b/x-pack/platform/plugins/shared/content_connectors/server/config.ts index 2c9bb0ffc65c4..ebbc22d4f0a8c 100644 --- a/x-pack/platform/plugins/shared/content_connectors/server/config.ts +++ b/x-pack/platform/plugins/shared/content_connectors/server/config.ts @@ -8,7 +8,7 @@ import { schema, TypeOf } from '@kbn/config-schema'; import { PluginConfigDescriptor } from '@kbn/core/server'; -export * from './types'; +export type * from './types'; const configSchema = schema.object({ enabled: schema.boolean({ defaultValue: true }), diff --git a/x-pack/platform/plugins/shared/data_quality/common/locators/index.ts b/x-pack/platform/plugins/shared/data_quality/common/locators/index.ts index 02d91cadb5fdb..fad2a0ac3f15d 100644 --- a/x-pack/platform/plugins/shared/data_quality/common/locators/index.ts +++ b/x-pack/platform/plugins/shared/data_quality/common/locators/index.ts @@ -7,4 +7,4 @@ export * from './dataset_quality_locator'; export * from './dataset_quality_details_locator'; -export * from './types'; +export type * from './types'; diff --git a/x-pack/platform/plugins/shared/dataset_quality/common/data_stream_details/index.ts b/x-pack/platform/plugins/shared/dataset_quality/common/data_stream_details/index.ts index 6cc0ccaa93a6d..d6aaa0f3a4aad 100644 --- a/x-pack/platform/plugins/shared/dataset_quality/common/data_stream_details/index.ts +++ b/x-pack/platform/plugins/shared/dataset_quality/common/data_stream_details/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './types'; +export type * from './types'; diff --git a/x-pack/platform/plugins/shared/dataset_quality/common/data_streams_stats/index.ts b/x-pack/platform/plugins/shared/dataset_quality/common/data_streams_stats/index.ts index 6cc0ccaa93a6d..d6aaa0f3a4aad 100644 --- a/x-pack/platform/plugins/shared/dataset_quality/common/data_streams_stats/index.ts +++ b/x-pack/platform/plugins/shared/dataset_quality/common/data_streams_stats/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './types'; +export type * from './types'; diff --git a/x-pack/platform/plugins/shared/dataset_quality/common/types/index.ts b/x-pack/platform/plugins/shared/dataset_quality/common/types/index.ts index 4aec783300a8c..5d4e0aba9f633 100644 --- a/x-pack/platform/plugins/shared/dataset_quality/common/types/index.ts +++ b/x-pack/platform/plugins/shared/dataset_quality/common/types/index.ts @@ -6,5 +6,5 @@ */ export * from './dataset_types'; -export * from './quality_types'; -export * from './common'; +export type * from './quality_types'; +export type * from './common'; diff --git a/x-pack/platform/plugins/shared/dataset_quality/public/controller/dataset_quality/index.ts b/x-pack/platform/plugins/shared/dataset_quality/public/controller/dataset_quality/index.ts index d0e19da1736db..73d79f546633f 100644 --- a/x-pack/platform/plugins/shared/dataset_quality/public/controller/dataset_quality/index.ts +++ b/x-pack/platform/plugins/shared/dataset_quality/public/controller/dataset_quality/index.ts @@ -6,4 +6,4 @@ */ export * from './create_controller'; -export * from './types'; +export type * from './types'; diff --git a/x-pack/platform/plugins/shared/dataset_quality/public/controller/dataset_quality_details/index.ts b/x-pack/platform/plugins/shared/dataset_quality/public/controller/dataset_quality_details/index.ts index d0e19da1736db..73d79f546633f 100644 --- a/x-pack/platform/plugins/shared/dataset_quality/public/controller/dataset_quality_details/index.ts +++ b/x-pack/platform/plugins/shared/dataset_quality/public/controller/dataset_quality_details/index.ts @@ -6,4 +6,4 @@ */ export * from './create_controller'; -export * from './types'; +export type * from './types'; diff --git a/x-pack/platform/plugins/shared/dataset_quality/public/services/data_stream_details/index.ts b/x-pack/platform/plugins/shared/dataset_quality/public/services/data_stream_details/index.ts index 843f8bd2c6b37..7060fc046c874 100644 --- a/x-pack/platform/plugins/shared/dataset_quality/public/services/data_stream_details/index.ts +++ b/x-pack/platform/plugins/shared/dataset_quality/public/services/data_stream_details/index.ts @@ -6,4 +6,4 @@ */ export * from './data_stream_details_service'; -export * from './types'; +export type * from './types'; diff --git a/x-pack/platform/plugins/shared/dataset_quality/public/services/data_streams_stats/index.ts b/x-pack/platform/plugins/shared/dataset_quality/public/services/data_streams_stats/index.ts index f4d6e87e2c9bf..abed9a937a826 100644 --- a/x-pack/platform/plugins/shared/dataset_quality/public/services/data_streams_stats/index.ts +++ b/x-pack/platform/plugins/shared/dataset_quality/public/services/data_streams_stats/index.ts @@ -6,4 +6,4 @@ */ export * from './data_streams_stats_service'; -export * from './types'; +export type * from './types'; diff --git a/x-pack/platform/plugins/shared/dataset_quality/public/state_machines/dataset_quality_controller/src/index.ts b/x-pack/platform/plugins/shared/dataset_quality/public/state_machines/dataset_quality_controller/src/index.ts index 74e05d6ca2114..0605205b9d855 100644 --- a/x-pack/platform/plugins/shared/dataset_quality/public/state_machines/dataset_quality_controller/src/index.ts +++ b/x-pack/platform/plugins/shared/dataset_quality/public/state_machines/dataset_quality_controller/src/index.ts @@ -6,5 +6,5 @@ */ export * from './state_machine'; -export * from './types'; +export type * from './types'; export * from './defaults'; diff --git a/x-pack/platform/plugins/shared/dataset_quality/public/state_machines/dataset_quality_details_controller/index.ts b/x-pack/platform/plugins/shared/dataset_quality/public/state_machines/dataset_quality_details_controller/index.ts index 069d40a3e8cdd..96c52d4f39010 100644 --- a/x-pack/platform/plugins/shared/dataset_quality/public/state_machines/dataset_quality_details_controller/index.ts +++ b/x-pack/platform/plugins/shared/dataset_quality/public/state_machines/dataset_quality_details_controller/index.ts @@ -6,6 +6,6 @@ */ // export * from './state_machine'; -export * from './types'; +export type * from './types'; export * from './defaults'; export * from './state_machine'; diff --git a/x-pack/platform/plugins/shared/fields_metadata/public/services/fields_metadata/index.ts b/x-pack/platform/plugins/shared/fields_metadata/public/services/fields_metadata/index.ts index 76628104a8198..a73448568dba7 100644 --- a/x-pack/platform/plugins/shared/fields_metadata/public/services/fields_metadata/index.ts +++ b/x-pack/platform/plugins/shared/fields_metadata/public/services/fields_metadata/index.ts @@ -6,4 +6,4 @@ */ export * from './fields_metadata_service'; -export * from './types'; +export type * from './types'; diff --git a/x-pack/platform/plugins/shared/fields_metadata/server/services/fields_metadata/types.ts b/x-pack/platform/plugins/shared/fields_metadata/server/services/fields_metadata/types.ts index 7e094fbbbf8b5..33a67c4577d81 100644 --- a/x-pack/platform/plugins/shared/fields_metadata/server/services/fields_metadata/types.ts +++ b/x-pack/platform/plugins/shared/fields_metadata/server/services/fields_metadata/types.ts @@ -13,7 +13,7 @@ import { IntegrationListExtractor, } from './repositories/types'; -export * from './repositories/types'; +export type * from './repositories/types'; // eslint-disable-next-line @typescript-eslint/no-empty-interface export interface FieldsMetadataServiceStartDeps {} diff --git a/x-pack/platform/plugins/shared/fleet/common/types/models/index.ts b/x-pack/platform/plugins/shared/fleet/common/types/models/index.ts index 507ff094c01fb..4bba0808407ba 100644 --- a/x-pack/platform/plugins/shared/fleet/common/types/models/index.ts +++ b/x-pack/platform/plugins/shared/fleet/common/types/models/index.ts @@ -7,18 +7,18 @@ export * from './agent'; export * from './agent_policy'; -export * from './package_policy'; -export * from './data_stream'; -export * from './output'; +export type * from './package_policy'; +export type * from './data_stream'; +export type * from './output'; export * from './epm'; -export * from './package_spec'; -export * from './enrollment_api_key'; -export * from './settings'; -export * from './preconfiguration'; -export * from './download_sources'; +export type * from './package_spec'; +export type * from './enrollment_api_key'; +export type * from './settings'; +export type * from './preconfiguration'; +export type * from './download_sources'; export * from './fleet_server_policy_config'; -export * from './fleet_proxy'; -export * from './secret'; +export type * from './fleet_proxy'; +export type * from './secret'; export * from './setup_technology'; -export * from './fleet_setup_lock'; +export type * from './fleet_setup_lock'; export * from './remote_synced_integrations'; diff --git a/x-pack/platform/plugins/shared/fleet/common/types/rest_spec/index.ts b/x-pack/platform/plugins/shared/fleet/common/types/rest_spec/index.ts index ffd854a6d0bda..29732fec75849 100644 --- a/x-pack/platform/plugins/shared/fleet/common/types/rest_spec/index.ts +++ b/x-pack/platform/plugins/shared/fleet/common/types/rest_spec/index.ts @@ -5,21 +5,21 @@ * 2.0. */ -export * from './agent_policy'; +export type * from './agent_policy'; export * from './agent'; -export * from './app'; -export * from './common'; -export * from './data_stream'; -export * from './download_sources'; -export * from './enrollment_api_key'; -export * from './epm'; -export * from './error'; -export * from './fleet_setup'; -export * from './output'; -export * from './package_policy'; -export * from './settings'; -export * from './health_check'; -export * from './fleet_server_hosts'; -export * from './standalone_agent_api_key'; -export * from './remote_synced_integrations'; -export * from './custom_integrations'; +export type * from './app'; +export type * from './common'; +export type * from './data_stream'; +export type * from './download_sources'; +export type * from './enrollment_api_key'; +export type * from './epm'; +export type * from './error'; +export type * from './fleet_setup'; +export type * from './output'; +export type * from './package_policy'; +export type * from './settings'; +export type * from './health_check'; +export type * from './fleet_server_hosts'; +export type * from './standalone_agent_api_key'; +export type * from './remote_synced_integrations'; +export type * from './custom_integrations'; diff --git a/x-pack/platform/plugins/shared/fleet/public/mock/index.ts b/x-pack/platform/plugins/shared/fleet/public/mock/index.ts index 598ce4d759336..9338967cbd136 100644 --- a/x-pack/platform/plugins/shared/fleet/public/mock/index.ts +++ b/x-pack/platform/plugins/shared/fleet/public/mock/index.ts @@ -10,4 +10,4 @@ export * from './plugin_configuration'; export * from './plugin_dependencies'; export * from './plugin_interfaces'; export * from './fleet_start_services'; -export * from './types'; +export type * from './types'; diff --git a/x-pack/platform/plugins/shared/fleet/public/types/index.ts b/x-pack/platform/plugins/shared/fleet/public/types/index.ts index 0f0adaba20b5d..57c43b4b843b5 100644 --- a/x-pack/platform/plugins/shared/fleet/public/types/index.ts +++ b/x-pack/platform/plugins/shared/fleet/public/types/index.ts @@ -159,6 +159,6 @@ export { SetupTechnology, } from '../../common/types'; -export * from './intra_app_route_state'; -export * from './ui_extensions'; -export * from './in_memory_package_policy'; +export type * from './intra_app_route_state'; +export type * from './ui_extensions'; +export type * from './in_memory_package_policy'; diff --git a/x-pack/platform/plugins/shared/fleet/server/routes/package_policy/handlers.test.ts b/x-pack/platform/plugins/shared/fleet/server/routes/package_policy/handlers.test.ts index e8904d82a7632..51a1d58b5333d 100644 --- a/x-pack/platform/plugins/shared/fleet/server/routes/package_policy/handlers.test.ts +++ b/x-pack/platform/plugins/shared/fleet/server/routes/package_policy/handlers.test.ts @@ -175,6 +175,7 @@ describe('When calling package policy', () => { beforeEach(async () => { appContextService.start(createAppContextStartContractMock()); context = xpackMocks.createRequestHandlerContext() as unknown as FleetRequestHandlerContext; + // eslint-disable-next-line @typescript-eslint/no-unused-expressions (await context.fleet).packagePolicyService.asCurrentUser as jest.Mocked; response = httpServerMock.createResponseFactory(); testPackagePolicy = { diff --git a/x-pack/platform/plugins/shared/fleet/server/services/artifacts/index.ts b/x-pack/platform/plugins/shared/fleet/server/services/artifacts/index.ts index d134f93ac00e1..4e1baa1cd4412 100644 --- a/x-pack/platform/plugins/shared/fleet/server/services/artifacts/index.ts +++ b/x-pack/platform/plugins/shared/fleet/server/services/artifacts/index.ts @@ -7,4 +7,4 @@ export * from './artifacts'; export * from './client'; -export * from './types'; +export type * from './types'; diff --git a/x-pack/platform/plugins/shared/fleet/server/services/check_allowed_packages.ts b/x-pack/platform/plugins/shared/fleet/server/services/check_allowed_packages.ts index fffd8d0bdcb91..2ddb2d3347339 100644 --- a/x-pack/platform/plugins/shared/fleet/server/services/check_allowed_packages.ts +++ b/x-pack/platform/plugins/shared/fleet/server/services/check_allowed_packages.ts @@ -36,7 +36,7 @@ export function checkAllowedPackages( ); } - const isRestricted = !allowedPackagedSet.has(pkgName); + const isRestricted = !allowedPackagedSet.has(pkgName as string); if (isRestricted) { throw new FleetUnauthorizedError( `Authorization denied to package: ${pkgName}. Allowed package(s): ${allowedPackagesStr}` diff --git a/x-pack/platform/plugins/shared/fleet/server/services/security/index.ts b/x-pack/platform/plugins/shared/fleet/server/services/security/index.ts index 6b38c6f6c7d5b..f7400db3beb9e 100644 --- a/x-pack/platform/plugins/shared/fleet/server/services/security/index.ts +++ b/x-pack/platform/plugins/shared/fleet/server/services/security/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -export * from './types'; +export type * from './types'; export { makeRouterWithFleetAuthz } from './fleet_router'; export { getRouteRequiredAuthz } from './route_required_authz'; export { diff --git a/x-pack/platform/plugins/shared/fleet/server/types/index.tsx b/x-pack/platform/plugins/shared/fleet/server/types/index.tsx index 9062e62357387..49a50e5f54be6 100644 --- a/x-pack/platform/plugins/shared/fleet/server/types/index.tsx +++ b/x-pack/platform/plugins/shared/fleet/server/types/index.tsx @@ -126,6 +126,6 @@ export interface PackageVerificationResult { export * from './models'; export * from './rest_spec'; -export * from './extensions'; -export * from './so_attributes'; +export type * from './extensions'; +export type * from './so_attributes'; export type { FleetRequestHandler, FleetRequestHandlerContext } from './request_context'; diff --git a/x-pack/platform/plugins/shared/index_management/common/types/index.ts b/x-pack/platform/plugins/shared/index_management/common/types/index.ts index 7ec100bc1d366..d1468d7d1a26e 100644 --- a/x-pack/platform/plugins/shared/index_management/common/types/index.ts +++ b/x-pack/platform/plugins/shared/index_management/common/types/index.ts @@ -5,13 +5,13 @@ * 2.0. */ -export * from './aliases'; +export type * from './aliases'; -export * from './indices'; +export type * from './indices'; -export * from './mappings'; +export type * from './mappings'; -export * from './templates'; +export type * from './templates'; export type { EnhancedDataStreamFromEs, @@ -22,6 +22,6 @@ export type { IndexMode, } from './data_streams'; -export * from './component_templates'; +export type * from './component_templates'; -export * from './enrich_policies'; +export type * from './enrich_policies'; diff --git a/x-pack/platform/plugins/shared/index_management/public/application/components/mappings_editor/types/index.ts b/x-pack/platform/plugins/shared/index_management/public/application/components/mappings_editor/types/index.ts index 0f4f4be888a7e..3060b2d68da23 100644 --- a/x-pack/platform/plugins/shared/index_management/public/application/components/mappings_editor/types/index.ts +++ b/x-pack/platform/plugins/shared/index_management/public/application/components/mappings_editor/types/index.ts @@ -5,8 +5,8 @@ * 2.0. */ -export * from './mappings_editor'; +export type * from './mappings_editor'; export * from './document_fields'; -export * from './state'; +export type * from './state'; diff --git a/x-pack/platform/plugins/shared/lens/common/content_management/index.ts b/x-pack/platform/plugins/shared/lens/common/content_management/index.ts index f9f0280d7801e..f3363af80ab02 100644 --- a/x-pack/platform/plugins/shared/lens/common/content_management/index.ts +++ b/x-pack/platform/plugins/shared/lens/common/content_management/index.ts @@ -29,4 +29,4 @@ export type { LensCrudTypes, } from './latest'; -export * as LensV1 from './v1'; +export type * as LensV1 from './v1'; diff --git a/x-pack/platform/plugins/shared/lens/common/content_management/latest.ts b/x-pack/platform/plugins/shared/lens/common/content_management/latest.ts index 25300c97a6d2e..ab3f7581b2043 100644 --- a/x-pack/platform/plugins/shared/lens/common/content_management/latest.ts +++ b/x-pack/platform/plugins/shared/lens/common/content_management/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/lens/public/persistence/index.ts b/x-pack/platform/plugins/shared/lens/public/persistence/index.ts index c8288cc3a4523..09e499a95acf5 100644 --- a/x-pack/platform/plugins/shared/lens/public/persistence/index.ts +++ b/x-pack/platform/plugins/shared/lens/public/persistence/index.ts @@ -6,4 +6,4 @@ */ export * from './lens_document_service'; -export * from './types'; +export type * from './types'; diff --git a/x-pack/platform/plugins/shared/lens/public/state_management/index.ts b/x-pack/platform/plugins/shared/lens/public/state_management/index.ts index 93b6ea0723913..6bb337130c981 100644 --- a/x-pack/platform/plugins/shared/lens/public/state_management/index.ts +++ b/x-pack/platform/plugins/shared/lens/public/state_management/index.ts @@ -20,7 +20,7 @@ import { initMiddleware } from './init_middleware'; import { optimizingMiddleware } from './optimizing_middleware'; import { contextMiddleware } from './context_middleware'; import { fullscreenMiddleware } from './fullscreen_middleware'; -export * from './types'; +export type * from './types'; export * from './selectors'; export const { diff --git a/x-pack/platform/plugins/shared/lens/public/visualizations/heatmap/heatmap_visualization.ts b/x-pack/platform/plugins/shared/lens/public/visualizations/heatmap/heatmap_visualization.ts index 7b9fa15413a57..f1c0cdbee3d4f 100644 --- a/x-pack/platform/plugins/shared/lens/public/visualizations/heatmap/heatmap_visualization.ts +++ b/x-pack/platform/plugins/shared/lens/public/visualizations/heatmap/heatmap_visualization.ts @@ -5,5 +5,5 @@ * 2.0. */ -export * from './types'; +export type * from './types'; export * from './visualization'; diff --git a/x-pack/platform/plugins/shared/logs_data_access/common/types.ts b/x-pack/platform/plugins/shared/logs_data_access/common/types.ts index 0600b162e1b3d..a7303ba30e1b7 100644 --- a/x-pack/platform/plugins/shared/logs_data_access/common/types.ts +++ b/x-pack/platform/plugins/shared/logs_data_access/common/types.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './services/log_sources_service/types'; +export type * from './services/log_sources_service/types'; diff --git a/x-pack/platform/plugins/shared/logs_data_access/public/services/log_data_service/index.ts b/x-pack/platform/plugins/shared/logs_data_access/public/services/log_data_service/index.ts index ec9370f4f4289..b33f38726a16d 100644 --- a/x-pack/platform/plugins/shared/logs_data_access/public/services/log_data_service/index.ts +++ b/x-pack/platform/plugins/shared/logs_data_access/public/services/log_data_service/index.ts @@ -6,4 +6,4 @@ */ export * from './log_data_service'; -export * from './types'; +export type * from './types'; diff --git a/x-pack/platform/plugins/shared/logs_shared/common/locators/index.ts b/x-pack/platform/plugins/shared/logs_shared/common/locators/index.ts index ad0bb5af615b2..8b9a2f3149a12 100644 --- a/x-pack/platform/plugins/shared/logs_shared/common/locators/index.ts +++ b/x-pack/platform/plugins/shared/logs_shared/common/locators/index.ts @@ -8,4 +8,4 @@ export * from './logs_locator'; export * from './get_logs_locators'; export * from './helpers'; -export * from './types'; +export type * from './types'; diff --git a/x-pack/platform/plugins/shared/logs_shared/public/observability_logs/log_view_state/src/index.ts b/x-pack/platform/plugins/shared/logs_shared/public/observability_logs/log_view_state/src/index.ts index 2b18455656689..601209776047c 100644 --- a/x-pack/platform/plugins/shared/logs_shared/public/observability_logs/log_view_state/src/index.ts +++ b/x-pack/platform/plugins/shared/logs_shared/public/observability_logs/log_view_state/src/index.ts @@ -7,5 +7,5 @@ export { createLogViewNotificationChannel, type LogViewNotificationEvent } from './notifications'; export * from './state_machine'; -export * from './types'; +export type * from './types'; export * from './url_state_storage_service'; diff --git a/x-pack/platform/plugins/shared/logs_shared/public/services/log_views/index.ts b/x-pack/platform/plugins/shared/logs_shared/public/services/log_views/index.ts index 07bb7bfa88476..5634c3be63920 100644 --- a/x-pack/platform/plugins/shared/logs_shared/public/services/log_views/index.ts +++ b/x-pack/platform/plugins/shared/logs_shared/public/services/log_views/index.ts @@ -7,4 +7,4 @@ export * from './log_views_client'; export * from './log_views_service'; -export * from './types'; +export type * from './types'; diff --git a/x-pack/platform/plugins/shared/logs_shared/public/utils/data_search/index.ts b/x-pack/platform/plugins/shared/logs_shared/public/utils/data_search/index.ts index bd1881a6935e9..5421ad803e938 100644 --- a/x-pack/platform/plugins/shared/logs_shared/public/utils/data_search/index.ts +++ b/x-pack/platform/plugins/shared/logs_shared/public/utils/data_search/index.ts @@ -7,7 +7,7 @@ export * from './flatten_data_search_response'; export * from './normalize_data_search_responses'; -export * from './types'; +export type * from './types'; export * from './use_data_search_request'; export * from './use_data_search_response_state'; export * from './use_latest_partial_data_search_response'; diff --git a/x-pack/platform/plugins/shared/logs_shared/server/lib/adapters/framework/index.ts b/x-pack/platform/plugins/shared/logs_shared/server/lib/adapters/framework/index.ts index 5d7c09c54b8c1..8dbefc5b6b466 100644 --- a/x-pack/platform/plugins/shared/logs_shared/server/lib/adapters/framework/index.ts +++ b/x-pack/platform/plugins/shared/logs_shared/server/lib/adapters/framework/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './adapter_types'; +export type * from './adapter_types'; diff --git a/x-pack/platform/plugins/shared/maps/common/content_management/index.ts b/x-pack/platform/plugins/shared/maps/common/content_management/index.ts index 8d9979a000d13..df79ab50ffe10 100644 --- a/x-pack/platform/plugins/shared/maps/common/content_management/index.ts +++ b/x-pack/platform/plugins/shared/maps/common/content_management/index.ts @@ -14,4 +14,4 @@ export type { MapCrudTypes, MapAttributes, MapItem, MapsSearchOut } from './late // Today "v1" === "latest" so the export under MapV1 namespace is not really useful // We leave it as a reference for future version when it will be needed to export/support older types // in the UIs. -export * as MapV1 from './v1'; +export type * as MapV1 from './v1'; diff --git a/x-pack/platform/plugins/shared/maps/common/content_management/latest.ts b/x-pack/platform/plugins/shared/maps/common/content_management/latest.ts index b2f4f73793aa2..a7184c4f9a71b 100644 --- a/x-pack/platform/plugins/shared/maps/common/content_management/latest.ts +++ b/x-pack/platform/plugins/shared/maps/common/content_management/latest.ts @@ -6,4 +6,4 @@ */ // Latest version is 1 -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/platform/plugins/shared/maps/common/descriptor_types/index.ts b/x-pack/platform/plugins/shared/maps/common/descriptor_types/index.ts index 6ca53c72f6563..3bd893f04c991 100644 --- a/x-pack/platform/plugins/shared/maps/common/descriptor_types/index.ts +++ b/x-pack/platform/plugins/shared/maps/common/descriptor_types/index.ts @@ -5,8 +5,8 @@ * 2.0. */ -export * from './data_request_descriptor_types'; -export * from './source_descriptor_types'; -export * from './layer_descriptor_types'; -export * from './map_descriptor'; -export * from './style_property_descriptor_types'; +export type * from './data_request_descriptor_types'; +export type * from './source_descriptor_types'; +export type * from './layer_descriptor_types'; +export type * from './map_descriptor'; +export type * from './style_property_descriptor_types'; diff --git a/x-pack/platform/plugins/shared/maps/public/reducers/map/index.ts b/x-pack/platform/plugins/shared/maps/public/reducers/map/index.ts index e9a459e4abc8b..e0a16f3ac473c 100644 --- a/x-pack/platform/plugins/shared/maps/public/reducers/map/index.ts +++ b/x-pack/platform/plugins/shared/maps/public/reducers/map/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -export * from './types'; +export type * from './types'; export { DEFAULT_MAP_STATE, map } from './map'; diff --git a/x-pack/platform/plugins/shared/ml/common/types/anomaly_detection_jobs/index.ts b/x-pack/platform/plugins/shared/ml/common/types/anomaly_detection_jobs/index.ts index cbfba6462aa34..b844c913bbe94 100644 --- a/x-pack/platform/plugins/shared/ml/common/types/anomaly_detection_jobs/index.ts +++ b/x-pack/platform/plugins/shared/ml/common/types/anomaly_detection_jobs/index.ts @@ -6,9 +6,9 @@ */ export * from './job'; -export * from './job_stats'; -export * from './datafeed'; -export * from './datafeed_stats'; +export type * from './job_stats'; +export type * from './datafeed'; +export type * from './datafeed_stats'; export * from './combined_job'; -export * from './summary_job'; -export * from './model_snapshot'; +export type * from './summary_job'; +export type * from './model_snapshot'; diff --git a/x-pack/platform/plugins/shared/ml/public/application/explorer/explorer_charts/utils/draw_anomaly_explorer_charts_cursor.ts b/x-pack/platform/plugins/shared/ml/public/application/explorer/explorer_charts/utils/draw_anomaly_explorer_charts_cursor.ts index 18b55fbe78589..270a7dca68c56 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/explorer/explorer_charts/utils/draw_anomaly_explorer_charts_cursor.ts +++ b/x-pack/platform/plugins/shared/ml/public/application/explorer/explorer_charts/utils/draw_anomaly_explorer_charts_cursor.ts @@ -49,7 +49,6 @@ export function drawCursor( .selectAll('.ml-anomaly-chart-cursor-line') .data(cursorData); - // @ts-expect-error d3 types are not up to date cursorMouseLine .enter() .append('path') @@ -59,6 +58,7 @@ export function drawCursor( return `M${xPosition},${CHART_HEIGHT} ${xPosition},0`; }) // Use elastic chart's cursor line style if possible + // @ts-expect-error upgrade typescript v5.4.5 .style('stroke', crosshairLine.stroke) .style('stroke-width', `${crosshairLine.strokeWidth}px`) .style('stroke-dasharray', crosshairLine.dash?.join(',') ?? '4,4') diff --git a/x-pack/platform/plugins/shared/ml/public/application/jobs/jobs_list/components/start_datafeed_modal/time_range_selector/time_range_selector.js b/x-pack/platform/plugins/shared/ml/public/application/jobs/jobs_list/components/start_datafeed_modal/time_range_selector/time_range_selector.js index a6889c745f763..e1e7031cd1b04 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/jobs/jobs_list/components/start_datafeed_modal/time_range_selector/time_range_selector.js +++ b/x-pack/platform/plugins/shared/ml/public/application/jobs/jobs_list/components/start_datafeed_modal/time_range_selector/time_range_selector.js @@ -118,6 +118,7 @@ export class TimeRangeSelector extends Component { index: 2, label: startLabels[2], body: ( + // eslint-disable-next-line no-use-before-define ), body: ( + // eslint-disable-next-line no-use-before-define { diff --git a/x-pack/platform/plugins/shared/osquery/common/search_strategy/osquery/index.ts b/x-pack/platform/plugins/shared/osquery/common/search_strategy/osquery/index.ts index 48ec1f2bb1900..ddeb4f3deab4f 100644 --- a/x-pack/platform/plugins/shared/osquery/common/search_strategy/osquery/index.ts +++ b/x-pack/platform/plugins/shared/osquery/common/search_strategy/osquery/index.ts @@ -18,8 +18,8 @@ import type { ResultsStrategyResponse, ResultsRequestOptions } from './results'; import type { SortField, PaginationInputPaginated } from '../common'; -export * from './actions'; -export * from './results'; +export type * from './actions'; +export type * from './results'; export enum OsqueryQueries { actions = 'actions', diff --git a/x-pack/platform/plugins/shared/osquery/cypress/plugins/index.ts b/x-pack/platform/plugins/shared/osquery/cypress/plugins/index.ts index 2653d7f55419b..b095cad920cd4 100644 --- a/x-pack/platform/plugins/shared/osquery/cypress/plugins/index.ts +++ b/x-pack/platform/plugins/shared/osquery/cypress/plugins/index.ts @@ -21,7 +21,6 @@ /** * @type {Cypress.PluginConfig} */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any module.exports = (on: any, config: any) => { // eslint-disable-next-line @typescript-eslint/no-var-requires require('@cypress/grep/src/plugin')(config); diff --git a/x-pack/platform/plugins/shared/osquery/public/agents/agent_grouper.test.ts b/x-pack/platform/plugins/shared/osquery/public/agents/agent_grouper.test.ts index 802282d5da8e6..ae1dc6239c98b 100644 --- a/x-pack/platform/plugins/shared/osquery/public/agents/agent_grouper.test.ts +++ b/x-pack/platform/plugins/shared/osquery/public/agents/agent_grouper.test.ts @@ -73,7 +73,6 @@ describe('AgentGrouper', () => { agentGrouper.setTotalAgents(100); const groups = agentGrouper.generateOptions(); - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const allGroup = groups[AGENT_GROUP_KEY.All].options![0]; expect(allGroup.label).toEqual(ALL_AGENTS_LABEL); const size: number = (allGroup.value as GroupOptionValue).size; @@ -99,7 +98,6 @@ describe('AgentGrouper', () => { expect(options).toBeTruthy(); data.forEach((datum, i) => { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const opt = options![i]; expect(opt.label).toEqual(`test ${dataName} ${i} (${datum.id})`); expect(opt.key).toEqual(datum.id); @@ -130,7 +128,6 @@ describe('AgentGrouper', () => { const options = groups[0].options; expect(options).toBeTruthy(); agentData.forEach((ag, i) => { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const opt = options![i]; expect(opt.label).toEqual( `${ag.local_metadata.host.hostname} (${ag.local_metadata.elastic.agent.id})` diff --git a/x-pack/platform/plugins/shared/osquery/public/agents/agent_grouper.ts b/x-pack/platform/plugins/shared/osquery/public/agents/agent_grouper.ts index 86f6bcbd42245..ad7bfd17eaa51 100644 --- a/x-pack/platform/plugins/shared/osquery/public/agents/agent_grouper.ts +++ b/x-pack/platform/plugins/shared/osquery/public/agents/agent_grouper.ts @@ -75,7 +75,6 @@ export class AgentGrouper { ), }; - // eslint-disable-next-line @typescript-eslint/no-explicit-any updateGroup(key: AGENT_GROUP_KEY, data: any[], append = false) { if (!data?.length || key === AGENT_GROUP_KEY.All) { return; diff --git a/x-pack/platform/plugins/shared/osquery/public/packs/queries/ecs_mapping_editor_field.tsx b/x-pack/platform/plugins/shared/osquery/public/packs/queries/ecs_mapping_editor_field.tsx index cb2fafbfe2f59..5b00ab17b1a96 100644 --- a/x-pack/platform/plugins/shared/osquery/public/packs/queries/ecs_mapping_editor_field.tsx +++ b/x-pack/platform/plugins/shared/osquery/public/packs/queries/ecs_mapping_editor_field.tsx @@ -781,7 +781,6 @@ export const ECSMappingEditorField = React.memo(({ euiFieldProps }: ECSMappingEd const oneLineQuery = removeMultilines(query); - // eslint-disable-next-line @typescript-eslint/no-explicit-any let ast: Record | undefined; try { @@ -848,7 +847,6 @@ export const ECSMappingEditorField = React.memo(({ euiFieldProps }: ECSMappingEd data?.map, (mapValue: { type: string; - // eslint-disable-next-line @typescript-eslint/no-explicit-any source: { type: string; variant: string; name: any | string; alias: any }; }) => { if (mapValue?.type === 'join') { diff --git a/x-pack/platform/plugins/shared/osquery/public/plugin.ts b/x-pack/platform/plugins/shared/osquery/public/plugin.ts index 303b6aab4f7f4..5110d1db2fde2 100644 --- a/x-pack/platform/plugins/shared/osquery/public/plugin.ts +++ b/x-pack/platform/plugins/shared/osquery/public/plugin.ts @@ -142,6 +142,5 @@ export class OsqueryPlugin implements Plugin = ({ }; const eventId = data[visibleRowIndex]?._id; - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion return ; }, }, diff --git a/x-pack/platform/plugins/shared/osquery/server/create_indices/create_transforms_indices.test.ts b/x-pack/platform/plugins/shared/osquery/server/create_indices/create_transforms_indices.test.ts index fd75423e06677..3de1cbd27ca8b 100644 --- a/x-pack/platform/plugins/shared/osquery/server/create_indices/create_transforms_indices.test.ts +++ b/x-pack/platform/plugins/shared/osquery/server/create_indices/create_transforms_indices.test.ts @@ -5,8 +5,6 @@ * 2.0. */ -/* eslint-disable @typescript-eslint/no-explicit-any */ - import { actionsMapping } from './actions_mapping'; import { actionResponsesMapping } from './action_responses_mapping'; import { diff --git a/x-pack/platform/plugins/shared/osquery/server/lib/osquery_app_context_services.ts b/x-pack/platform/plugins/shared/osquery/server/lib/osquery_app_context_services.ts index f8d19d1e017d0..da095405caf15 100644 --- a/x-pack/platform/plugins/shared/osquery/server/lib/osquery_app_context_services.ts +++ b/x-pack/platform/plugins/shared/osquery/server/lib/osquery_app_context_services.ts @@ -61,7 +61,6 @@ export class OsqueryAppContextService { this.spacesService = dependencies.spacesService; } - // eslint-disable-next-line @typescript-eslint/no-empty-function public stop() {} public getAgentService(): AgentService | undefined { diff --git a/x-pack/platform/plugins/shared/osquery/server/lib/telemetry/task.ts b/x-pack/platform/plugins/shared/osquery/server/lib/telemetry/task.ts index 8a0d40dc126a4..8ca2b7e2074b7 100644 --- a/x-pack/platform/plugins/shared/osquery/server/lib/telemetry/task.ts +++ b/x-pack/platform/plugins/shared/osquery/server/lib/telemetry/task.ts @@ -104,7 +104,6 @@ export class OsqueryTelemetryTask { state: updatedState, }; }, - // eslint-disable-next-line @typescript-eslint/no-empty-function cancel: async () => {}, }; }, diff --git a/x-pack/platform/plugins/shared/osquery/server/plugin.ts b/x-pack/platform/plugins/shared/osquery/server/plugin.ts index 8494aa076383a..131074cf0ba37 100644 --- a/x-pack/platform/plugins/shared/osquery/server/plugin.ts +++ b/x-pack/platform/plugins/shared/osquery/server/plugin.ts @@ -119,7 +119,6 @@ export class OsqueryPlugin implements Plugin ); @@ -110,7 +109,6 @@ export const convertSOQueriesToPackConfig = ( return acc; }, - // eslint-disable-next-line @typescript-eslint/no-explicit-any {} as Record ); diff --git a/x-pack/platform/plugins/shared/osquery/server/utils/runtime_types.ts b/x-pack/platform/plugins/shared/osquery/server/utils/runtime_types.ts index 605cf3a0770d8..1407373780815 100644 --- a/x-pack/platform/plugins/shared/osquery/server/utils/runtime_types.ts +++ b/x-pack/platform/plugins/shared/osquery/server/utils/runtime_types.ts @@ -15,13 +15,9 @@ import { get } from 'lodash'; type ErrorFactory = (message: string) => Error; export type GenericIntersectionC = - // eslint-disable-next-line @typescript-eslint/no-explicit-any | rt.IntersectionC<[any, any]> - // eslint-disable-next-line @typescript-eslint/no-explicit-any | rt.IntersectionC<[any, any, any]> - // eslint-disable-next-line @typescript-eslint/no-explicit-any | rt.IntersectionC<[any, any, any, any]> - // eslint-disable-next-line @typescript-eslint/no-explicit-any | rt.IntersectionC<[any, any, any, any, any]>; export const createPlainError = (message: string) => new Error(message); @@ -36,11 +32,7 @@ export const decodeOrThrow = pipe(runtimeType.decode(inputValue), fold(throwErrors(createError), identity)); const getProps = ( - codec: - | rt.HasProps - // eslint-disable-next-line @typescript-eslint/no-explicit-any - | rt.RecordC - | GenericIntersectionC + codec: rt.HasProps | rt.RecordC | GenericIntersectionC ): rt.Props | null => { if (codec == null) { return null; @@ -78,12 +70,7 @@ const getProps = ( } }; -const getExcessProps = ( - // eslint-disable-next-line @typescript-eslint/no-explicit-any - props: rt.Props | rt.RecordC, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - r: any -): string[] => +const getExcessProps = (props: rt.Props | rt.RecordC, r: any): string[] => Object.keys(r).reduce((acc, k) => { const codecChildren = get(props, [k]); const childrenProps = getProps(codecChildren); diff --git a/x-pack/platform/plugins/shared/rule_registry/server/rule_data_client/index.ts b/x-pack/platform/plugins/shared/rule_registry/server/rule_data_client/index.ts index 42af95a1c5736..ea23bcdac2fcb 100644 --- a/x-pack/platform/plugins/shared/rule_registry/server/rule_data_client/index.ts +++ b/x-pack/platform/plugins/shared/rule_registry/server/rule_data_client/index.ts @@ -6,4 +6,4 @@ */ export * from './rule_data_client'; -export * from './types'; +export type * from './types'; diff --git a/x-pack/platform/plugins/shared/serverless/server/config.ts b/x-pack/platform/plugins/shared/serverless/server/config.ts index 7075a0c7a2e49..72d6a667e9749 100644 --- a/x-pack/platform/plugins/shared/serverless/server/config.ts +++ b/x-pack/platform/plugins/shared/serverless/server/config.ts @@ -8,7 +8,7 @@ import { schema, TypeOf } from '@kbn/config-schema'; import { PluginConfigDescriptor } from '@kbn/core/server'; -export * from './types'; +export type * from './types'; const configSchema = schema.object({ // Is this plugin enabled? diff --git a/x-pack/platform/plugins/shared/spaces/common/index.ts b/x-pack/platform/plugins/shared/spaces/common/index.ts index 571c7f5694d64..9951ccd70b297 100644 --- a/x-pack/platform/plugins/shared/spaces/common/index.ts +++ b/x-pack/platform/plugins/shared/spaces/common/index.ts @@ -21,4 +21,4 @@ export type { GetSpaceResult, SolutionView, } from './types/latest'; -export { spaceV1 } from './types'; +export type { spaceV1 } from './types'; diff --git a/x-pack/platform/plugins/shared/spaces/common/types/index.ts b/x-pack/platform/plugins/shared/spaces/common/types/index.ts index 6a45180e186cd..ff6d352e4af51 100644 --- a/x-pack/platform/plugins/shared/spaces/common/types/index.ts +++ b/x-pack/platform/plugins/shared/spaces/common/types/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * as spaceV1 from './space/v1'; +export type * as spaceV1 from './space/v1'; diff --git a/x-pack/platform/plugins/shared/spaces/common/types/latest.ts b/x-pack/platform/plugins/shared/spaces/common/types/latest.ts index 12924244d8591..6d594afc58a95 100644 --- a/x-pack/platform/plugins/shared/spaces/common/types/latest.ts +++ b/x-pack/platform/plugins/shared/spaces/common/types/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './space/v1'; +export type * from './space/v1'; diff --git a/x-pack/platform/plugins/shared/streams_app/public/components/app_root/index.tsx b/x-pack/platform/plugins/shared/streams_app/public/components/app_root/index.tsx index 0fbcfca6c49ed..89d5cf34cf8e9 100644 --- a/x-pack/platform/plugins/shared/streams_app/public/components/app_root/index.tsx +++ b/x-pack/platform/plugins/shared/streams_app/public/components/app_root/index.tsx @@ -46,6 +46,7 @@ export function AppRoot({ return ( + {/* @ts-expect-error upgrade typescript v5.4.5 */} diff --git a/x-pack/platform/plugins/shared/streams_app/public/components/data_management/stream_detail_enrichment/state_management/data_source_state_machine/index.ts b/x-pack/platform/plugins/shared/streams_app/public/components/data_management/stream_detail_enrichment/state_management/data_source_state_machine/index.ts index 0f3aa79ae271b..049348c3d53a3 100644 --- a/x-pack/platform/plugins/shared/streams_app/public/components/data_management/stream_detail_enrichment/state_management/data_source_state_machine/index.ts +++ b/x-pack/platform/plugins/shared/streams_app/public/components/data_management/stream_detail_enrichment/state_management/data_source_state_machine/index.ts @@ -6,5 +6,5 @@ */ export * from './data_source_state_machine'; -export * from './types'; +export type * from './types'; export * from './use_data_source_selector'; diff --git a/x-pack/platform/plugins/shared/streams_app/public/components/data_management/stream_detail_enrichment/state_management/processor_state_machine/index.ts b/x-pack/platform/plugins/shared/streams_app/public/components/data_management/stream_detail_enrichment/state_management/processor_state_machine/index.ts index 4143400cd5a30..80496cdf21b7c 100644 --- a/x-pack/platform/plugins/shared/streams_app/public/components/data_management/stream_detail_enrichment/state_management/processor_state_machine/index.ts +++ b/x-pack/platform/plugins/shared/streams_app/public/components/data_management/stream_detail_enrichment/state_management/processor_state_machine/index.ts @@ -6,5 +6,5 @@ */ export * from './processor_state_machine'; -export * from './types'; +export type * from './types'; export * from './utils'; diff --git a/x-pack/platform/plugins/shared/streams_app/public/components/data_management/stream_detail_enrichment/state_management/simulation_state_machine/index.ts b/x-pack/platform/plugins/shared/streams_app/public/components/data_management/stream_detail_enrichment/state_management/simulation_state_machine/index.ts index 3233f81e88bbd..6fc4b5c7269e7 100644 --- a/x-pack/platform/plugins/shared/streams_app/public/components/data_management/stream_detail_enrichment/state_management/simulation_state_machine/index.ts +++ b/x-pack/platform/plugins/shared/streams_app/public/components/data_management/stream_detail_enrichment/state_management/simulation_state_machine/index.ts @@ -7,5 +7,5 @@ export * from './simulation_documents_search'; export * from './simulation_state_machine'; -export * from './types'; +export type * from './types'; export * from './utils'; diff --git a/x-pack/platform/plugins/shared/streams_app/public/components/data_management/stream_detail_enrichment/state_management/stream_enrichment_state_machine/index.ts b/x-pack/platform/plugins/shared/streams_app/public/components/data_management/stream_detail_enrichment/state_management/stream_enrichment_state_machine/index.ts index c9d28a5e5cd39..3be3451278e95 100644 --- a/x-pack/platform/plugins/shared/streams_app/public/components/data_management/stream_detail_enrichment/state_management/stream_enrichment_state_machine/index.ts +++ b/x-pack/platform/plugins/shared/streams_app/public/components/data_management/stream_detail_enrichment/state_management/stream_enrichment_state_machine/index.ts @@ -6,4 +6,4 @@ */ export * from './use_stream_enrichment'; -export * from './types'; +export type * from './types'; diff --git a/x-pack/platform/plugins/shared/streams_app/public/components/data_management/stream_detail_routing/state_management/stream_routing_state_machine/index.ts b/x-pack/platform/plugins/shared/streams_app/public/components/data_management/stream_detail_routing/state_management/stream_routing_state_machine/index.ts index b7c59688dd700..6694c5537bd11 100644 --- a/x-pack/platform/plugins/shared/streams_app/public/components/data_management/stream_detail_routing/state_management/stream_routing_state_machine/index.ts +++ b/x-pack/platform/plugins/shared/streams_app/public/components/data_management/stream_detail_routing/state_management/stream_routing_state_machine/index.ts @@ -7,4 +7,4 @@ export * from './selectors'; export * from './use_stream_routing'; -export * from './types'; +export type * from './types'; diff --git a/x-pack/platform/plugins/shared/task_manager/server/monitoring/workload_statistics.ts b/x-pack/platform/plugins/shared/task_manager/server/monitoring/workload_statistics.ts index 87b2a525a9778..10454504ef898 100644 --- a/x-pack/platform/plugins/shared/task_manager/server/monitoring/workload_statistics.ts +++ b/x-pack/platform/plugins/shared/task_manager/server/monitoring/workload_statistics.ts @@ -487,7 +487,6 @@ export interface TaskTypeAggregation extends estypes.AggregationsFiltersAggregat sum_other_doc_count?: number | undefined; } -// @ts-expect-error key doesn't accept a string export interface ScheduleAggregation extends estypes.AggregationsFiltersAggregate { buckets: Array<{ doc_count: number; key: string | number }>; doc_count_error_upper_bound?: number | undefined; diff --git a/x-pack/platform/plugins/shared/timelines/common/search_strategy/timeline/events/index.ts b/x-pack/platform/plugins/shared/timelines/common/search_strategy/timeline/events/index.ts index 2b7f63bd86f7d..c061a746f1871 100644 --- a/x-pack/platform/plugins/shared/timelines/common/search_strategy/timeline/events/index.ts +++ b/x-pack/platform/plugins/shared/timelines/common/search_strategy/timeline/events/index.ts @@ -5,10 +5,10 @@ * 2.0. */ -export * from './all'; -export * from './details'; -export * from './last_event_time'; -export * from './eql'; +export type * from './all'; +export type * from './details'; +export type * from './last_event_time'; +export type * from './eql'; export const EntityType = { EVENTS: 'events', diff --git a/x-pack/platform/plugins/shared/timelines/common/types/timeline/index.ts b/x-pack/platform/plugins/shared/timelines/common/types/timeline/index.ts index 03435dc64a6dc..524837e92bcf8 100644 --- a/x-pack/platform/plugins/shared/timelines/common/types/timeline/index.ts +++ b/x-pack/platform/plugins/shared/timelines/common/types/timeline/index.ts @@ -6,9 +6,9 @@ */ export * from './actions'; -export * from './cells'; +export type * from './cells'; export * from './data_provider'; -export * from './rows'; +export type * from './rows'; /** * Warning: This version might diverge from the API response. It should not be used anymore. diff --git a/x-pack/platform/test/functional_with_es_ssl/apps/triggers_actions_ui/maintenance_windows/maintenance_windows_table.ts b/x-pack/platform/test/functional_with_es_ssl/apps/triggers_actions_ui/maintenance_windows/maintenance_windows_table.ts index c6294747cea82..d3828872135b4 100644 --- a/x-pack/platform/test/functional_with_es_ssl/apps/triggers_actions_ui/maintenance_windows/maintenance_windows_table.ts +++ b/x-pack/platform/test/functional_with_es_ssl/apps/triggers_actions_ui/maintenance_windows/maintenance_windows_table.ts @@ -263,13 +263,15 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { }); it('paginates maintenance windows correctly', async () => { - new Array(12).fill(null).map(async (_, index) => { - const mw = await createMaintenanceWindow({ - name: index + '-pagination', - getService, - }); - objectRemover.add(mw.id, 'rules/maintenance_window', 'alerting', true); - }); + await Promise.all( + new Array(12).fill(null).map(async (_, index) => { + const mw = await createMaintenanceWindow({ + name: index + '-pagination', + getService, + }); + objectRemover.add(mw.id, 'rules/maintenance_window', 'alerting', true); + }) + ); await browser.refresh(); await pageObjects.maintenanceWindows.searchMaintenanceWindows('pagination'); diff --git a/x-pack/solutions/chat/plugins/serverless_chat/server/config.ts b/x-pack/solutions/chat/plugins/serverless_chat/server/config.ts index 2c0d7816e2e6f..00176c487a92a 100644 --- a/x-pack/solutions/chat/plugins/serverless_chat/server/config.ts +++ b/x-pack/solutions/chat/plugins/serverless_chat/server/config.ts @@ -8,7 +8,7 @@ import { schema, TypeOf } from '@kbn/config-schema'; import { PluginConfigDescriptor } from '@kbn/core/server'; -export * from './types'; +export type * from './types'; const configSchema = schema.object({ enabled: schema.boolean({ defaultValue: false }), diff --git a/x-pack/solutions/observability/packages/kbn-alerts-grouping/src/index.ts b/x-pack/solutions/observability/packages/kbn-alerts-grouping/src/index.ts index 6cbed2bf0531e..f30bc4c3707ea 100644 --- a/x-pack/solutions/observability/packages/kbn-alerts-grouping/src/index.ts +++ b/x-pack/solutions/observability/packages/kbn-alerts-grouping/src/index.ts @@ -7,4 +7,4 @@ export * from './components/alerts_grouping'; export * from './contexts/alerts_grouping_context'; -export * from './types'; +export type * from './types'; diff --git a/x-pack/solutions/observability/packages/kbn-scout-oblt/src/playwright/fixtures/index.ts b/x-pack/solutions/observability/packages/kbn-scout-oblt/src/playwright/fixtures/index.ts index b05e86d128a2e..b6a89e169df54 100644 --- a/x-pack/solutions/observability/packages/kbn-scout-oblt/src/playwright/fixtures/index.ts +++ b/x-pack/solutions/observability/packages/kbn-scout-oblt/src/playwright/fixtures/index.ts @@ -7,4 +7,4 @@ export { test } from './single_thread_fixtures'; export { spaceTest } from './parallel_run_fixtures'; -export * from './types'; +export type * from './types'; diff --git a/x-pack/solutions/observability/plugins/exploratory_view/e2e/journeys/index.ts b/x-pack/solutions/observability/plugins/exploratory_view/e2e/journeys/index.ts index 3f0bc8128434c..eae0b7c0aefc1 100644 --- a/x-pack/solutions/observability/plugins/exploratory_view/e2e/journeys/index.ts +++ b/x-pack/solutions/observability/plugins/exploratory_view/e2e/journeys/index.ts @@ -6,5 +6,5 @@ */ // export * from './exploratory_view'; -export * from './step_duration.journey'; +export type * from './step_duration.journey'; // export * from './single_metric.journey'; diff --git a/x-pack/solutions/observability/plugins/infra/common/log_analysis/index.ts b/x-pack/solutions/observability/plugins/infra/common/log_analysis/index.ts index 30ff84bee8b6f..2265e846974aa 100644 --- a/x-pack/solutions/observability/plugins/infra/common/log_analysis/index.ts +++ b/x-pack/solutions/observability/plugins/infra/common/log_analysis/index.ts @@ -6,7 +6,7 @@ */ export * from './log_analysis'; -export * from './log_analysis_quality'; +export type * from './log_analysis_quality'; export * from './log_analysis_results'; export * from './log_entry_rate_analysis'; export * from './log_entry_categories_analysis'; diff --git a/x-pack/solutions/observability/plugins/infra/common/saved_views/index.ts b/x-pack/solutions/observability/plugins/infra/common/saved_views/index.ts index 6cc0ccaa93a6d..d6aaa0f3a4aad 100644 --- a/x-pack/solutions/observability/plugins/infra/common/saved_views/index.ts +++ b/x-pack/solutions/observability/plugins/infra/common/saved_views/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './types'; +export type * from './types'; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/criterion.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/criterion.tsx index 5f1a3859b0881..8353ae86ddf02 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/criterion.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/criterion.tsx @@ -223,7 +223,8 @@ export const Criterion: React.FC = ({ + {/* @ts-expect-error upgrade typescript v5.4.5 */} diff --git a/x-pack/solutions/observability/plugins/serverless_observability/server/config.ts b/x-pack/solutions/observability/plugins/serverless_observability/server/config.ts index 599a9f2bd7769..10051a3808644 100644 --- a/x-pack/solutions/observability/plugins/serverless_observability/server/config.ts +++ b/x-pack/solutions/observability/plugins/serverless_observability/server/config.ts @@ -8,7 +8,7 @@ import { schema, TypeOf } from '@kbn/config-schema'; import { PluginConfigDescriptor } from '@kbn/core/server'; -export * from './types'; +export type * from './types'; const configSchema = schema.object({ enabled: schema.boolean({ defaultValue: false }), diff --git a/x-pack/solutions/observability/plugins/slo/public/typings/index.ts b/x-pack/solutions/observability/plugins/slo/public/typings/index.ts index 78f557bdcbc7d..789a90f241cac 100644 --- a/x-pack/solutions/observability/plugins/slo/public/typings/index.ts +++ b/x-pack/solutions/observability/plugins/slo/public/typings/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './slo'; +export type * from './slo'; diff --git a/x-pack/solutions/observability/plugins/slo/server/domain/models/index.ts b/x-pack/solutions/observability/plugins/slo/server/domain/models/index.ts index 16336c40928f8..dacd4ec59eaf7 100644 --- a/x-pack/solutions/observability/plugins/slo/server/domain/models/index.ts +++ b/x-pack/solutions/observability/plugins/slo/server/domain/models/index.ts @@ -5,9 +5,9 @@ * 2.0. */ -export * from './common'; +export type * from './common'; export { Duration, DurationUnit, toDurationUnit, toMomentUnitOfTime } from '@kbn/slo-schema'; -export * from './error_budget'; -export * from './indicators'; -export * from './slo'; +export type * from './error_budget'; +export type * from './indicators'; +export type * from './slo'; export * from './time_window'; diff --git a/x-pack/solutions/observability/plugins/synthetics/common/runtime_types/ping/index.ts b/x-pack/solutions/observability/plugins/synthetics/common/runtime_types/ping/index.ts index 38ef0c7a835ad..872a4ef2765e3 100644 --- a/x-pack/solutions/observability/plugins/synthetics/common/runtime_types/ping/index.ts +++ b/x-pack/solutions/observability/plugins/synthetics/common/runtime_types/ping/index.ts @@ -5,6 +5,6 @@ * 2.0. */ -export * from './histogram'; +export type * from './histogram'; export * from './ping'; export * from './synthetics'; diff --git a/x-pack/solutions/observability/plugins/synthetics/common/types/index.ts b/x-pack/solutions/observability/plugins/synthetics/common/types/index.ts index 6544898d54a64..0c7c3734903b9 100644 --- a/x-pack/solutions/observability/plugins/synthetics/common/types/index.ts +++ b/x-pack/solutions/observability/plugins/synthetics/common/types/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -export * from './synthetics_monitor'; -export * from './monitor_validation'; -export * from './default_alerts'; -export * from './overview'; +export type * from './synthetics_monitor'; +export type * from './monitor_validation'; +export type * from './default_alerts'; +export type * from './overview'; diff --git a/x-pack/solutions/observability/plugins/synthetics/e2e/synthetics/journeys/index.ts b/x-pack/solutions/observability/plugins/synthetics/e2e/synthetics/journeys/index.ts index 807f7603945ca..f8de4e1fa59f5 100644 --- a/x-pack/solutions/observability/plugins/synthetics/e2e/synthetics/journeys/index.ts +++ b/x-pack/solutions/observability/plugins/synthetics/e2e/synthetics/journeys/index.ts @@ -6,26 +6,26 @@ */ // export * from './data_retention.journey'; // it is flaky -export * from './project_api_keys.journey'; -export * from './getting_started.journey'; -export * from './add_monitor.journey'; -export * from './monitor_selector.journey'; -export * from './management_list.journey'; -export * from './overview_sorting.journey'; +export type * from './project_api_keys.journey'; +export type * from './getting_started.journey'; +export type * from './add_monitor.journey'; +export type * from './monitor_selector.journey'; +export type * from './management_list.journey'; +export type * from './overview_sorting.journey'; // export * from './overview_scrolling.journey'; // export * from './overview_search.journey'; -export * from './private_locations.journey'; -export * from './alerting_default.journey'; -export * from './global_parameters.journey'; -export * from './detail_flyout'; -export * from './alert_rules/default_status_alert.journey'; -export * from './alert_rules/custom_status_alert.journey'; -export * from './alert_rules/custom_tls_alert.journey'; -export * from './test_now_mode.journey'; -export * from './monitor_details_page/monitor_summary.journey'; -export * from './test_run_details.journey'; -export * from './step_details.journey'; -export * from './project_monitor_read_only.journey'; -export * from './overview_save_lens_visualization.journey'; -export * from './filter_monitors.journey'; -export * from './overview_compact_view.journey'; +export type * from './private_locations.journey'; +export type * from './alerting_default.journey'; +export type * from './global_parameters.journey'; +export type * from './detail_flyout'; +export type * from './alert_rules/default_status_alert.journey'; +export type * from './alert_rules/custom_status_alert.journey'; +export type * from './alert_rules/custom_tls_alert.journey'; +export type * from './test_now_mode.journey'; +export type * from './monitor_details_page/monitor_summary.journey'; +export type * from './test_run_details.journey'; +export type * from './step_details.journey'; +export type * from './project_monitor_read_only.journey'; +export type * from './overview_save_lens_visualization.journey'; +export type * from './filter_monitors.journey'; +export type * from './overview_compact_view.journey'; diff --git a/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/types.ts b/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/types.ts index c2a0475b0cc68..098d0ee16c60f 100644 --- a/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/types.ts +++ b/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/types.ts @@ -34,7 +34,7 @@ export interface Step { export type StepMap = Record; export * from '../../../../../common/runtime_types/monitor_management'; -export * from '../../../../../common/types/monitor_validation'; +export type * from '../../../../../common/types/monitor_validation'; export interface FormLocation { id: string; diff --git a/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/monitor_details/hooks/use_failed_tests_by_step.tsx b/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/monitor_details/hooks/use_failed_tests_by_step.tsx index d42e52d02e190..b5032a45be276 100644 --- a/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/monitor_details/hooks/use_failed_tests_by_step.tsx +++ b/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/monitor_details/hooks/use_failed_tests_by_step.tsx @@ -91,6 +91,7 @@ export function useFailedTestByStep({ to, from }: { to: string; from: string }) index, count, name: key, + // @ts-expect-error upgrade typescript v5.4.5 percent: (count / total) * 100, }; }); diff --git a/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/hooks/use_redux_es_search.ts b/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/hooks/use_redux_es_search.ts index 5eb9f0bd7aafc..0e9baf224e8c4 100644 --- a/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/hooks/use_redux_es_search.ts +++ b/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/hooks/use_redux_es_search.ts @@ -42,7 +42,7 @@ export const useReduxEsSearch = < return useMemo(() => { return { - data: results[name] as ESSearchResponse, + data: results[name] as unknown as ESSearchResponse | undefined, loading: loadings[name], error: errors[name], }; diff --git a/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/state/monitor_list/index.ts b/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/state/monitor_list/index.ts index f0668e74f4864..95211eb754fda 100644 --- a/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/state/monitor_list/index.ts +++ b/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/state/monitor_list/index.ts @@ -132,7 +132,7 @@ export const monitorListReducer = createReducer(initialState, (builder) => { }); export * from './api'; -export * from './models'; +export type * from './models'; export * from './actions'; export * from './effects'; export * from './selectors'; diff --git a/x-pack/solutions/observability/plugins/uptime/common/runtime_types/ping/index.ts b/x-pack/solutions/observability/plugins/uptime/common/runtime_types/ping/index.ts index 38ef0c7a835ad..872a4ef2765e3 100644 --- a/x-pack/solutions/observability/plugins/uptime/common/runtime_types/ping/index.ts +++ b/x-pack/solutions/observability/plugins/uptime/common/runtime_types/ping/index.ts @@ -5,6 +5,6 @@ * 2.0. */ -export * from './histogram'; +export type * from './histogram'; export * from './ping'; export * from './synthetics'; diff --git a/x-pack/solutions/observability/plugins/uptime/common/types/index.ts b/x-pack/solutions/observability/plugins/uptime/common/types/index.ts index b99bc8a2f2d07..43d16c569e079 100644 --- a/x-pack/solutions/observability/plugins/uptime/common/types/index.ts +++ b/x-pack/solutions/observability/plugins/uptime/common/types/index.ts @@ -5,6 +5,6 @@ * 2.0. */ -export * from './monitor_duration'; -export * from './synthetics_monitor'; -export * from './integration_deprecation'; +export type * from './monitor_duration'; +export type * from './synthetics_monitor'; +export type * from './integration_deprecation'; diff --git a/x-pack/solutions/observability/plugins/uptime/e2e/uptime/journeys/alerts/index.ts b/x-pack/solutions/observability/plugins/uptime/e2e/uptime/journeys/alerts/index.ts index 6d243430345d4..68526ee842aec 100644 --- a/x-pack/solutions/observability/plugins/uptime/e2e/uptime/journeys/alerts/index.ts +++ b/x-pack/solutions/observability/plugins/uptime/e2e/uptime/journeys/alerts/index.ts @@ -5,6 +5,6 @@ * 2.0. */ -export * from './tls_alert_flyouts_in_alerting_app'; +export type * from './tls_alert_flyouts_in_alerting_app'; // export * from './status_alert_flyouts_in_alerting_app'; -export * from './default_email_settings'; +export type * from './default_email_settings'; diff --git a/x-pack/solutions/observability/plugins/uptime/e2e/uptime/journeys/index.ts b/x-pack/solutions/observability/plugins/uptime/e2e/uptime/journeys/index.ts index a507c0d111b5d..aab0f336532b8 100644 --- a/x-pack/solutions/observability/plugins/uptime/e2e/uptime/journeys/index.ts +++ b/x-pack/solutions/observability/plugins/uptime/e2e/uptime/journeys/index.ts @@ -5,9 +5,9 @@ * 2.0. */ -export * from './data_view_permissions'; -export * from './alerts'; -export * from './uptime.journey'; -export * from './step_duration.journey'; -export * from './monitor_details'; -export * from './locations'; +export type * from './data_view_permissions'; +export type * from './alerts'; +export type * from './uptime.journey'; +export type * from './step_duration.journey'; +export type * from './monitor_details'; +export type * from './locations'; diff --git a/x-pack/solutions/observability/plugins/uptime/e2e/uptime/journeys/locations/index.ts b/x-pack/solutions/observability/plugins/uptime/e2e/uptime/journeys/locations/index.ts index 1ec4437601d57..3f8aab61de545 100644 --- a/x-pack/solutions/observability/plugins/uptime/e2e/uptime/journeys/locations/index.ts +++ b/x-pack/solutions/observability/plugins/uptime/e2e/uptime/journeys/locations/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './locations'; +export type * from './locations'; diff --git a/x-pack/solutions/observability/plugins/uptime/e2e/uptime/journeys/monitor_details/index.ts b/x-pack/solutions/observability/plugins/uptime/e2e/uptime/journeys/monitor_details/index.ts index 51b782f118c2a..3494bcdb7106b 100644 --- a/x-pack/solutions/observability/plugins/uptime/e2e/uptime/journeys/monitor_details/index.ts +++ b/x-pack/solutions/observability/plugins/uptime/e2e/uptime/journeys/monitor_details/index.ts @@ -5,6 +5,6 @@ * 2.0. */ -export * from './monitor_details.journey'; -export * from './monitor_alerts.journey'; -export * from './ping_redirects.journey'; +export type * from './monitor_details.journey'; +export type * from './monitor_alerts.journey'; +export type * from './ping_redirects.journey'; diff --git a/x-pack/solutions/observability/plugins/uptime/server/legacy_uptime/lib/adapters/framework/index.ts b/x-pack/solutions/observability/plugins/uptime/server/legacy_uptime/lib/adapters/framework/index.ts index 5d7c09c54b8c1..8dbefc5b6b466 100644 --- a/x-pack/solutions/observability/plugins/uptime/server/legacy_uptime/lib/adapters/framework/index.ts +++ b/x-pack/solutions/observability/plugins/uptime/server/legacy_uptime/lib/adapters/framework/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './adapter_types'; +export type * from './adapter_types'; diff --git a/x-pack/solutions/observability/plugins/uptime/server/legacy_uptime/lib/adapters/index.ts b/x-pack/solutions/observability/plugins/uptime/server/legacy_uptime/lib/adapters/index.ts index 88c2a79b238e8..78a4322d253d2 100644 --- a/x-pack/solutions/observability/plugins/uptime/server/legacy_uptime/lib/adapters/index.ts +++ b/x-pack/solutions/observability/plugins/uptime/server/legacy_uptime/lib/adapters/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './framework'; +export type * from './framework'; diff --git a/x-pack/solutions/observability/plugins/uptime/server/legacy_uptime/routes/index.ts b/x-pack/solutions/observability/plugins/uptime/server/legacy_uptime/routes/index.ts index 7253c3a9096c4..38441a3e6a2b9 100644 --- a/x-pack/solutions/observability/plugins/uptime/server/legacy_uptime/routes/index.ts +++ b/x-pack/solutions/observability/plugins/uptime/server/legacy_uptime/routes/index.ts @@ -27,7 +27,7 @@ import { createNetworkEventsRoute } from './network_events'; import { createJourneyFailedStepsRoute } from './pings/journeys'; import { createLastSuccessfulCheckRoute } from './synthetics/last_successful_check'; -export * from './types'; +export type * from './types'; export { createRouteWithAuth } from './create_route_with_auth'; export { uptimeRouteWrapper } from './uptime_route_wrapper'; diff --git a/x-pack/solutions/observability/plugins/ux/e2e/journeys/index.ts b/x-pack/solutions/observability/plugins/ux/e2e/journeys/index.ts index 17f9e6e35236f..73ba7b611aaa8 100644 --- a/x-pack/solutions/observability/plugins/ux/e2e/journeys/index.ts +++ b/x-pack/solutions/observability/plugins/ux/e2e/journeys/index.ts @@ -5,11 +5,11 @@ * 2.0. */ -export * from './inp.journey'; -export * from './core_web_vitals'; +export type * from './inp.journey'; +export type * from './core_web_vitals'; // export * from './page_views'; -export * from './url_ux_query.journey'; -export * from './ux_js_errors.journey'; -export * from './ux_client_metrics.journey'; -export * from './ux_long_task_metric_journey'; -export * from './ux_visitor_breakdown.journey'; +export type * from './url_ux_query.journey'; +export type * from './ux_js_errors.journey'; +export type * from './ux_client_metrics.journey'; +export type * from './ux_long_task_metric_journey'; +export type * from './ux_visitor_breakdown.journey'; diff --git a/x-pack/solutions/search/packages/kbn-ipynb/index.tsx b/x-pack/solutions/search/packages/kbn-ipynb/index.tsx index 33a6ac85e9e19..9d5785b5d2382 100644 --- a/x-pack/solutions/search/packages/kbn-ipynb/index.tsx +++ b/x-pack/solutions/search/packages/kbn-ipynb/index.tsx @@ -5,5 +5,5 @@ * 2.0. */ -export * from './types'; +export type * from './types'; export * from './components'; diff --git a/x-pack/solutions/search/packages/kbn-search-queries/index.ts b/x-pack/solutions/search/packages/kbn-search-queries/index.ts index f00ad23ff9eda..c79e51f95a548 100644 --- a/x-pack/solutions/search/packages/kbn-search-queries/index.ts +++ b/x-pack/solutions/search/packages/kbn-search-queries/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -export * from './src/types'; +export type * from './src/types'; export * from './src/generate_query'; export * from './src/fields'; export * from './src/field_descriptors'; diff --git a/x-pack/solutions/search/packages/shared-ui/index.ts b/x-pack/solutions/search/packages/shared-ui/index.ts index 944e7342b7b70..88128b267826d 100644 --- a/x-pack/solutions/search/packages/shared-ui/index.ts +++ b/x-pack/solutions/search/packages/shared-ui/index.ts @@ -9,4 +9,4 @@ export * from './src/connector_icon'; export * from './src/form_info_field/form_info_field'; export * from './src/search_empty_prompt'; export * from './src/constants'; -export * from './src/types'; +export type * from './src/types'; diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/analytics/components/add_analytics_collections/add_analytics_collection_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/analytics/components/add_analytics_collections/add_analytics_collection_logic.ts index b0a1f466e0f77..be53e2ebf545c 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/analytics/components/add_analytics_collections/add_analytics_collection_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/analytics/components/add_analytics_collections/add_analytics_collection_logic.ts @@ -128,7 +128,6 @@ export const AddAnalyticsCollectionLogic = kea< inputError: [ null, { - // @ts-expect-error upgrade typescript v5.1.6 setInputError: (_, { inputError }) => inputError, setNameValue: () => null, }, @@ -136,7 +135,6 @@ export const AddAnalyticsCollectionLogic = kea< name: [ '', { - // @ts-expect-error upgrade typescript v5.1.6 setNameValue: (_, { name }) => name, }, ], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_data_view_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_data_view_logic.ts index a189fb5de81aa..2df8446b56cdf 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_data_view_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_data_view_logic.ts @@ -44,7 +44,6 @@ export const AnalyticsCollectionDataViewLogic = kea< }), path: ['enterprise_search', 'analytics', 'collection', 'dataView'], reducers: () => ({ - // @ts-expect-error upgrade typescript v5.1.6 dataView: [null, { setDataView: (_, { dataView }) => dataView }], }), }); diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_explore_table_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_explore_table_logic.ts index 50be09a628a5d..04ab8ba35bc94 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_explore_table_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_explore_table_logic.ts @@ -436,7 +436,6 @@ export const AnalyticsCollectionExploreTableLogic = kea< }; }, path: ['enterprise_search', 'analytics', 'collection', 'explore', 'table'], - // @ts-expect-error upgrade typescript v5.1.6 reducers: () => ({ isLoading: [ false, @@ -450,12 +449,10 @@ export const AnalyticsCollectionExploreTableLogic = kea< setTimeRange: () => true, }, ], - // @ts-expect-error upgrade typescript v5.1.6 items: [[], { setItems: (_, { items }) => items }], pageIndex: [ 0, { - // @ts-expect-error upgrade typescript v5.1.6 onTableChange: (_, { page }) => page?.index || 0, reset: () => 0, setSearch: () => 0, @@ -465,28 +462,22 @@ export const AnalyticsCollectionExploreTableLogic = kea< pageSize: [ BASE_PAGE_SIZE, { - // @ts-expect-error upgrade typescript v5.1.6 onTableChange: (_, { page }) => page?.size || BASE_PAGE_SIZE, reset: () => BASE_PAGE_SIZE, }, ], search: [ '', - // @ts-expect-error upgrade typescript v5.1.6 { reset: () => '', setSearch: (_, { search }) => search, setSelectedTable: () => '' }, ], - // @ts-expect-error upgrade typescript v5.1.6 selectedTable: [null, { setSelectedTable: (_, { id }) => id }], sorting: [ null, { - // @ts-expect-error upgrade typescript v5.1.6 onTableChange: (_, { sort = null }) => sort, - // @ts-expect-error upgrade typescript v5.1.6 setSelectedTable: (_, { sorting = null }) => sorting, }, ], - // @ts-expect-error upgrade typescript v5.1.6 totalItemsCount: [0, { setTotalItemsCount: (_, { count }) => count }], }), }); diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate/api_key_modal/generate_analytics_api_key_modal.logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate/api_key_modal/generate_analytics_api_key_modal.logic.ts index d4d13e9ba586b..9c562e7c4fa14 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate/api_key_modal/generate_analytics_api_key_modal.logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate/api_key_modal/generate_analytics_api_key_modal.logic.ts @@ -38,7 +38,6 @@ export const GenerateApiKeyModalLogic = kea< keyName: [ '', { - // @ts-expect-error upgrade typescript v5.1.6 setKeyName: (_, { keyName }) => keyName, }, ], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_toolbar/analytics_collection_toolbar_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_toolbar/analytics_collection_toolbar_logic.ts index c7db71d654d34..960a861a146be 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_toolbar/analytics_collection_toolbar_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_toolbar/analytics_collection_toolbar_logic.ts @@ -59,13 +59,11 @@ export const AnalyticsCollectionToolbarLogic = kea< reducers: () => ({ _searchSessionId: [ null, - // @ts-expect-error upgrade typescript v5.1.6 { setSearchSessionId: (state, { searchSessionId }) => searchSessionId }, ], refreshInterval: [ DEFAULT_REFRESH_INTERVAL, { - // @ts-expect-error upgrade typescript v5.1.6 setRefreshInterval: (_, { pause, value }) => ({ pause, value, @@ -75,7 +73,6 @@ export const AnalyticsCollectionToolbarLogic = kea< timeRange: [ DEFAULT_TIME_RANGE, { - // @ts-expect-error upgrade typescript v5.1.6 setTimeRange: (state, { from, to }) => ({ ...state, from, diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/analytics/components/analytics_overview/analytics_collections_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/analytics/components/analytics_overview/analytics_collections_logic.ts index 2e82f2d7aa224..bfe86f2874a60 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/analytics/components/analytics_overview/analytics_collections_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/analytics/components/analytics_overview/analytics_collections_logic.ts @@ -68,7 +68,6 @@ export const AnalyticsCollectionsLogic = kea< searchQuery: [ '', { - // @ts-expect-error upgrade typescript v5.1.6 searchAnalyticsCollections: (_, { query }) => query, }, ], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/applications/components/search_application/add_indices_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/applications/components/search_application/add_indices_logic.ts index d51a14b11cbea..f69e52ced5c24 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/applications/components/search_application/add_indices_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/applications/components/search_application/add_indices_logic.ts @@ -62,7 +62,6 @@ export const AddIndicesLogic = kea [], - // @ts-expect-error upgrade typescript v5.1.6 setSelectedIndices: (_, { indices }) => indices, }, ], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/applications/components/search_application/connect/generate_api_key_modal/generate_search_application_api_key_modal.logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/applications/components/search_application/connect/generate_api_key_modal/generate_search_application_api_key_modal.logic.ts index 95ee70e5dbbe3..400fc37f50660 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/applications/components/search_application/connect/generate_api_key_modal/generate_search_application_api_key_modal.logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/applications/components/search_application/connect/generate_api_key_modal/generate_search_application_api_key_modal.logic.ts @@ -38,7 +38,6 @@ export const GenerateApiKeyModalLogic = kea< keyName: [ '', { - // @ts-expect-error upgrade typescript v5.1.6 setKeyName: (_, { keyName }) => keyName, }, ], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/applications/components/search_application/search_application_name_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/applications/components/search_application/search_application_name_logic.ts index deff481fab872..3aec921316ff5 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/applications/components/search_application/search_application_name_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/applications/components/search_application/search_application_name_logic.ts @@ -33,7 +33,6 @@ export const SearchApplicationNameLogic = kea< // Short-circuiting this to empty string is necessary to enable testing logics relying on this props.searchApplicationName ?? '', { - // @ts-expect-error upgrade typescript v5.1.6 setSearchApplicationName: (_, { name }) => name, }, ], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/applications/components/search_applications/create_search_application_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/applications/components/search_applications/create_search_application_logic.ts index cacd38906105c..117b239355fee 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/applications/components/search_applications/create_search_application_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/applications/components/search_applications/create_search_application_logic.ts @@ -82,14 +82,12 @@ export const CreateSearchApplicationLogic = kea< searchApplicationName: [ '', { - // @ts-expect-error upgrade typescript v5.1.6 setName: (_, { name }) => name, }, ], selectedIndices: [ [], { - // @ts-expect-error upgrade typescript v5.1.6 setSelectedIndices: (_, { indices }) => indices, }, ], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/applications/components/search_applications/search_application_indices_flyout_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/applications/components/search_applications/search_application_indices_flyout_logic.ts index 6f8691480c351..723b5e5e4d5b3 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/applications/components/search_applications/search_application_indices_flyout_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/applications/components/search_applications/search_application_indices_flyout_logic.ts @@ -64,7 +64,6 @@ export const SearchApplicationIndicesFlyoutLogic = kea< null, { closeFlyout: () => null, - // @ts-expect-error upgrade typescript v5.1.6 openFlyout: (_, { name }) => name, }, ], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/applications/components/search_applications/search_applications_list_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/applications/components/search_applications/search_applications_list_logic.ts index 8753bcda80542..23fca303dd218 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/applications/components/search_applications/search_applications_list_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/applications/components/search_applications/search_applications_list_logic.ts @@ -119,7 +119,6 @@ export const SearchApplicationsListLogic = kea< null, { closeDeleteSearchApplicationModal: () => null, - // @ts-expect-error upgrade typescript v5.1.6 openDeleteSearchApplicationModal: (_, { searchApplication }) => searchApplication, }, ], @@ -143,18 +142,15 @@ export const SearchApplicationsListLogic = kea< parameters: [ { count: 0, meta: DEFAULT_META }, { - // @ts-expect-error upgrade typescript v5.1.6 apiSuccess: (state, { count }) => ({ ...state, count, meta: updateMetaTotalState(state.meta, count), // update total count from response }), - // @ts-expect-error upgrade typescript v5.1.6 onPaginate: (state, { pageNumber }) => ({ ...state, meta: updateMetaPageIndex(state.meta, pageNumber), }), - // @ts-expect-error upgrade typescript v5.1.6 setSearchQuery: (state, { searchQuery }) => ({ ...state, searchQuery: searchQuery ? searchQuery : undefined, @@ -164,7 +160,6 @@ export const SearchApplicationsListLogic = kea< searchQuery: [ '', { - // @ts-expect-error upgrade typescript v5.1.6 setSearchQuery: (_, { searchQuery }) => searchQuery, }, ], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/cached_fetch_connector_by_id_api_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/cached_fetch_connector_by_id_api_logic.ts index c82409667fb0f..05475ba553995 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/cached_fetch_connector_by_id_api_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/cached_fetch_connector_by_id_api_logic.ts @@ -116,7 +116,6 @@ export const CachedFetchConnectorByIdApiLogic = kea< null, { apiReset: () => null, - // @ts-expect-error upgrade typescript v5.1.6 apiSuccess: (currentState, newConnectorData) => { return isEqual(currentState, newConnectorData.connector) ? currentState @@ -128,7 +127,6 @@ export const CachedFetchConnectorByIdApiLogic = kea< '', { apiReset: () => '', - // @ts-expect-error upgrade typescript v5.1.6 startPolling: (_, { connectorId }) => connectorId, }, ], @@ -136,7 +134,6 @@ export const CachedFetchConnectorByIdApiLogic = kea< null, { clearPollTimeout: () => null, - // @ts-expect-error upgrade typescript v5.1.6 setTimeoutId: (_, { id }) => id, }, ], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/api/index/cached_fetch_index_api_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/api/index/cached_fetch_index_api_logic.ts index a650ef6a90dde..538f358b4d59b 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/api/index/cached_fetch_index_api_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/api/index/cached_fetch_index_api_logic.ts @@ -117,7 +117,6 @@ export const CachedFetchIndexApiLogic = kea< null, { apiReset: () => null, - // @ts-expect-error upgrade typescript v5.1.6 apiSuccess: (currentState, newIndexData) => { return isEqual(currentState, newIndexData) ? currentState : newIndexData; }, @@ -127,7 +126,6 @@ export const CachedFetchIndexApiLogic = kea< null, { clearPollTimeout: () => null, - // @ts-expect-error upgrade typescript v5.1.6 setTimeoutId: (_, { id }) => id, }, ], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/api/ml_models/cached_fetch_models_api_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/api/ml_models/cached_fetch_models_api_logic.ts index f3c5b45c8746a..a26dbada96c08 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/api/ml_models/cached_fetch_models_api_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/api/ml_models/cached_fetch_models_api_logic.ts @@ -103,7 +103,6 @@ export const CachedFetchModelsApiLogic = kea< null, { apiReset: () => null, - // @ts-expect-error upgrade typescript v5.1.6 apiSuccess: (currentState, newState) => isEqual(currentState, newState) ? currentState : newState, }, @@ -112,7 +111,6 @@ export const CachedFetchModelsApiLogic = kea< null, { clearPollTimeout: () => null, - // @ts-expect-error upgrade typescript v5.1.6 setTimeoutId: (_, { id }) => id, }, ], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/attach_index_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/attach_index_logic.ts index 3d02d69af0ca0..3f0b99a25e4cf 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/attach_index_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/attach_index_logic.ts @@ -114,14 +114,12 @@ export const AttachIndexLogic = kea connector, }, ], indexExists: [ {}, { - // @ts-expect-error upgrade typescript v5.1.6 checkIndexExistsApiSuccess: (state, { exists, indexName }) => ({ ...state, [indexName]: exists, diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_name_and_description_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_name_and_description_logic.ts index 333e3cfb912af..da097b6c2905b 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_name_and_description_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_name_and_description_logic.ts @@ -63,7 +63,6 @@ export const ConnectorNameAndDescriptionLogic = kea< connector: [ null, { - // @ts-expect-error upgrade typescript v5.1.6 setConnector: (_, connector) => connector, }, ], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/connectors_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/connectors_logic.ts index 86d3b3ed90826..eb3d2acdded48 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/connectors_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/connectors_logic.ts @@ -140,13 +140,11 @@ export const ConnectorsLogic = kea ({ deleteModalConnectorId: [ '', { closeDeleteModal: () => '', - // @ts-expect-error upgrade typescript v5.1.6 openDeleteModal: (_, { connectorId }) => connectorId, }, ], @@ -154,7 +152,6 @@ export const ConnectorsLogic = kea '', - // @ts-expect-error upgrade typescript v5.1.6 openDeleteModal: (_, { connectorName }) => connectorName, }, ], @@ -162,7 +159,6 @@ export const ConnectorsLogic = kea null, - // @ts-expect-error upgrade typescript v5.1.6 openDeleteModal: (_, { indexName }) => indexName, }, ], @@ -189,19 +185,16 @@ export const ConnectorsLogic = kea ({ fetchCrawlersOnly, from: meta.page.from, searchQuery, size: meta.page.size, }), - // @ts-expect-error upgrade typescript v5.1.6 fetchConnectors: (state, payload) => ({ ...state, ...payload, }), - // @ts-expect-error upgrade typescript v5.1.6 onPaginate: (state, { newPageIndex }) => ({ ...state, from: (newPageIndex - 1) * state.size, diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_connector/add_connector_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_connector/add_connector_logic.ts index 3794a81b2a664..7c8eb1cf170ab 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_connector/add_connector_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_connector/add_connector_logic.ts @@ -53,11 +53,9 @@ export const AddConnectorLogic = kea error.body?.attributes?.error_code === ErrorCode.CONNECTOR_DOCUMENT_ALREADY_EXISTS, apiSuccess: () => false, - // @ts-expect-error upgrade typescript v5.1.6 setIsModalVisible: (_, { isModalVisible }) => isModalVisible, }, ], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_connector/new_connector_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_connector/new_connector_logic.ts index f2f327f40650e..785061b41d45e 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_connector/new_connector_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_connector/new_connector_logic.ts @@ -220,14 +220,12 @@ export const NewConnectorLogic = kea isDirty, }, ], rawName: [ '', { - // @ts-expect-error upgrade typescript v5.1.6 setRawName: (_, { rawName }) => rawName, }, ], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/generate_api_key_modal/generate_api_key_modal.logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/generate_api_key_modal/generate_api_key_modal.logic.ts index 39b4f2ac6b5b9..022dee11d63c9 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/generate_api_key_modal/generate_api_key_modal.logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/generate_api_key_modal/generate_api_key_modal.logic.ts @@ -38,7 +38,6 @@ export const GenerateApiKeyModalLogic = kea< keyName: [ '', { - // @ts-expect-error upgrade typescript v5.1.6 setKeyName: (_, { keyName }) => keyName, }, ], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_name_and_description/connector_name_and_description_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_name_and_description/connector_name_and_description_logic.ts index 06e4e5aec1b93..d17384ae478a4 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_name_and_description/connector_name_and_description_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_name_and_description/connector_name_and_description_logic.ts @@ -94,16 +94,13 @@ export const ConnectorNameAndDescriptionLogic = kea< false, { apiSuccess: () => false, - // @ts-expect-error upgrade typescript v5.1.6 setIsEditing: (_, { isEditing }) => isEditing, }, ], localNameAndDescription: [ {}, { - // @ts-expect-error upgrade typescript v5.1.6 setLocalNameAndDescription: (_, nameAndDescription) => nameAndDescription, - // @ts-expect-error upgrade typescript v5.1.6 updateLocalNameAndDescription: (localNameAndDescription, nameAndDescription) => ({ ...localNameAndDescription, ...nameAndDescription, @@ -113,9 +110,7 @@ export const ConnectorNameAndDescriptionLogic = kea< nameAndDescription: [ {}, { - // @ts-expect-error upgrade typescript v5.1.6 apiSuccess: (_, { description, name }) => ({ description, name }), - // @ts-expect-error upgrade typescript v5.1.6 setNameAndDescription: (_, nameAndDescription) => nameAndDescription, }, ], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/connector_filtering_logic.tsx b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/connector_filtering_logic.tsx index 316a15d2104e5..825cea83f1510 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/connector_filtering_logic.tsx +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/connector_filtering_logic.tsx @@ -198,7 +198,6 @@ export const ConnectorFilteringLogic = kea< filteringConfig: [ null, { - // @ts-expect-error upgrade typescript v5.1.6 apiSuccess: (filteringConfig, filteringRules) => filteringConfig ? { @@ -206,7 +205,6 @@ export const ConnectorFilteringLogic = kea< active: filteringRules, } : null, - // @ts-expect-error upgrade typescript v5.1.6 draftApiSuccess: (filteringConfig, filteringRules) => filteringConfig ? { @@ -214,7 +212,6 @@ export const ConnectorFilteringLogic = kea< draft: filteringRules, } : null, - // @ts-expect-error upgrade typescript v5.1.6 setFilteringConfig: (_, filteringConfig) => filteringConfig, }, ], @@ -223,21 +220,18 @@ export const ConnectorFilteringLogic = kea< { draftApiError: () => false, draftApiSuccess: () => false, - // @ts-expect-error upgrade typescript v5.1.6 setIsEditing: (_, { isEditing }) => isEditing, }, ], localAdvancedSnippet: [ '', { - // @ts-expect-error upgrade typescript v5.1.6 setLocalAdvancedSnippet: (_, { advancedSnippet }) => advancedSnippet, }, ], localFilteringRules: [ [], { - // @ts-expect-error upgrade typescript v5.1.6 addFilteringRule: (filteringRules, filteringRule) => { const newFilteringRules: FilteringRule[] = filteringRules.length ? [ @@ -248,22 +242,16 @@ export const ConnectorFilteringLogic = kea< : [filteringRule, createDefaultRule(1)]; return newFilteringRules.map((rule, index) => ({ ...rule, order: index })); }, - // @ts-expect-error upgrade typescript v5.1.6 deleteFilteringRule: (filteringRules, filteringRule) => - // @ts-expect-error upgrade typescript v5.1.6 filteringRules.filter((rule) => rule.id !== filteringRule.id), - // @ts-expect-error upgrade typescript v5.1.6 reorderFilteringRules: (filteringRules, newFilteringRules) => { const lastItem = filteringRules.length ? filteringRules[filteringRules.length - 1] : createDefaultRule(0); return [...newFilteringRules, lastItem].map((rule, index) => ({ ...rule, order: index })); }, - // @ts-expect-error upgrade typescript v5.1.6 setLocalFilteringRules: (_, filteringRules) => filteringRules, - // @ts-expect-error upgrade typescript v5.1.6 updateFilteringRule: (filteringRules, filteringRule) => - // @ts-expect-error upgrade typescript v5.1.6 filteringRules.map((rule) => (rule.id === filteringRule.id ? filteringRule : rule)), }, ], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/index_name_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/index_name_logic.ts index 1f40c898546d0..c2a94b21f47b2 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/index_name_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/index_name_logic.ts @@ -27,7 +27,6 @@ export const IndexNameLogic = kea indexName, }, ], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/overview.logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/overview.logic.ts index aeeeedd89814f..ced2cc0d98099 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/overview.logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/overview.logic.ts @@ -90,7 +90,6 @@ export const OverviewLogic = kea !state, }, ], @@ -105,7 +104,6 @@ export const OverviewLogic = kea false, - // @ts-expect-error upgrade typescript v5.1.6 toggleManageApiKeyPopover: (state) => !state, }, ], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/ml_inference_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/ml_inference_logic.ts index cc20cea88f7cf..478b51dc1d7b1 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/ml_inference_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/ml_inference_logic.ts @@ -357,7 +357,6 @@ export const MLInferenceLogic = kea< step: AddInferencePipelineSteps.Configuration, }, { - // @ts-expect-error upgrade typescript v5.1.6 addSelectedFieldsToMapping: (modal, { isTextExpansionModelSelected }) => { const { configuration: { fieldMappings, targetField }, @@ -400,7 +399,6 @@ export const MLInferenceLogic = kea< indexName: '', step: AddInferencePipelineSteps.Configuration, }), - // @ts-expect-error upgrade typescript v5.1.6 removeFieldFromMapping: (modal, { fieldName }) => { const { configuration: { fieldMappings }, @@ -414,12 +412,10 @@ export const MLInferenceLogic = kea< ...modal, configuration: { ...modal.configuration, - // @ts-expect-error upgrade typescript v5.1.6 fieldMappings: fieldMappings?.filter(({ sourceField }) => sourceField !== fieldName), }, }; }, - // @ts-expect-error upgrade typescript v5.1.6 selectFields: (modal, { fieldNames }) => ({ ...modal, configuration: { @@ -427,16 +423,12 @@ export const MLInferenceLogic = kea< }, selectedSourceFields: fieldNames, }), - // @ts-expect-error upgrade typescript v5.1.6 setAddInferencePipelineStep: (modal, { step }) => ({ ...modal, step }), - // @ts-expect-error upgrade typescript v5.1.6 setIndexName: (modal, { indexName }) => ({ ...modal, indexName }), - // @ts-expect-error upgrade typescript v5.1.6 setInferencePipelineConfiguration: (modal, { configuration }) => ({ ...modal, configuration, }), - // @ts-expect-error upgrade typescript v5.1.6 setTargetField: (modal, { targetFieldName }) => ({ ...modal, configuration: { @@ -449,9 +441,7 @@ export const MLInferenceLogic = kea< createErrors: [ [], { - // @ts-expect-error upgrade typescript v5.1.6 attachApiError: (_, error) => getErrorsFromHttpResponse(error), - // @ts-expect-error upgrade typescript v5.1.6 createApiError: (_, error) => getErrorsFromHttpResponse(error), makeAttachPipelineRequest: () => [], makeCreatePipelineRequest: () => [], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/test_pipeline_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/test_pipeline_logic.ts index be802834c86dd..200942c4e7b97 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/test_pipeline_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/test_pipeline_logic.ts @@ -172,18 +172,14 @@ export const TestPipelineLogic = kea simulateBody, }, ], simulatePipelineErrors: [ [], { - // @ts-expect-error upgrade typescript v5.1.6 setSimulatePipelineErrors: (_, { errors }) => errors, - // @ts-expect-error upgrade typescript v5.1.6 simulateExistingPipelineApiError: (_, error) => getErrorsFromHttpResponse(error), - // @ts-expect-error upgrade typescript v5.1.6 simulatePipelineApiError: (_, error) => getErrorsFromHttpResponse(error), }, ], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/text_expansion_callout/text_expansion_callout_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/text_expansion_callout/text_expansion_callout_logic.ts index a3e4c5701a692..49d2ccc7bba3a 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/text_expansion_callout/text_expansion_callout_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/text_expansion_callout/text_expansion_callout_logic.ts @@ -254,14 +254,12 @@ export const TextExpansionCalloutLogic = kea< null, { clearTextExpansionModelPollingId: () => null, - // @ts-expect-error upgrade typescript v5.1.6 setTextExpansionModelPollingId: (_, { pollTimeoutId }) => pollTimeoutId, }, ], elserModelId: [ '', { - // @ts-expect-error upgrade typescript v5.1.6 setElserModelId: (_, { elserModelId }) => elserModelId, }, ], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipelines_json_configurations_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipelines_json_configurations_logic.ts index 864bfa5a34fa2..7acaf7016d3be 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipelines_json_configurations_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipelines_json_configurations_logic.ts @@ -77,7 +77,6 @@ export const IndexPipelinesConfigurationsLogic = kea< selectedPipelineId: [ '', { - // @ts-expect-error upgrade typescript v5.1.6 selectPipeline: (_, { pipeline }) => pipeline, }, ], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipelines_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipelines_logic.ts index daff77a070ee5..f795bd69f387d 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipelines_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipelines_logic.ts @@ -353,7 +353,6 @@ export const PipelinesLogic = kea pipeline, }, ], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs_view_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs_view_logic.ts index 7f04a624ab841..647a19c62d360 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs_view_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs_view_logic.ts @@ -175,14 +175,12 @@ export const SyncJobsViewLogic = kea connectorId, }, ], selectedSyncJobCategory: [ 'content', { - // @ts-expect-error upgrade typescript v5.1.6 setSelectedSyncJobCategory: (_, { category }) => category, }, ], @@ -190,17 +188,14 @@ export const SyncJobsViewLogic = kea null, - // @ts-expect-error upgrade typescript v5.1.6 setCancelSyncJob: (_, { syncJobId }) => syncJobId ?? null, }, ], syncJobs: [ [], { - // @ts-expect-error upgrade typescript v5.1.6 fetchSyncJobsApiSuccess: (currentState, { data }) => { const newState = - // @ts-expect-error upgrade typescript v5.1.6 data?.map((syncJob) => { return { ...syncJob, diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/indices_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/indices_logic.ts index ae2831b2dacc7..030c9016d620b 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/indices_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/indices_logic.ts @@ -151,13 +151,11 @@ export const IndicesLogic = kea>({ }, }), path: ['enterprise_search', 'content', 'indices_logic'], - // @ts-expect-error upgrade typescript v5.1.6 reducers: () => ({ deleteModalIndexName: [ '', { closeDeleteModal: () => '', - // @ts-expect-error upgrade typescript v5.1.6 openDeleteModal: (_, { indexName }) => indexName, }, ], @@ -185,9 +183,7 @@ export const IndicesLogic = kea>({ }, { apiSuccess: ( - // @ts-expect-error upgrade typescript v5.1.6 _, - // @ts-expect-error upgrade typescript v5.1.6 { meta, onlyShowSearchOptimizedIndices, returnHiddenIndices, searchQuery } ) => ({ from: meta.page.from, @@ -196,7 +192,6 @@ export const IndicesLogic = kea>({ searchQuery, size: meta.page.size, }), - // @ts-expect-error upgrade typescript v5.1.6 onPaginate: (state, { newPageIndex }) => ({ ...state, from: (newPageIndex - 1) * state.size, diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/settings_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/settings_logic.ts index fdd6e08a251d6..9ee7906c62f15 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/settings_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/settings_logic.ts @@ -88,7 +88,6 @@ export const SettingsLogic = kea pipeline, }, ], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/utils/sync_rules_helpers.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/utils/sync_rules_helpers.ts index ccff4bae5afcb..16c335a9d0ca8 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/utils/sync_rules_helpers.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_content/utils/sync_rules_helpers.ts @@ -23,6 +23,7 @@ export const isAdvancedSyncRuleSnippetEmpty = (snippet: string | undefined | nul } else if (typeof parsedJson === 'object') { return Object.keys(parsedJson).length === 0; } + // eslint-disable-next-line @typescript-eslint/no-unused-vars } catch (error) { // we have somewhat invalid JSON in the advanced snippet, // it is not empty and cause problems somewhere else diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/api_key/create_api_key_flyout.tsx b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/api_key/create_api_key_flyout.tsx index c72f56c656e49..a92ed85e06c52 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/api_key/create_api_key_flyout.tsx +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/api_key/create_api_key_flyout.tsx @@ -134,6 +134,7 @@ export const CreateApiKeyFlyout: React.FC = ({ onClose try { parsedRoleDescriptors = roleDescriptors.length > 0 ? JSON.parse(roleDescriptors) : undefined; + // eslint-disable-next-line @typescript-eslint/no-unused-vars } catch (e) { setRoleDescriptorsError(INVALID_JSON_ERROR); return; @@ -144,6 +145,7 @@ export const CreateApiKeyFlyout: React.FC = ({ onClose if (metadataEnabled) { try { parsedMetadata = metadata.length > 0 ? JSON.parse(metadata) : undefined; + // eslint-disable-next-line @typescript-eslint/no-unused-vars } catch (e) { setMetadataError(INVALID_JSON_ERROR); return; diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/api_logic/create_api_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/api_logic/create_api_logic.ts index a32f479dcda82..0b56ebff05dc4 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/api_logic/create_api_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/api_logic/create_api_logic.ts @@ -81,25 +81,21 @@ export const createApiLogic = ( }, }), path: ['enterprise_search', 'api', ...path], - // @ts-expect-error upgrade typescript v5.1.6 reducers: () => ({ apiStatus: [ { status: Status.IDLE, }, { - // @ts-expect-error upgrade typescript v5.1.6 apiError: (_, error) => ({ error, status: Status.ERROR, }), apiReset: () => ({ status: Status.IDLE }), - // @ts-expect-error upgrade typescript v5.1.6 apiSuccess: (_, data) => ({ data, status: Status.SUCCESS, }), - // @ts-expect-error upgrade typescript v5.1.6 makeRequest: ({ data }) => { return { data, diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/flash_messages/flash_messages_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/flash_messages/flash_messages_logic.ts index a0cbef4661f24..580503b0324ec 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/flash_messages/flash_messages_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/flash_messages/flash_messages_logic.ts @@ -49,7 +49,6 @@ export const FlashMessagesLogic = kea< historyListener: [ null, { - // @ts-expect-error upgrade typescript v5.1.6 setHistoryListener: (_, { historyListener }) => historyListener, }, ], @@ -57,7 +56,6 @@ export const FlashMessagesLogic = kea< [], { clearFlashMessages: () => [], - // @ts-expect-error upgrade typescript v5.1.6 setFlashMessages: (_, { messages }) => messages, }, ], @@ -66,7 +64,6 @@ export const FlashMessagesLogic = kea< [], { clearQueuedMessages: () => [], - // @ts-expect-error upgrade typescript v5.1.6 setQueuedMessages: (_, { messages }) => messages, }, ], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/flash_messages/handle_api_errors.test.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/flash_messages/handle_api_errors.test.ts index 6c7012bb1a061..ae6e140221391 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/flash_messages/handle_api_errors.test.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/flash_messages/handle_api_errors.test.ts @@ -73,6 +73,7 @@ describe('flashAPIErrors', () => { it('displays a generic error message and re-throws non-API errors', () => { try { flashAPIErrors(Error('whatever') as any); + // eslint-disable-next-line @typescript-eslint/no-unused-vars } catch (e) { expect(FlashMessagesLogic.actions.setFlashMessages).toHaveBeenCalledWith([ { type: 'error', message: expect.any(String) }, diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/http/http_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/http/http_logic.ts index d6b9e1c4c3e82..2af90935679f9 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/http/http_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/http/http_logic.ts @@ -87,7 +87,6 @@ export const HttpLogic = kea>({ errorConnectingMessage: [ props.errorConnectingMessage || '', { - // @ts-expect-error upgrade typescript v5.1.6 onConnectionError: (_, { errorConnectingMessage }) => errorConnectingMessage, }, ], @@ -95,14 +94,12 @@ export const HttpLogic = kea>({ httpInterceptors: [ [], { - // @ts-expect-error upgrade typescript v5.1.6 setHttpInterceptors: (_, { httpInterceptors }) => httpInterceptors, }, ], readOnlyMode: [ props.readOnlyMode || false, { - // @ts-expect-error upgrade typescript v5.1.6 setReadOnlyMode: (_, { readOnlyMode }) => readOnlyMode, }, ], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana/kibana_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana/kibana_logic.ts index 6ab07383ec92c..fc4622522f076 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana/kibana_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana/kibana_logic.ts @@ -161,7 +161,6 @@ export const KibanaLogic = kea>({ user: [ props.user || null, { - // @ts-expect-error upgrade typescript v5.1.6 setUser: (_, { user }) => user || null, }, ], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/licensing/licensing_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/licensing/licensing_logic.ts index 736cf1c5c5d48..689a60a55c357 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/licensing/licensing_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/licensing/licensing_logic.ts @@ -41,14 +41,12 @@ export const LicensingLogic = kea license, }, ], licenseSubscription: [ null, { - // @ts-expect-error upgrade typescript v5.1.6 setLicenseSubscription: (_, licenseSubscription) => licenseSubscription, }, ], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/tables/inline_editable_table/inline_editable_table_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/tables/inline_editable_table/inline_editable_table_logic.ts index ff73d8fb6d0e1..a4a25d0ed5a66 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/tables/inline_editable_table/inline_editable_table_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/tables/inline_editable_table/inline_editable_table_logic.ts @@ -89,9 +89,7 @@ export const InlineEditableTableLogic = kea item, - // @ts-expect-error upgrade typescript v5.1.6 setEditingItemValue: (_, { item }) => item, }, ], @@ -100,7 +98,6 @@ export const InlineEditableTableLogic = kea ({}), setEditingItemValue: () => ({}), - // @ts-expect-error upgrade typescript v5.1.6 setFieldErrors: (_, { fieldErrors }) => fieldErrors, }, ], @@ -109,7 +106,6 @@ export const InlineEditableTableLogic = kea [], setEditingItemValue: () => [], - // @ts-expect-error upgrade typescript v5.1.6 setRowErrors: (_, { rowErrors }) => rowErrors, }, ], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/telemetry/telemetry_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/telemetry/telemetry_logic.ts index 69c88023d15f8..1d1663480c074 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/telemetry/telemetry_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/telemetry/telemetry_logic.ts @@ -34,6 +34,7 @@ export const TelemetryLogic = kea>({ try { const body = JSON.stringify({ product, action, metric }); await http.put('/internal/enterprise_search/stats', { headers, body }); + // eslint-disable-next-line @typescript-eslint/no-unused-vars } catch (error) { throw new Error('Unable to send telemetry'); } diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/url_combo_box/url_combo_box.tsx b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/url_combo_box/url_combo_box.tsx index 56fd31435e922..6d7249d74aa04 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/url_combo_box/url_combo_box.tsx +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/url_combo_box/url_combo_box.tsx @@ -20,6 +20,7 @@ const isUrl = (value: string) => { try { url = new URL(value); + // eslint-disable-next-line @typescript-eslint/no-unused-vars } catch (_) { return false; } diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/url_combo_box/url_combo_box_logic.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/url_combo_box/url_combo_box_logic.ts index 740ed32a09ce7..6dd3f81028ab4 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/url_combo_box/url_combo_box_logic.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/url_combo_box/url_combo_box_logic.ts @@ -25,7 +25,6 @@ export const UrlComboBoxLogic = kea isInvalid, }, ], diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/use_local_storage/use_local_storage.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/use_local_storage/use_local_storage.ts index fc78803d34b27..1d1dfb6e5030c 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/use_local_storage/use_local_storage.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/use_local_storage/use_local_storage.ts @@ -33,6 +33,7 @@ export const useLocalStorage = (key: string, defaultValue: Value): [Value let parsedItem; try { return JSON.parse(storedItem) as Value; + // eslint-disable-next-line @typescript-eslint/no-unused-vars } catch (e) { removeFromStorage(); } diff --git a/x-pack/solutions/search/plugins/enterprise_search/server/lib/indices/fetch_unattached_indices.ts b/x-pack/solutions/search/plugins/enterprise_search/server/lib/indices/fetch_unattached_indices.ts index b3bcb812496c3..9ffae87f989e2 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/server/lib/indices/fetch_unattached_indices.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/server/lib/indices/fetch_unattached_indices.ts @@ -25,6 +25,7 @@ export const fetchUnattachedIndices = async ( let connectors: Connector[] = []; try { connectors = await fetchConnectors(client.asCurrentUser, indexNames); + // eslint-disable-next-line @typescript-eslint/no-unused-vars } catch (error) { connectors = []; } diff --git a/x-pack/solutions/search/plugins/enterprise_search/server/lib/indices/pipelines/ml_inference/pipeline_processors/create_ml_inference_pipeline.ts b/x-pack/solutions/search/plugins/enterprise_search/server/lib/indices/pipelines/ml_inference/pipeline_processors/create_ml_inference_pipeline.ts index bdcc4eb2932d9..3140c4b2d252d 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/server/lib/indices/pipelines/ml_inference/pipeline_processors/create_ml_inference_pipeline.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/server/lib/indices/pipelines/ml_inference/pipeline_processors/create_ml_inference_pipeline.ts @@ -80,6 +80,7 @@ export const createMlInferencePipeline = async ( pipelineByName = await esClient.ingest.getPipeline({ id: inferencePipelineGeneratedName, }); + // eslint-disable-next-line @typescript-eslint/no-unused-vars } catch (error) { // Silently swallow error } diff --git a/x-pack/solutions/search/plugins/enterprise_search/server/lib/indices/pipelines/ml_inference/pipeline_processors/get_ml_inference_pipeline_processors.ts b/x-pack/solutions/search/plugins/enterprise_search/server/lib/indices/pipelines/ml_inference/pipeline_processors/get_ml_inference_pipeline_processors.ts index 33b97bf030954..e849c739c17d2 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/server/lib/indices/pipelines/ml_inference/pipeline_processors/get_ml_inference_pipeline_processors.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/server/lib/indices/pipelines/ml_inference/pipeline_processors/get_ml_inference_pipeline_processors.ts @@ -27,6 +27,7 @@ export const fetchMlInferencePipelines = async (client: ElasticsearchClient) => return await client.ingest.getPipeline({ id: getInferencePipelineNameFromIndexName('*'), }); + // eslint-disable-next-line @typescript-eslint/no-unused-vars } catch (error) { // The GET /_ingest/pipeline API returns an empty object on 404 Not Found. If there are no `@ml-inference` // pipelines then return an empty record of pipelines diff --git a/x-pack/solutions/search/plugins/enterprise_search/server/lib/pipelines/get_custom_pipelines.ts b/x-pack/solutions/search/plugins/enterprise_search/server/lib/pipelines/get_custom_pipelines.ts index d7f2dd2bbab26..f99663a572360 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/server/lib/pipelines/get_custom_pipelines.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/server/lib/pipelines/get_custom_pipelines.ts @@ -18,6 +18,7 @@ export const getCustomPipelines = async ( }); return pipelinesResponse; + // eslint-disable-next-line @typescript-eslint/no-unused-vars } catch (error) { // If we can't find anything, we return an empty object return {}; diff --git a/x-pack/solutions/search/plugins/enterprise_search/server/routes/enterprise_search/connectors.ts b/x-pack/solutions/search/plugins/enterprise_search/server/routes/enterprise_search/connectors.ts index 9cbfc2f83c79d..a0a73ff589a62 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/server/routes/enterprise_search/connectors.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/server/routes/enterprise_search/connectors.ts @@ -1117,6 +1117,7 @@ export function registerConnectorRoutes({ router, log, getStartServices }: Route }, headers: { 'content-type': 'application/json' }, }); + // eslint-disable-next-line @typescript-eslint/no-unused-vars } catch (error) { return createError({ errorCode: ErrorCode.CONNECTOR_UNSUPPORTED_OPERATION, diff --git a/x-pack/solutions/search/plugins/enterprise_search/server/utils/create_ml_inference_pipeline.ts b/x-pack/solutions/search/plugins/enterprise_search/server/utils/create_ml_inference_pipeline.ts index 2562aa7156ffe..48ad24cd4ac3b 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/server/utils/create_ml_inference_pipeline.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/server/utils/create_ml_inference_pipeline.ts @@ -33,6 +33,7 @@ export const addSubPipelineToIndexSpecificMlPipeline = async ( id: parentPipelineId, }); parentPipeline = pipelineResponse[parentPipelineId]; + // eslint-disable-next-line @typescript-eslint/no-unused-vars } catch (error) { // Swallow error; in this case the next step will return } diff --git a/x-pack/solutions/search/plugins/enterprise_search/server/utils/identify_exceptions.ts b/x-pack/solutions/search/plugins/enterprise_search/server/utils/identify_exceptions.ts index 179608f9b0b72..1fef5f13e03ae 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/server/utils/identify_exceptions.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/server/utils/identify_exceptions.ts @@ -88,6 +88,7 @@ export function getErrorMessage(payload?: unknown): string { } try { return JSON.stringify(payload); + // eslint-disable-next-line @typescript-eslint/no-unused-vars } catch (error) { // If all else fails, we return a generic error return i18n.translate('xpack.enterpriseSearch.server.errorIdentifyingException', { diff --git a/x-pack/solutions/search/plugins/search_homepage/server/config.ts b/x-pack/solutions/search/plugins/search_homepage/server/config.ts index 4f805e6e53d09..00fea6ffbabb7 100644 --- a/x-pack/solutions/search/plugins/search_homepage/server/config.ts +++ b/x-pack/solutions/search/plugins/search_homepage/server/config.ts @@ -8,7 +8,7 @@ import { schema, TypeOf } from '@kbn/config-schema'; import { PluginConfigDescriptor } from '@kbn/core/server'; -export * from './types'; +export type * from './types'; const configSchema = schema.object({ enabled: schema.boolean({ defaultValue: true }), diff --git a/x-pack/solutions/search/plugins/search_notebooks/server/config.ts b/x-pack/solutions/search/plugins/search_notebooks/server/config.ts index dc0a1d05a2253..c998c5975d37a 100644 --- a/x-pack/solutions/search/plugins/search_notebooks/server/config.ts +++ b/x-pack/solutions/search/plugins/search_notebooks/server/config.ts @@ -8,7 +8,7 @@ import { schema, TypeOf } from '@kbn/config-schema'; import { PluginConfigDescriptor } from '@kbn/core/server'; -export * from './types'; +export type * from './types'; const configSchema = schema.object({ enabled: schema.boolean({ defaultValue: true }), diff --git a/x-pack/solutions/search/plugins/search_query_rules/public/types.ts b/x-pack/solutions/search/plugins/search_query_rules/public/types.ts index d8fd1cada5818..dbb7d8b389693 100644 --- a/x-pack/solutions/search/plugins/search_query_rules/public/types.ts +++ b/x-pack/solutions/search/plugins/search_query_rules/public/types.ts @@ -12,7 +12,7 @@ import type { SharePluginStart } from '@kbn/share-plugin/public'; import type { UsageCollectionStart } from '@kbn/usage-collection-plugin/public'; import type { CloudStart } from '@kbn/cloud-plugin/public'; -export * from '../common/types'; +export type * from '../common/types'; export interface AppPluginStartDependencies { history: AppMountParameters['history']; console?: ConsolePluginStart; diff --git a/x-pack/solutions/search/plugins/search_query_rules/server/types.ts b/x-pack/solutions/search/plugins/search_query_rules/server/types.ts index 9e48b47c210c5..7a8184bd6f422 100644 --- a/x-pack/solutions/search/plugins/search_query_rules/server/types.ts +++ b/x-pack/solutions/search/plugins/search_query_rules/server/types.ts @@ -6,7 +6,7 @@ */ import { FeaturesPluginSetup } from '@kbn/features-plugin/server'; -export * from '../common/types'; +export type * from '../common/types'; export interface SearchQueryRulesPluginSetupDependencies { features: FeaturesPluginSetup; diff --git a/x-pack/solutions/search/plugins/search_synonyms/public/types.ts b/x-pack/solutions/search/plugins/search_synonyms/public/types.ts index ad4d8eb0e6ba2..4f3ae04ae406e 100644 --- a/x-pack/solutions/search/plugins/search_synonyms/public/types.ts +++ b/x-pack/solutions/search/plugins/search_synonyms/public/types.ts @@ -10,7 +10,7 @@ import type { AppMountParameters, CoreStart } from '@kbn/core/public'; import type { ConsolePluginStart } from '@kbn/console-plugin/public'; import type { UsageCollectionStart } from '@kbn/usage-collection-plugin/public'; -export * from '../common/types'; +export type * from '../common/types'; export interface AppPluginStartDependencies { history: AppMountParameters['history']; console?: ConsolePluginStart; diff --git a/x-pack/solutions/search/plugins/search_synonyms/server/types.ts b/x-pack/solutions/search/plugins/search_synonyms/server/types.ts index de63a55f0b023..4693ed0a818ce 100644 --- a/x-pack/solutions/search/plugins/search_synonyms/server/types.ts +++ b/x-pack/solutions/search/plugins/search_synonyms/server/types.ts @@ -6,7 +6,7 @@ */ import { FeaturesPluginSetup } from '@kbn/features-plugin/server'; -export * from '../common/types'; +export type * from '../common/types'; export interface SearchSynonymsPluginSetupDependencies { features: FeaturesPluginSetup; diff --git a/x-pack/solutions/search/plugins/serverless_search/server/config.ts b/x-pack/solutions/search/plugins/serverless_search/server/config.ts index 546c594aaabfb..fd937d7354e2b 100644 --- a/x-pack/solutions/search/plugins/serverless_search/server/config.ts +++ b/x-pack/solutions/search/plugins/serverless_search/server/config.ts @@ -8,7 +8,7 @@ import { schema, TypeOf } from '@kbn/config-schema'; import { PluginConfigDescriptor } from '@kbn/core/server'; -export * from './types'; +export type * from './types'; const configSchema = schema.object({ enabled: schema.boolean({ defaultValue: false }), diff --git a/x-pack/solutions/security/packages/data-stream-adapter/index.ts b/x-pack/solutions/security/packages/data-stream-adapter/index.ts index 211fc4f9b5f17..fdb0797c5dfc7 100644 --- a/x-pack/solutions/security/packages/data-stream-adapter/index.ts +++ b/x-pack/solutions/security/packages/data-stream-adapter/index.ts @@ -16,4 +16,4 @@ export type { EcsFieldMap, } from '@kbn/index-adapter'; -export * from '@kbn/index-adapter/src/field_maps/types'; +export type * from '@kbn/index-adapter/src/field_maps/types'; diff --git a/x-pack/solutions/security/packages/data-stream-adapter/src/data_stream_adapter.ts b/x-pack/solutions/security/packages/data-stream-adapter/src/data_stream_adapter.ts index a8cc35fc0526d..9c6b0a78c9b2d 100644 --- a/x-pack/solutions/security/packages/data-stream-adapter/src/data_stream_adapter.ts +++ b/x-pack/solutions/security/packages/data-stream-adapter/src/data_stream_adapter.ts @@ -5,8 +5,7 @@ * 2.0. */ -import type { SetIndexTemplateParams } from '@kbn/index-adapter'; -import { IndexAdapter, type InstallParams } from '@kbn/index-adapter'; +import { IndexAdapter, type InstallParams, type SetIndexTemplateParams } from '@kbn/index-adapter'; import { createOrUpdateDataStream } from './create_or_update_data_stream'; export class DataStreamAdapter extends IndexAdapter { diff --git a/x-pack/solutions/security/packages/data-table/common/types/index.ts b/x-pack/solutions/security/packages/data-table/common/types/index.ts index 06f9396f7878f..b251a454d562d 100644 --- a/x-pack/solutions/security/packages/data-table/common/types/index.ts +++ b/x-pack/solutions/security/packages/data-table/common/types/index.ts @@ -6,7 +6,7 @@ */ export * from './data_table'; -export * from './header_actions'; +export type * from './header_actions'; export const FILTER_OPEN = 'open' as const; export const FILTER_CLOSED = 'closed' as const; diff --git a/x-pack/solutions/security/packages/features/index.ts b/x-pack/solutions/security/packages/features/index.ts index a7fe0b5131c73..ca632ee7b1eec 100644 --- a/x-pack/solutions/security/packages/features/index.ts +++ b/x-pack/solutions/security/packages/features/index.ts @@ -4,4 +4,4 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -export * from './src/types'; +export type * from './src/types'; diff --git a/x-pack/solutions/security/packages/index-adapter/index.ts b/x-pack/solutions/security/packages/index-adapter/index.ts index 8f5bf5446863c..66d2e67f6f791 100644 --- a/x-pack/solutions/security/packages/index-adapter/index.ts +++ b/x-pack/solutions/security/packages/index-adapter/index.ts @@ -18,4 +18,4 @@ export type { IndexAdapterParams, InstallParams, } from './src/index_adapter'; -export * from './src/field_maps/types'; +export type * from './src/field_maps/types'; diff --git a/x-pack/solutions/security/packages/kbn-cloud-security-posture/common/schema/vulnerabilities/latest.ts b/x-pack/solutions/security/packages/kbn-cloud-security-posture/common/schema/vulnerabilities/latest.ts index 961d1bf9dc49d..421b8a3269aa8 100644 --- a/x-pack/solutions/security/packages/kbn-cloud-security-posture/common/schema/vulnerabilities/latest.ts +++ b/x-pack/solutions/security/packages/kbn-cloud-security-posture/common/schema/vulnerabilities/latest.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './csp_vulnerability_finding'; +export type * from './csp_vulnerability_finding'; diff --git a/x-pack/solutions/security/packages/kbn-cloud-security-posture/public/index.ts b/x-pack/solutions/security/packages/kbn-cloud-security-posture/public/index.ts index 7779499a826c9..e7a102a23e9d0 100644 --- a/x-pack/solutions/security/packages/kbn-cloud-security-posture/public/index.ts +++ b/x-pack/solutions/security/packages/kbn-cloud-security-posture/public/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -export * from './src/types'; +export type * from './src/types'; export * from './src/constants/navigation'; export type { NavFilter } from './src/utils/query_utils'; export { showErrorToast } from './src/utils/show_error_toast'; diff --git a/x-pack/solutions/security/packages/kbn-scout-security/src/playwright/fixtures/index.ts b/x-pack/solutions/security/packages/kbn-scout-security/src/playwright/fixtures/index.ts index b05e86d128a2e..b6a89e169df54 100644 --- a/x-pack/solutions/security/packages/kbn-scout-security/src/playwright/fixtures/index.ts +++ b/x-pack/solutions/security/packages/kbn-scout-security/src/playwright/fixtures/index.ts @@ -7,4 +7,4 @@ export { test } from './single_thread_fixtures'; export { spaceTest } from './parallel_run_fixtures'; -export * from './types'; +export type * from './types'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/index.ts index 40ff03e880946..4e87d4638e2c7 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -export * from './src/types'; +export type * from './src/types'; export * from './src/use_async'; export * from './src/use_is_mounted'; export * from './src/use_observable'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/index.ts index 90db551881094..b773ffbc6ec56 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/index.ts @@ -8,4 +8,4 @@ export * from './src/common'; export * from './src/request'; export * from './src/response'; -export * from './src/typescript_types'; +export type * from './src/typescript_types'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-list-api/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/index.ts index afe1280b9b856..acdbbddd22311 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-list-api/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/index.ts @@ -9,4 +9,4 @@ export * from './src/api'; export * from './src/fp_utils'; export * from './src/list_api'; export * from './src/list_item_api'; -export * from './src/types'; +export type * from './src/types'; diff --git a/x-pack/solutions/security/packages/navigation/src/links.tsx b/x-pack/solutions/security/packages/navigation/src/links.tsx index b04a3c6dbcf6f..31a509ba35858 100644 --- a/x-pack/solutions/security/packages/navigation/src/links.tsx +++ b/x-pack/solutions/security/packages/navigation/src/links.tsx @@ -5,8 +5,12 @@ * 2.0. */ -import type { HTMLAttributeAnchorTarget } from 'react'; -import React, { type MouseEventHandler, type MouseEvent, useCallback } from 'react'; +import React, { + type MouseEventHandler, + type MouseEvent, + type HTMLAttributeAnchorTarget, + useCallback, +} from 'react'; import { EuiButton, EuiLink, type EuiLinkProps } from '@elastic/eui'; import type { SecurityPageName } from '@kbn/deeplinks-security'; import type { AppDeepLinkId } from '@kbn/core-chrome-browser'; diff --git a/x-pack/solutions/security/plugins/lists/public/lists/mocks/query_wrapper.tsx b/x-pack/solutions/security/plugins/lists/public/lists/mocks/query_wrapper.tsx index f1034d034f78c..95ff84de80d44 100644 --- a/x-pack/solutions/security/plugins/lists/public/lists/mocks/query_wrapper.tsx +++ b/x-pack/solutions/security/plugins/lists/public/lists/mocks/query_wrapper.tsx @@ -19,8 +19,11 @@ export const createQueryWrapperMock = (): { }, }, logger: { + // eslint-disable-next-line @typescript-eslint/explicit-function-return-type error: () => undefined, + // eslint-disable-next-line @typescript-eslint/explicit-function-return-type log: () => undefined, + // eslint-disable-next-line @typescript-eslint/explicit-function-return-type warn: () => undefined, }, }); diff --git a/x-pack/solutions/security/plugins/lists/server/saved_objects/migrations.ts b/x-pack/solutions/security/plugins/lists/server/saved_objects/migrations.ts index dfa1615f195a6..bdf92bdc9d7ab 100644 --- a/x-pack/solutions/security/plugins/lists/server/saved_objects/migrations.ts +++ b/x-pack/solutions/security/plugins/lists/server/saved_objects/migrations.ts @@ -21,8 +21,7 @@ import { import { ExceptionListSoSchema } from '../schemas/saved_objects'; -const entryType = t.union([entry, entriesNested]); -type EntryType = t.TypeOf; +type EntryType = t.TypeOf | t.TypeOf; const migrateEntry = (entryToMigrate: EntryType): EntryType => { const newEntry = entryToMigrate; diff --git a/x-pack/solutions/security/plugins/lists/server/services/exception_lists/delete_exception_list_items_by_list.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/delete_exception_list_items_by_list.ts index 6a47052143069..2e4d719d2a596 100644 --- a/x-pack/solutions/security/plugins/lists/server/services/exception_lists/delete_exception_list_items_by_list.ts +++ b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/delete_exception_list_items_by_list.ts @@ -74,6 +74,7 @@ export const deleteFoundExceptionListItems = async ({ await asyncForEach(ids, async (id) => { try { await savedObjectsClient.delete(savedObjectType, id); + // eslint-disable-next-line @typescript-eslint/no-unused-vars } catch (err) { // This can happen from race conditions or networking issues so deleting the id's // like this is considered "best effort" and it is possible to get dangling pieces diff --git a/x-pack/solutions/security/plugins/lists/server/services/exception_lists/find_exception_list_items_point_in_time_finder.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/find_exception_list_items_point_in_time_finder.ts index 0f9188930c44b..212ddfade1737 100644 --- a/x-pack/solutions/security/plugins/lists/server/services/exception_lists/find_exception_list_items_point_in_time_finder.ts +++ b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/find_exception_list_items_point_in_time_finder.ts @@ -119,6 +119,7 @@ export const findExceptionListsItemPointInTimeFinder = async ({ executeFunctionOnStream(exceptionListItem); try { await finder.close(); + // eslint-disable-next-line @typescript-eslint/no-unused-vars } catch (exception) { // This is just a pre-caution in case the finder does a throw we don't want to blow up // the response. We have seen this within e2e test containers but nothing happen in normal @@ -133,6 +134,7 @@ export const findExceptionListsItemPointInTimeFinder = async ({ try { await finder.close(); + // eslint-disable-next-line @typescript-eslint/no-unused-vars } catch (exception) { // This is just a pre-caution in case the finder does a throw we don't want to blow up // the response. We have seen this within e2e test containers but nothing happen in normal diff --git a/x-pack/solutions/security/plugins/lists/server/services/exception_lists/find_exception_list_point_in_time_finder.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/find_exception_list_point_in_time_finder.ts index 4fc9bf96d2a7d..0821c421976f4 100644 --- a/x-pack/solutions/security/plugins/lists/server/services/exception_lists/find_exception_list_point_in_time_finder.ts +++ b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/find_exception_list_point_in_time_finder.ts @@ -97,6 +97,7 @@ export const findExceptionListPointInTimeFinder = async ({ executeFunctionOnStream(exceptionList); try { await finder.close(); + // eslint-disable-next-line @typescript-eslint/no-unused-vars } catch (exception) { // This is just a pre-caution in case the finder does a throw we don't want to blow up // the response. We have seen this within e2e test containers but nothing happen in normal @@ -110,6 +111,7 @@ export const findExceptionListPointInTimeFinder = async ({ try { await finder.close(); + // eslint-disable-next-line @typescript-eslint/no-unused-vars } catch (exception) { // This is just a pre-caution in case the finder does a throw we don't want to blow up // the response. We have seen this within e2e test containers but nothing happen in normal diff --git a/x-pack/solutions/security/plugins/lists/server/services/exception_lists/find_value_list_exception_list_items_point_in_time_finder.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/find_value_list_exception_list_items_point_in_time_finder.ts index b216d02437e2a..f66acfbd65fca 100644 --- a/x-pack/solutions/security/plugins/lists/server/services/exception_lists/find_value_list_exception_list_items_point_in_time_finder.ts +++ b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/find_value_list_exception_list_items_point_in_time_finder.ts @@ -96,6 +96,7 @@ export const findValueListExceptionListItemsPointInTimeFinder = async ({ executeFunctionOnStream(exceptionList); try { await finder.close(); + // eslint-disable-next-line @typescript-eslint/no-unused-vars } catch (exception) { // This is just a pre-caution in case the finder does a throw we don't want to blow up // the response. We have seen this within e2e test containers but nothing happen in normal @@ -109,6 +110,7 @@ export const findValueListExceptionListItemsPointInTimeFinder = async ({ try { await finder.close(); + // eslint-disable-next-line @typescript-eslint/no-unused-vars } catch (exception) { // This is just a pre-caution in case the finder does a throw we don't want to blow up // the response. We have seen this within e2e test containers but nothing happen in normal diff --git a/x-pack/solutions/security/plugins/lists/server/services/extension_points/index.ts b/x-pack/solutions/security/plugins/lists/server/services/extension_points/index.ts index be6219733ffec..37755c84ec5f1 100644 --- a/x-pack/solutions/security/plugins/lists/server/services/extension_points/index.ts +++ b/x-pack/solutions/security/plugins/lists/server/services/extension_points/index.ts @@ -5,6 +5,6 @@ * 2.0. */ -export * from './types'; +export type * from './types'; export { ExtensionPointStorage } from './extension_point_storage'; export type { ExtensionPointStorageInterface, ExtensionPointStorageClientInterface } from './types'; diff --git a/x-pack/solutions/security/plugins/lists/server/services/items/create_list_items_bulk.ts b/x-pack/solutions/security/plugins/lists/server/services/items/create_list_items_bulk.ts index 6877b4aabedeb..9f75f4e8d1bd1 100644 --- a/x-pack/solutions/security/plugins/lists/server/services/items/create_list_items_bulk.ts +++ b/x-pack/solutions/security/plugins/lists/server/services/items/create_list_items_bulk.ts @@ -90,6 +90,7 @@ export const createListItemsBulk = async ({ index: listItemIndex, refresh, }); + // eslint-disable-next-line @typescript-eslint/no-unused-vars } catch (error) { // TODO: Log out the error with return values from the bulk insert into another index or saved object } diff --git a/x-pack/solutions/security/plugins/lists/server/services/lists/index.ts b/x-pack/solutions/security/plugins/lists/server/services/lists/index.ts index c12868816d91c..ce2a50c076a7d 100644 --- a/x-pack/solutions/security/plugins/lists/server/services/lists/index.ts +++ b/x-pack/solutions/security/plugins/lists/server/services/lists/index.ts @@ -12,5 +12,5 @@ export * from './get_list_index'; export * from './get_list_template'; export * from './get_list'; export * from './list_client'; -export * from './types'; +export type * from './types'; export * from './update_list'; diff --git a/x-pack/solutions/security/plugins/lists/server/services/utils/encode_decode_cursor.ts b/x-pack/solutions/security/plugins/lists/server/services/utils/encode_decode_cursor.ts index c086123882323..99f9b10effda8 100644 --- a/x-pack/solutions/security/plugins/lists/server/services/utils/encode_decode_cursor.ts +++ b/x-pack/solutions/security/plugins/lists/server/services/utils/encode_decode_cursor.ts @@ -124,6 +124,7 @@ export const decodeCursor = ({ export const parseOrUndefined = (input: string): ContextCursor | undefined => { try { return JSON.parse(input); + // eslint-disable-next-line @typescript-eslint/no-unused-vars } catch (err) { return undefined; } diff --git a/x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/fleet_integrations/index.ts b/x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/fleet_integrations/index.ts index 1c50373366955..8736f1fcb298f 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/fleet_integrations/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/fleet_integrations/index.ts @@ -5,10 +5,10 @@ * 2.0. */ -export * from './get_all_integrations/get_all_integrations_route'; +export type * from './get_all_integrations/get_all_integrations_route'; -export * from './get_installed_integrations/get_installed_integrations_route'; +export type * from './get_installed_integrations/get_installed_integrations_route'; export * from './urls'; -export * from './model/integrations'; -export * from './model/installed_integrations'; +export type * from './model/integrations'; +export type * from './model/installed_integrations'; diff --git a/x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/index_management/index.ts b/x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/index_management/index.ts index 4b060113e613b..6a9b32fa96f19 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/index_management/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/index_management/index.ts @@ -7,6 +7,6 @@ export * from './create_index/create_index.gen'; export * from './delete_index/delete_index.gen'; -export * from './read_alerts_index_exists/read_alerts_index_exists_route'; +export type * from './read_alerts_index_exists/read_alerts_index_exists_route'; export * from './read_index/read_index.gen'; export * from './read_privileges/read_privileges.gen'; diff --git a/x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/model/index.ts b/x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/model/index.ts index f5c8440a07148..586b2688f3a59 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/model/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/model/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -export * from './alerts'; +export type * from './alerts'; export * from './rule_response_actions'; export * from './rule_schema'; export * from './error_schema.gen'; diff --git a/x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/prebuilt_rules/index.ts b/x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/prebuilt_rules/index.ts index 10ee54a38cc7c..4d83778ded7eb 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/prebuilt_rules/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/prebuilt_rules/index.ts @@ -6,18 +6,18 @@ */ export * from './read_prebuilt_rules_and_timelines_status/read_prebuilt_rules_and_timelines_status_route.gen'; -export * from './get_prebuilt_rules_status/get_prebuilt_rules_status_route'; +export type * from './get_prebuilt_rules_status/get_prebuilt_rules_status_route'; export * from './install_prebuilt_rules_and_timelines/install_prebuilt_rules_and_timelines_route.gen'; export * from './perform_rule_installation/perform_rule_installation_route'; export * from './perform_rule_upgrade/perform_rule_upgrade_route'; -export * from './review_rule_installation/review_rule_installation_route'; +export type * from './review_rule_installation/review_rule_installation_route'; export * from './review_rule_upgrade/review_rule_upgrade_route'; export * from './urls'; export * from './model/aggregated_prebuilt_rules_error'; export * from './model/diff/diffable_rule/diffable_field_types'; export * from './model/diff/diffable_rule/diffable_rule'; -export * from './model/diff/rule_diff/fields_diff'; -export * from './model/diff/rule_diff/rule_diff'; +export type * from './model/diff/rule_diff/fields_diff'; +export type * from './model/diff/rule_diff/rule_diff'; export * from './model/diff/three_way_diff/three_way_diff_outcome'; export * from './model/diff/three_way_diff/three_way_diff'; export * from './model/diff/three_way_diff/three_way_diff_conflict'; diff --git a/x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/prebuilt_rules/model/index.ts b/x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/prebuilt_rules/model/index.ts index 418a2c7014928..29259f7cfa5e4 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/prebuilt_rules/model/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/prebuilt_rules/model/index.ts @@ -8,8 +8,8 @@ export * from './aggregated_prebuilt_rules_error'; export * from './diff/diffable_rule/diffable_field_types'; export * from './diff/diffable_rule/diffable_rule'; -export * from './diff/rule_diff/fields_diff'; -export * from './diff/rule_diff/rule_diff'; +export type * from './diff/rule_diff/fields_diff'; +export type * from './diff/rule_diff/rule_diff'; export * from './diff/three_way_diff/three_way_diff_outcome'; export * from './diff/three_way_diff/three_way_diff'; export * from './diff/three_way_diff/three_way_diff_conflict'; diff --git a/x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/rule_management/index.ts b/x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/rule_management/index.ts index 7e237836d145a..cf009cce79d9c 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/rule_management/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/rule_management/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -export * from './bulk_actions/bulk_actions_types'; +export type * from './bulk_actions/bulk_actions_types'; export * from './bulk_actions/bulk_actions_route.gen'; export * from './coverage_overview/coverage_overview_route'; export * from './crud/create_rule/create_rule_route.gen'; diff --git a/x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/rule_monitoring/detection_engine_health/model/index.ts b/x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/rule_monitoring/detection_engine_health/model/index.ts index 10d72d2241ec0..13971bfc0d2b1 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/rule_monitoring/detection_engine_health/model/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/rule_monitoring/detection_engine_health/model/index.ts @@ -5,9 +5,9 @@ * 2.0. */ -export * from './cluster_health'; +export type * from './cluster_health'; export * from './health_interval'; -export * from './health_metadata'; -export * from './health_stats'; -export * from './rule_health'; -export * from './space_health'; +export type * from './health_metadata'; +export type * from './health_stats'; +export type * from './rule_health'; +export type * from './space_health'; diff --git a/x-pack/solutions/security/plugins/security_solution/common/api/timeline/model/api.ts b/x-pack/solutions/security/plugins/security_solution/common/api/timeline/model/api.ts index 250daaf3077eb..499cd4d304e0b 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/api/timeline/model/api.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/api/timeline/model/api.ts @@ -5,11 +5,11 @@ * 2.0. */ -import type { DataProviderType } from './components.gen'; import { BareNote, BarePinnedEvent, ColumnHeaderResult, + type DataProviderType, DataProviderTypeEnum, DataProviderResult, FavoriteTimelineResponse, diff --git a/x-pack/solutions/security/plugins/security_solution/common/endpoint/data_generators/endpoint_action_generator.ts b/x-pack/solutions/security/plugins/security_solution/common/endpoint/data_generators/endpoint_action_generator.ts index 6818050c93632..1b5a58455af04 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/endpoint/data_generators/endpoint_action_generator.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/endpoint/data_generators/endpoint_action_generator.ts @@ -11,7 +11,6 @@ import type { estypes } from '@elastic/elasticsearch'; import { isProcessesAction } from '../service/response_actions/type_guards'; import { ENDPOINT_ACTION_RESPONSES_DS, ENDPOINT_ACTIONS_DS } from '../constants'; import { BaseDataGenerator } from './base_data_generator'; -import type { GetProcessesActionOutputContent } from '../types'; import { type ActionDetails, type ActionResponseOutput, @@ -21,6 +20,7 @@ import { type EndpointActivityLogAction, type EndpointActivityLogActionResponse, type EndpointPendingActions, + type GetProcessesActionOutputContent, type LogsEndpointAction, type LogsEndpointActionResponse, type ProcessesEntry, diff --git a/x-pack/solutions/security/plugins/security_solution/common/endpoint/data_generators/exceptions_list_item_generator.ts b/x-pack/solutions/security/plugins/security_solution/common/endpoint/data_generators/exceptions_list_item_generator.ts index 588e716eee0f8..1a56b9537441c 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/endpoint/data_generators/exceptions_list_item_generator.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/endpoint/data_generators/exceptions_list_item_generator.ts @@ -5,13 +5,11 @@ * 2.0. */ -import type { - ExceptionListItemSchema, - CreateExceptionListItemSchema, - UpdateExceptionListItemSchema, - EntriesArray, -} from '@kbn/securitysolution-io-ts-list-types'; import { + type ExceptionListItemSchema, + type CreateExceptionListItemSchema, + type UpdateExceptionListItemSchema, + type EntriesArray, ListOperatorTypeEnum, type ListOperatorType, } from '@kbn/securitysolution-io-ts-list-types'; diff --git a/x-pack/solutions/security/plugins/security_solution/common/endpoint/data_loaders/index_endpoint_hosts.ts b/x-pack/solutions/security/plugins/security_solution/common/endpoint/data_loaders/index_endpoint_hosts.ts index 49fb7215d7b94..f528f4a824b29 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/endpoint/data_loaders/index_endpoint_hosts.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/endpoint/data_loaders/index_endpoint_hosts.ts @@ -37,14 +37,12 @@ import { deleteIndexedFleetAgents, indexFleetAgentForHost, } from './index_fleet_agent'; -import type { - DeleteIndexedEndpointFleetActionsResponse, - IndexedEndpointAndFleetActionsForHostResponse, -} from './index_endpoint_fleet_actions'; import { buildIEndpointAndFleetActionsBulkOperations, deleteIndexedEndpointAndFleetActions, type IndexEndpointAndFleetActionsForHostOptions, + type DeleteIndexedEndpointFleetActionsResponse, + type IndexedEndpointAndFleetActionsForHostResponse, } from './index_endpoint_fleet_actions'; import type { diff --git a/x-pack/solutions/security/plugins/security_solution/common/endpoint/types/index.ts b/x-pack/solutions/security/plugins/security_solution/common/endpoint/types/index.ts index bffe6d8f3984c..ac7f4d42bee4b 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/endpoint/types/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/endpoint/types/index.ts @@ -12,10 +12,10 @@ import type { ManifestSchema } from '../schema/manifest'; export * from './actions'; export * from './os'; export * from './trusted_apps'; -export * from './utility_types'; -export * from './agents'; -export * from './sentinel_one'; -export * from './microsoft_defender_endpoint'; +export type * from './utility_types'; +export type * from './agents'; +export type * from './sentinel_one'; +export type * from './microsoft_defender_endpoint'; export type { ConditionEntriesMap, ConditionEntry } from './exception_list_items'; /** diff --git a/x-pack/solutions/security/plugins/security_solution/common/entity_analytics/risk_engine/index.ts b/x-pack/solutions/security/plugins/security_solution/common/entity_analytics/risk_engine/index.ts index 208adac419b22..f53f6b28a8e7e 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/entity_analytics/risk_engine/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/entity_analytics/risk_engine/index.ts @@ -8,7 +8,7 @@ export * from './risk_weights'; export * from './range'; export * from './risk_levels'; -export * from './types'; +export type * from './types'; export * from './indices'; export * from './constants'; export * from './privileges'; diff --git a/x-pack/solutions/security/plugins/security_solution/common/search_strategy/security_solution/hosts/index.ts b/x-pack/solutions/security/plugins/security_solution/common/search_strategy/security_solution/hosts/index.ts index 46b6c5306f4b6..45731a18e3680 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/search_strategy/security_solution/hosts/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/search_strategy/security_solution/hosts/index.ts @@ -7,11 +7,11 @@ import { HostsFields } from '../../../api/search_strategy/hosts/model/sort'; -export * from './all'; +export type * from './all'; export * from './common'; -export * from './details'; -export * from './overview'; -export * from './uncommon_processes'; +export type * from './details'; +export type * from './overview'; +export type * from './uncommon_processes'; export { HostsQueries } from '../../../api/search_strategy'; diff --git a/x-pack/solutions/security/plugins/security_solution/common/search_strategy/security_solution/network/index.ts b/x-pack/solutions/security/plugins/security_solution/common/search_strategy/security_solution/network/index.ts index 919360fc1ae4f..82a728f92a44e 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/search_strategy/security_solution/network/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/search_strategy/security_solution/network/index.ts @@ -6,13 +6,13 @@ */ export * from './common'; -export * from './details'; +export type * from './details'; export * from './dns'; export * from './http'; -export * from './overview'; +export type * from './overview'; export * from './tls'; -export * from './top_countries'; -export * from './top_n_flow'; +export type * from './top_countries'; +export type * from './top_n_flow'; export * from './users'; export { NetworkQueries } from '../../../api/search_strategy'; diff --git a/x-pack/solutions/security/plugins/security_solution/common/search_strategy/security_solution/related_entities/index.ts b/x-pack/solutions/security/plugins/security_solution/common/search_strategy/security_solution/related_entities/index.ts index 06b2de80a0a0c..44d3e8d4284aa 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/search_strategy/security_solution/related_entities/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/search_strategy/security_solution/related_entities/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -export * from './related_hosts'; -export * from './related_users'; +export type * from './related_hosts'; +export type * from './related_users'; export { RelatedEntitiesQueries } from '../../../api/search_strategy'; diff --git a/x-pack/solutions/security/plugins/security_solution/common/search_strategy/security_solution/risk_score/index.ts b/x-pack/solutions/security/plugins/security_solution/common/search_strategy/security_solution/risk_score/index.ts index fd0e3e7af9f01..967fbbc510f83 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/search_strategy/security_solution/risk_score/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/search_strategy/security_solution/risk_score/index.ts @@ -7,4 +7,4 @@ export * from './all'; export * from './common'; -export * from './kpi'; +export type * from './kpi'; diff --git a/x-pack/solutions/security/plugins/security_solution/common/search_strategy/security_solution/services/index.ts b/x-pack/solutions/security/plugins/security_solution/common/search_strategy/security_solution/services/index.ts index f4e899539ec4b..e2fd75a5e89b9 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/search_strategy/security_solution/services/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/search_strategy/security_solution/services/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -export * from './observed_details'; -export * from './common'; +export type * from './observed_details'; +export type * from './common'; export { ServicesQueries } from '../../../api/search_strategy'; diff --git a/x-pack/solutions/security/plugins/security_solution/common/search_strategy/security_solution/users/index.ts b/x-pack/solutions/security/plugins/security_solution/common/search_strategy/security_solution/users/index.ts index 27ef092c15019..dae824754ddcf 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/search_strategy/security_solution/users/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/search_strategy/security_solution/users/index.ts @@ -5,9 +5,9 @@ * 2.0. */ -export * from './all'; +export type * from './all'; export * from './common'; -export * from './observed_details'; +export type * from './observed_details'; export * from './authentications'; export { UsersQueries } from '../../../api/search_strategy'; diff --git a/x-pack/solutions/security/plugins/security_solution/common/search_strategy/timeline/events/index.ts b/x-pack/solutions/security/plugins/security_solution/common/search_strategy/timeline/events/index.ts index c4d6f70a27587..d159c20f5017a 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/search_strategy/timeline/events/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/search_strategy/timeline/events/index.ts @@ -5,10 +5,10 @@ * 2.0. */ -export * from './all'; -export * from './details'; +export type * from './all'; +export type * from './details'; export * from './last_event_time'; -export * from './eql'; +export type * from './eql'; export enum TimelineEventsQueries { all = 'eventsAll', diff --git a/x-pack/solutions/security/plugins/security_solution/common/types/index.ts b/x-pack/solutions/security/plugins/security_solution/common/types/index.ts index 07c42be2eba8a..478b488c578e8 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/types/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/types/index.ts @@ -8,8 +8,8 @@ import type { Status } from '../api/detection_engine'; export * from './timeline'; -export * from './header_actions'; -export * from './bulk_actions'; +export type * from './header_actions'; +export type * from './bulk_actions'; export const FILTER_OPEN: Status = 'open'; export const FILTER_CLOSED: Status = 'closed'; diff --git a/x-pack/solutions/security/plugins/security_solution/common/types/timeline/index.ts b/x-pack/solutions/security/plugins/security_solution/common/types/timeline/index.ts index 917ab003d5f5a..611ff9e231e56 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/types/timeline/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/types/timeline/index.ts @@ -5,11 +5,11 @@ * 2.0. */ -export * from './cells'; -export * from './columns'; +export type * from './cells'; +export type * from './columns'; export * from './data_provider'; -export * from './rows'; -export * from './store'; +export type * from './rows'; +export type * from './store'; /** * Used for scrolling top inside a tab. Especially when swiching tabs. diff --git a/x-pack/solutions/security/plugins/security_solution/public/attack_discovery/pages/settings_flyout/schedule/schedules_table/columns/index.tsx b/x-pack/solutions/security/plugins/security_solution/public/attack_discovery/pages/settings_flyout/schedule/schedules_table/columns/index.tsx index 5d2b4387808e3..c3a29922d8b22 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/attack_discovery/pages/settings_flyout/schedule/schedules_table/columns/index.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/attack_discovery/pages/settings_flyout/schedule/schedules_table/columns/index.tsx @@ -5,7 +5,7 @@ * 2.0. */ -export * from './constants'; +export type * from './constants'; export * from './actions'; export * from './enable'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/cloud_security_posture/routes.tsx b/x-pack/solutions/security/plugins/security_solution/public/cloud_security_posture/routes.tsx index 046b9087d40d6..ffe0443cd6c1f 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/cloud_security_posture/routes.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/cloud_security_posture/routes.tsx @@ -7,8 +7,10 @@ import React from 'react'; import { CLOUD_SECURITY_POSTURE_BASE_PATH } from '@kbn/cloud-security-posture-common'; -import type { CloudSecurityPosturePageId } from '@kbn/cloud-security-posture-plugin/public'; -import { type CspSecuritySolutionContext } from '@kbn/cloud-security-posture-plugin/public'; +import { + type CspSecuritySolutionContext, + type CloudSecurityPosturePageId, +} from '@kbn/cloud-security-posture-plugin/public'; import { useExpandableFlyoutApi } from '@kbn/expandable-flyout'; import { SecurityPageName } from '../app/types'; import type { SecuritySubPluginRoutes } from '../app/types'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/common/components/callouts/index.ts b/x-pack/solutions/security/plugins/security_solution/public/common/components/callouts/index.ts index 0b7ec42744a6e..134f85aa173f4 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/common/components/callouts/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/common/components/callouts/index.ts @@ -6,6 +6,6 @@ */ export * from './callout_switcher'; -export * from './callout_types'; +export type * from './callout_types'; export * from './callout'; export * from './callout_persistent_switcher'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/common/components/markdown_editor/eui_form.tsx b/x-pack/solutions/security/plugins/security_solution/public/common/components/markdown_editor/eui_form.tsx index b637c1b617562..ddca8c61fb5ff 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/common/components/markdown_editor/eui_form.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/common/components/markdown_editor/eui_form.tsx @@ -13,7 +13,6 @@ import { getFieldValidityAndErrorMessage } from '../../../shared_imports'; import type { MarkdownEditorRef } from './editor'; import { MarkdownEditor } from './editor'; -/* eslint-disable react/no-unused-prop-types */ type MarkdownEditorFormProps = EuiMarkdownEditorProps & { field: FieldHook; dataTestSubj: string; @@ -21,7 +20,6 @@ type MarkdownEditorFormProps = EuiMarkdownEditorProps & { isDisabled?: boolean; includePlugins?: boolean; }; -/* eslint-enable react/no-unused-prop-types */ export const MarkdownEditorForm = React.memo( forwardRef( diff --git a/x-pack/solutions/security/plugins/security_solution/public/common/components/top_n/top_n.tsx b/x-pack/solutions/security/plugins/security_solution/public/common/components/top_n/top_n.tsx index 4f82fbd0a1d93..cfaf968396d27 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/common/components/top_n/top_n.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/common/components/top_n/top_n.tsx @@ -60,7 +60,7 @@ export interface Props extends Pick void; - onFilterAdded?: () => void; // eslint-disable-line react/no-unused-prop-types + onFilterAdded?: () => void; applyGlobalQueriesAndFilters?: boolean; } diff --git a/x-pack/solutions/security/plugins/security_solution/public/common/hooks/use_form_with_warnings/use_form_with_warnings.ts b/x-pack/solutions/security/plugins/security_solution/public/common/hooks/use_form_with_warnings/use_form_with_warnings.ts index 191ba82f0943c..655703cb11c1a 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/common/hooks/use_form_with_warnings/use_form_with_warnings.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/common/hooks/use_form_with_warnings/use_form_with_warnings.ts @@ -7,8 +7,7 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import { isEmpty } from 'lodash'; -import type { FormHook } from '../../../shared_imports'; -import { useForm, type FormConfig, type FormData } from '../../../shared_imports'; +import { useForm, type FormConfig, type FormData, type FormHook } from '../../../shared_imports'; import type { FormHookWithWarnings } from './form_hook_with_warnings'; import { extractValidationResults } from './extract_validation_results'; import type { ValidationResults } from './validation_results'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/common/links/index.ts b/x-pack/solutions/security/plugins/security_solution/public/common/links/index.ts index 89d9453ebd190..338c5c20c1390 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/common/links/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/common/links/index.ts @@ -6,4 +6,4 @@ */ export * from './links_hooks'; -export * from './types'; +export type * from './types'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/common/mock/endpoint/app_context_render.tsx b/x-pack/solutions/security/plugins/security_solution/public/common/mock/endpoint/app_context_render.tsx index 41c19eaa2c0e4..b43d8c1203223 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/common/mock/endpoint/app_context_render.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/common/mock/endpoint/app_context_render.tsx @@ -276,14 +276,10 @@ export const createAppRootMockRenderer = (): AppContextTestRender => { app: experimentalFeaturesReducer, }; - const store = createMockStore( - undefined, - storeReducer, - undefined, - undefined, - // @ts-expect-error ts upgrade v4.7.4 - [...managementMiddlewareFactory(coreStart, depsStart), middlewareSpy.actionSpyMiddleware] - ); + const store = createMockStore(undefined, storeReducer, undefined, undefined, [ + ...managementMiddlewareFactory(coreStart, depsStart), + middlewareSpy.actionSpyMiddleware, + ]); const queryClient = new QueryClient({ defaultOptions: { diff --git a/x-pack/solutions/security/plugins/security_solution/public/common/mock/timeline_results.ts b/x-pack/solutions/security/plugins/security_solution/public/common/mock/timeline_results.ts index dd38472bb6b15..e7725c72ad792 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/common/mock/timeline_results.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/common/mock/timeline_results.ts @@ -10,9 +10,9 @@ import { FilterStateStore } from '@kbn/es-query'; import type { DataTableModel } from '@kbn/securitysolution-data-table'; import { VIEW_SELECTION } from '../../../common/constants'; import { TimelineId, TimelineTabs } from '../../../common/types/timeline'; -import type { TimelineResponse } from '../../../common/api/timeline'; import { type ColumnHeaderResult, + type TimelineResponse, RowRendererIdEnum, TimelineStatusEnum, TimelineTypeEnum, diff --git a/x-pack/solutions/security/plugins/security_solution/public/common/store/grouping/index.ts b/x-pack/solutions/security/plugins/security_solution/public/common/store/grouping/index.ts index 7486cc81b581b..19a7b1227e9ec 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/common/store/grouping/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/common/store/grouping/index.ts @@ -8,6 +8,6 @@ import * as groupActions from './actions'; import * as groupSelectors from './selectors'; -export * from './types'; +export type * from './types'; export { groupActions, groupSelectors }; diff --git a/x-pack/solutions/security/plugins/security_solution/public/common/store/model.ts b/x-pack/solutions/security/plugins/security_solution/public/common/store/model.ts index da208bdf94e2b..bdba5088fcc18 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/common/store/model.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/common/store/model.ts @@ -9,4 +9,4 @@ export { appModel } from './app'; export { dragAndDropModel } from './drag_and_drop'; export { inputsModel } from './inputs'; export { sourcererModel } from '../../sourcerer/store'; -export * from './types'; +export type * from './types'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/fleet_integrations/api/index.ts b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/fleet_integrations/api/index.ts index f20ead0b41939..4069c09a2b4c8 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/fleet_integrations/api/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/fleet_integrations/api/index.ts @@ -5,5 +5,5 @@ * 2.0. */ -export * from './api_client_interface'; +export type * from './api_client_interface'; export * from './api_client'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/query_bar_field/index.ts b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/query_bar_field/index.ts index 07f6e408c5574..cfec8e1a52ad2 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/query_bar_field/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/query_bar_field/index.ts @@ -5,6 +5,6 @@ * 2.0. */ -export * from './types'; +export type * from './types'; export * from './default_queries'; export * from './query_field'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/use_persistent_query.ts b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/use_persistent_query.ts index 0b6adf47f1fe3..451f2031718a7 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/use_persistent_query.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/use_persistent_query.ts @@ -9,8 +9,7 @@ import { useEffect, useMemo, useRef } from 'react'; import { isEqual } from 'lodash'; import usePrevious from 'react-use/lib/usePrevious'; import type { EqlOptions } from '../../../../../common/search_strategy'; -import type { FieldHook } from '../../../../shared_imports'; -import { type FormHook, useFormData } from '../../../../shared_imports'; +import { type FormHook, type FieldHook, useFormData } from '../../../../shared_imports'; import type { DefineStepRule } from '../../../common/types'; import { isEqlRule, diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/validators/index_pattern_validator_factory.ts b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/validators/index_pattern_validator_factory.ts index 9962d3b835b3c..e07602f54641e 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/validators/index_pattern_validator_factory.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/validators/index_pattern_validator_factory.ts @@ -6,8 +6,12 @@ */ import { i18n } from '@kbn/i18n'; -import type { ERROR_CODE } from '../../../shared_imports'; -import { fieldValidators, type FormData, type ValidationFunc } from '../../../shared_imports'; +import { + fieldValidators, + type FormData, + type ValidationFunc, + type ERROR_CODE, +} from '../../../shared_imports'; export function indexPatternValidatorFactory(): ValidationFunc { return fieldValidators.emptyField( diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/validators/max_signals_validator_factory.ts b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/validators/max_signals_validator_factory.ts index b50e0dc4662a5..6a170a79d8df8 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/validators/max_signals_validator_factory.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/validators/max_signals_validator_factory.ts @@ -6,8 +6,12 @@ */ import { i18n } from '@kbn/i18n'; -import type { ERROR_CODE } from '../../../shared_imports'; -import { fieldValidators, type FormData, type ValidationFunc } from '../../../shared_imports'; +import { + fieldValidators, + type FormData, + type ValidationFunc, + type ERROR_CODE, +} from '../../../shared_imports'; export const MIN_VALUE = 1; diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/fields/data_source/data_source_edit_form.tsx b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/fields/data_source/data_source_edit_form.tsx index ec9e49bb7ab17..883b33e624edd 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/fields/data_source/data_source_edit_form.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/fields/data_source/data_source_edit_form.tsx @@ -9,10 +9,11 @@ import React from 'react'; import { EuiText } from '@elastic/eui'; import { indexPatternValidatorFactory } from '../../../../../../../rule_creation_ui/validators/index_pattern_validator_factory'; import { dataViewIdValidatorFactory } from '../../../../../../../rule_creation_ui/validators/data_view_id_validator_factory'; -import type { ValidationFunc, ERROR_CODE } from '../../../../../../../../shared_imports'; import { type FormData, type FormSchema, + type ValidationFunc, + type ERROR_CODE, FIELD_TYPES, } from '../../../../../../../../shared_imports'; import { DataSourceType } from '../../../../../../../../../common/api/detection_engine/prebuilt_rules'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/rule_upgrade/rule_upgrade.tsx b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/rule_upgrade/rule_upgrade.tsx index 1ff08ee9b3f74..d8bea806d39ae 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/rule_upgrade/rule_upgrade.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/rule_upgrade/rule_upgrade.tsx @@ -7,9 +7,9 @@ import React, { memo } from 'react'; import { EuiSpacer } from '@elastic/eui'; -import type { FieldsUpgradeState } from '../../../../model/prebuilt_rule_upgrade'; import { FieldUpgradeStateEnum, + type FieldsUpgradeState, type RuleUpgradeState, type SetRuleFieldResolvedValueFn, } from '../../../../model/prebuilt_rule_upgrade'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/hooks/use_prebuilt_rules_upgrade.tsx b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/hooks/use_prebuilt_rules_upgrade.tsx index c38e345c21596..bd27395598257 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/hooks/use_prebuilt_rules_upgrade.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/hooks/use_prebuilt_rules_upgrade.tsx @@ -14,13 +14,13 @@ import { useIsUpgradingSecurityPackages } from '../logic/use_upgrade_security_pa import { usePrebuiltRulesCustomizationStatus } from '../logic/prebuilt_rules/use_prebuilt_rules_customization_status'; import { usePerformUpgradeRules } from '../logic/prebuilt_rules/use_perform_rule_upgrade'; import { usePrebuiltRulesUpgradeReview } from '../logic/prebuilt_rules/use_prebuilt_rules_upgrade_review'; -import type { PerformRuleUpgradeRequestBody } from '../../../../common/api/detection_engine'; import { type FindRulesSortField, type RuleFieldsToUpgrade, type RuleResponse, type RuleSignatureId, type RuleUpgradeSpecifier, + type PerformRuleUpgradeRequestBody, ThreeWayDiffConflict, SkipRuleUpgradeReasonEnum, UpgradeConflictResolutionEnum, diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/model/prebuilt_rule_upgrade/index.ts b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/model/prebuilt_rule_upgrade/index.ts index 0e5a631fde2e2..7964618c88a79 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/model/prebuilt_rule_upgrade/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/model/prebuilt_rule_upgrade/index.ts @@ -6,7 +6,7 @@ */ export * from './field_upgrade_state_enum'; -export * from './fields_upgrade_state'; -export * from './rule_upgrade_state'; -export * from './rules_upgrade_state'; -export * from './set_rule_field_resolved_value'; +export type * from './fields_upgrade_state'; +export type * from './rule_upgrade_state'; +export type * from './rules_upgrade_state'; +export type * from './set_rule_field_resolved_value'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/use_prebuilt_rules_upgrade_state.test.ts b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/use_prebuilt_rules_upgrade_state.test.ts index f83aa914432a6..ec975187e4faa 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/use_prebuilt_rules_upgrade_state.test.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/use_prebuilt_rules_upgrade_state.test.ts @@ -6,9 +6,9 @@ */ import { FieldUpgradeStateEnum } from '../../../../rule_management/model/prebuilt_rule_upgrade'; -import type { RuleResponse } from '../../../../../../common/api/detection_engine'; import { useAppToasts } from '../../../../../common/hooks/use_app_toasts'; import { + type RuleResponse, type RuleUpgradeInfoForReview, ThreeWayDiffConflict, ThreeWayDiffOutcome, diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management_ui/pages/rule_management/__integration_tests__/rules_upgrade/test_utils/set_field_value.ts b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management_ui/pages/rule_management/__integration_tests__/rules_upgrade/test_utils/set_field_value.ts index 734545977a1a4..1f482f8f626d7 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management_ui/pages/rule_management/__integration_tests__/rules_upgrade/test_utils/set_field_value.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management_ui/pages/rule_management/__integration_tests__/rules_upgrade/test_utils/set_field_value.ts @@ -16,18 +16,6 @@ import { selectEuiComboBoxOption, } from '../../../../../../../common/test/eui/combobox'; import { selectEuiSuperSelectOption } from '../../../../../../../common/test/eui/super_select'; -import type { - AlertSuppression, - AnomalyThreshold, - HistoryWindowStart, - InlineKqlQuery, - MachineLearningJobId, - NewTermsFields, - RuleEqlQuery, - RuleKqlQuery, - ThreatIndex, - Threshold, -} from '../../../../../../../../common/api/detection_engine'; import { DataSourceType, type BuildingBlockObject, @@ -42,6 +30,16 @@ import { type Threat, type TimelineTemplateReference, type TimestampOverrideObject, + type AlertSuppression, + type AnomalyThreshold, + type HistoryWindowStart, + type InlineKqlQuery, + type MachineLearningJobId, + type NewTermsFields, + type RuleEqlQuery, + type RuleKqlQuery, + type ThreatIndex, + type Threshold, KqlQueryType, } from '../../../../../../../../common/api/detection_engine'; import type { RuleSchedule } from '../../../../../../../../common/api/detection_engine/model/rule_schema/rule_schedule'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_monitoring/api/index.ts b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_monitoring/api/index.ts index f20ead0b41939..4069c09a2b4c8 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_monitoring/api/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_monitoring/api/index.ts @@ -5,5 +5,5 @@ * 2.0. */ -export * from './api_client_interface'; +export type * from './api_client_interface'; export * from './api_client'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/entity_analytics/api/api.ts b/x-pack/solutions/security/plugins/security_solution/public/entity_analytics/api/api.ts index 042ff8026acc1..38ba8c3cc497a 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/entity_analytics/api/api.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/entity_analytics/api/api.ts @@ -67,8 +67,10 @@ import { import type { SnakeToCamelCase } from '../common/utils'; import { useKibana } from '../../common/lib/kibana/kibana_react'; import type { ReadRiskEngineSettingsResponse } from '../../../common/api/entity_analytics/risk_engine'; -import type { ListEntitiesResponse } from '../../../common/api/entity_analytics/entity_store/entities/list_entities.gen'; -import { type ListEntitiesRequestQuery } from '../../../common/api/entity_analytics/entity_store/entities/list_entities.gen'; +import { + type ListEntitiesRequestQuery, + type ListEntitiesResponse, +} from '../../../common/api/entity_analytics/entity_store/entities/list_entities.gen'; export interface DeleteAssetCriticalityResponse { deleted: true; diff --git a/x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/entity_store/components/engines_status/hooks/use_columns.tsx b/x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/entity_store/components/engines_status/hooks/use_columns.tsx index 05e5e9d89e560..2b8e3861a98de 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/entity_store/components/engines_status/hooks/use_columns.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/entity_store/components/engines_status/hooks/use_columns.tsx @@ -5,10 +5,10 @@ * 2.0. */ -import type { IconColor } from '@elastic/eui'; import { EuiLink, type EuiBasicTableColumn, + type IconColor, EuiHealth, EuiScreenReaderOnly, EuiButtonIcon, @@ -19,8 +19,8 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { EngineComponentResourceEnum, type EngineComponentResource, + type EngineComponentStatus, } from '../../../../../../../common/api/entity_analytics'; -import type { EngineComponentStatus } from '../../../../../../../common/api/entity_analytics'; import { useKibana } from '../../../../../../common/lib/kibana'; type TableColumn = EuiBasicTableColumn; diff --git a/x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/entity_store/hooks/use_entity_store.ts b/x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/entity_store/hooks/use_entity_store.ts index 637a96fee392b..76f8606bfc1a7 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/entity_store/hooks/use_entity_store.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/entity_store/hooks/use_entity_store.ts @@ -15,10 +15,10 @@ import type { InitEntityStoreResponse, } from '../../../../../common/api/entity_analytics/entity_store/enable.gen'; import { useKibana } from '../../../../common/lib/kibana/kibana_react'; -import type { EntityType } from '../../../../../common/api/entity_analytics'; import { type DeleteEntityEngineResponse, type StopEntityEngineResponse, + type EntityType, } from '../../../../../common/api/entity_analytics'; import { useEntityStoreRoutes } from '../../../api/entity_store'; import { EntityEventTypes } from '../../../../common/lib/telemetry'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/top_risk_score_contributors_alerts/index.tsx b/x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/top_risk_score_contributors_alerts/index.tsx index a4de8378f0f43..0a0c43a0e8993 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/top_risk_score_contributors_alerts/index.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/top_risk_score_contributors_alerts/index.tsx @@ -19,11 +19,11 @@ import { import { HeaderSection } from '../../../common/components/header_section'; import * as i18n from './translations'; import type { RiskInputs } from '../../../../common/entity_analytics/risk_engine'; -import type { EntityRiskScore } from '../../../../common/search_strategy'; import { EntityType, type HostRiskScore, type UserRiskScore, + type EntityRiskScore, } from '../../../../common/search_strategy'; import { DetectionEngineAlertsTable } from '../../../detections/components/alerts_table'; import { GroupedAlertsTable } from '../../../detections/components/alerts_table/alerts_grouping'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/flyout/csp_details/vulnerabilities_flyout/vulnerabilities_right/index.tsx b/x-pack/solutions/security/plugins/security_solution/public/flyout/csp_details/vulnerabilities_flyout/vulnerabilities_right/index.tsx index e6930f2ebf3f5..691e2e2372c1b 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/flyout/csp_details/vulnerabilities_flyout/vulnerabilities_right/index.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/flyout/csp_details/vulnerabilities_flyout/vulnerabilities_right/index.tsx @@ -6,11 +6,11 @@ */ import React from 'react'; -import type { FindingsVulnerabilityPanelExpandableFlyoutProps } from '@kbn/cloud-security-posture'; import { SeverityStatusBadge, getNormalizedSeverity, type FindingVulnerabilityFullFlyoutContentProps, + type FindingsVulnerabilityPanelExpandableFlyoutProps, } from '@kbn/cloud-security-posture'; import { EuiFlexGroup, EuiFlexItem, EuiFlyoutFooter, EuiSpacer, EuiText } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/left/components/correlations_details_alerts_table.tsx b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/left/components/correlations_details_alerts_table.tsx index 0bc8bf397cf93..42d1a7d99fda6 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/left/components/correlations_details_alerts_table.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/left/components/correlations_details_alerts_table.tsx @@ -5,8 +5,7 @@ * 2.0. */ -import type { ReactElement, ReactNode } from 'react'; -import React, { type FC, useMemo, useCallback } from 'react'; +import React, { type FC, useMemo, useCallback, type ReactElement, type ReactNode } from 'react'; import { type Criteria, EuiBasicTable, formatDate } from '@elastic/eui'; import { Severity } from '@kbn/securitysolution-io-ts-alerting-types'; import type { Filter } from '@kbn/es-query'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/expandable_section.tsx b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/expandable_section.tsx index 99faf10c04604..c8a4e9035fef2 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/expandable_section.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/expandable_section.tsx @@ -7,8 +7,7 @@ import { EuiAccordion, EuiFlexGroup, EuiSpacer, EuiTitle, useGeneratedHtmlId } from '@elastic/eui'; import type { EuiFlexGroupProps } from '@elastic/eui'; -import type { ReactElement } from 'react'; -import React, { type VFC } from 'react'; +import React, { type VFC, type ReactElement } from 'react'; import { useAccordionState } from '../hooks/use_accordion_state'; export const HEADER_TEST_ID = 'Header'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/session_preview.tsx b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/session_preview.tsx index fe5e7e14cba48..35b34f5f72b4c 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/session_preview.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/session_preview.tsx @@ -6,8 +6,7 @@ */ import { EuiCode, EuiIcon, EuiLink, useEuiTheme } from '@elastic/eui'; -import type { ReactElement } from 'react'; -import React, { useMemo, type FC, type PropsWithChildren } from 'react'; +import React, { useMemo, type FC, type PropsWithChildren, type ReactElement } from 'react'; import { css } from '@emotion/react'; import { FormattedMessage } from '@kbn/i18n-react'; import { useRuleDetailsLink } from '../../shared/hooks/use_rule_details_link'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/session_view/index.tsx b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/session_view/index.tsx index ad5cd47ddb2f5..c45ec32504c48 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/session_view/index.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/session_view/index.tsx @@ -7,8 +7,11 @@ import type { FC } from 'react'; import React, { memo, useCallback, useMemo } from 'react'; -import type { FlyoutPanelProps } from '@kbn/expandable-flyout'; -import { type PanelPath, useExpandableFlyoutApi } from '@kbn/expandable-flyout'; +import { + type PanelPath, + type FlyoutPanelProps, + useExpandableFlyoutApi, +} from '@kbn/expandable-flyout'; import { PanelContent } from './content'; import { PanelHeader } from './header'; import type { CustomProcess } from './context'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/shared/components/alert_count_insight.tsx b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/shared/components/alert_count_insight.tsx index 1c66ad608883e..45f6574661ed6 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/shared/components/alert_count_insight.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/shared/components/alert_count_insight.tsx @@ -7,12 +7,12 @@ import React, { useMemo } from 'react'; import { capitalize } from 'lodash'; -import type { EuiThemeComputed } from '@elastic/eui'; import { EuiLoadingSpinner, EuiFlexItem, EuiText, type EuiFlexGroupProps, + type EuiThemeComputed, useEuiTheme, EuiLink, EuiToolTip, diff --git a/x-pack/solutions/security/plugins/security_solution/public/flyout/entity_details/user_right/mocks/index.ts b/x-pack/solutions/security/plugins/security_solution/public/flyout/entity_details/user_right/mocks/index.ts index 3cd43fc677fa2..b245ed7bfd231 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/flyout/entity_details/user_right/mocks/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/flyout/entity_details/user_right/mocks/index.ts @@ -5,9 +5,9 @@ * 2.0. */ -import type { ManagedUserFields } from '../../../../../common/search_strategy/security_solution/users/managed_details'; import { ManagedUserDatasetKey, + type ManagedUserFields, type ManagedUserHits, } from '../../../../../common/search_strategy/security_solution/users/managed_details'; import type { ManagedUserData } from '../types'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/flyout/shared/components/flyout_navigation.test.tsx b/x-pack/solutions/security/plugins/security_solution/public/flyout/shared/components/flyout_navigation.test.tsx index 433620e6def43..f063bc922e07e 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/flyout/shared/components/flyout_navigation.test.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/flyout/shared/components/flyout_navigation.test.tsx @@ -16,9 +16,10 @@ import { FLYOUT_HISTORY_BUTTON_TEST_ID, HEADER_ACTIONS_TEST_ID, } from './test_ids'; -import type { ExpandableFlyoutState, FlyoutPanelHistory } from '@kbn/expandable-flyout'; import { type ExpandableFlyoutApi, + type ExpandableFlyoutState, + type FlyoutPanelHistory, useExpandableFlyoutApi, useExpandableFlyoutHistory, useExpandableFlyoutState, diff --git a/x-pack/solutions/security/plugins/security_solution/public/management/components/artifact_entry_card/index.ts b/x-pack/solutions/security/plugins/security_solution/public/management/components/artifact_entry_card/index.ts index d8e2eeb956c11..ea1dc6fd1ee89 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/management/components/artifact_entry_card/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/management/components/artifact_entry_card/index.ts @@ -9,6 +9,6 @@ export * from './artifact_entry_card'; export * from './artifact_entry_card_minified'; export * from './artifact_entry_collapsible_card'; export * from './components/card_section_panel'; -export * from './types'; +export type * from './types'; export { CardCompressedHeaderLayout } from './components/card_compressed_header'; export { useEndpointPoliciesToArtifactPolicies } from './hooks/use_endpoint_policies_to_artifact_policies'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/management/components/artifact_list_page/index.ts b/x-pack/solutions/security/plugins/security_solution/public/management/components/artifact_list_page/index.ts index db5c03a48ff2a..5b187883d92db 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/management/components/artifact_list_page/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/management/components/artifact_list_page/index.ts @@ -6,7 +6,7 @@ */ export { ArtifactListPage } from './artifact_list_page'; -export * from './types'; +export type * from './types'; export { artifactListPageLabels } from './translations'; export type { ArtifactListPageProps } from './artifact_list_page'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/get_processes_action.tsx b/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/get_processes_action.tsx index 5086e1ac1fada..bde5d0e68022c 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/get_processes_action.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/get_processes_action.tsx @@ -34,7 +34,9 @@ export const GetProcessesActionResult = memo( GetProcessesActionOutputContent >({ ResultComponent, + // @ts-expect-error upgrade typescript v5.4.5 setStore, + // @ts-expect-error upgrade typescript v5.4.5 store, status, setStatus, diff --git a/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/suspend_process_action.tsx b/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/suspend_process_action.tsx index d685e306e7b0d..32e77e7140263 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/suspend_process_action.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/suspend_process_action.tsx @@ -40,7 +40,9 @@ export const SuspendProcessActionResult = memo< return useConsoleActionSubmitter({ ResultComponent, + // @ts-expect-error upgrade typescript v5.4.5 setStore, + // @ts-expect-error upgrade typescript v5.4.5 store, status, setStatus, diff --git a/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/use_action_history_url_params.ts b/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/use_action_history_url_params.ts index 2d7a0ee932af5..2900ce0d29366 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/use_action_history_url_params.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/use_action_history_url_params.ts @@ -11,7 +11,6 @@ import { isActionType, isAgentType, } from '../../../../../common/endpoint/service/response_actions/type_guards'; -import type { ResponseActionType } from '../../../../../common/endpoint/service/response_actions/constants'; import { type ConsoleResponseActionCommands, RESPONSE_ACTION_API_COMMANDS_NAMES, @@ -19,6 +18,7 @@ import { type ResponseActionAgentType, type ResponseActionsApiCommandNames, type ResponseActionStatus, + type ResponseActionType, } from '../../../../../common/endpoint/service/response_actions/constants'; import { useUrlParams } from '../../../hooks/use_url_params'; import { DEFAULT_DATE_RANGE_OPTIONS } from './hooks'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_response_actions_list/response_actions_log.tsx b/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_response_actions_list/response_actions_log.tsx index 659da5fd70986..3cb3d1bc7f155 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_response_actions_list/response_actions_log.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_response_actions_list/response_actions_log.tsx @@ -10,12 +10,12 @@ import { EuiEmptyPrompt, EuiFlexItem } from '@elastic/eui'; import React, { memo, useCallback, useEffect, useMemo, useState } from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; import { useIsExperimentalFeatureEnabled } from '../../../common/hooks/use_experimental_features'; -import type { ResponseActionAgentType } from '../../../../common/endpoint/service/response_actions/constants'; import { RESPONSE_CONSOLE_COMMAND_TO_API_COMMAND_MAP, type ResponseActionsApiCommandNames, type ResponseActionStatus, type ResponseActionType, + type ResponseActionAgentType, } from '../../../../common/endpoint/service/response_actions/constants'; import type { ActionListApiResponse } from '../../../../common/endpoint/types'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/management/cypress/screens/index.ts b/x-pack/solutions/security/plugins/security_solution/public/management/cypress/screens/index.ts index e1594d2b59f7e..1bb8241a3ea00 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/management/cypress/screens/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/management/cypress/screens/index.ts @@ -13,4 +13,4 @@ export * from './policy_list'; export * from './page_reference'; export * from './responder'; export * from './fleet'; -export * from './types'; +export type * from './types'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/management/hooks/policy/use_bulk_fetch_fleet_integration_policies.ts b/x-pack/solutions/security/plugins/security_solution/public/management/hooks/policy/use_bulk_fetch_fleet_integration_policies.ts index d29391f928bb0..39d05c7a86db9 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/management/hooks/policy/use_bulk_fetch_fleet_integration_policies.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/management/hooks/policy/use_bulk_fetch_fleet_integration_policies.ts @@ -5,8 +5,7 @@ * 2.0. */ -import type { QueryObserverResult } from '@tanstack/react-query'; -import { useQuery, type UseQueryOptions } from '@tanstack/react-query'; +import { useQuery, type UseQueryOptions, type QueryObserverResult } from '@tanstack/react-query'; import type { PackagePolicy } from '@kbn/fleet-plugin/common'; import { packagePolicyRouteService } from '@kbn/fleet-plugin/common'; import type { IHttpFetchError } from '@kbn/core-http-browser'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/management/hooks/use_with_show_responder.tsx b/x-pack/solutions/security/plugins/security_solution/public/management/hooks/use_with_show_responder.tsx index e3e830efcb047..a1e080fa648ee 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/management/hooks/use_with_show_responder.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/management/hooks/use_with_show_responder.tsx @@ -8,8 +8,10 @@ import React, { useCallback } from 'react'; import { useLicense } from '../../common/hooks/use_license'; import type { MaybeImmutable } from '../../../common/endpoint/types'; -import type { EndpointCapabilities } from '../../../common/endpoint/service/response_actions/constants'; -import { type ResponseActionAgentType } from '../../../common/endpoint/service/response_actions/constants'; +import { + type ResponseActionAgentType, + type EndpointCapabilities, +} from '../../../common/endpoint/service/response_actions/constants'; import { AgentInfo } from '../components/endpoint_responder/components/header_info/agent_info/agent_info'; import { useUserPrivileges } from '../../common/components/user_privileges'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/management/pages/endpoint_hosts/store/mock_endpoint_result_list.ts b/x-pack/solutions/security/plugins/security_solution/public/management/pages/endpoint_hosts/store/mock_endpoint_result_list.ts index c29e8e25ac4d0..42453c8dd3de0 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/management/pages/endpoint_hosts/store/mock_endpoint_result_list.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/management/pages/endpoint_hosts/store/mock_endpoint_result_list.ts @@ -219,6 +219,7 @@ export const setEndpointListApiMockImplementation: ( const [path] = args; if (typeof path === 'string') { if (apiHandlers[path]) { + // @ts-expect-error upgrade typescript v5.4.5 return apiHandlers[path](); } } @@ -230,6 +231,7 @@ export const setEndpointListApiMockImplementation: ( const [path] = args; if (typeof path === 'string') { if (apiHandlers[path]) { + // @ts-expect-error upgrade typescript v5.4.5 return apiHandlers[path](); } } diff --git a/x-pack/solutions/security/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx b/x-pack/solutions/security/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx index d4f3d26fca19e..4f2339f12cfbb 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx @@ -7,7 +7,6 @@ import React, { useCallback, useMemo } from 'react'; import styled from 'styled-components'; -import type { CriteriaWithPagination, EuiSuperDatePickerProps } from '@elastic/eui'; import { EuiBasicTable, type EuiBasicTableColumn, @@ -18,6 +17,8 @@ import { EuiHorizontalRule, EuiLoadingLogo, type EuiSelectableProps, + type CriteriaWithPagination, + type EuiSuperDatePickerProps, EuiSpacer, EuiSuperDatePicker, EuiText, diff --git a/x-pack/solutions/security/plugins/security_solution/public/management/services/policies/hooks.ts b/x-pack/solutions/security/plugins/security_solution/public/management/services/policies/hooks.ts index 9e8e433f8a9aa..20611d8696675 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/management/services/policies/hooks.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/management/services/policies/hooks.ts @@ -7,8 +7,7 @@ import type { QueryObserverResult, UseQueryOptions } from '@tanstack/react-query'; import { useQuery } from '@tanstack/react-query'; import type { IHttpFetchError } from '@kbn/core-http-browser'; -import type { BulkGetAgentPoliciesResponse } from '@kbn/fleet-plugin/common'; -import { type GetInfoResponse } from '@kbn/fleet-plugin/common'; +import { type GetInfoResponse, type BulkGetAgentPoliciesResponse } from '@kbn/fleet-plugin/common'; import { firstValueFrom } from 'rxjs'; import type { IKibanaSearchResponse } from '@kbn/search-types'; import { ENDPOINT_PACKAGE_POLICIES_STATS_STRATEGY } from '../../../../common/endpoint/constants'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/overview/components/event_counts/index.tsx b/x-pack/solutions/security/plugins/security_solution/public/overview/components/event_counts/index.tsx index a6e8ae70f1b1e..571a909b1c334 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/overview/components/event_counts/index.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/overview/components/event_counts/index.tsx @@ -9,8 +9,7 @@ import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import React, { useMemo } from 'react'; import type { Filter, Query } from '@kbn/es-query'; -import type { DataView } from '@kbn/data-plugin/common'; -import { type DataViewSpec, getEsQueryConfig } from '@kbn/data-plugin/common'; +import { type DataView, type DataViewSpec, getEsQueryConfig } from '@kbn/data-plugin/common'; import { ID as OverviewHostQueryId } from '../../containers/overview_host'; import { OverviewHost } from '../overview_host'; import { OverviewNetwork } from '../overview_network'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/siem_migrations/rules/components/rule_details_flyout/tabs/translation/callout.tsx b/x-pack/solutions/security/plugins/security_solution/public/siem_migrations/rules/components/rule_details_flyout/tabs/translation/callout.tsx index 53b8ab34c4ae2..1c2106dbe48fd 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/siem_migrations/rules/components/rule_details_flyout/tabs/translation/callout.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/siem_migrations/rules/components/rule_details_flyout/tabs/translation/callout.tsx @@ -9,8 +9,10 @@ import type { FC } from 'react'; import React from 'react'; import type { IconType } from '@elastic/eui'; import { EuiCallOut } from '@elastic/eui'; -import type { RuleMigrationRule } from '../../../../../../../common/siem_migrations/model/rule_migration.gen'; -import { type RuleMigrationTranslationResult } from '../../../../../../../common/siem_migrations/model/rule_migration.gen'; +import { + type RuleMigrationTranslationResult, + type RuleMigrationRule, +} from '../../../../../../../common/siem_migrations/model/rule_migration.gen'; import * as i18n from './translations'; type RuleMigrationTranslationCallOutMode = RuleMigrationTranslationResult | 'mapped'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/threat_intelligence/modules/timeline/components/investigate_in_timeline.tsx b/x-pack/solutions/security/plugins/security_solution/public/threat_intelligence/modules/timeline/components/investigate_in_timeline.tsx index 6202663df7e02..d780a22483cb7 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/threat_intelligence/modules/timeline/components/investigate_in_timeline.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/threat_intelligence/modules/timeline/components/investigate_in_timeline.tsx @@ -21,7 +21,6 @@ export interface InvestigateInTimelineProps { /** * Click event to close the popover in the parent component */ - // eslint-disable-next-line react/no-unused-prop-types onClick?: () => void; /** * Used for unit and e2e tests. diff --git a/x-pack/solutions/security/plugins/security_solution/public/timelines/components/open_timeline/helpers.ts b/x-pack/solutions/security/plugins/security_solution/public/timelines/components/open_timeline/helpers.ts index 58cf2036b2b48..baafabc82f387 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/timelines/components/open_timeline/helpers.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/timelines/components/open_timeline/helpers.ts @@ -12,19 +12,17 @@ import deepMerge from 'deepmerge'; import { useDiscoverInTimelineContext } from '../../../common/components/discover_in_timeline/use_discover_in_timeline_context'; import type { ColumnHeaderOptions, KueryFilterQuery } from '../../../../common/types/timeline'; import { TimelineId, TimelineTabs } from '../../../../common/types/timeline'; -import type { - ColumnHeaderResult, - DataProviderResult, - FilterTimelineResult, - Note, - PinnedEvent, - TimelineResponse, -} from '../../../../common/api/timeline'; import { DataProviderTypeEnum, RowRendererValues, TimelineStatusEnum, type TimelineType, + type ColumnHeaderResult, + type DataProviderResult, + type FilterTimelineResult, + type Note, + type PinnedEvent, + type TimelineResponse, TimelineTypeEnum, } from '../../../../common/api/timeline'; import { useUpdateTimeline } from './use_update_timeline'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/timelines/components/timeline/data_providers/provider_item_actions.tsx b/x-pack/solutions/security/plugins/security_solution/public/timelines/components/timeline/data_providers/provider_item_actions.tsx index 8f315c2719c11..0ca2094056045 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/timelines/components/timeline/data_providers/provider_item_actions.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/timelines/components/timeline/data_providers/provider_item_actions.tsx @@ -41,7 +41,7 @@ interface OwnProps { closePopover: () => void; deleteProvider: () => void; field: string; - kqlQuery: string; // eslint-disable-line react/no-unused-prop-types + kqlQuery: string; isEnabled: boolean; isExcluded: boolean; isOpen: boolean; diff --git a/x-pack/solutions/security/plugins/security_solution/public/timelines/store/helpers.ts b/x-pack/solutions/security/plugins/security_solution/public/timelines/store/helpers.ts index 75098b733652e..663ffa38bfd16 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/timelines/store/helpers.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/timelines/store/helpers.ts @@ -15,9 +15,10 @@ import type { QueryOperator, } from '../components/timeline/data_providers/data_provider'; import { EXISTS_OPERATOR, IS_OPERATOR } from '../components/timeline/data_providers/data_provider'; -import type { RowRendererId, TimelineType } from '../../../common/api/timeline'; import { type DataProviderType, + type RowRendererId, + type TimelineType, DataProviderTypeEnum, TimelineStatusEnum, TimelineTypeEnum, diff --git a/x-pack/solutions/security/plugins/security_solution/scripts/endpoint/api_emulator/index.ts b/x-pack/solutions/security/plugins/security_solution/scripts/endpoint/api_emulator/index.ts index 8c4d0eae4e5e7..5226794f6ee24 100644 --- a/x-pack/solutions/security/plugins/security_solution/scripts/endpoint/api_emulator/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/scripts/endpoint/api_emulator/index.ts @@ -17,7 +17,7 @@ export { startExternalEdrServerEmulator, type StartExternalEdrServerEmulatorOptions, } from './external_edr_server_emulator'; -export * from './external_edr_server_emulator.types'; +export type * from './external_edr_server_emulator.types'; export const cli = () => { run( diff --git a/x-pack/solutions/security/plugins/security_solution/scripts/endpoint/common/screen/index.ts b/x-pack/solutions/security/plugins/security_solution/scripts/endpoint/common/screen/index.ts index 29f289b4d241f..d0f773c47fc42 100644 --- a/x-pack/solutions/security/plugins/security_solution/scripts/endpoint/common/screen/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/scripts/endpoint/common/screen/index.ts @@ -8,6 +8,6 @@ export { ScreenBaseClass } from './screen_base_class'; export { ChoiceMenuFormatter } from './choice_menu_formatter'; export { DataFormatter } from './data_formatter'; -export * from './types'; +export type * from './types'; export * from './type_gards'; export * from './common_choices'; diff --git a/x-pack/solutions/security/plugins/security_solution/server/endpoint/lib/reference_data/index.ts b/x-pack/solutions/security/plugins/security_solution/server/endpoint/lib/reference_data/index.ts index fe6a34eb94339..d0a501dae459d 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/endpoint/lib/reference_data/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/endpoint/lib/reference_data/index.ts @@ -8,4 +8,4 @@ export * from './saved_objects'; export * from './constants'; export * from './reference_data_client'; -export * from './types'; +export type * from './types'; diff --git a/x-pack/solutions/security/plugins/security_solution/server/endpoint/routes/actions/response_actions.ts b/x-pack/solutions/security/plugins/security_solution/server/endpoint/routes/actions/response_actions.ts index f6f77cbf6d972..e621854a43b7a 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/endpoint/routes/actions/response_actions.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/endpoint/routes/actions/response_actions.ts @@ -10,7 +10,6 @@ import type { ResponseActionAgentType, ResponseActionsApiCommandNames, } from '../../../../common/endpoint/service/response_actions/constants'; -import type { RunScriptActionRequestBody } from '../../../../common/api/endpoint'; import { EndpointActionGetFileSchema, type ExecuteActionRequestBody, @@ -29,6 +28,7 @@ import { type UploadActionApiRequestBody, UploadActionRequestSchema, RunScriptActionRequestSchema, + type RunScriptActionRequestBody, } from '../../../../common/api/endpoint'; import { diff --git a/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/actions/clients/index.ts b/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/actions/clients/index.ts index 351b015621320..cbd18f30c785c 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/actions/clients/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/actions/clients/index.ts @@ -8,5 +8,5 @@ export * from './endpoint/endpoint_actions_client'; export * from './sentinelone/sentinel_one_actions_client'; export * from './get_response_actions_client'; -export * from './lib/types'; +export type * from './lib/types'; export * from './lib/normalized_external_connector_client'; diff --git a/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/actions/clients/microsoft/defender/endpoint/ms_defender_endpoint_actions_client.ts b/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/actions/clients/microsoft/defender/endpoint/ms_defender_endpoint_actions_client.ts index 3a504cccb024d..aa99539e046b8 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/actions/clients/microsoft/defender/endpoint/ms_defender_endpoint_actions_client.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/actions/clients/microsoft/defender/endpoint/ms_defender_endpoint_actions_client.ts @@ -10,17 +10,15 @@ import { MICROSOFT_DEFENDER_ENDPOINT_CONNECTOR_ID, MICROSOFT_DEFENDER_ENDPOINT_SUB_ACTION, } from '@kbn/stack-connectors-plugin/common/microsoft_defender_endpoint/constants'; -import type { - MicrosoftDefenderEndpointGetActionsParams, - MicrosoftDefenderEndpointGetActionsResponse, - MicrosoftDefenderEndpointRunScriptParams, - MicrosoftDefenderGetLibraryFilesResponse, -} from '@kbn/stack-connectors-plugin/common/microsoft_defender_endpoint/types'; import { type MicrosoftDefenderEndpointAgentDetailsParams, type MicrosoftDefenderEndpointIsolateHostParams, type MicrosoftDefenderEndpointMachine, type MicrosoftDefenderEndpointMachineAction, + type MicrosoftDefenderEndpointGetActionsParams, + type MicrosoftDefenderEndpointGetActionsResponse, + type MicrosoftDefenderEndpointRunScriptParams, + type MicrosoftDefenderGetLibraryFilesResponse, } from '@kbn/stack-connectors-plugin/common/microsoft_defender_endpoint/types'; import { groupBy } from 'lodash'; import type { Readable } from 'stream'; @@ -51,12 +49,10 @@ import type { ResponseActionsApiCommandNames, } from '../../../../../../../../common/endpoint/service/response_actions/constants'; import type { NormalizedExternalConnectorClient } from '../../../lib/normalized_external_connector_client'; -import type { - ResponseActionsClientPendingAction, - ResponseActionsClientValidateRequestResponse, - ResponseActionsClientWriteActionRequestToEndpointIndexOptions, -} from '../../../lib/base_response_actions_client'; import { + type ResponseActionsClientPendingAction, + type ResponseActionsClientValidateRequestResponse, + type ResponseActionsClientWriteActionRequestToEndpointIndexOptions, ResponseActionsClientImpl, type ResponseActionsClientOptions, } from '../../../lib/base_response_actions_client'; diff --git a/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/agent/clients/index.ts b/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/agent/clients/index.ts index b21f3b952a4e8..d90d8417ae7bf 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/agent/clients/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/agent/clients/index.ts @@ -9,4 +9,4 @@ export * from './endpoint/endpoint_agent_status_client'; export * from './sentinel_one/sentinel_one_agent_status_client'; export * from './get_agent_status_client'; -export * from './lib/types'; +export type * from './lib/types'; diff --git a/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts b/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts index 8ae82e03aa55f..32acb5275c447 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts @@ -7,8 +7,11 @@ import semver from 'semver'; import { chunk, isEmpty, isEqual, keyBy } from 'lodash'; -import type { ElasticsearchClient } from '@kbn/core/server'; -import { type Logger, type SavedObjectsClientContract } from '@kbn/core/server'; +import { + type Logger, + type SavedObjectsClientContract, + type ElasticsearchClient, +} from '@kbn/core/server'; import { ENDPOINT_ARTIFACT_LISTS, ENDPOINT_LIST_ID } from '@kbn/securitysolution-list-constants'; import type { PackagePolicy } from '@kbn/fleet-plugin/common'; import type { Artifact, PackagePolicyClient } from '@kbn/fleet-plugin/server'; @@ -39,12 +42,10 @@ import { Manifest, } from '../../../lib/artifacts'; -import type { - InternalUnifiedManifestBaseSchema, - InternalUnifiedManifestSchema, - InternalUnifiedManifestUpdateSchema, -} from '../../../schemas/artifacts'; import { + type InternalUnifiedManifestBaseSchema, + type InternalUnifiedManifestSchema, + type InternalUnifiedManifestUpdateSchema, internalArtifactCompleteSchema, type InternalArtifactCompleteSchema, type InternalManifestSchema, diff --git a/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/fleet/endpoint_fleet_services_factory.ts b/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/fleet/endpoint_fleet_services_factory.ts index 1b1e71a4ff8f7..171bc13cbba9c 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/fleet/endpoint_fleet_services_factory.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/fleet/endpoint_fleet_services_factory.ts @@ -13,8 +13,11 @@ import type { PackageClient, } from '@kbn/fleet-plugin/server'; import { AgentNotFoundError } from '@kbn/fleet-plugin/server'; -import type { AgentPolicy } from '@kbn/fleet-plugin/common'; -import { PACKAGE_POLICY_SAVED_OBJECT_TYPE, type PackagePolicy } from '@kbn/fleet-plugin/common'; +import { + PACKAGE_POLICY_SAVED_OBJECT_TYPE, + type PackagePolicy, + type AgentPolicy, +} from '@kbn/fleet-plugin/common'; import type { Logger, SavedObjectsClientContract } from '@kbn/core/server'; import { AgentPolicyNotFoundError, diff --git a/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/get_prebuilt_rule_base_version/get_prebuilt_rule_base_version_handler.ts b/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/get_prebuilt_rule_base_version/get_prebuilt_rule_base_version_handler.ts index 9c04848c1b28c..2e2d281b2f1d2 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/get_prebuilt_rule_base_version/get_prebuilt_rule_base_version_handler.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/get_prebuilt_rule_base_version/get_prebuilt_rule_base_version_handler.ts @@ -9,13 +9,13 @@ import type { KibanaRequest, KibanaResponseFactory } from '@kbn/core/server'; import { transformError } from '@kbn/securitysolution-es-utils'; import { pickBy } from 'lodash'; import type { RuleResponse } from '../../../../../../common/api/detection_engine/model/rule_schema'; -import type { FullRuleDiff } from '../../../../../../common/api/detection_engine/prebuilt_rules'; import { ThreeWayDiffOutcome, type GetPrebuiltRuleBaseVersionRequest, type GetPrebuiltRuleBaseVersionResponseBody, type PartialRuleDiff, type ThreeWayDiff, + type FullRuleDiff, } from '../../../../../../common/api/detection_engine/prebuilt_rules'; import type { SecuritySolutionRequestHandlerContext } from '../../../../../types'; import { buildSiemResponse } from '../../../routes/utils'; diff --git a/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/perform_rule_upgrade/diffable_rule_fields_mappings.ts b/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/perform_rule_upgrade/diffable_rule_fields_mappings.ts index 32ba541dcd3b6..4ed4a3032faa1 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/perform_rule_upgrade/diffable_rule_fields_mappings.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/perform_rule_upgrade/diffable_rule_fields_mappings.ts @@ -12,8 +12,8 @@ import type { InlineKqlQuery, ThreeWayDiff, DiffableRuleTypes, + AllFieldsDiff, } from '../../../../../../common/api/detection_engine'; -import { type AllFieldsDiff } from '../../../../../../common/api/detection_engine'; import type { PrebuiltRuleAsset } from '../../model/rule_assets/prebuilt_rule_asset'; /** diff --git a/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/revert_prebuilt_rule/revert_prebuilt_rule_handler.ts b/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/revert_prebuilt_rule/revert_prebuilt_rule_handler.ts index 446691755a8e8..e95eee344905c 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/revert_prebuilt_rule/revert_prebuilt_rule_handler.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/revert_prebuilt_rule/revert_prebuilt_rule_handler.ts @@ -9,8 +9,8 @@ import type { IKibanaResponse, KibanaRequest, KibanaResponseFactory } from '@kbn import { transformError } from '@kbn/securitysolution-es-utils'; import { getErrorMessage, getErrorStatusCode } from '../../../../../utils/error_helpers'; import type { RuleResponse } from '../../../../../../common/api/detection_engine/model/rule_schema'; -import type { BulkActionReversionSkipResult } from '../../../../../../common/api/detection_engine/prebuilt_rules'; import { + type BulkActionReversionSkipResult, type RevertPrebuiltRulesRequest, type RevertPrebuiltRulesResponseBody, } from '../../../../../../common/api/detection_engine/prebuilt_rules'; diff --git a/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/rule_source_importer/index.ts b/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/rule_source_importer/index.ts index 616c3d28eae95..28dc3d1d7b8d6 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/rule_source_importer/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/rule_source_importer/index.ts @@ -5,5 +5,5 @@ * 2.0. */ -export * from './rule_source_importer_interface'; +export type * from './rule_source_importer_interface'; export * from './rule_source_importer'; diff --git a/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/rule_monitoring/index.ts b/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/rule_monitoring/index.ts index 9031a5949394c..f37e06b04cff8 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/rule_monitoring/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/rule_monitoring/index.ts @@ -9,6 +9,6 @@ export * from './api/register_routes'; export { RULE_EXECUTION_LOG_PROVIDER } from './logic/event_log/event_log_constants'; export * from './logic/detection_engine_health'; export * from './logic/rule_execution_log'; -export * from './logic/service_interface'; +export type * from './logic/service_interface'; export * from './logic/service'; export { truncateList } from './logic/utils/normalization'; diff --git a/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/detection_engine_health/index.ts b/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/detection_engine_health/index.ts index 5d0c8ed6743ea..e00ce43f9f0ff 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/detection_engine_health/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/detection_engine_health/index.ts @@ -5,5 +5,5 @@ * 2.0. */ -export * from './detection_engine_health_client_interface'; +export type * from './detection_engine_health_client_interface'; export * from './detection_engine_health_client'; diff --git a/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/index.ts b/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/index.ts index a3309b270de21..6743e3a5e641e 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -export * from './client_for_executors/client_interface'; -export * from './client_for_routes/client_interface'; +export type * from './client_for_executors/client_interface'; +export type * from './client_for_routes/client_interface'; export { createRuleExecutionSummary } from './create_rule_execution_summary'; diff --git a/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/rule_types/utils/source_fields_merging/index.ts b/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/rule_types/utils/source_fields_merging/index.ts index ff07c898a3a24..c677360bfe241 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/rule_types/utils/source_fields_merging/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/rule_types/utils/source_fields_merging/index.ts @@ -4,6 +4,6 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -export * from './types'; +export type * from './types'; export * from './strategies'; export * from './utils'; diff --git a/x-pack/solutions/security/plugins/security_solution/server/lib/entity_analytics/entity_store/tasks/data_view_refresh/data_view_refresh_task.ts b/x-pack/solutions/security/plugins/security_solution/server/lib/entity_analytics/entity_store/tasks/data_view_refresh/data_view_refresh_task.ts index ddca80533dee7..0ff293b40fcc1 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/lib/entity_analytics/entity_store/tasks/data_view_refresh/data_view_refresh_task.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/lib/entity_analytics/entity_store/tasks/data_view_refresh/data_view_refresh_task.ts @@ -6,8 +6,12 @@ */ import moment from 'moment'; -import type { AnalyticsServiceSetup, AuditLogger } from '@kbn/core/server'; -import { type Logger, SavedObjectsErrorHelpers } from '@kbn/core/server'; +import { + type Logger, + type AnalyticsServiceSetup, + type AuditLogger, + SavedObjectsErrorHelpers, +} from '@kbn/core/server'; import type { ConcreteTaskInstance, TaskManagerSetupContract, diff --git a/x-pack/solutions/security/plugins/security_solution/server/lib/entity_analytics/privilege_monitoring/routes/monitoring_entity_source/monitoring_entity_source.ts b/x-pack/solutions/security/plugins/security_solution/server/lib/entity_analytics/privilege_monitoring/routes/monitoring_entity_source/monitoring_entity_source.ts index 0287d29d10ab4..147519cee893d 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/lib/entity_analytics/privilege_monitoring/routes/monitoring_entity_source/monitoring_entity_source.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/lib/entity_analytics/privilege_monitoring/routes/monitoring_entity_source/monitoring_entity_source.ts @@ -16,14 +16,12 @@ import { ENABLE_PRIVILEGED_USER_MONITORING_SETTING, } from '../../../../../../common/constants'; import type { EntityAnalyticsRoutesDeps } from '../../../types'; -import type { - GetEntitySourceResponse, - UpdateEntitySourceResponse, -} from '../../../../../../common/api/entity_analytics/privilege_monitoring/monitoring_entity_source/monitoring_entity_source.gen'; import { CreateEntitySourceRequestBody, UpdateEntitySourceRequestBody, type CreateEntitySourceResponse, + type GetEntitySourceResponse, + type UpdateEntitySourceResponse, GetEntitySourceRequestParams, UpdateEntitySourceRequestParams, } from '../../../../../../common/api/entity_analytics/privilege_monitoring/monitoring_entity_source/monitoring_entity_source.gen'; diff --git a/x-pack/solutions/security/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_risk_scores.test.ts b/x-pack/solutions/security/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_risk_scores.test.ts index 5408501ae0e38..5688c50c422a6 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_risk_scores.test.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_risk_scores.test.ts @@ -170,6 +170,7 @@ describe('calculateRiskScores()', () => { }); it('should add the filter when excludeAlertStatuses is not empty', async () => { + // eslint-disable-next-line @typescript-eslint/no-unused-expressions esClient.search as jest.Mock; params = { ...params, excludeAlertStatuses: ['closed'] }; await calculateRiskScores(params); diff --git a/x-pack/solutions/security/plugins/security_solution/server/lib/entity_analytics/utils/event_ingested_pipeline.ts b/x-pack/solutions/security/plugins/security_solution/server/lib/entity_analytics/utils/event_ingested_pipeline.ts index 1db5b117d74b7..ccf9c86b14e9e 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/lib/entity_analytics/utils/event_ingested_pipeline.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/lib/entity_analytics/utils/event_ingested_pipeline.ts @@ -5,8 +5,11 @@ * 2.0. */ -import type { SavedObjectsClientContract } from '@kbn/core/server'; -import { SavedObjectsClient, type ElasticsearchClient } from '@kbn/core/server'; +import { + SavedObjectsClient, + type ElasticsearchClient, + type SavedObjectsClientContract, +} from '@kbn/core/server'; import type { EntityAnalyticsMigrationsParams } from '../migrations'; import { getAllSpaceConfigurations } from '../risk_engine/utils/saved_object_configuration'; import { AssetCriticalityMigrationClient } from '../asset_criticality/asset_criticality_migration_client'; diff --git a/x-pack/solutions/security/plugins/security_solution/server/lib/siem_migrations/rules/api/util/update_rules.ts b/x-pack/solutions/security/plugins/security_solution/server/lib/siem_migrations/rules/api/util/update_rules.ts index 864b4e47394b7..77ead9cb4082a 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/lib/siem_migrations/rules/api/util/update_rules.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/lib/siem_migrations/rules/api/util/update_rules.ts @@ -6,10 +6,10 @@ */ import { parseEsqlQuery } from '@kbn/securitysolution-utils'; -import type { UpdateRuleMigrationRule } from '../../../../../../common/siem_migrations/model/rule_migration.gen'; import { RuleMigrationTranslationResultEnum, type RuleMigrationTranslationResult, + type UpdateRuleMigrationRule, } from '../../../../../../common/siem_migrations/model/rule_migration.gen'; import type { InternalUpdateRuleMigrationRule } from '../../types'; diff --git a/x-pack/solutions/security/plugins/security_solution/server/lib/siem_migrations/rules/data/rule_migrations_data_rules_client.ts b/x-pack/solutions/security/plugins/security_solution/server/lib/siem_migrations/rules/data/rule_migrations_data_rules_client.ts index 383be9c112b66..f14932a2eaae5 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/lib/siem_migrations/rules/data/rule_migrations_data_rules_client.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/lib/siem_migrations/rules/data/rule_migrations_data_rules_client.ts @@ -22,13 +22,11 @@ import { SiemMigrationStatus, RuleTranslationResult, } from '../../../../../common/siem_migrations/constants'; -import type { - RuleMigrationAllIntegrationsStats, - RuleMigrationRule, -} from '../../../../../common/siem_migrations/model/rule_migration.gen'; import { type RuleMigrationTaskStats, type RuleMigrationTranslationStats, + type RuleMigrationAllIntegrationsStats, + type RuleMigrationRule, } from '../../../../../common/siem_migrations/model/rule_migration.gen'; import { getSortingOptions, type RuleMigrationSort } from './sort'; import { conditions as searchConditions } from './search'; diff --git a/x-pack/solutions/security/plugins/security_solution/server/lib/siem_migrations/rules/types.ts b/x-pack/solutions/security/plugins/security_solution/server/lib/siem_migrations/rules/types.ts index d803f65102da2..738fa8f740baf 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/lib/siem_migrations/rules/types.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/lib/siem_migrations/rules/types.ts @@ -11,8 +11,8 @@ import type { RuleMigrationRule, RuleMigrationTranslationResult, UpdateRuleMigrationRule, + RuleMigrationResource, } from '../../../../common/siem_migrations/model/rule_migration.gen'; -import { type RuleMigrationResource } from '../../../../common/siem_migrations/model/rule_migration.gen'; import type { RuleVersions } from './data/rule_migrations_data_prebuilt_rules_client'; import type { Stored } from '../types'; import type { SiemMigrationsIndexNameProvider } from '../common/types'; diff --git a/x-pack/solutions/security/plugins/security_solution/server/lib/timeline/__mocks__/request_responses.ts b/x-pack/solutions/security/plugins/security_solution/server/lib/timeline/__mocks__/request_responses.ts index 70187dc9bf40a..7c291b73ec796 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/lib/timeline/__mocks__/request_responses.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/lib/timeline/__mocks__/request_responses.ts @@ -14,13 +14,11 @@ import { TIMELINE_URL, TIMELINE_PREPACKAGED_URL, } from '../../../../common/constants'; -import type { - SavedTimeline, - PatchTimelineRequestBody, - CreateTimelinesRequestBody, - GetTimelineRequestQuery, -} from '../../../../common/api/timeline'; import { + type SavedTimeline, + type PatchTimelineRequestBody, + type CreateTimelinesRequestBody, + type GetTimelineRequestQuery, type TimelineType, TimelineTypeEnum, TimelineStatusEnum, diff --git a/x-pack/solutions/security/plugins/security_solution/server/lib/timeline/saved_object/timelines/convert_saved_object_to_savedtimeline.ts b/x-pack/solutions/security/plugins/security_solution/server/lib/timeline/saved_object/timelines/convert_saved_object_to_savedtimeline.ts index 9ac49a52fae06..791f73d5e06e1 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/lib/timeline/saved_object/timelines/convert_saved_object_to_savedtimeline.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/lib/timeline/saved_object/timelines/convert_saved_object_to_savedtimeline.ts @@ -16,12 +16,12 @@ import { SavedObjectTimelineType, SavedObjectTimelineStatus, } from '../../../../../common/types/timeline/saved_object'; -import type { TimelineResponse } from '../../../../../common/api/timeline'; import { type TimelineType, TimelineTypeEnum, type TimelineStatus, TimelineStatusEnum, + type TimelineResponse, } from '../../../../../common/api/timeline'; // TODO: Added to support legacy TimelineType.draft, can be removed in 7.10 diff --git a/x-pack/solutions/security/plugins/security_solution/server/lib/timeline/utils/failure_cases.ts b/x-pack/solutions/security/plugins/security_solution/server/lib/timeline/utils/failure_cases.ts index 7dace57181239..2b96042c472cd 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/lib/timeline/utils/failure_cases.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/lib/timeline/utils/failure_cases.ts @@ -6,8 +6,12 @@ */ import { isEmpty } from 'lodash/fp'; -import type { TimelineType, TimelineResponse } from '../../../../common/api/timeline'; -import { type TimelineStatus, TimelineStatusEnum } from '../../../../common/api/timeline'; +import { + type TimelineStatus, + type TimelineType, + type TimelineResponse, + TimelineStatusEnum, +} from '../../../../common/api/timeline'; export const UPDATE_TIMELINE_ERROR_MESSAGE = 'You cannot create new timelines with PATCH. Use POST instead.'; diff --git a/x-pack/solutions/security/plugins/security_solution/server/lib/timeline/utils/timeline_object.ts b/x-pack/solutions/security/plugins/security_solution/server/lib/timeline/utils/timeline_object.ts index 44afe078f9104..4d7d203f50d14 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/lib/timeline/utils/timeline_object.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/lib/timeline/utils/timeline_object.ts @@ -5,9 +5,9 @@ * 2.0. */ -import type { TimelineResponse } from '../../../../common/api/timeline'; import { type TimelineType, + type TimelineResponse, TimelineTypeEnum, TimelineStatusEnum, } from '../../../../common/api/timeline'; diff --git a/x-pack/solutions/security/plugins/security_solution/server/utils/promise_pool.ts b/x-pack/solutions/security/plugins/security_solution/server/utils/promise_pool.ts index 45c1cc9e95013..c371f89848054 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/utils/promise_pool.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/utils/promise_pool.ts @@ -73,7 +73,7 @@ export const initPromisePool = async ({ outcome.errors.push({ item, error }); }) .finally(() => { - tasks.splice(tasks.indexOf(task), 1); + void tasks.splice(tasks.indexOf(task), 1); }); tasks.push(task); diff --git a/x-pack/solutions/security/plugins/session_view/common/types/latest.ts b/x-pack/solutions/security/plugins/session_view/common/types/latest.ts index dce95e7328199..ca233e28b7864 100644 --- a/x-pack/solutions/security/plugins/session_view/common/types/latest.ts +++ b/x-pack/solutions/security/plugins/session_view/common/types/latest.ts @@ -4,4 +4,4 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -export * from './v1'; +export type * from './v1'; diff --git a/x-pack/solutions/security/test/functional/page_objects/detections.ts b/x-pack/solutions/security/test/functional/page_objects/detections.ts index b1bfd02cc12bb..cb51497088ea0 100644 --- a/x-pack/solutions/security/test/functional/page_objects/detections.ts +++ b/x-pack/solutions/security/test/functional/page_objects/detections.ts @@ -48,7 +48,7 @@ export class DetectionsPageObject extends FtrService { async replaceIndexPattern(): Promise { const buttons = await this.find.allByCssSelector('[data-test-subj="comboBoxInput"] button'); - await buttons.map(async (button: WebElementWrapper) => await button.click()); + await Promise.all(buttons.map(async (button: WebElementWrapper) => await button.click())); await this.testSubjects.setValue('comboBoxSearchInput', '*'); } diff --git a/yarn.lock b/yarn.lock index d10c911430196..ba3ad5f389ca6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2869,17 +2869,17 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.25.5.tgz#7fc114af5f6563f19f73324b5d5ff36ece0803d1" integrity sha512-TXv6YnJ8ZMVdX+SXWVBo/0p8LTcrUYngpWjvm91TMjjBQii7Oz11Lw5lbDV5Y0TzuhSJHwiH4hEtC1I42mMS0g== -"@eslint-community/eslint-utils@^4.2.0": - version "4.4.0" - resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" - integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== +"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": + version "4.7.0" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz#607084630c6c033992a082de6e6fbc1a8b52175a" + integrity sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw== dependencies: - eslint-visitor-keys "^3.3.0" + eslint-visitor-keys "^3.4.3" -"@eslint-community/regexpp@^4.4.0", "@eslint-community/regexpp@^4.6.1": - version "4.6.2" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.6.2.tgz#1816b5f6948029c5eaacb0703b850ee0cb37d8f8" - integrity sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw== +"@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.6.1": + version "4.12.1" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.1.tgz#cfc6cffe39df390a3841cde2abccf92eaa7ae0e0" + integrity sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ== "@eslint/eslintrc@^2.1.4": version "2.1.4" @@ -13445,11 +13445,6 @@ "@types/node" "*" "@types/ws" "*" -"@types/semver@^7.3.12": - version "7.5.3" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.3.tgz#9a726e116beb26c24f1ccd6850201e1246122e04" - integrity sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw== - "@types/semver@^7.3.4", "@types/semver@^7.5.1": version "7.5.8" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e" @@ -13849,69 +13844,118 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@^5.62.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz#aeef0328d172b9e37d9bab6dbc13b87ed88977db" - integrity sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag== +"@typescript-eslint/eslint-plugin@^8.16.0": + version "8.36.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.36.0.tgz#880ce277f8a30ccf539ec027acac157088f131ae" + integrity sha512-lZNihHUVB6ZZiPBNgOQGSxUASI7UJWhT8nHyUGCnaQ28XFCw98IfrMCG3rUl1uwUWoAvodJQby2KTs79UTcrAg== dependencies: - "@eslint-community/regexpp" "^4.4.0" - "@typescript-eslint/scope-manager" "5.62.0" - "@typescript-eslint/type-utils" "5.62.0" - "@typescript-eslint/utils" "5.62.0" - debug "^4.3.4" + "@eslint-community/regexpp" "^4.10.0" + "@typescript-eslint/scope-manager" "8.36.0" + "@typescript-eslint/type-utils" "8.36.0" + "@typescript-eslint/utils" "8.36.0" + "@typescript-eslint/visitor-keys" "8.36.0" graphemer "^1.4.0" - ignore "^5.2.0" - natural-compare-lite "^1.4.0" - semver "^7.3.7" - tsutils "^3.21.0" + ignore "^7.0.0" + natural-compare "^1.4.0" + ts-api-utils "^2.1.0" -"@typescript-eslint/parser@^5.62.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.62.0.tgz#1b63d082d849a2fcae8a569248fbe2ee1b8a56c7" - integrity sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA== +"@typescript-eslint/parser@^8.16.0": + version "8.36.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.36.0.tgz#003007fe2030013936b6634b9cf52c457d36ed42" + integrity sha512-FuYgkHwZLuPbZjQHzJXrtXreJdFMKl16BFYyRrLxDhWr6Qr7Kbcu2s1Yhu8tsiMXw1S0W1pjfFfYEt+R604s+Q== dependencies: - "@typescript-eslint/scope-manager" "5.62.0" - "@typescript-eslint/types" "5.62.0" - "@typescript-eslint/typescript-estree" "5.62.0" + "@typescript-eslint/scope-manager" "8.36.0" + "@typescript-eslint/types" "8.36.0" + "@typescript-eslint/typescript-estree" "8.36.0" + "@typescript-eslint/visitor-keys" "8.36.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.62.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz#d9457ccc6a0b8d6b37d0eb252a23022478c5460c" - integrity sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w== +"@typescript-eslint/project-service@8.36.0": + version "8.36.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/project-service/-/project-service-8.36.0.tgz#0c4acdcbe56476a43cdabaac1f08819424a379fd" + integrity sha512-JAhQFIABkWccQYeLMrHadu/fhpzmSQ1F1KXkpzqiVxA/iYI6UnRt2trqXHt1sYEcw1mxLnB9rKMsOxXPxowN/g== dependencies: - "@typescript-eslint/types" "5.62.0" - "@typescript-eslint/visitor-keys" "5.62.0" + "@typescript-eslint/tsconfig-utils" "^8.36.0" + "@typescript-eslint/types" "^8.36.0" + debug "^4.3.4" -"@typescript-eslint/scope-manager@^8.15.0": - version "8.25.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.25.0.tgz#ac3805077aade898e98ca824294c998545597df3" - integrity sha512-6PPeiKIGbgStEyt4NNXa2ru5pMzQ8OYKO1hX1z53HMomrmiSB+R5FmChgQAP1ro8jMtNawz+TRQo/cSXrauTpg== +"@typescript-eslint/scope-manager@8.16.0": + version "8.16.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.16.0.tgz#ebc9a3b399a69a6052f3d88174456dd399ef5905" + integrity sha512-mwsZWubQvBki2t5565uxF0EYvG+FwdFb8bMtDuGQLdCCnGPrDEDvm1gtfynuKlnpzeBRqdFCkMf9jg1fnAK8sg== dependencies: - "@typescript-eslint/types" "8.25.0" - "@typescript-eslint/visitor-keys" "8.25.0" + "@typescript-eslint/types" "8.16.0" + "@typescript-eslint/visitor-keys" "8.16.0" -"@typescript-eslint/type-utils@5.62.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz#286f0389c41681376cdad96b309cedd17d70346a" - integrity sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew== +"@typescript-eslint/scope-manager@8.36.0", "@typescript-eslint/scope-manager@^8.15.0": + version "8.36.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.36.0.tgz#23e4196ed07d7ea3737a584fbebc9a79c3835168" + integrity sha512-wCnapIKnDkN62fYtTGv2+RY8FlnBYA3tNm0fm91kc2BjPhV2vIjwwozJ7LToaLAyb1ca8BxrS7vT+Pvvf7RvqA== + dependencies: + "@typescript-eslint/types" "8.36.0" + "@typescript-eslint/visitor-keys" "8.36.0" + +"@typescript-eslint/tsconfig-utils@8.36.0", "@typescript-eslint/tsconfig-utils@^8.36.0": + version "8.36.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.36.0.tgz#63ef8a20ae9b5754c6ceacbe87b2fe1aab12ba13" + integrity sha512-Nhh3TIEgN18mNbdXpd5Q8mSCBnrZQeY9V7Ca3dqYvNDStNIGRmJA6dmrIPMJ0kow3C7gcQbpsG2rPzy1Ks/AnA== + +"@typescript-eslint/type-utils@8.36.0": + version "8.36.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.36.0.tgz#16b092c2cbbb5549f6a4df1382a481586850502f" + integrity sha512-5aaGYG8cVDd6cxfk/ynpYzxBRZJk7w/ymto6uiyUFtdCozQIsQWh7M28/6r57Fwkbweng8qAzoMCPwSJfWlmsg== dependencies: - "@typescript-eslint/typescript-estree" "5.62.0" - "@typescript-eslint/utils" "5.62.0" + "@typescript-eslint/typescript-estree" "8.36.0" + "@typescript-eslint/utils" "8.36.0" debug "^4.3.4" - tsutils "^3.21.0" + ts-api-utils "^2.1.0" "@typescript-eslint/types@5.62.0": version "5.62.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== -"@typescript-eslint/types@8.25.0": - version "8.25.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.25.0.tgz#f91512c2f532b1d6a8826cadd0b0e5cd53cf97e0" - integrity sha512-+vUe0Zb4tkNgznQwicsvLUJgZIRs6ITeWSCclX1q85pR1iOiaj+4uZJIUp//Z27QWu5Cseiw3O3AR8hVpax7Aw== +"@typescript-eslint/types@8.16.0": + version "8.16.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.16.0.tgz#49c92ae1b57942458ab83d9ec7ccab3005e64737" + integrity sha512-NzrHj6thBAOSE4d9bsuRNMvk+BvaQvmY4dDglgkgGC0EW/tB3Kelnp3tAKH87GEwzoxgeQn9fNGRyFJM/xd+GQ== + +"@typescript-eslint/types@8.36.0", "@typescript-eslint/types@^8.36.0": + version "8.36.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.36.0.tgz#d3d184adc2899e2912c13b17c1590486ef37c7ac" + integrity sha512-xGms6l5cTJKQPZOKM75Dl9yBfNdGeLRsIyufewnxT4vZTrjC0ImQT4fj8QmtJK84F58uSh5HVBSANwcfiXxABQ== -"@typescript-eslint/typescript-estree@5.62.0", "@typescript-eslint/typescript-estree@^5.59.5", "@typescript-eslint/typescript-estree@^5.62.0": +"@typescript-eslint/typescript-estree@8.16.0": + version "8.16.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.16.0.tgz#9d741e56e5b13469b5190e763432ce5551a9300c" + integrity sha512-E2+9IzzXMc1iaBy9zmo+UYvluE3TW7bCGWSF41hVWUE01o8nzr1rvOQYSxelxr6StUvRcTMe633eY8mXASMaNw== + dependencies: + "@typescript-eslint/types" "8.16.0" + "@typescript-eslint/visitor-keys" "8.16.0" + debug "^4.3.4" + fast-glob "^3.3.2" + is-glob "^4.0.3" + minimatch "^9.0.4" + semver "^7.6.0" + ts-api-utils "^1.3.0" + +"@typescript-eslint/typescript-estree@8.36.0", "@typescript-eslint/typescript-estree@^8.16.0": + version "8.36.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.36.0.tgz#344857fa79f71715369554a3cbb6b4ff8695a7bc" + integrity sha512-JaS8bDVrfVJX4av0jLpe4ye0BpAaUW7+tnS4Y4ETa3q7NoZgzYbN9zDQTJ8kPb5fQ4n0hliAt9tA4Pfs2zA2Hg== + dependencies: + "@typescript-eslint/project-service" "8.36.0" + "@typescript-eslint/tsconfig-utils" "8.36.0" + "@typescript-eslint/types" "8.36.0" + "@typescript-eslint/visitor-keys" "8.36.0" + debug "^4.3.4" + fast-glob "^3.3.2" + is-glob "^4.0.3" + minimatch "^9.0.4" + semver "^7.6.0" + ts-api-utils "^2.1.0" + +"@typescript-eslint/typescript-estree@^5.59.5": version "5.62.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz#7d17794b77fabcac615d6a48fb143330d962eb9b" integrity sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA== @@ -13924,19 +13968,15 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.62.0", "@typescript-eslint/utils@^5.10.0", "@typescript-eslint/utils@^6.18.1", "@typescript-eslint/utils@^8.15.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86" - integrity sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ== +"@typescript-eslint/utils@8.16.0", "@typescript-eslint/utils@8.36.0", "@typescript-eslint/utils@^5.10.0", "@typescript-eslint/utils@^6.18.1", "@typescript-eslint/utils@^8.15.0": + version "8.16.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.16.0.tgz#c71264c437157feaa97842809836254a6fc833c3" + integrity sha512-C1zRy/mOL8Pj157GiX4kaw7iyRLKfJXBR3L82hk5kS/GyHcOFmy4YUq/zfZti72I9wnuQtA/+xzft4wCC8PJdA== dependencies: - "@eslint-community/eslint-utils" "^4.2.0" - "@types/json-schema" "^7.0.9" - "@types/semver" "^7.3.12" - "@typescript-eslint/scope-manager" "5.62.0" - "@typescript-eslint/types" "5.62.0" - "@typescript-eslint/typescript-estree" "5.62.0" - eslint-scope "^5.1.1" - semver "^7.3.7" + "@eslint-community/eslint-utils" "^4.4.0" + "@typescript-eslint/scope-manager" "8.16.0" + "@typescript-eslint/types" "8.16.0" + "@typescript-eslint/typescript-estree" "8.16.0" "@typescript-eslint/visitor-keys@5.62.0": version "5.62.0" @@ -13946,14 +13986,22 @@ "@typescript-eslint/types" "5.62.0" eslint-visitor-keys "^3.3.0" -"@typescript-eslint/visitor-keys@8.25.0": - version "8.25.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.25.0.tgz#e8646324cd1793f96e02669cb717a05319403164" - integrity sha512-kCYXKAum9CecGVHGij7muybDfTS2sD3t0L4bJsEZLkyrXUImiCTq1M3LG2SRtOhiHFwMR9wAFplpT6XHYjTkwQ== +"@typescript-eslint/visitor-keys@8.16.0": + version "8.16.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.16.0.tgz#d5086afc060b01ff7a4ecab8d49d13d5a7b07705" + integrity sha512-pq19gbaMOmFE3CbL0ZB8J8BFCo2ckfHBfaIsaOZgBIF4EoISJIdLX5xRhd0FGB0LlHReNRuzoJoMGpTjq8F2CQ== dependencies: - "@typescript-eslint/types" "8.25.0" + "@typescript-eslint/types" "8.16.0" eslint-visitor-keys "^4.2.0" +"@typescript-eslint/visitor-keys@8.36.0": + version "8.36.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.36.0.tgz#7dc6ba4dd037979eb3a3bdd2093aa3604bb73674" + integrity sha512-vZrhV2lRPWDuGoxcmrzRZyxAggPL+qp3WzUrlZD+slFueDiYHxeBa34dUXPuC0RmGKzl4lS5kFJYvKCq9cnNDA== + dependencies: + "@typescript-eslint/types" "8.36.0" + eslint-visitor-keys "^4.2.1" + "@ungap/structured-clone@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" @@ -19381,7 +19429,7 @@ eslint-rule-docs@^1.1.5: resolved "https://registry.yarnpkg.com/eslint-rule-docs/-/eslint-rule-docs-1.1.199.tgz#f4e0befb6907101399624964ce4726f684415630" integrity sha512-0jXhQ2JLavUsV/8HVFrBSHL4EM17cl0veZHAVcF1HOEoPdrr09huADK9/L7CbsqP4tMJy9FG23neUEDH8W/Mmg== -eslint-scope@5.1.1, eslint-scope@^5.1.1: +eslint-scope@5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== @@ -19431,10 +19479,10 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4 resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint-visitor-keys@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz#687bacb2af884fcdda8a6e7d65c606f46a14cd45" - integrity sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw== +eslint-visitor-keys@^4.2.0, eslint-visitor-keys@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz#4cfea60fe7dd0ad8e816e1ed026c1d5251b512c1" + integrity sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ== eslint@^8.57.0: version "8.57.0" @@ -21900,7 +21948,7 @@ ignore@^5.0.5, ignore@^5.1.1, ignore@^5.2.0, ignore@^5.2.1: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== -ignore@^7.0.3, ignore@^7.0.4: +ignore@^7.0.0, ignore@^7.0.3, ignore@^7.0.4: version "7.0.5" resolved "https://registry.yarnpkg.com/ignore/-/ignore-7.0.5.tgz#4cb5f6cd7d4c7ab0365738c7aea888baa6d7efd9" integrity sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg== @@ -25651,11 +25699,6 @@ napi-build-utils@^1.0.1: resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806" integrity sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg== -natural-compare-lite@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" - integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== - natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -29861,7 +29904,7 @@ semver@^6.0.0, semver@^6.1.0, semver@^6.3.0, semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.3.2, semver@^7.3.5, semver@^7.3.7, semver@^7.5.0, semver@^7.5.2, semver@^7.5.3, semver@^7.5.4, semver@^7.6.2, semver@^7.6.3, semver@^7.7.1, semver@^7.7.2: +semver@^7.3.2, semver@^7.3.5, semver@^7.3.7, semver@^7.5.0, semver@^7.5.2, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0, semver@^7.6.2, semver@^7.6.3, semver@^7.7.1, semver@^7.7.2: version "7.7.2" resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.2.tgz#67d99fdcd35cec21e6f8b87a7fd515a33f982b58" integrity sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA== @@ -31977,6 +32020,16 @@ ts-algebra@^2.0.0: resolved "https://registry.yarnpkg.com/ts-algebra/-/ts-algebra-2.0.0.tgz#4e3e0953878f26518fce7f6bb115064a65388b7a" integrity sha512-FPAhNPFMrkwz76P7cdjdmiShwMynZYN6SgOujD1urY4oNm80Ou9oMdmbR45LotcKOXoy7wSmHkRFE6Mxbrhefw== +ts-api-utils@^1.3.0: + version "1.4.3" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.4.3.tgz#bfc2215fe6528fecab2b0fba570a2e8a4263b064" + integrity sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw== + +ts-api-utils@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-2.1.0.tgz#595f7094e46eed364c13fd23e75f9513d29baf91" + integrity sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ== + ts-debounce@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/ts-debounce/-/ts-debounce-4.0.0.tgz#33440ef64fab53793c3d546a8ca6ae539ec15841" @@ -32289,10 +32342,10 @@ typescript-tuple@^2.2.1: dependencies: typescript-compare "^0.0.2" -typescript@5, typescript@5.1.6, typescript@^3.3.3333, typescript@^5.0.4, typescript@^5.5.3: - version "5.1.6" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.1.6.tgz#02f8ac202b6dad2c0dd5e0913745b47a37998274" - integrity sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA== +typescript@5, typescript@5.4.5, typescript@^3.3.3333, typescript@^5.0.4, typescript@^5.5.3: + version "5.4.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611" + integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ== typewise-core@^1.2, typewise-core@^1.2.0: version "1.2.0"