Commit d2c45ec
authored
fix(types): add exportDocx overloads and fix Toolbar compat (#2703)
1. Add exportDocx overloads narrowing return type per flag:
- exportXmlOnly: true β Promise<string>
- exportJsonOnly: true β Promise<string>
- getUpdatedDocs: true β Promise<Record<string, string | null>>
- default β Promise<Blob | Buffer>
Extract ExportDocxParams interface extending SaveOptions.
2. Remove [key: string]: unknown index signature from Toolbar interface.
SuperToolbar (extends EventEmitter) was incompatible because
EventEmitter methods return specific types, not unknown.
Keep setActiveEditor(editor: Editor) matching Editor.#onFocus usage.1 parent f3e837c commit d2c45ec
3 files changed
Lines changed: 35 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
231 | 244 | | |
232 | 245 | | |
233 | 246 | | |
| |||
3061 | 3074 | | |
3062 | 3075 | | |
3063 | 3076 | | |
| 3077 | + | |
| 3078 | + | |
| 3079 | + | |
| 3080 | + | |
| 3081 | + | |
| 3082 | + | |
3064 | 3083 | | |
| 3084 | + | |
| 3085 | + | |
| 3086 | + | |
| 3087 | + | |
3065 | 3088 | | |
3066 | 3089 | | |
3067 | 3090 | | |
| |||
3071 | 3094 | | |
3072 | 3095 | | |
3073 | 3096 | | |
3074 | | - | |
3075 | | - | |
3076 | | - | |
3077 | | - | |
3078 | | - | |
3079 | | - | |
3080 | | - | |
3081 | | - | |
3082 | | - | |
3083 | | - | |
| 3097 | + | |
3084 | 3098 | | |
3085 | 3099 | | |
3086 | 3100 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
82 | 85 | | |
83 | 86 | | |
84 | 87 | | |
85 | | - | |
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
80 | 86 | | |
81 | 87 | | |
82 | 88 | | |
| |||
0 commit comments