Skip to content

Commit 0b3da6b

Browse files
committed
refactor getstyle to get
1 parent f20085b commit 0b3da6b

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/client/initialize.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ export function initialize<T = {}>(): PluginInstance<T> {
230230
return () => off('wb:plugin:style:update', callback);
231231
},
232232

233-
getStyle() {
233+
get() {
234234
return execPromise('wb:plugin:style:get');
235235
},
236236
},

src/react/hooks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ export function usePluginStyle(): PluginStyle | undefined {
258258

259259
useEffect(() => {
260260
// Request initial style data on mount and subscribe to updates
261-
void client.style.getStyle().then(response => setStyle(response));
261+
void client.style.get().then(response => setStyle(response));
262262
return client.style.subscribe(setStyle);
263263
}, [client]);
264264

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ export interface PluginInstance<T = any> {
369369
* Request current style from workbook
370370
* @returns Promise with current style
371371
*/
372-
getStyle(): Promise<PluginStyle>;
372+
get(): Promise<PluginStyle>;
373373
};
374374

375375
/**

0 commit comments

Comments
 (0)