chore: remove AnyDuringMigration from common renderer (#6402)

* chore: remove AnyDuringMigration from common renderer

* chore: remove AnyDuringMigration in common drawer

* chore: format

* chore: add dividers back

* chore: format
This commit is contained in:
Beka Westberg
2022-09-11 13:06:41 -07:00
committed by GitHub
parent d754c6d278
commit b5cd839000
13 changed files with 189 additions and 243 deletions

View File

@@ -29,7 +29,7 @@ import type {IPathObject} from './i_path_object.js';
* @alias Blockly.blockRendering.PathObject
*/
export class PathObject implements IPathObject {
svgRoot: AnyDuringMigration;
svgRoot: SVGElement;
/** @internal */
svgPath: SVGElement;
@@ -39,9 +39,7 @@ export class PathObject implements IPathObject {
*
* @internal
*/
// AnyDuringMigration because: Type 'null' is not assignable to type
// 'SVGElement'.
cursorSvg: SVGElement = null as AnyDuringMigration;
cursorSvg: SVGElement|null = null;
/**
* Holds the markers svg element when the marker is attached to the block.
@@ -49,9 +47,7 @@ export class PathObject implements IPathObject {
*
* @internal
*/
// AnyDuringMigration because: Type 'null' is not assignable to type
// 'SVGElement'.
markerSvg: SVGElement = null as AnyDuringMigration;
markerSvg: SVGElement|null = null;
/** @internal */
constants: ConstantProvider;
@@ -104,9 +100,7 @@ export class PathObject implements IPathObject {
*/
setCursorSvg(cursorSvg: SVGElement) {
if (!cursorSvg) {
// AnyDuringMigration because: Type 'null' is not assignable to type
// 'SVGElement'.
this.cursorSvg = null as AnyDuringMigration;
this.cursorSvg = null;
return;
}
@@ -123,9 +117,7 @@ export class PathObject implements IPathObject {
*/
setMarkerSvg(markerSvg: SVGElement) {
if (!markerSvg) {
// AnyDuringMigration because: Type 'null' is not assignable to type
// 'SVGElement'.
this.markerSvg = null as AnyDuringMigration;
this.markerSvg = null;
return;
}
@@ -279,6 +271,7 @@ export class PathObject implements IPathObject {
* @param _enable True if styling should be added.
* @internal
*/
updateShapeForInputHighlight(_conn: Connection, _enable: boolean) {}
updateShapeForInputHighlight(_conn: Connection, _enable: boolean) {
// NOOP
}
}
// NOP