Skip to content

Commit d1827dc

Browse files
authored
Add tsconfig for url_forwarding (#81177)
Also add missing pieces to kibana_react, as a follow-up to #80992. References #80508 References #81003
1 parent 5996bc3 commit d1827dc

File tree

18 files changed

+173
-29
lines changed

18 files changed

+173
-29
lines changed

src/core/public/apm_system.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
jest.mock('@elastic/apm-rum');
2121
import { init, apm } from '@elastic/apm-rum';
22+
import { DeeplyMockedKeys } from '../typings';
2223
import { ApmSystem } from './apm_system';
2324

2425
const initMock = init as jest.Mocked<typeof init>;

src/core/public/chrome/chrome_service.mock.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*/
1919
import { BehaviorSubject } from 'rxjs';
2020
import type { PublicMethodsOf } from '@kbn/utility-types';
21+
import { DeeplyMockedKeys } from '../../typings';
2122
import { ChromeBadge, ChromeBrand, ChromeBreadcrumb, ChromeService, InternalChromeStart } from './';
2223

2324
const createStartContractMock = () => {

src/core/public/notifications/notifications_service.mock.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
* under the License.
1818
*/
1919
import type { PublicMethodsOf } from '@kbn/utility-types';
20+
import { MockedKeys } from '../../typings';
2021
import {
2122
NotificationsService,
2223
NotificationsSetup,

src/core/public/overlays/overlay_service.mock.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
* under the License.
1818
*/
1919
import type { PublicMethodsOf } from '@kbn/utility-types';
20+
import { DeeplyMockedKeys } from '../../typings';
2021
import { OverlayService, OverlayStart } from './overlay_service';
2122
import { overlayBannersServiceMock } from './banners/banners_service.mock';
2223
import { overlayFlyoutServiceMock } from './flyout/flyout_service.mock';

src/core/server/core_context.mock.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*/
1919

2020
import { REPO_ROOT } from '@kbn/dev-utils';
21+
import { DeeplyMockedKeys } from '../typings';
2122
import { CoreContext } from './core_context';
2223
import { Env, IConfigService } from './config';
2324
import { configServiceMock, getEnvOptions } from './config/mocks';

src/core/server/elasticsearch/client/mocks.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*/
1919
import { Client, ApiResponse } from '@elastic/elasticsearch';
2020
import { TransportRequestPromise } from '@elastic/elasticsearch/lib/Transport';
21+
import { DeeplyMockedKeys } from '../../../typings';
2122
import { ElasticsearchClient } from './types';
2223
import { ICustomClusterClient } from './cluster_client';
2324

src/core/server/mocks.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import { of } from 'rxjs';
2020
import { duration } from 'moment';
2121
import { ByteSizeValue } from '@kbn/config-schema';
22+
import { MockedKeys } from '../typings';
2223
import { PluginInitializerContext, CoreSetup, CoreStart, StartServicesAccessor } from '.';
2324
import { loggingSystemMock } from './logging/logging_system.mock';
2425
import { loggingServiceMock } from './logging/logging_service.mock';

src/core/typings.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
* under the License.
1818
*/
1919

20-
type DeeplyMockedKeys<T> = {
20+
export type DeeplyMockedKeys<T> = {
2121
[P in keyof T]: T[P] extends (...args: any[]) => any
2222
? jest.MockInstance<ReturnType<T[P]>, Parameters<T[P]>>
2323
: DeeplyMockedKeys<T[P]>;
2424
} &
2525
T;
2626

27-
type MockedKeys<T> = { [P in keyof T]: jest.Mocked<T[P]> };
27+
export type MockedKeys<T> = { [P in keyof T]: jest.Mocked<T[P]> };
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import { Injectable, IDirectiveFactory, IScope, IAttributes, IController } from 'angular';
21+
22+
export const createTopNavDirective: Injectable<IDirectiveFactory<
23+
IScope,
24+
JQLite,
25+
IAttributes,
26+
IController
27+
>>;
28+
export const createTopNavHelper: (
29+
options: unknown
30+
) => Injectable<IDirectiveFactory<IScope, JQLite, IAttributes, IController>>;
31+
export function loadKbnTopNavDirectives(navUi: unknown): void;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
export function PromiseServiceCreator($q: unknown, $timeout: unknown): (fn: unknown) => unknown;

0 commit comments

Comments
 (0)