[Typescript]: Move elastic/eui typings to single file (#26127)

* [Typescript]: Move elastic/eui typings to single file

* [Typescript]: Add typings folder to copyTask when building distributable
This commit is contained in:
Sébastien Loix 2018-11-26 08:28:10 +01:00 committed by GitHub
parent 0743bbcb78
commit 4911a10c73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 33 additions and 478 deletions

View file

@ -40,6 +40,7 @@ export const CopySourceTask = {
'!src/functional_test_runner/**',
'!src/dev/**',
'bin/**',
'typings/**',
'webpackShims/**',
'config/kibana.yml',
'tsconfig*.json',

View file

@ -41,7 +41,8 @@ export const TranspileTypescriptTask = {
...browserProject.config,
include: [
...browserProject.config.include,
'src/**/public/**/*'
'src/**/public/**/*',
'typings/**/*'
]
}));

View file

@ -17,10 +17,6 @@
* under the License.
*/
declare module '@elastic/eui' {
export const EuiPopoverTitle: React.SFC<any>;
}
import {
EuiButtonEmpty,
EuiForm,

View file

@ -19,12 +19,8 @@
import { IndexPattern } from 'ui/index_patterns';
declare module '@elastic/eui' {
export const EuiOutsideClickDetector: SFC<any>;
}
import { debounce, isEqual } from 'lodash';
import React, { Component, SFC } from 'react';
import React, { Component } from 'react';
import { getFromLegacyIndexPattern } from 'ui/index_patterns/static_utils';
import { kfetch } from 'ui/kfetch';
import { PersistedLog } from 'ui/persisted_log';

View file

@ -17,11 +17,6 @@
* under the License.
*/
// TODO: Remove once typescript definitions are in EUI
declare module '@elastic/eui' {
export const EuiCopy: React.SFC<any>;
}
import React, { Component } from 'react';
import {

View file

@ -17,11 +17,6 @@
* under the License.
*/
// TODO: Remove once typescript definitions are in EUI
declare module '@elastic/eui' {
export const EuiWrappingPopover: React.SFC<any>;
}
import React from 'react';
import ReactDOM from 'react-dom';

View file

@ -47,7 +47,8 @@
"importHelpers": true
},
"include": [
"src/**/*"
"src/**/*",
"typings/**/*"
],
"exclude": [
"src/**/__fixtures__/**/*",

27
typings/@elastic/eui/index.d.ts vendored Normal file
View file

@ -0,0 +1,27 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
// TODO: Remove once typescript definitions are in EUI
declare module '@elastic/eui' {
export const EuiWrappingPopover: React.SFC<any>;
export const EuiCopy: React.SFC<any>;
export const EuiPopoverTitle: React.SFC<any>;
export const EuiOutsideClickDetector: React.SFC<any>;
}

File diff suppressed because one or more lines are too long