@univerjs/core 0.6.0 → 0.6.1

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.
@@ -23,7 +23,7 @@ export declare class FBlob extends FBase {
23
23
  * @returns a new blob by copying the current blob
24
24
  * @example
25
25
  * ```ts
26
- * const blob = univerAPI.newBlob(blob);
26
+ * const blob = univerAPI.newBlob();
27
27
  * const newBlob = blob.copyBlob();
28
28
  * console.log(newBlob);
29
29
  * ```
@@ -35,8 +35,9 @@ export declare class FBlob extends FBase {
35
35
  * @returns a new blob by converting the current blob to the specified content type
36
36
  * @example
37
37
  * ```ts
38
- * const blob = univerAPI.newBlob(blob);
39
- * const newBlob = blob.getBlob();
38
+ * const blob = univerAPI.newBlob();
39
+ * const newBlob = blob.getAs('text/plain');
40
+ * console.log(newBlob);
40
41
  * ```
41
42
  */
42
43
  getAs(contentType: string): FBlob;
@@ -45,9 +46,9 @@ export declare class FBlob extends FBase {
45
46
  * @returns
46
47
  * @example
47
48
  * ```ts
48
- * const blob = univerAPI.newBlob(blob);
49
- * const newBlob = blob.getDataAsString();
50
- * console.log(newBlob);
49
+ * const blob = univerAPI.newBlob();
50
+ * const data = await blob.getDataAsString();
51
+ * console.log(data);
51
52
  * ```
52
53
  */
53
54
  getDataAsString(): Promise<string>;
@@ -57,9 +58,9 @@ export declare class FBlob extends FBase {
57
58
  * @returns the blob content as a string
58
59
  * @example
59
60
  * ```ts
60
- * const blob = univerAPI.newBlob(blob);
61
- * const newBlob = blob.getDataAsString('iso-8859-1');
62
- * console.log(newBlob);
61
+ * const blob = univerAPI.newBlob();
62
+ * const data = await blob.getDataAsString('iso-8859-1');
63
+ * console.log(data);
63
64
  * ```
64
65
  */
65
66
  getDataAsString(charset?: string): Promise<string>;
@@ -68,9 +69,9 @@ export declare class FBlob extends FBase {
68
69
  * @returns the blob content as a byte array
69
70
  * @example
70
71
  * ```ts
71
- * const blob = univerAPI.newBlob(blob);
72
- * const newBlob = blob.getBytes();
73
- * console.log(newBlob);
72
+ * const blob = univerAPI.newBlob();
73
+ * const bytes = await blob.getBytes();
74
+ * console.log(bytes);
74
75
  * ```
75
76
  */
76
77
  getBytes(): Promise<Uint8Array>;
@@ -114,9 +115,9 @@ export declare class FBlob extends FBase {
114
115
  * @returns the content type
115
116
  * @example
116
117
  * ```ts
117
- * const blob = univerAPI.newBlob(blob);
118
- * const newBlob = blob.getContentType();
119
- * console.log(newBlob);
118
+ * const blob = univerAPI.newBlob();
119
+ * const contentType = blob.getContentType();
120
+ * console.log(contentType);
120
121
  * ```
121
122
  */
122
123
  getContentType(): string | undefined;
@@ -126,9 +127,8 @@ export declare class FBlob extends FBase {
126
127
  * @returns the blob object
127
128
  * @example
128
129
  * ```ts
129
- * const blob = univerAPI.newBlob(blob);
130
- * const newBlob = blob.setContentType('text/plain');
131
- * console.log(newBlob);
130
+ * const blob = univerAPI.newBlob();
131
+ * blob.setContentType('text/plain');
132
132
  * ```
133
133
  */
134
134
  setContentType(contentType: string): FBlob;
@@ -1,4 +1,4 @@
1
- import { AutoFillSeries, BaselineOffset, BooleanNumber, BorderStyleTypes, BorderType, ColorType, CommandType, CommonHideTypes, CopyPasteType, DataValidationErrorStyle, DataValidationOperator, DataValidationRenderMode, DataValidationStatus, DataValidationType, DeleteDirection, DeveloperMetadataVisibility, Dimension, Direction, HorizontalAlign, InterpolationPointType, LifecycleStages, LocaleType, MentionType, ProtectionType, RelativeDate, SheetTypes, TextDecoration, TextDirection, ThemeColorType, UniverInstanceType, VerticalAlign } from '@univerjs/core';
1
+ import { AutoFillSeries, BaselineOffset, BooleanNumber, BorderStyleTypes, BorderType, ColorType, CommandType, CommonHideTypes, CopyPasteType, DataValidationErrorStyle, DataValidationOperator, DataValidationRenderMode, DataValidationStatus, DataValidationType, DeleteDirection, DeveloperMetadataVisibility, Dimension, Direction, HorizontalAlign, InterpolationPointType, LifecycleStages, LocaleType, MentionType, ProtectionType, RelativeDate, SheetTypes, TextDecoration, TextDirection, ThemeColorType, UniverInstanceType, VerticalAlign, WrapStrategy } from '@univerjs/core';
2
2
  /**
3
3
  * @hideconstructor
4
4
  */
@@ -14,127 +14,291 @@ export declare class FEnum {
14
14
  static extend(source: any): void;
15
15
  constructor();
16
16
  /**
17
- * Defines different types of Univer instances
17
+ * Defines different types of Univer instances
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * console.log(univerAPI.Enum.UniverInstanceType.UNIVER_SHEET);
22
+ * ```
18
23
  */
19
24
  get UniverInstanceType(): typeof UniverInstanceType;
20
25
  /**
21
26
  * Represents different stages in the lifecycle
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * console.log(univerAPI.Enum.LifecycleStages.Rendered);
31
+ * ```
22
32
  */
23
33
  get LifecycleStages(): typeof LifecycleStages;
24
34
  /**
25
35
  * Different types of data validation
36
+ *
37
+ * @example
38
+ * ```ts
39
+ * console.log(univerAPI.Enum.DataValidationType.LIST);
40
+ * ```
26
41
  */
27
42
  get DataValidationType(): typeof DataValidationType;
28
43
  /**
29
44
  * Different error display styles
45
+ *
46
+ * @example
47
+ * ```ts
48
+ * console.log(univerAPI.Enum.DataValidationErrorStyle.WARNING);
49
+ * ```
30
50
  */
31
51
  get DataValidationErrorStyle(): typeof DataValidationErrorStyle;
32
52
  /**
33
53
  * Different validation rendering modes
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * console.log(univerAPI.Enum.DataValidationRenderMode.TEXT);
58
+ * ```
34
59
  */
35
60
  get DataValidationRenderMode(): typeof DataValidationRenderMode;
36
61
  /**
37
62
  * Different validation operators
63
+ *
64
+ * @example
65
+ * ```ts
66
+ * console.log(univerAPI.Enum.DataValidationOperator.BETWEEN);
67
+ * ```
38
68
  */
39
69
  get DataValidationOperator(): typeof DataValidationOperator;
40
70
  /**
41
71
  * Different validation states
72
+ *
73
+ * @example
74
+ * ```ts
75
+ * console.log(univerAPI.Enum.DataValidationStatus.VALID);
76
+ * ```
42
77
  */
43
78
  get DataValidationStatus(): typeof DataValidationStatus;
44
79
  /**
45
80
  * Different types of commands
81
+ *
82
+ * @example
83
+ * ```ts
84
+ * console.log(univerAPI.Enum.CommandType.COMMAND);
85
+ * ```
46
86
  */
47
87
  get CommandType(): typeof CommandType;
48
88
  /**
49
89
  * Different baseline offsets for text baseline positioning
90
+ *
91
+ * @example
92
+ * ```ts
93
+ * console.log(univerAPI.Enum.BaselineOffset.SUPERSCRIPT);
94
+ * ```
50
95
  */
51
96
  get BaselineOffset(): typeof BaselineOffset;
52
97
  /**
53
98
  * Boolean number representations
99
+ *
100
+ * @example
101
+ * ```ts
102
+ * console.log(univerAPI.Enum.BooleanNumber.TRUE);
103
+ * ```
54
104
  */
55
105
  get BooleanNumber(): typeof BooleanNumber;
56
106
  /**
57
107
  * Different horizontal text alignment options
108
+ *
109
+ * @example
110
+ * ```ts
111
+ * console.log(univerAPI.Enum.HorizontalAlign.CENTER);
112
+ * ```
58
113
  */
59
114
  get HorizontalAlign(): typeof HorizontalAlign;
60
115
  /**
61
116
  * Different text decoration styles
117
+ *
118
+ * @example
119
+ * ```ts
120
+ * console.log(univerAPI.Enum.TextDecoration.DOUBLE);
121
+ * ```
62
122
  */
63
123
  get TextDecoration(): typeof TextDecoration;
64
124
  /**
65
125
  * Different text direction options
126
+ *
127
+ * @example
128
+ * ```ts
129
+ * console.log(univerAPI.Enum.TextDirection.LEFT_TO_RIGHT);
130
+ * ```
66
131
  */
67
132
  get TextDirection(): typeof TextDirection;
68
133
  /**
69
134
  * Different vertical text alignment options
135
+ *
136
+ * @example
137
+ * ```ts
138
+ * console.log(univerAPI.Enum.VerticalAlign.MIDDLE);
139
+ * ```
70
140
  */
71
141
  get VerticalAlign(): typeof VerticalAlign;
142
+ /**
143
+ * Different wrap strategy options
144
+ *
145
+ * @example
146
+ * ```ts
147
+ * console.log(univerAPI.Enum.WrapStrategy.WRAP);
148
+ * ```
149
+ */
150
+ get WrapStrategy(): typeof WrapStrategy;
72
151
  /**
73
152
  * Different border types
153
+ *
154
+ * @example
155
+ * ```ts
156
+ * console.log(univerAPI.Enum.BorderType.OUTSIDE);
157
+ * ```
74
158
  */
75
159
  get BorderType(): typeof BorderType;
76
160
  /**
77
161
  * Different border style types
162
+ *
163
+ * @example
164
+ * ```ts
165
+ * console.log(univerAPI.Enum.BorderStyleTypes.NONE);
166
+ * ```
78
167
  */
79
168
  get BorderStyleTypes(): typeof BorderStyleTypes;
80
169
  /**
81
170
  * Auto fill series types
171
+ *
172
+ * @example
173
+ * ```ts
174
+ * console.log(univerAPI.Enum.AutoFillSeries.ALTERNATE_SERIES);
175
+ * ```
82
176
  */
83
177
  get AutoFillSeries(): typeof AutoFillSeries;
84
178
  /**
85
179
  * Color types
180
+ *
181
+ * @example
182
+ * ```ts
183
+ * console.log(univerAPI.Enum.ColorType.RGB);
184
+ * ```
86
185
  */
87
186
  get ColorType(): typeof ColorType;
88
187
  /**
89
188
  * Common hide types
189
+ *
190
+ * @example
191
+ * ```ts
192
+ * console.log(univerAPI.Enum.CommonHideTypes.ON);
193
+ * ```
90
194
  */
91
195
  get CommonHideTypes(): typeof CommonHideTypes;
92
196
  /**
93
197
  * Copy paste types
198
+ *
199
+ * @example
200
+ * ```ts
201
+ * console.log(univerAPI.Enum.CopyPasteType.PASTE_VALUES);
202
+ * ```
94
203
  */
95
204
  get CopyPasteType(): typeof CopyPasteType;
96
205
  /**
97
206
  * Delete direction types
207
+ *
208
+ * @example
209
+ * ```ts
210
+ * console.log(univerAPI.Enum.DeleteDirection.LEFT);
211
+ * ```
98
212
  */
99
213
  get DeleteDirection(): typeof DeleteDirection;
100
214
  /**
101
215
  * Developer metadata visibility types
216
+ *
217
+ * @example
218
+ * ```ts
219
+ * console.log(univerAPI.Enum.DeveloperMetadataVisibility.DOCUMENT);
220
+ * ```
102
221
  */
103
222
  get DeveloperMetadataVisibility(): typeof DeveloperMetadataVisibility;
104
223
  /**
105
224
  * Dimension types
225
+ *
226
+ * @example
227
+ * ```ts
228
+ * console.log(univerAPI.Enum.Dimension.ROWS);
229
+ * ```
106
230
  */
107
231
  get Dimension(): typeof Dimension;
108
232
  /**
109
233
  * Direction types
234
+ *
235
+ * @example
236
+ * ```ts
237
+ * console.log(univerAPI.Enum.Direction.UP);
238
+ * ```
110
239
  */
111
240
  get Direction(): typeof Direction;
112
241
  /**
113
242
  * Interpolation point types
243
+ *
244
+ * @example
245
+ * ```ts
246
+ * console.log(univerAPI.Enum.InterpolationPointType.NUMBER);
247
+ * ```
114
248
  */
115
249
  get InterpolationPointType(): typeof InterpolationPointType;
116
250
  /**
117
251
  * Locale types
252
+ *
253
+ * @example
254
+ * ```ts
255
+ * console.log(univerAPI.Enum.LocaleType.EN_US);
256
+ * ```
118
257
  */
119
258
  get LocaleType(): typeof LocaleType;
120
259
  /**
121
260
  * Mention types
261
+ *
262
+ * @example
263
+ * ```ts
264
+ * console.log(univerAPI.Enum.MentionType.PERSON);
265
+ * ```
122
266
  */
123
267
  get MentionType(): typeof MentionType;
124
268
  /**
125
269
  * Protection types
270
+ *
271
+ * @example
272
+ * ```ts
273
+ * console.log(univerAPI.Enum.ProtectionType.RANGE);
274
+ * ```
126
275
  */
127
276
  get ProtectionType(): typeof ProtectionType;
128
277
  /**
129
278
  * Relative date types
279
+ *
280
+ * @example
281
+ * ```ts
282
+ * console.log(univerAPI.Enum.RelativeDate.TODAY);
283
+ * ```
130
284
  */
131
285
  get RelativeDate(): typeof RelativeDate;
132
286
  /**
133
287
  * Sheet types
288
+ *
289
+ * @example
290
+ * ```ts
291
+ * console.log(univerAPI.Enum.SheetTypes.GRID);
292
+ * ```
134
293
  */
135
294
  get SheetTypes(): typeof SheetTypes;
136
295
  /**
137
296
  * Theme color types
297
+ *
298
+ * @example
299
+ * ```ts
300
+ * console.log(univerAPI.Enum.ThemeColorType.ACCENT1);
301
+ * ```
138
302
  */
139
303
  get ThemeColorType(): typeof ThemeColorType;
140
304
  }
@@ -16,8 +16,9 @@ export declare class FEventRegistry {
16
16
  * @returns {Disposable} The Disposable instance, for remove the listener
17
17
  * @example
18
18
  * ```ts
19
- * univerAPI.addEvent(univerAPI.event.UnitCreated, (params) => {
20
- * console.log('unit created', params);
19
+ * univerAPI.addEvent(univerAPI.Event.LifeCycleChanged, (params) => {
20
+ * const { stage } = params;
21
+ * console.log('life cycle changed', params);
21
22
  * });
22
23
  * ```
23
24
  */
@@ -29,7 +30,7 @@ export declare class FEventRegistry {
29
30
  * @returns {boolean} should cancel
30
31
  * @example
31
32
  * ```ts
32
- * this.fireEvent(univerAPI.event.UnitCreated, params);
33
+ * this.fireEvent(univerAPI.Event.LifeCycleChanged, params);
33
34
  * ```
34
35
  */
35
36
  fireEvent<T extends keyof IEventParamConfig>(event: T, params: IEventParamConfig[T]): boolean | undefined;
@@ -78,10 +78,12 @@ export declare class FEventName {
78
78
  * @see {@link IDocCreatedParam}
79
79
  * @example
80
80
  * ```ts
81
- * univerAPI.addEvent(univerAPI.event.DocCreated, (params) => {
81
+ * const disposable = univerAPI.addEvent(univerAPI.Event.DocCreated, (params) => {
82
82
  * const { unitId, type, doc, unit } = params;
83
83
  * console.log('doc created', params);
84
84
  * });
85
+ *
86
+ * // Remove the event listener, use `disposable.dispose()`
85
87
  * ```
86
88
  */
87
89
  get DocCreated(): "DocCreated";
@@ -90,10 +92,12 @@ export declare class FEventName {
90
92
  * @see {@link IDocDisposedEvent}
91
93
  * @example
92
94
  * ```ts
93
- * univerAPI.addEvent(univerAPI.event.DocDisposed, (params) => {
95
+ * const disposable = univerAPI.addEvent(univerAPI.Event.DocDisposed, (params) => {
94
96
  * const { unitId, unitType, snapshot } = params;
95
97
  * console.log('doc disposed', params);
96
98
  * });
99
+ *
100
+ * // Remove the event listener, use `disposable.dispose()`
97
101
  * ```
98
102
  */
99
103
  get DocDisposed(): "DocDisposed";
@@ -102,10 +106,12 @@ export declare class FEventName {
102
106
  * @see {@link ILifeCycleChangedEvent}
103
107
  * @example
104
108
  * ```ts
105
- * univerAPI.addEvent(univerAPI.event.LifeCycleChanged, (params) => {
109
+ * const disposable = univerAPI.addEvent(univerAPI.Event.LifeCycleChanged, (params) => {
106
110
  * const { stage } = params;
107
111
  * console.log('life cycle changed', params);
108
112
  * });
113
+ *
114
+ * // Remove the event listener, use `disposable.dispose()`
109
115
  * ```
110
116
  */
111
117
  get LifeCycleChanged(): "LifeCycleChanged";
@@ -114,10 +120,12 @@ export declare class FEventName {
114
120
  * @see {@link ICommandEvent}
115
121
  * @example
116
122
  * ```ts
117
- * univerAPI.addEvent(univerAPI.event.Redo, (event) => {
123
+ * const disposable = univerAPI.addEvent(univerAPI.Event.Redo, (event) => {
118
124
  * const { params, id, type } = event;
119
- * console.log('command executed', event);
125
+ * console.log('redo command executed', event);
120
126
  * });
127
+ *
128
+ * // Remove the event listener, use `disposable.dispose()`
121
129
  * ```
122
130
  */
123
131
  get Redo(): "Redo";
@@ -126,10 +134,12 @@ export declare class FEventName {
126
134
  * @see {@link ICommandEvent}
127
135
  * @example
128
136
  * ```ts
129
- * univerAPI.addEvent(univerAPI.event.Undo, (event) => {
137
+ * const disposable = univerAPI.addEvent(univerAPI.Event.Undo, (event) => {
130
138
  * const { params, id, type } = event;
131
- * console.log('command executed', event);
139
+ * console.log('undo command executed', event);
132
140
  * });
141
+ *
142
+ * // Remove the event listener, use `disposable.dispose()`
133
143
  * ```
134
144
  */
135
145
  get Undo(): "Undo";
@@ -138,10 +148,15 @@ export declare class FEventName {
138
148
  * @see {@link ICommandEvent}
139
149
  * @example
140
150
  * ```ts
141
- * univerAPI.addEvent(univerAPI.event.BeforeRedo, (event) => {
151
+ * const disposable = univerAPI.addEvent(univerAPI.Event.BeforeRedo, (event) => {
142
152
  * const { params, id, type } = event;
143
- * console.log('command executed', event);
153
+ * console.log('before redo command executed', event);
154
+ *
155
+ * // Cancel the redo operation
156
+ * event.cancel = true;
144
157
  * });
158
+ *
159
+ * // Remove the event listener, use `disposable.dispose()`
145
160
  * ```
146
161
  */
147
162
  get BeforeRedo(): "BeforeRedo";
@@ -150,10 +165,15 @@ export declare class FEventName {
150
165
  * @see {@link ICommandEvent}
151
166
  * @example
152
167
  * ```ts
153
- * univerAPI.addEvent(univerAPI.event.BeforeUndo, (event) => {
168
+ * const disposable = univerAPI.addEvent(univerAPI.Event.BeforeUndo, (event) => {
154
169
  * const { params, id, type } = event;
155
- * console.log('command executed', event);
170
+ * console.log('before undo command executed', event);
171
+ *
172
+ * // Cancel the undo operation
173
+ * event.cancel = true;
156
174
  * });
175
+ *
176
+ * // Remove the event listener, use `disposable.dispose()`
157
177
  * ```
158
178
  */
159
179
  get BeforeUndo(): "BeforeUndo";
@@ -162,10 +182,12 @@ export declare class FEventName {
162
182
  * @see {@link ICommandEvent}
163
183
  * @example
164
184
  * ```ts
165
- * univerAPI.addEvent(univerAPI.event.CommandExecuted, (event) => {
185
+ * const disposable = univerAPI.addEvent(univerAPI.Event.CommandExecuted, (event) => {
166
186
  * const { params, id, type } = event;
167
187
  * console.log('command executed', event);
168
188
  * });
189
+ *
190
+ * // Remove the event listener, use `disposable.dispose()`
169
191
  * ```
170
192
  */
171
193
  get CommandExecuted(): "CommandExecuted";
@@ -174,10 +196,15 @@ export declare class FEventName {
174
196
  * @see {@link ICommandEvent}
175
197
  * @example
176
198
  * ```ts
177
- * univerAPI.addEvent(univerAPI.event.BeforeCommandExecute, (event) => {
199
+ * const disposable = univerAPI.addEvent(univerAPI.Event.BeforeCommandExecute, (event) => {
178
200
  * const { params, id, type } = event;
179
- * console.log('command executed', event);
201
+ * console.log('before command executed', event);
202
+ *
203
+ * // Cancel the command execution
204
+ * event.cancel = true;
180
205
  * });
206
+ *
207
+ * // Remove the event listener, use `disposable.dispose()`
181
208
  * ```
182
209
  */
183
210
  get BeforeCommandExecute(): "BeforeCommandExecute";
@@ -9,42 +9,42 @@ export declare class FHooks extends FBase {
9
9
  constructor(_injector: Injector, _lifecycleService: LifecycleService);
10
10
  /**
11
11
  * @param callback
12
- * @deprecated use `univerAPI.addEvent(univerAPI.Event.LifecycleChanged)` as instead
12
+ * @deprecated use `univerAPI.addEvent(univerAPI.Event.LifeCycleChanged, ({ stage }) => {})` as instead
13
13
  */
14
14
  onStarting(callback: () => void): IDisposable;
15
15
  /**
16
16
  * @param callback
17
- * @deprecated use `univerAPI.addEvent(univerAPI.Event.LifecycleChanged)` as instead
17
+ * @deprecated use `univerAPI.addEvent(univerAPI.Event.LifeCycleChanged, ({ stage }) => {})` as instead
18
18
  */
19
19
  onReady(callback: () => void): IDisposable;
20
20
  /**
21
21
  * @param callback
22
- * @deprecated use `univerAPI.addEvent(univerAPI.Event.LifecycleChanged, () => {})` as instead
22
+ * @deprecated use `univerAPI.addEvent(univerAPI.Event.LifeCycleChanged, ({ stage }) => {})` as instead
23
23
  */
24
24
  onRendered(callback: () => void): IDisposable;
25
25
  /**
26
26
  * @param callback
27
- * @deprecated use `univerAPI.addEvent(univerAPI.Event.LifecycleChanged, () => {})` as instead
27
+ * @deprecated use `univerAPI.addEvent(univerAPI.Event.LifeCycleChanged, ({ stage }) => {})` as instead
28
28
  */
29
29
  onSteady(callback: () => void): IDisposable;
30
30
  /**
31
31
  * @param callback
32
- * @deprecated use `univerAPI.addEvent(univerAPI.Event.BeforeUndo, () => {})` as instead
32
+ * @deprecated use `univerAPI.addEvent(univerAPI.Event.BeforeUndo, (event) => {})` as instead
33
33
  */
34
34
  onBeforeUndo(callback: (action: IUndoRedoItem) => void): IDisposable;
35
35
  /**
36
36
  * @param callback
37
- * @deprecated use `univerAPI.addEvent(univerAPI.Event.Undo, () => {})` as instead
37
+ * @deprecated use `univerAPI.addEvent(univerAPI.Event.Undo, (event) => {})` as instead
38
38
  */
39
39
  onUndo(callback: (action: IUndoRedoItem) => void): IDisposable;
40
40
  /**
41
41
  * @param callback
42
- * @deprecated use `univerAPI.addEvent(univerAPI.Event.BeforeRedo, () => {})` as instead
42
+ * @deprecated use `univerAPI.addEvent(univerAPI.Event.BeforeRedo, (event) => {})` as instead
43
43
  */
44
44
  onBeforeRedo(callback: (action: IUndoRedoItem) => void): IDisposable;
45
45
  /**
46
46
  * @param callback
47
- * @deprecated use `univerAPI.addEvent(univerAPI.Event.Redo, () => {})` as instead
47
+ * @deprecated use `univerAPI.addEvent(univerAPI.Event.Redo, (event) => {})` as instead
48
48
  */
49
49
  onRedo(callback: (action: IUndoRedoItem) => void): IDisposable;
50
50
  }