File tree 3 files changed +6
-3
lines changed
3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ export default class ShimoSheetCabinet extends CabinetBase {
9
9
private token : string
10
10
private file : ShimoSDK . File
11
11
private editorOptions : ShimoSDK . Sheet . EditorOptions
12
- private fetchCollaborators : string
12
+ private fetchCollaborators : string | ShimoSDK . Sheet . FetchCollaboratorsCallback
13
13
private plugins : string [ ]
14
14
private collaboration : ShimoSDK . Common . Collaboration
15
15
@@ -212,7 +212,7 @@ export default class ShimoSheetCabinet extends CabinetBase {
212
212
currentUser : {
213
213
id : this . user . id
214
214
} ,
215
- permission : this . user . permission ,
215
+ permission : this . user . permission ! ,
216
216
fetchCollaborators : this . fetchCollaborators
217
217
}
218
218
const _ = new this . sdkSheet . plugins . Lock ( options )
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ declare global {
73
73
export type ToolbarOptions = IToolbar . ToolbarOptions
74
74
export type Lock = ILock . default
75
75
export type LockOptions = ILock . LockOptions
76
+ export type FetchCollaboratorsCallback = ILock . FetchCollaboratorsCallback
76
77
}
77
78
78
79
namespace Document {
Original file line number Diff line number Diff line change @@ -18,13 +18,15 @@ interface Collaborator {
18
18
displayRole ?: string | undefined
19
19
}
20
20
21
+ export type FetchCollaboratorsCallback = ( ) => Promise < Collaborator [ ] >
22
+
21
23
export interface LockOptions {
22
24
editor : Editor
23
25
currentUser : {
24
26
id : number
25
27
}
26
28
permission : PermissionConfig
27
- fetchCollaborators : string
29
+ fetchCollaborators : string | FetchCollaboratorsCallback
28
30
}
29
31
export default class Lock {
30
32
constructor ( opts : LockOptions ) ;
You can’t perform that action at this time.
0 commit comments