Skip to content

Commit b6d1f45

Browse files
committed
Fix random dash-table ts errors.
1 parent e52a875 commit b6d1f45

File tree

5 files changed

+11
-17
lines changed

5 files changed

+11
-17
lines changed

components/dash-table/src/dash-table/components/Table/props.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -187,14 +187,12 @@ export interface IMarkdownOptions {
187187
html?: boolean;
188188
}
189189

190-
export type NumberFormat =
191-
| {
192-
locale: INumberLocale;
193-
nully: any;
194-
prefix?: number;
195-
specifier: string;
196-
}
197-
| undefined;
190+
export type NumberFormat = {
191+
locale: INumberLocale;
192+
nully: any;
193+
prefix?: number;
194+
specifier: string;
195+
};
198196

199197
export interface INumberColumn extends ITypeColumn {
200198
format?: NumberFormat;

components/dash-table/src/dash-table/derived/data/virtual.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const getter = (
3939
return (column && column.sort_as_null) || [];
4040
};
4141

42-
const isNully = (value: any, columnId: ColumnId) =>
42+
const isNully = (value: any, columnId: ColumnId): any =>
4343
R.isNil(value) || R.includes(value, getNullyCases(columnId));
4444

4545
if (sort_action === TableAction.Native) {

components/dash-table/src/dash-table/derived/style/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export function resolveStyle(styles: IConvertedStyle[]): CSSProperties {
161161
Object.assign(res, styles[i].style);
162162
}
163163

164-
return R.omit(BORDER_PROPERTIES_AND_FRAGMENTS, res);
164+
return R.omit(BORDER_PROPERTIES_AND_FRAGMENTS as any, res);
165165
}
166166

167167
export const getDataCellStyle =

components/dash-table/src/dash-table/type/formatter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default (c: IColumnType) => {
77
let formatter;
88
switch (c.type) {
99
case ColumnType.Numeric:
10-
formatter = getNumberFormatter(c.format);
10+
formatter = getNumberFormatter(c.format as any);
1111
break;
1212
}
1313

components/dash-table/src/dash-table/type/number.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,11 @@ import * as R from 'ramda';
22
import {formatLocale} from 'd3-format';
33
import isNumeric from 'fast-isnumeric';
44

5-
import {
6-
INumberColumn,
7-
INumberLocale,
8-
NumberFormat
9-
} from 'dash-table/components/Table/props';
5+
import {INumberColumn, NumberFormat} from 'dash-table/components/Table/props';
106
import {reconcileNull, isNully} from './null';
117
import {IReconciliation} from './reconcile';
128

13-
const convertToD3 = ({group, symbol, ...others}: INumberLocale) => ({
9+
const convertToD3 = ({group, symbol, ...others}: any): any => ({
1410
currency: symbol,
1511
thousands: group,
1612
...R.omit(['separate_4digits', 'symbol'], others)

0 commit comments

Comments
 (0)