mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-17 14:27:02 +08:00
refactor(editor): remove dependency of command global types (#9903)
Closes: [BS-2216](https://linear.app/affine-design/issue/BS-2216/remove-global-types-in-command)
This commit is contained in:
@@ -9,14 +9,12 @@ export async function updateBlockType(
|
||||
) {
|
||||
await page.evaluate(
|
||||
([flavour, type]) => {
|
||||
(window.host.std.command.chain() as any)
|
||||
.updateBlockType({
|
||||
flavour,
|
||||
props: {
|
||||
type,
|
||||
},
|
||||
})
|
||||
.run();
|
||||
window.host.std.command.exec(window.$blocksuite.blocks.updateBlockType, {
|
||||
flavour,
|
||||
props: {
|
||||
type,
|
||||
},
|
||||
});
|
||||
},
|
||||
[flavour, type] as [BlockSuite.Flavour, string?]
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user