refactor(editor): cleanup ts-expect-error (#9369)

This commit is contained in:
Saul-Mirone
2024-12-27 05:14:23 +00:00
parent 908e3efd12
commit 2b27d62b0e
35 changed files with 84 additions and 90 deletions
@@ -482,7 +482,7 @@ export const LatexExtension = InlineMarkdownExtension({
if (!latexBlock || latexBlock.flavour !== 'affine:latex') return;
//FIXME(@Flrande): wait for refactor
// @ts-expect-error FIXME: ts error
// @ts-expect-error BS-2241
latexBlock.toggleEditor();
})
.catch(console.error);
@@ -58,10 +58,7 @@ export class AffineLatexNode extends SignalWatcher(
gap: 10px;
border-radius: 4px;
background: ${
// @ts-expect-error FIXME: ts error
unsafeCSSVarV2('label/red')
};
background: ${unsafeCSSVarV2('chip/label/red')};
color: ${unsafeCSSVarV2('text/highlight/fg/red')};
font-family: Inter;
@@ -126,7 +123,7 @@ export class AffineLatexNode extends SignalWatcher(
if (!latexContainer) return;
latexContainer.replaceChildren();
// @ts-expect-error FIXME: ts error
// @ts-expect-error lit hack won't fix
delete latexContainer['_$litPart$'];
if (latex.length === 0) {
@@ -142,7 +139,7 @@ export class AffineLatexNode extends SignalWatcher(
});
} catch {
latexContainer.replaceChildren();
// @ts-expect-error FIXME: ts error
// @ts-expect-error lit hack won't fix
delete latexContainer['_$litPart$'];
render(
html`<span class="error-placeholder">Error equation</span>`,