chore(NA): move json type definitions to x-pack root type definitions (#37249)

This commit is contained in:
Tiago Costa 2019-07-02 02:23:38 +01:00 committed by GitHub
parent 48f5d4ceff
commit f7a223d34c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 14 deletions

View file

@ -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;
}

View file

@ -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;
}