refactor: Remove more uses of AnyDuringMigration (#6863)

* refactor: Remove uses of AnyDuringMigration from xml.ts.

* refactor: Remove uses of AnyDuringMigration from block_svg.ts.

* refactor: Remove uses of AnyDuringMigration from theme_manager.ts.

* refactor: Remove uses of AnyDuringMigration from names.ts.

* refactor: Remove uses of AnyDuringMigration from field_angle.ts.

* refactor: Remove some uses of AnyDuringMigration from block.ts.

* refactor: Make safename construction more readable.

* fix: Use a default size for block comments.

* fix: Clarify test of shadow block disposal.

* fix: Update assert in workspace_svg_test to use isDeadOrDying().
This commit is contained in:
Aaron Dodson
2023-02-28 14:38:17 -08:00
committed by GitHub
parent c9e2af2a27
commit 8a44dff4e8
11 changed files with 98 additions and 202 deletions

View File

@@ -94,7 +94,7 @@ export function inject(
* @param options Dictionary of options.
* @returns Newly created SVG image.
*/
function createDom(container: Element, options: Options): Element {
function createDom(container: Element, options: Options): SVGElement {
// Sadly browsers (Chrome vs Firefox) are currently inconsistent in laying
// out content in RTL mode. Therefore Blockly forces the use of LTR,
// then manually positions content in RTL as needed.
@@ -146,7 +146,7 @@ function createDom(container: Element, options: Options): Element {
* @param options Dictionary of options.
* @returns Newly created main workspace.
*/
function createMainWorkspace(svg: Element, options: Options): WorkspaceSvg {
function createMainWorkspace(svg: SVGElement, options: Options): WorkspaceSvg {
options.parentWorkspace = null;
const mainWorkspace = new WorkspaceSvg(options);
const wsOptions = mainWorkspace.options;