* Mocks for CoreStart, CoreSetup and PluginInitializerContext
* Public CoreStart, CoreSetup mocks
* Update api signature/docs
* Convert embaddable_api tests to new core mocks
* CR Feedback
* Introduce ui_new_platform.test.mocks and refactor embedabble tests
* Hack to get TS warnings for Core mocks
* Core mocks types cleanup & hack to get TS warnings for Server Core mocks
* Use __mocks__ new_platform
* Remove accidently commited auto-mock
* Introduce MockedKeys type for Core mocks
* Better typing/docs for UiSettings
* Revert "Use __mocks__ new_platform"
This reverts commit 2d666facc8
.
* Add missing mock to test
* Cleanup UiSettings types
26 lines
759 B
TypeScript
26 lines
759 B
TypeScript
/*
|
|
* 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;
|
|
}
|
|
|
|
type MethodKeysOf<T> = {
|
|
[K in keyof T]: T[K] extends (...args: any[]) => any ? K : never
|
|
}[keyof T];
|
|
|
|
type PublicMethodsOf<T> = Pick<T, MethodKeysOf<T>>;
|
|
|
|
declare module 'axios/lib/adapters/xhr';
|
|
|
|
type MockedKeys<T> = { [P in keyof T]: jest.Mocked<T[P]> };
|