eslint fix

This commit is contained in:
Peter Savchenko 2024-04-28 11:05:39 +03:00
parent 70b7e46f42
commit beebfae54f
2 changed files with 9 additions and 8 deletions

View file

@ -97,9 +97,9 @@ export default class CaretAPI extends Module {
/**
* Sets caret to the Block by passed index
*
* @param {number} index - index of Block where to set caret
* @param {string} position - position where to set caret
* @param {number} offset - caret offset
* @param blockOrIdOrIndex - either BlockAPI or Block id or Block index
* @param position - position where to set caret
* @param offset - caret offset
* @returns {boolean}
*/
private setToBlock = (

View file

@ -1,11 +1,12 @@
import type { API } from "../../../types";
import type { BlockAPI } from "../../../types/api/block";
import { EditorModules } from "../../types-internal/editor-modules";
import Block from "../block";
import type { BlockAPI } from '../../../types/api/block';
import { EditorModules } from '../../types-internal/editor-modules';
import Block from '../block';
/**
* Returns Block instance by passed Block index or Block id
* @param attribute
*
* @param attribute - either BlockAPI or Block id or Block index
* @param editor - Editor instance
*/
export function resolveBlock(attribute: BlockAPI | BlockAPI['id'] | number, editor: EditorModules): Block | undefined {
if (typeof attribute === 'number') {