0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2024-12-22 07:13:08 -05:00

Type editor in spec

This makes it easier to catch inconsistencies between the spec and
interface for Squire.
This commit is contained in:
Callum Skeet 2023-07-31 11:31:18 +10:00
parent 54914dd5d5
commit 3dcd940a20

View file

@ -7,7 +7,7 @@ import { Squire } from '../source/Editor';
document.body.innerHTML = `<div id="squire">`;
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 = `<div id="squire">`;
});
});