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:
parent
54914dd5d5
commit
3dcd940a20
1 changed files with 3 additions and 3 deletions
|
@ -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">`;
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue