[7.x] Remove redundant x-pack/typings
. (#55083)
This commit is contained in:
parent
dc1b1f504e
commit
c0868965af
|
@ -7,7 +7,10 @@
|
|||
]
|
||||
},
|
||||
"include": [
|
||||
"**/*"
|
||||
"**/*",
|
||||
"../typings/**/*"
|
||||
],
|
||||
"exclude": []
|
||||
"exclude": [
|
||||
"../typings/jest.d.ts"
|
||||
]
|
||||
}
|
||||
|
|
25
x-pack/test/typings/hapi.d.ts
vendored
25
x-pack/test/typings/hapi.d.ts
vendored
|
@ -1,25 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License;
|
||||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import 'hapi';
|
||||
|
||||
import { XPackMainPlugin } from '../../legacy/plugins/xpack_main/server/xpack_main';
|
||||
import { SecurityPlugin } from '../../legacy/plugins/security';
|
||||
import { ActionsPlugin, ActionsClient } from '../../legacy/plugins/actions';
|
||||
import { AlertingPlugin, AlertsClient } from '../../legacy/plugins/alerting';
|
||||
|
||||
declare module 'hapi' {
|
||||
interface Request {
|
||||
getActionsClient?: () => ActionsClient;
|
||||
getAlertsClient?: () => AlertsClient;
|
||||
}
|
||||
interface PluginProperties {
|
||||
xpack_main: XPackMainPlugin;
|
||||
security?: SecurityPlugin;
|
||||
actions?: ActionsPlugin;
|
||||
alerting?: AlertingPlugin;
|
||||
}
|
||||
}
|
7
x-pack/test/typings/hapi_basic.d.ts
vendored
7
x-pack/test/typings/hapi_basic.d.ts
vendored
|
@ -1,7 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License;
|
||||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
declare module '@hapi/basic';
|
28
x-pack/test/typings/index.d.ts
vendored
28
x-pack/test/typings/index.d.ts
vendored
|
@ -1,28 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License;
|
||||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
declare module '*.html' {
|
||||
const template: string;
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
export default template;
|
||||
}
|
||||
|
||||
declare module 'lodash/internal/toPath' {
|
||||
function toPath(value: string | string[]): string[];
|
||||
export = toPath;
|
||||
}
|
||||
|
||||
declare module '*.json' {
|
||||
const json: any;
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
export default json;
|
||||
}
|
||||
|
||||
type MethodKeysOf<T> = {
|
||||
[K in keyof T]: T[K] extends (...args: any[]) => any ? K : never;
|
||||
}[keyof T];
|
||||
|
||||
type PublicMethodsOf<T> = Pick<T, MethodKeysOf<T>>;
|
9
x-pack/typings/index.d.ts
vendored
9
x-pack/typings/index.d.ts
vendored
|
@ -27,15 +27,6 @@ type Writable<T> = {
|
|||
-readonly [K in keyof T]: T[K];
|
||||
};
|
||||
|
||||
type MockedKeys<T> = { [P in keyof T]: jest.Mocked<Writable<T[P]>> };
|
||||
|
||||
type DeeplyMockedKeys<T> = {
|
||||
[P in keyof T]: T[P] extends (...args: any[]) => any
|
||||
? jest.MockInstance<ReturnType<T[P]>, Parameters<T[P]>>
|
||||
: DeeplyMockedKeys<T[P]>;
|
||||
} &
|
||||
T;
|
||||
|
||||
// allow JSON files to be imported directly without lint errors
|
||||
// see: https://github.com/palantir/tslint/issues/1264#issuecomment-228433367
|
||||
// and: https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#arbitrary-expressions-are-forbidden-in-export-assignments-in-ambient-contexts
|
||||
|
|
|
@ -4,8 +4,16 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
// https://github.com/styled-components/jest-styled-components/issues/264
|
||||
type MockedKeys<T> = { [P in keyof T]: jest.Mocked<Writable<T[P]>> };
|
||||
|
||||
type DeeplyMockedKeys<T> = {
|
||||
[P in keyof T]: T[P] extends (...args: any[]) => any
|
||||
? jest.MockInstance<ReturnType<T[P]>, Parameters<T[P]>>
|
||||
: DeeplyMockedKeys<T[P]>;
|
||||
} &
|
||||
T;
|
||||
|
||||
// https://github.com/styled-components/jest-styled-components/issues/264
|
||||
declare namespace jest {
|
||||
interface AsymmetricMatcher {
|
||||
$$typeof: Symbol; //eslint-disable-line
|
Loading…
Reference in a new issue