From dce56807e87b1d26f1d501def74b170e00b2c013 Mon Sep 17 00:00:00 2001 From: Samuel Gratzl Date: Mon, 24 Dec 2018 14:59:17 +0100 Subject: [PATCH] optimize exports to avoid warning and better chunks --- src/internal/index.ts | 3 ++- src/mixin/index.ts | 4 ++-- src/style/index.ts | 3 ++- src/table/ACellTableSection.ts | 9 +++++---- src/table/index.ts | 5 +++-- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/internal/index.ts b/src/internal/index.ts index ce4c5bd..8124e84 100644 --- a/src/internal/index.ts +++ b/src/internal/index.ts @@ -5,8 +5,9 @@ export * from './scroll'; * @param node * @internal */ -export function clear(node: Node) { +export function clear(node: T) { while (node.lastChild) { node.removeChild(node.lastChild); } + return node; } diff --git a/src/mixin/index.ts b/src/mixin/index.ts index 6cd1142..a21f79b 100644 --- a/src/mixin/index.ts +++ b/src/mixin/index.ts @@ -1,3 +1,3 @@ -export {EScrollResult, IMixin, IMixinAdapter, IMixinClass} from './IMixin'; +export * from './IMixin'; export {default as PrefetchMixin} from './PrefetchMixin'; - +export * from './PrefetchMixin'; diff --git a/src/style/index.ts b/src/style/index.ts index 864b47e..d8df5d5 100644 --- a/src/style/index.ts +++ b/src/style/index.ts @@ -1,3 +1,4 @@ -export {default as GridStyleManager, IColumn, setTemplate, tableCSSClasses, tableIds} from './GridStyleManager'; +export {default as GridStyleManager} from './GridStyleManager'; +export * from './GridStyleManager'; export {default as StyleManager} from './StyleManager'; diff --git a/src/table/ACellTableSection.ts b/src/table/ACellTableSection.ts index e050211..438db87 100644 --- a/src/table/ACellTableSection.ts +++ b/src/table/ACellTableSection.ts @@ -8,8 +8,7 @@ import {CSS_CLASS_HIDDEN, CSS_CLASS_LOADING} from '../styles'; import ACellAdapter, {ICellAdapterRenderContext} from './internal/ACellAdapter'; import {ITableSection} from './MultiTableRowRenderer'; -export {isLoadingCell} from '../ARowRenderer'; -export declare type ICellRenderContext = ICellAdapterRenderContext; +export declare type ITableCellRenderContext = ICellAdapterRenderContext; /** * base class for a cell renderer as table section @@ -164,9 +163,9 @@ export abstract class ACellTableSection extends ARowRenderer /** * the current render context, upon change `recreate` the whole table - * @returns {ICellRenderContext} + * @returns {ITableCellRenderContext} */ - protected abstract get context(): ICellRenderContext; + protected abstract get context(): ITableCellRenderContext; /** * create a new header node for the given column @@ -250,3 +249,5 @@ export abstract class ACellTableSection extends ARowRenderer this.cell.updateRow(node, rowIndex); } } + +export default ACellTableSection; diff --git a/src/table/index.ts b/src/table/index.ts index e370f70..2511e3e 100644 --- a/src/table/index.ts +++ b/src/table/index.ts @@ -1,3 +1,4 @@ -export {ACellTableSection, ICellRenderContext as ITableCellRenderContext} from './ACellTableSection'; -export {default as MultiTableRowRenderer, IMultiTableRowRendererOptions, ISeparatorFactory, ITableFactory, ITableSection} from './MultiTableRowRenderer'; +export * from './ACellTableSection'; +export {default as MultiTableRowRenderer} from './MultiTableRowRenderer'; +export * from './MultiTableRowRenderer';