chore(NA): move json type definitions to x-pack root type definitions (#37249)
This commit is contained in:
parent
48f5d4ceff
commit
f7a223d34c
|
@ -1,14 +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.
|
||||
*/
|
||||
|
||||
// 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
|
||||
declare module '*.json' {
|
||||
const json: any;
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
export default json;
|
||||
}
|
9
x-pack/typings/index.d.ts
vendored
9
x-pack/typings/index.d.ts
vendored
|
@ -24,3 +24,12 @@ type PublicMethodsOf<T> = Pick<T, MethodKeysOf<T>>;
|
|||
declare module 'axios/lib/adapters/xhr';
|
||||
|
||||
type MockedKeys<T> = { [P in keyof T]: jest.Mocked<T[P]> };
|
||||
|
||||
// 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
|
||||
declare module '*.json' {
|
||||
const json: any;
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
export default json;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue