Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## [`master`](https://github.com/elastic/eui/tree/master)

- Converted `EuiModal` and `EuiConfirmModal` to TypeScript ([#2742](https://github.com/elastic/eui/pull/2742))
- Converted `EuiTabs` to TypeScript ([#2717](https://github.com/elastic/eui/pull/2717))
- Converted `EuiFormRow` to TypeScript ([#2712](https://github.com/elastic/eui/pull/2712))
- Updated `logoAPM`, `logoSecurity` and `logoEnterpriseSearch`. Added `logoWorkplaceSearch` and `logoObservability` ([#2769](https://github.com/elastic/eui/pull/2769))
Expand Down
5 changes: 4 additions & 1 deletion scripts/babel/proptypes-from-ts-props/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,10 @@ const typeDefinitionExtractors = {
*/
VariableDeclaration: node => {
return node.declarations.reduce((declarations, declaration) => {
if (declaration.init.type === 'ObjectExpression') {
if (
declaration.init != null &&
declaration.init.type === 'ObjectExpression'
) {
declarations.push({
name: declaration.id.name,
definition: declaration.init,
Expand Down
12 changes: 12 additions & 0 deletions scripts/babel/proptypes-from-ts-props/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2613,6 +2613,18 @@ FooComponent.propTypes = {
});
});

describe('misc', () => {
it('supports non-initialized variable declarations', () => {
const result = transform(
`
let something: any;
`,
babelOptions
);

expect(result.code).toBe('let something;');
});
});
});

describe('remove types from exports', () => {
Expand Down
1 change: 0 additions & 1 deletion src/components/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/// <reference path="./combo_box/index.d.ts" />
/// <reference path="./date_picker/index.d.ts" />
/// <reference path="./form/index.d.ts" />
/// <reference path="./modal/index.d.ts" />

declare module '@elastic/eui' {
// @ts-ignore
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`renders EuiConfirmModal 1`] = `
exports[`EuiConfirmModal renders EuiConfirmModal 1`] = `
Array [
<div
data-focus-guard="true"
Expand Down Expand Up @@ -111,7 +111,7 @@ Array [
]
`;

exports[`renders EuiConfirmModal without EuiModalBody, if empty 1`] = `
exports[`EuiConfirmModal renders EuiConfirmModal without EuiModalBody, if empty 1`] = `
Array [
<div
data-focus-guard="true"
Expand Down
141 changes: 0 additions & 141 deletions src/components/modal/confirm_modal.js

This file was deleted.

161 changes: 0 additions & 161 deletions src/components/modal/confirm_modal.test.js

This file was deleted.

Loading