Skip to content

Commit

Permalink
TypeScript project references for Observability plugin (#89320)
Browse files Browse the repository at this point in the history
References #80508. References #81003.
  • Loading branch information
smith authored Feb 2, 2021
1 parent ad67ee5 commit 4940a1c
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ interface IndexDocumentResponse {
result: string;
}

interface GetResponse {
export interface GetResponse {
_id: string;
_index: string;
_source: Annotation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { PromiseValueType } from '../../../apm/typings/common';
import type { UnwrapPromise } from '@kbn/utility-types';

export function unwrapEsResponse<T extends Promise<{ body: any }>>(
responsePromise: T
): Promise<PromiseValueType<T>['body']> {
): Promise<UnwrapPromise<T>['body']> {
return responsePromise.then((res) => res.body);
}
22 changes: 22 additions & 0 deletions x-pack/plugins/observability/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"composite": true,
"outDir": "./target/types",
"emitDeclarationOnly": true,
"declaration": true,
"declarationMap": true
},
"include": ["common/**/*", "public/**/*", "server/**/*", "typings/**/*"],
"references": [
{ "path": "../../../src/core/tsconfig.json" },
{ "path": "../../../src/plugins/data/tsconfig.json" },
{ "path": "../../../src/plugins/home/tsconfig.json" },
{ "path": "../../../src/plugins/kibana_react/tsconfig.json" },
{ "path": "../../../src/plugins/kibana_utils/tsconfig.json" },
{ "path": "../../../src/plugins/usage_collection/tsconfig.json" },
{ "path": "../alerts/tsconfig.json" },
{ "path": "../licensing/tsconfig.json" },
{ "path": "../translations/tsconfig.json" }
]
}
1 change: 1 addition & 0 deletions x-pack/test/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
{ "path": "../plugins/cloud/tsconfig.json" },
{ "path": "../plugins/saved_objects_tagging/tsconfig.json" },
{ "path": "../plugins/global_search_bar/tsconfig.json" },
{ "path": "../plugins/observability/tsconfig.json" },
{ "path": "../plugins/ingest_pipelines/tsconfig.json" },
{ "path": "../plugins/license_management/tsconfig.json" },
{ "path": "../plugins/snapshot_restore/tsconfig.json" },
Expand Down
18 changes: 8 additions & 10 deletions x-pack/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"plugins/maps/**/*",
"plugins/maps_file_upload/**/*",
"plugins/maps_legacy_licensing/**/*",
"plugins/observability/**/*",
"plugins/reporting/**/*",
"plugins/searchprofiler/**/*",
"plugins/security_solution/cypress/**/*",
Expand Down Expand Up @@ -67,6 +68,7 @@
{ "path": "../src/plugins/es_ui_shared/tsconfig.json" },
{ "path": "../src/plugins/expressions/tsconfig.json" },
{ "path": "../src/plugins/home/tsconfig.json" },
{ "path": "../src/plugins/index_pattern_management/tsconfig.json" },
{ "path": "../src/plugins/inspector/tsconfig.json" },
{ "path": "../src/plugins/kibana_legacy/tsconfig.json" },
{ "path": "../src/plugins/kibana_overview/tsconfig.json" },
Expand All @@ -89,9 +91,8 @@
{ "path": "../src/plugins/ui_actions/tsconfig.json" },
{ "path": "../src/plugins/url_forwarding/tsconfig.json" },
{ "path": "../src/plugins/usage_collection/tsconfig.json" },
{ "path": "../src/plugins/index_pattern_management/tsconfig.json" },
{ "path": "./plugins/actions/tsconfig.json"},
{ "path": "./plugins/alerts/tsconfig.json"},
{ "path": "./plugins/actions/tsconfig.json" },
{ "path": "./plugins/alerts/tsconfig.json" },
{ "path": "./plugins/beats_management/tsconfig.json" },
{ "path": "./plugins/canvas/tsconfig.json" },
{ "path": "./plugins/cloud/tsconfig.json" },
Expand All @@ -109,28 +110,25 @@
{ "path": "./plugins/global_search_providers/tsconfig.json" },
{ "path": "./plugins/global_search/tsconfig.json" },
{ "path": "./plugins/graph/tsconfig.json" },
{ "path": "./plugins/grokdebugger/tsconfig.json" },
{ "path": "./plugins/ingest_pipelines/tsconfig.json" },
{ "path": "./plugins/lens/tsconfig.json" },
{ "path": "./plugins/license_management/tsconfig.json" },
{ "path": "./plugins/licensing/tsconfig.json" },
{ "path": "./plugins/maps_file_upload/tsconfig.json" },
{ "path": "./plugins/maps_legacy_licensing/tsconfig.json" },
{ "path": "./plugins/maps/tsconfig.json" },
{ "path": "./plugins/observability/tsconfig.json" },
{ "path": "./plugins/painless_lab/tsconfig.json" },
{ "path": "./plugins/saved_objects_tagging/tsconfig.json" },
{ "path": "./plugins/searchprofiler/tsconfig.json" },
{ "path": "./plugins/security/tsconfig.json" },
{ "path": "./plugins/snapshot_restore/tsconfig.json" },
{ "path": "./plugins/spaces/tsconfig.json" },
{ "path": "./plugins/stack_alerts/tsconfig.json" },
{ "path": "./plugins/task_manager/tsconfig.json" },
{ "path": "./plugins/telemetry_collection_xpack/tsconfig.json" },
{ "path": "./plugins/translations/tsconfig.json" },
{ "path": "./plugins/triggers_actions_ui/tsconfig.json"},
{ "path": "./plugins/stack_alerts/tsconfig.json"},
{ "path": "./plugins/snapshot_restore/tsconfig.json" },
{ "path": "./plugins/grokdebugger/tsconfig.json" },
{ "path": "./plugins/ingest_pipelines/tsconfig.json"},
{ "path": "./plugins/license_management/tsconfig.json" },
{ "path": "./plugins/painless_lab/tsconfig.json" },
{ "path": "./plugins/triggers_actions_ui/tsconfig.json" },
{ "path": "./plugins/ui_actions_enhanced/tsconfig.json" },
{ "path": "./plugins/watcher/tsconfig.json" }
Expand Down
17 changes: 4 additions & 13 deletions x-pack/tsconfig.refs.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,36 +21,27 @@
{ "path": "./plugins/global_search_providers/tsconfig.json" },
{ "path": "./plugins/global_search/tsconfig.json" },
{ "path": "./plugins/graph/tsconfig.json" },
{ "path": "./plugins/grokdebugger/tsconfig.json" },
{ "path": "./plugins/ingest_pipelines/tsconfig.json" },
{ "path": "./plugins/lens/tsconfig.json" },
{ "path": "./plugins/license_management/tsconfig.json" },
{ "path": "./plugins/licensing/tsconfig.json" },
{ "path": "./plugins/maps_file_upload/tsconfig.json" },
{ "path": "./plugins/maps_legacy_licensing/tsconfig.json" },
{ "path": "./plugins/maps/tsconfig.json" },
{ "path": "./plugins/observability/tsconfig.json" },
{ "path": "./plugins/painless_lab/tsconfig.json" },
{ "path": "./plugins/reporting/tsconfig.json" },
{ "path": "./plugins/saved_objects_tagging/tsconfig.json" },
{ "path": "./plugins/searchprofiler/tsconfig.json" },
{ "path": "./plugins/security/tsconfig.json" },
{ "path": "./plugins/snapshot_restore/tsconfig.json" },
{ "path": "./plugins/spaces/tsconfig.json" },
{ "path": "./plugins/stack_alerts/tsconfig.json" },
{ "path": "./plugins/task_manager/tsconfig.json" },
{ "path": "./plugins/telemetry_collection_xpack/tsconfig.json" },
{ "path": "./plugins/translations/tsconfig.json" },
{ "path": "./plugins/triggers_actions_ui/tsconfig.json" },
{ "path": "./plugins/spaces/tsconfig.json" },
{ "path": "./plugins/security/tsconfig.json" },
{ "path": "./plugins/stack_alerts/tsconfig.json" },
{ "path": "./plugins/encrypted_saved_objects/tsconfig.json" },
{ "path": "./plugins/beats_management/tsconfig.json" },
{ "path": "./plugins/cloud/tsconfig.json" },
{ "path": "./plugins/saved_objects_tagging/tsconfig.json" },
{ "path": "./plugins/global_search_bar/tsconfig.json" },
{ "path": "./plugins/snapshot_restore/tsconfig.json" },
{ "path": "./plugins/grokdebugger/tsconfig.json" },
{ "path": "./plugins/ingest_pipelines/tsconfig.json" },
{ "path": "./plugins/license_management/tsconfig.json" },
{ "path": "./plugins/painless_lab/tsconfig.json" },
{ "path": "./plugins/ui_actions_enhanced/tsconfig.json" },
{ "path": "./plugins/watcher/tsconfig.json" }
]
Expand Down

0 comments on commit 4940a1c

Please sign in to comment.