From 3dcd940a205072a6a25d2166249414148983bcc8 Mon Sep 17 00:00:00 2001 From: Callum Skeet Date: Mon, 31 Jul 2023 11:31:18 +1000 Subject: [PATCH] Type editor in spec This makes it easier to catch inconsistencies between the spec and interface for Squire. --- test/squire.spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/squire.spec.ts b/test/squire.spec.ts index c7a552f..ef60445 100644 --- a/test/squire.spec.ts +++ b/test/squire.spec.ts @@ -7,7 +7,7 @@ import { Squire } from '../source/Editor'; document.body.innerHTML = `
`; -let editor; +let editor: Squire; describe('Squire RTE', () => { beforeEach(() => { @@ -25,7 +25,7 @@ describe('Squire RTE', () => { }); }); - function selectAll(editor) { + function selectAll(editor: Squire) { document.getSelection()!.removeAllRanges(); const range = document.createRange(); range.setStart(editor._root.childNodes.item(0), 0); @@ -524,7 +524,7 @@ describe('Squire RTE', () => { }); afterEach(() => { - editor = null; + editor = null as any; document.body.innerHTML = `
`; }); });