stk-table-vue 0.0.1-beta.6 → 0.0.1-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -11,7 +11,8 @@ js体积(未压缩41kb)
11
11
  * [x] 表头列宽拖动。
12
12
  * [x] 多级表头。(不支持横向虚拟滚动)
13
13
  * [x] 支持table-layout: fixed 配置。
14
- * [] 鼠标点击后,键盘上下滚动表格
14
+ * [x] 鼠标悬浮在表格上,键盘上下左右滚动虚拟表格
15
+ * [] 列固定阴影
15
16
 
16
17
  ## Usage
17
18
  > npm install stk-table-vue
@@ -36,80 +37,57 @@ const stkTable = ref<InstanceType<typeof StkTable>>();
36
37
  ```ts
37
38
  export type StkProps = Partial<{
38
39
  width: string;
39
-
40
40
  /** 最小表格宽度 */
41
41
  minWidth: string;
42
-
43
42
  /** 表格最大宽度*/
44
43
  maxWidth: string;
45
-
46
44
  /** 是否使用 table-layout:fixed */
47
45
  fixedMode: boolean;
48
-
49
46
  /** 是否隐藏表头 */
50
47
  headless: boolean;
51
-
52
48
  /** 主题,亮、暗 */
53
49
  theme: 'light' | 'dark';
54
-
55
50
  /** 虚拟滚动 */
56
51
  virtual: boolean;
57
-
58
52
  /** x轴虚拟滚动 */
59
53
  virtualX: boolean;
60
-
61
54
  /** 表格列配置 */
62
55
  columns: StkTableColumn<any>[];
63
-
64
56
  /** 表格数据源 */
65
57
  dataSource: any[];
66
-
67
58
  /** 行唯一键 */
68
59
  rowKey: UniqKey;
69
-
70
60
  /** 列唯一键 */
71
61
  colKey: UniqKey;
72
-
73
62
  /** 空值展示文字 */
74
63
  emptyCellText: string;
75
-
76
64
  /** 暂无数据兜底高度是否撑满 */
77
65
  noDataFull: boolean;
78
-
79
66
  /** 是否展示暂无数据 */
80
67
  showNoData: boolean;
81
-
82
68
  /** 是否服务端排序,true则不排序数据 */
83
69
  sortRemote: boolean;
84
-
85
70
  /** 表头是否溢出展示... */
86
71
  showHeaderOverflow: boolean;
87
-
88
72
  /** 表体溢出是否展示... */
89
73
  showOverflow: boolean;
90
-
91
74
  /** 是否增加行hover class */
92
75
  showTrHoverClass: boolean;
93
-
94
76
  /** 表头是否可拖动 */
95
77
  headerDrag: boolean;
96
-
97
78
  /**
98
79
  * 给行附加className<br>
99
80
  * FIXME: 是否需要优化,因为不传此prop会使表格行一直执行空函数,是否有影响
100
81
  */
101
82
  rowClassName: (row: any, i: number) => string;
102
-
103
83
  /**
104
84
  * 列宽是否可拖动<br>
105
85
  * **不要设置**列minWidth,**必须**设置width<br>
106
86
  * 列宽拖动时,每一列都必须要有width,且minWidth/maxWidth不生效。table width会变为"fit-content"。
107
87
  */
108
88
  colResizable: boolean;
109
-
110
89
  /** 可拖动至最小的列宽 */
111
90
  colMinWidth: number;
112
-
113
91
  /**
114
92
  * 单元格分割线。
115
93
  * 默认横竖都有
@@ -118,7 +96,6 @@ export type StkProps = Partial<{
118
96
  * "body-v" - 仅表体展示竖线
119
97
  */
120
98
  bordered: boolean | 'h' | 'v' | 'body-v';
121
-
122
99
  /** 自动重新计算虚拟滚动高度宽度。默认true */
123
100
  autoResize: boolean;
124
101
  }>;
@@ -126,7 +103,7 @@ export type StkProps = Partial<{
126
103
 
127
104
  ### StkTableColumn
128
105
  ``` ts
129
- type Sorter = boolean | Function;
106
+ type Sorter<T> = boolean | ((data: T[], option: { order: Order; column: any }) => T[]);
130
107
  /** 表格列配置 */
131
108
  export type StkTableColumn<T extends Record<string, any>> = {
132
109
  /** 取值id */
@@ -138,7 +115,7 @@ export type StkTableColumn<T extends Record<string, any>> = {
138
115
  /** 表头内容对齐方式 */
139
116
  headerAlign?: 'right' | 'left' | 'center';
140
117
  /** 筛选 */
141
- sorter?: Sorter;
118
+ sorter?: Sorter<T>;
142
119
  /** 列宽。横向虚拟滚动时必须设置。 */
143
120
  width?: string;
144
121
  /** 最小列宽。非x虚拟滚动生效。 */
@@ -1,236 +1,233 @@
1
- import { SortOption, StkTableColumn } from './types/index';
2
- /**
3
- * 初始化虚拟滚动参数
4
- * @param {number} [height] 虚拟滚动的高度
5
- */
6
- declare function initVirtualScroll(height?: number): void;
7
- /**
8
- * 选中一行,
9
- * @param {string} rowKey
10
- * @param {boolean} option.silent 是否触发回调
11
- */
12
- declare function setCurrentRow(rowKey: string, option?: {
13
- silent: boolean;
14
- }): void;
15
- /**
16
- * 设置表头排序状态
17
- * @param {string} dataIndex 列字段
18
- * @param {'asc'|'desc'|null} order
19
- * @param {object} option.sortOption 指定排序参数
20
- * @param {boolean} option.sort 是否触发排序
21
- * @param {boolean} option.silent 是否触发回调
22
- */
23
- declare function setSorter(dataIndex: string, order: null | 'asc' | 'desc', option?: {
24
- sortOption?: SortOption;
25
- silent?: boolean;
26
- sort?: boolean;
27
- }): any[];
28
- /** 重置排序 */
29
- declare function resetSorter(): void;
30
- /**
31
- * 设置滚动条位置
32
- * @param top 传null 则不变动位置
33
- * @param left 传null 则不变动位置
34
- */
35
- declare function scrollTo(top?: number | null, left?: number | null): void;
36
- /** 获取当前状态的表格数据 */
37
- declare function getTableData(): any[];
38
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<{
39
- width: string;
40
- minWidth: string;
41
- maxWidth: string;
42
- fixedMode: boolean;
43
- headless: boolean;
44
- theme: "light" | "dark";
45
- virtual: boolean;
46
- virtualX: boolean;
47
- columns: StkTableColumn<any>[];
48
- dataSource: any[];
49
- rowKey: import("./types/index").UniqKey;
50
- colKey: import("./types/index").UniqKey;
51
- emptyCellText: string;
52
- noDataFull: boolean;
53
- showNoData: boolean;
54
- sortRemote: boolean;
55
- showHeaderOverflow: boolean;
56
- showOverflow: boolean;
57
- showTrHoverClass: boolean;
58
- headerDrag: boolean;
59
- rowClassName: (row: any, i: number) => string;
60
- colResizable: boolean;
61
- colMinWidth: number;
62
- bordered: boolean | "h" | "v" | "body-v";
63
- autoResize: boolean;
64
- }>>, {
65
- width: string;
66
- fixedMode: boolean;
67
- minWidth: string;
68
- maxWidth: string;
69
- headless: boolean;
70
- theme: string;
71
- virtual: boolean;
72
- virtualX: boolean;
73
- columns: () => never[];
74
- dataSource: () => never[];
75
- rowKey: string;
76
- colKey: string;
77
- emptyCellText: string;
78
- noDataFull: boolean;
79
- showNoData: boolean;
80
- sortRemote: boolean;
81
- showHeaderOverflow: boolean;
82
- showOverflow: boolean;
83
- showTrHoverClass: boolean;
84
- headerDrag: boolean;
85
- rowClassName: () => "";
86
- colResizable: boolean;
87
- colMinWidth: number;
88
- bordered: boolean;
89
- autoResize: boolean;
90
- }>, {
91
- initVirtualScroll: typeof initVirtualScroll;
92
- initVirtualScrollX: () => void;
93
- initVirtualScrollY: (height?: number | undefined) => void;
94
- setCurrentRow: typeof setCurrentRow;
95
- setHighlightDimCell: (rowKeyValue: string, dataIndex: string) => void;
96
- setHighlightDimRow: (rowKeyValues: (string | number)[]) => void;
97
- sortCol: import("vue").Ref<string | null | undefined>;
98
- setSorter: typeof setSorter;
99
- resetSorter: typeof resetSorter;
100
- scrollTo: typeof scrollTo;
101
- getTableData: typeof getTableData;
102
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
103
- scroll: (...args: any[]) => void;
104
- "th-drag-start": (...args: any[]) => void;
105
- "col-order-change": (...args: any[]) => void;
106
- "th-drop": (...args: any[]) => void;
107
- columns: (...args: any[]) => void;
108
- "sort-change": (...args: any[]) => void;
109
- "row-click": (...args: any[]) => void;
110
- "current-change": (...args: any[]) => void;
111
- "row-dblclick": (...args: any[]) => void;
112
- "header-row-menu": (...args: any[]) => void;
113
- "row-menu": (...args: any[]) => void;
114
- "cell-click": (...args: any[]) => void;
115
- "header-cell-click": (...args: any[]) => void;
116
- }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<{
117
- width: string;
118
- minWidth: string;
119
- maxWidth: string;
120
- fixedMode: boolean;
121
- headless: boolean;
122
- theme: "light" | "dark";
123
- virtual: boolean;
124
- virtualX: boolean;
125
- columns: StkTableColumn<any>[];
126
- dataSource: any[];
127
- rowKey: import("./types/index").UniqKey;
128
- colKey: import("./types/index").UniqKey;
129
- emptyCellText: string;
130
- noDataFull: boolean;
131
- showNoData: boolean;
132
- sortRemote: boolean;
133
- showHeaderOverflow: boolean;
134
- showOverflow: boolean;
135
- showTrHoverClass: boolean;
136
- headerDrag: boolean;
137
- rowClassName: (row: any, i: number) => string;
138
- colResizable: boolean;
139
- colMinWidth: number;
140
- bordered: boolean | "h" | "v" | "body-v";
141
- autoResize: boolean;
142
- }>>, {
143
- width: string;
144
- fixedMode: boolean;
145
- minWidth: string;
146
- maxWidth: string;
147
- headless: boolean;
148
- theme: string;
149
- virtual: boolean;
150
- virtualX: boolean;
151
- columns: () => never[];
152
- dataSource: () => never[];
153
- rowKey: string;
154
- colKey: string;
155
- emptyCellText: string;
156
- noDataFull: boolean;
157
- showNoData: boolean;
158
- sortRemote: boolean;
159
- showHeaderOverflow: boolean;
160
- showOverflow: boolean;
161
- showTrHoverClass: boolean;
162
- headerDrag: boolean;
163
- rowClassName: () => "";
164
- colResizable: boolean;
165
- colMinWidth: number;
166
- bordered: boolean;
167
- autoResize: boolean;
168
- }>>> & {
169
- onScroll?: ((...args: any[]) => any) | undefined;
170
- "onTh-drag-start"?: ((...args: any[]) => any) | undefined;
171
- "onCol-order-change"?: ((...args: any[]) => any) | undefined;
172
- "onTh-drop"?: ((...args: any[]) => any) | undefined;
173
- onColumns?: ((...args: any[]) => any) | undefined;
174
- "onSort-change"?: ((...args: any[]) => any) | undefined;
175
- "onRow-click"?: ((...args: any[]) => any) | undefined;
176
- "onCurrent-change"?: ((...args: any[]) => any) | undefined;
177
- "onRow-dblclick"?: ((...args: any[]) => any) | undefined;
178
- "onHeader-row-menu"?: ((...args: any[]) => any) | undefined;
179
- "onRow-menu"?: ((...args: any[]) => any) | undefined;
180
- "onCell-click"?: ((...args: any[]) => any) | undefined;
181
- "onHeader-cell-click"?: ((...args: any[]) => any) | undefined;
182
- }, {
183
- width: string;
184
- minWidth: string;
185
- maxWidth: string;
186
- colKey: import("./types/index").UniqKey;
187
- fixedMode: boolean;
188
- headless: boolean;
189
- theme: "light" | "dark";
190
- virtual: boolean;
191
- virtualX: boolean;
192
- columns: StkTableColumn<any>[];
193
- dataSource: any[];
194
- rowKey: import("./types/index").UniqKey;
195
- emptyCellText: string;
196
- noDataFull: boolean;
197
- showNoData: boolean;
198
- sortRemote: boolean;
199
- showHeaderOverflow: boolean;
200
- showOverflow: boolean;
201
- showTrHoverClass: boolean;
202
- headerDrag: boolean;
203
- rowClassName: (row: any, i: number) => string;
204
- colResizable: boolean;
205
- colMinWidth: number;
206
- bordered: boolean | "h" | "v" | "body-v";
207
- autoResize: boolean;
208
- }, {}>, {
209
- tableHeader?(_: {
210
- column: StkTableColumn<any>;
211
- }): any;
212
- empty?(_: {}): any;
213
- }>;
214
- export default _default;
215
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
216
- type __VLS_TypePropsToRuntimeProps<T> = {
217
- [K in keyof T]-?: {} extends Pick<T, K> ? {
218
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
219
- } : {
220
- type: import('vue').PropType<T[K]>;
221
- required: true;
222
- };
223
- };
224
- type __VLS_WithDefaults<P, D> = {
225
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
226
- default: D[K];
227
- }> : P[K];
228
- };
229
- type __VLS_Prettify<T> = {
230
- [K in keyof T]: T[K];
231
- } & {};
232
- type __VLS_WithTemplateSlots<T, S> = T & {
233
- new (): {
234
- $slots: S;
235
- };
236
- };
1
+ import { SortOption, StkTableColumn } from './types/index';
2
+ /**
3
+ * 选中一行,
4
+ * @param {string} rowKey
5
+ * @param {boolean} option.silent 是否触发回调
6
+ */
7
+ declare function setCurrentRow(rowKey: string, option?: {
8
+ silent: boolean;
9
+ }): void;
10
+ /**
11
+ * 设置表头排序状态
12
+ * @param {string} dataIndex 列字段
13
+ * @param {'asc'|'desc'|null} order
14
+ * @param {object} option.sortOption 指定排序参数
15
+ * @param {boolean} option.sort 是否触发排序
16
+ * @param {boolean} option.silent 是否触发回调
17
+ */
18
+ declare function setSorter(dataIndex: string, order: null | 'asc' | 'desc', option?: {
19
+ sortOption?: SortOption;
20
+ silent?: boolean;
21
+ sort?: boolean;
22
+ }): any[];
23
+ /** 重置排序 */
24
+ declare function resetSorter(): void;
25
+ /**
26
+ * 设置滚动条位置
27
+ * @param top 传null 则不变动位置
28
+ * @param left 传null 则不变动位置
29
+ */
30
+ declare function scrollTo(top?: number | null, left?: number | null): void;
31
+ /** 获取当前状态的表格数据 */
32
+ declare function getTableData(): any[];
33
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<{
34
+ width: string;
35
+ minWidth: string;
36
+ maxWidth: string;
37
+ fixedMode: boolean;
38
+ headless: boolean;
39
+ theme: "light" | "dark";
40
+ virtual: boolean;
41
+ virtualX: boolean;
42
+ columns: StkTableColumn<any>[];
43
+ dataSource: any[];
44
+ rowKey: import("./types/index").UniqKey;
45
+ /** 若有多级表头时,最后一行的tableHeaders.内容是 props.columns 的引用集合 */
46
+ colKey: import("./types/index").UniqKey;
47
+ emptyCellText: string;
48
+ noDataFull: boolean;
49
+ showNoData: boolean;
50
+ sortRemote: boolean;
51
+ showHeaderOverflow: boolean;
52
+ showOverflow: boolean;
53
+ showTrHoverClass: boolean;
54
+ headerDrag: boolean;
55
+ rowClassName: (row: any, i: number) => string;
56
+ colResizable: boolean;
57
+ colMinWidth: number;
58
+ bordered: boolean | "h" | "v" | "body-v";
59
+ autoResize: boolean;
60
+ }>>, {
61
+ width: string;
62
+ fixedMode: boolean;
63
+ minWidth: string;
64
+ maxWidth: string;
65
+ headless: boolean;
66
+ theme: string;
67
+ virtual: boolean;
68
+ virtualX: boolean;
69
+ columns: () => never[];
70
+ dataSource: () => never[];
71
+ rowKey: string;
72
+ colKey: string;
73
+ emptyCellText: string;
74
+ noDataFull: boolean;
75
+ showNoData: boolean;
76
+ sortRemote: boolean;
77
+ showHeaderOverflow: boolean;
78
+ showOverflow: boolean;
79
+ showTrHoverClass: boolean;
80
+ headerDrag: boolean;
81
+ rowClassName: () => "";
82
+ colResizable: boolean;
83
+ colMinWidth: number;
84
+ bordered: boolean;
85
+ autoResize: boolean;
86
+ }>, {
87
+ initVirtualScroll: (height?: number | undefined) => void;
88
+ initVirtualScrollX: () => void;
89
+ initVirtualScrollY: (height?: number | undefined) => void;
90
+ setCurrentRow: typeof setCurrentRow;
91
+ setHighlightDimCell: (rowKeyValue: string, dataIndex: string) => void;
92
+ setHighlightDimRow: (rowKeyValues: (string | number)[]) => void;
93
+ sortCol: import("vue").Ref<string | null | undefined>;
94
+ setSorter: typeof setSorter;
95
+ resetSorter: typeof resetSorter;
96
+ scrollTo: typeof scrollTo;
97
+ getTableData: typeof getTableData;
98
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
99
+ scroll: (...args: any[]) => void;
100
+ "th-drag-start": (...args: any[]) => void;
101
+ "col-order-change": (...args: any[]) => void;
102
+ "th-drop": (...args: any[]) => void;
103
+ columns: (...args: any[]) => void;
104
+ "sort-change": (...args: any[]) => void;
105
+ "row-click": (...args: any[]) => void;
106
+ "current-change": (...args: any[]) => void;
107
+ "row-dblclick": (...args: any[]) => void;
108
+ "header-row-menu": (...args: any[]) => void;
109
+ "row-menu": (...args: any[]) => void;
110
+ "cell-click": (...args: any[]) => void;
111
+ "header-cell-click": (...args: any[]) => void;
112
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<{
113
+ width: string;
114
+ minWidth: string;
115
+ maxWidth: string;
116
+ fixedMode: boolean;
117
+ headless: boolean;
118
+ theme: "light" | "dark";
119
+ virtual: boolean;
120
+ virtualX: boolean;
121
+ columns: StkTableColumn<any>[];
122
+ dataSource: any[];
123
+ rowKey: import("./types/index").UniqKey;
124
+ /** 若有多级表头时,最后一行的tableHeaders.内容是 props.columns 的引用集合 */
125
+ colKey: import("./types/index").UniqKey;
126
+ emptyCellText: string;
127
+ noDataFull: boolean;
128
+ showNoData: boolean;
129
+ sortRemote: boolean;
130
+ showHeaderOverflow: boolean;
131
+ showOverflow: boolean;
132
+ showTrHoverClass: boolean;
133
+ headerDrag: boolean;
134
+ rowClassName: (row: any, i: number) => string;
135
+ colResizable: boolean;
136
+ colMinWidth: number;
137
+ bordered: boolean | "h" | "v" | "body-v";
138
+ autoResize: boolean;
139
+ }>>, {
140
+ width: string;
141
+ fixedMode: boolean;
142
+ minWidth: string;
143
+ maxWidth: string;
144
+ headless: boolean;
145
+ theme: string;
146
+ virtual: boolean;
147
+ virtualX: boolean;
148
+ columns: () => never[];
149
+ dataSource: () => never[];
150
+ rowKey: string;
151
+ colKey: string;
152
+ emptyCellText: string;
153
+ noDataFull: boolean;
154
+ showNoData: boolean;
155
+ sortRemote: boolean;
156
+ showHeaderOverflow: boolean;
157
+ showOverflow: boolean;
158
+ showTrHoverClass: boolean;
159
+ headerDrag: boolean;
160
+ rowClassName: () => "";
161
+ colResizable: boolean;
162
+ colMinWidth: number;
163
+ bordered: boolean;
164
+ autoResize: boolean;
165
+ }>>> & {
166
+ onScroll?: ((...args: any[]) => any) | undefined;
167
+ "onTh-drag-start"?: ((...args: any[]) => any) | undefined;
168
+ "onCol-order-change"?: ((...args: any[]) => any) | undefined;
169
+ "onTh-drop"?: ((...args: any[]) => any) | undefined;
170
+ onColumns?: ((...args: any[]) => any) | undefined;
171
+ "onSort-change"?: ((...args: any[]) => any) | undefined;
172
+ "onRow-click"?: ((...args: any[]) => any) | undefined;
173
+ "onCurrent-change"?: ((...args: any[]) => any) | undefined;
174
+ "onRow-dblclick"?: ((...args: any[]) => any) | undefined;
175
+ "onHeader-row-menu"?: ((...args: any[]) => any) | undefined;
176
+ "onRow-menu"?: ((...args: any[]) => any) | undefined;
177
+ "onCell-click"?: ((...args: any[]) => any) | undefined;
178
+ "onHeader-cell-click"?: ((...args: any[]) => any) | undefined;
179
+ }, {
180
+ width: string;
181
+ minWidth: string;
182
+ maxWidth: string;
183
+ colKey: import("./types/index").UniqKey;
184
+ fixedMode: boolean;
185
+ headless: boolean;
186
+ theme: "light" | "dark";
187
+ virtual: boolean;
188
+ virtualX: boolean;
189
+ columns: StkTableColumn<any>[];
190
+ dataSource: any[];
191
+ rowKey: import("./types/index").UniqKey;
192
+ emptyCellText: string;
193
+ noDataFull: boolean;
194
+ showNoData: boolean;
195
+ sortRemote: boolean;
196
+ showHeaderOverflow: boolean;
197
+ showOverflow: boolean;
198
+ showTrHoverClass: boolean;
199
+ headerDrag: boolean;
200
+ rowClassName: (row: any, i: number) => string;
201
+ colResizable: boolean;
202
+ colMinWidth: number;
203
+ bordered: boolean | "h" | "v" | "body-v";
204
+ autoResize: boolean;
205
+ }, {}>, {
206
+ tableHeader?(_: {
207
+ column: StkTableColumn<any>;
208
+ }): any;
209
+ empty?(_: {}): any;
210
+ }>;
211
+ export default _default;
212
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
213
+ type __VLS_TypePropsToRuntimeProps<T> = {
214
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
215
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
216
+ } : {
217
+ type: import('vue').PropType<T[K]>;
218
+ required: true;
219
+ };
220
+ };
221
+ type __VLS_WithDefaults<P, D> = {
222
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
223
+ default: D[K];
224
+ }> : P[K];
225
+ };
226
+ type __VLS_Prettify<T> = {
227
+ [K in keyof T]: T[K];
228
+ } & {};
229
+ type __VLS_WithTemplateSlots<T, S> = T & {
230
+ new (): {
231
+ $slots: S;
232
+ };
233
+ };