// in cypress/support/index.d.ts // load type definitions that come with Cypress module /// import type { EditorConfig } from './../../../types/index'; import type EditorJS from '../../../types/index' declare global { namespace Cypress { interface Chainable { /** * Custom command to select DOM element by data-cy attribute. * @param editorConfig - config to pass to the editor * @example cy.createEditor({}) */ createEditor(editorConfig: EditorConfig): Chainable } interface ApplicationWindow { EditorJS: typeof EditorJS } } }