Refactor jsdoc types (#16)

* WIP

* Fix type 1

* Missing types info

* Some fixes

* Several types refactoring and fixes

* WIP

* Fix grammar
This commit is contained in:
barsdeveloper
2023-09-22 22:56:33 +02:00
committed by GitHub
parent 78c62ee59a
commit fdd86ce5de
78 changed files with 413 additions and 1010 deletions

View File

@@ -1,7 +1,5 @@
import Configuration from "../Configuration.js"
/** @typedef {import("../Blueprint.js").default} Blueprint */
/** @template {Element} T */
export default class IInput {

View File

@@ -1,7 +1,3 @@
import IInput from "./IInput"
/** @typedef {import("../Blueprint.js").default} Blueprint */
export default class InputCombination {
constructor() { }

View File

@@ -2,8 +2,6 @@ import ElementFactory from "../../element/ElementFactory.js"
import IInput from "../IInput.js"
import ObjectSerializer from "../../serialization/ObjectSerializer.js"
/** @typedef {import("../../element/NodeElement.js").NodeElementConstructor} NodeElementConstructor */
export default class Paste extends IInput {
static #serializer = new ObjectSerializer()

View File

@@ -2,8 +2,6 @@ import KeyboardShortcut from "./KeyboardShortcut.js"
import Shortcuts from "../../Shortcuts.js"
import Zoom from "../mouse/Zoom.js"
/** @typedef {import("../../Blueprint.js").default} Blueprint */
export default class KeyboardEnableZoom extends KeyboardShortcut {
/** @type {Zoom} */

View File

@@ -2,8 +2,6 @@ import Configuration from "../../Configuration.js"
import IInput from "../IInput.js"
import KeyBindingEntity from "../../entity/KeyBindingEntity.js"
/** @typedef {import("../../Blueprint.js").default} Blueprint */
/**
* @template {Element} T
* @extends IInput<T>

View File

@@ -3,11 +3,6 @@ import IDraggableElement from "../../element/IDraggableElement.js"
import IPointing from "./IPointing.js"
import Utility from "../../Utility.js"
/**
* @typedef {import("../../Blueprint.js").default} Blueprint
* @typedef {import("../../element/IElement.js").default} IElement
*/
/**
* @template {IElement} T
* @extends {IPointing<T>}

View File

@@ -1,8 +1,6 @@
import IInput from "../IInput.js"
import Utility from "../../Utility.js"
/** @typedef {import("../keyboard/KeyboardShortcut.js").default} KeyboardShortcut */
/**
* @template {Element} T
* @extends {IInput<T>}

View File

@@ -1,11 +1,6 @@
import Configuration from "../../Configuration.js"
import IPointing from "./IPointing.js"
/**
* @typedef {import("../../Blueprint.js").default} Blueprint
* @typedef {import("../keyboard/KeyboardShortcut.js").default} KeyboardShortcut
*/
/**
* @template {Element} T
* @extends {IPointing<T>}

View File

@@ -1,7 +1,5 @@
import MouseMoveDraggable from "./MouseMoveDraggable.js"
/** @typedef {import("../../Blueprint.js").default} Blueprint */
export default class MouseClickDrag extends MouseMoveDraggable {
#onClicked

View File

@@ -2,14 +2,6 @@ import Configuration from "../../Configuration.js"
import ElementFactory from "../../element/ElementFactory.js"
import IMouseClickDrag from "./IMouseClickDrag.js"
/**
* @typedef {import("../../Blueprint.js").default} Blueprint
* @typedef {import("../../element/LinkElement.js").default} LinkElement
* @typedef {import("../../element/LinkElement.js").LinkElementConstructor} LinkElementConstructor
* @typedef {import("../../element/PinElement.js").default} PinElement
* @typedef {import("../../template/pin/KnotPinTemplate.js").default} KnotPinTemplate
*/
/** @extends IMouseClickDrag<PinElement> */
export default class MouseCreateLink extends IMouseClickDrag {

View File

@@ -1,9 +1,5 @@
import IMouseClickDrag from "./IMouseClickDrag.js"
/**
* @typedef {import("../../element/IDraggableElement.js").default} IDraggableElement
*/
/**
* @template {IDraggableElement} T
* @extends {IMouseClickDrag<T>}

View File

@@ -1,10 +1,6 @@
import IMouseClickDrag from "./IMouseClickDrag.js"
import Utility from "../../Utility.js"
/**
* @typedef {import("../../element/IDraggableElement.js").default} IDraggableElement
*/
/**
* @template {IDraggableElement} T
* @extends {IMouseClickDrag<T>}

View File

@@ -1,10 +1,5 @@
import MouseMoveDraggable from "./MouseMoveDraggable.js"
/**
* @typedef {import("../../element/NodeElement.js").default} NodeElement
* @typedef {import("../../template/node/CommentNodeTemplate.js").default} CommentNodeTemplate
*/
/** @extends {MouseMoveDraggable<NodeElement>} */
export default class MouseMoveNodes extends MouseMoveDraggable {

View File

@@ -1,7 +1,5 @@
import IPointing from "./IPointing.js"
/** @typedef {import("../../Blueprint.js").default} Blueprint */
export default class MouseWheel extends IPointing {
static #ignoreEvent =