@@ -2,12 +2,13 @@ import { expectTypeOf } from 'expect-type';
2
2
3
3
import { BasePlugin } from '../../plugins/-private/base' ;
4
4
import { ColumnReordering } from '../../plugins/column-reordering' ;
5
- import { Plugins } from '../../plugins/-private/utils' ;
6
- import { DataSorting , SortItem } from '../../plugins/data-sorting' ;
7
5
import { ColumnResizing } from '../../plugins/column-resizing' ;
8
6
import { ColumnVisibility } from '../../plugins/column-visibility' ;
7
+ import { DataSorting } from '../../plugins/data-sorting' ;
9
8
import { StickyColumns } from '../../plugins/sticky-columns' ;
10
9
10
+ import type { Plugins } from '../../plugins/-private/utils' ;
11
+ import type { SortItem } from '../../plugins/data-sorting' ;
11
12
import type { Plugin } from '[public-plugin-types]' ;
12
13
import type { TableConfig } from '[public-types]' ;
13
14
import type { Constructor } from '#private-types' ;
@@ -26,8 +27,10 @@ expectTypeOf<
26
27
[ Constructor < BasePlugin > , Constructor < BasePlugin > ]
27
28
> ( ) . toMatchTypeOf < TablePluginConfig > ( ) ;
28
29
29
- class SomeClass { foo = 'bar' }
30
- class LocalPlugin extends BasePlugin < { Meta : { Table : SomeClass } } > {
30
+ class SomeClass {
31
+ foo = 'bar' ;
32
+ }
33
+ class LocalPlugin extends BasePlugin < { Meta : { Table : SomeClass } } > {
31
34
name = 'local-plugin' ;
32
35
}
33
36
@@ -51,8 +54,10 @@ expectTypeOf([StickyColumns]).toMatchTypeOf<TablePluginConfig>();
51
54
// The various ways to define plugins
52
55
expectTypeOf ( [ DataSorting , ColumnReordering ] ) . toMatchTypeOf < TablePluginConfig > ( ) ;
53
56
54
- const onSort = ( _sorts : SortItem < number > [ ] ) => { } ;
57
+ const onSort = ( _sorts : SortItem < number > [ ] ) => {
58
+ /* intentionally empty */
59
+ } ;
55
60
const sorts : SortItem < number > [ ] = [ ] ;
56
- expectTypeOf ( [ DataSorting . with ( ( ) => ( { } ) ) ] ) . toMatchTypeOf < TablePluginConfig > ( ) ;
57
- expectTypeOf ( [ DataSorting . with ( ( ) => ( { onSort, sorts } ) ) ] ) . toMatchTypeOf < TablePluginConfig > ( ) ;
58
61
62
+ expectTypeOf ( [ DataSorting . with ( ( ) => ( { } ) ) ] ) . toMatchTypeOf < TablePluginConfig > ( ) ;
63
+ expectTypeOf ( [ DataSorting . with ( ( ) => ( { onSort, sorts } ) ) ] ) . toMatchTypeOf < TablePluginConfig > ( ) ;
0 commit comments