Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: tsc errors picked up from develop #6224

Merged
merged 30 commits into from
Jun 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f9734eb
fix: relative path for deprecation utils
BeksOmega Jun 17, 2022
3cc4556
fix: checking if properties exist in svg_math
BeksOmega Jun 17, 2022
e5d3ace
fix: set all timeout PIDs to AnyDuringMigration
BeksOmega Jun 17, 2022
b0b4634
fix: make nullability errors explicity in block drag surface
BeksOmega Jun 17, 2022
3df7dde
fix: make null check in events_block_change explicit
BeksOmega Jun 17, 2022
83550f4
fix: make getEventWorkspace_ internal so we can access it from Commen…
BeksOmega Jun 17, 2022
9631a7f
fix: rename DIV -> containerDiv in tooltip
BeksOmega Jun 17, 2022
c50bdb6
fix: ignore backwards compat check in category
BeksOmega Jun 17, 2022
f9f1678
fix: set block styles to AnyDuringMigration
BeksOmega Jun 17, 2022
498fd2d
fix: type typo in KeyboardShortcut
BeksOmega Jun 17, 2022
716828e
fix: constants name in row measurables
BeksOmega Jun 17, 2022
ad6ed93
fix: typecast in mutator
BeksOmega Jun 17, 2022
72dea11
fix: populateProcedures type of flattened array
BeksOmega Jun 17, 2022
9b03e95
fix: ignore errors related to workspace comment deserialization
BeksOmega Jun 17, 2022
f634c50
chore: format files
BeksOmega Jun 17, 2022
b9fc36d
fix: renaming imports missing file extensions
BeksOmega Jun 17, 2022
8cae019
fix: remove check for sound.play
BeksOmega Jun 22, 2022
631dfa3
fix: temporarily remove bad requireType.
BeksOmega Jun 24, 2022
c7899a6
fix: bad jsdoc in array
BeksOmega Jun 24, 2022
3640a43
fix: silence missing property errors
BeksOmega Jun 24, 2022
4343cc9
fix: context menu action handler not knowing the type of this.
BeksOmega Jun 24, 2022
36e9578
fix: readd getDeveloperVars checks (should not be part of migration)
BeksOmega Jun 24, 2022
b92748f
fix: silence closure errors about overriding supertype props
BeksOmega Jun 24, 2022
750c9bd
fix: silence globalThis errors
BeksOmega Jun 24, 2022
eb8f5d6
fix: bad jsdoc name
BeksOmega Jun 24, 2022
4f6a7bf
chore: attempt compiling with blockly.js
BeksOmega Jun 24, 2022
f1310e8
fix: attempt moving the import statement above the namespace line
BeksOmega Jun 24, 2022
b212625
chore: add todo comments to block def files
BeksOmega Jun 27, 2022
5bc9689
chore: remove todo from context menu
BeksOmega Jun 27, 2022
31399be
chore: add comments abotu disabled errors
BeksOmega Jun 27, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion blocks/blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ const procedures = goog.require('Blockly.libraryBlocks.procedures');
const texts = goog.require('Blockly.libraryBlocks.texts');
const variables = goog.require('Blockly.libraryBlocks.variables');
const variablesDynamic = goog.require('Blockly.libraryBlocks.variablesDynamic');
// const {BlockDefinition} = goog.requireType('Blockly.blocks');
// TODO (6248): Properly import the BlockDefinition type.
/* eslint-disable-next-line no-unused-vars */
const {BlockDefinition} = goog.requireType('Blockly.blocks');
const BlockDefinition = Object;
BeksOmega marked this conversation as resolved.
Show resolved Hide resolved


exports.colour = colour;
Expand Down
4 changes: 3 additions & 1 deletion blocks/colour.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@

goog.module('Blockly.libraryBlocks.colour');

// const {BlockDefinition} = goog.requireType('Blockly.blocks');
// TODO (6248): Properly import the BlockDefinition type.
/* eslint-disable-next-line no-unused-vars */
const {BlockDefinition} = goog.requireType('Blockly.blocks');
const BlockDefinition = Object;
const {createBlockDefinitionsFromJsonArray, defineBlocks} = goog.require('Blockly.common');
/** @suppress {extraRequire} */
goog.require('Blockly.FieldColour');
Expand Down
4 changes: 3 additions & 1 deletion blocks/lists.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ const Xml = goog.require('Blockly.Xml');
const {Align} = goog.require('Blockly.Input');
/* eslint-disable-next-line no-unused-vars */
const {Block} = goog.requireType('Blockly.Block');
// const {BlockDefinition} = goog.requireType('Blockly.blocks');
// TODO (6248): Properly import the BlockDefinition type.
/* eslint-disable-next-line no-unused-vars */
const {BlockDefinition} = goog.requireType('Blockly.blocks');
const BlockDefinition = Object;
const {ConnectionType} = goog.require('Blockly.ConnectionType');
const {FieldDropdown} = goog.require('Blockly.FieldDropdown');
const {Msg} = goog.require('Blockly.Msg');
Expand Down
4 changes: 3 additions & 1 deletion blocks/logic.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ const Extensions = goog.require('Blockly.Extensions');
const xmlUtils = goog.require('Blockly.utils.xml');
/* eslint-disable-next-line no-unused-vars */
const {Block} = goog.requireType('Blockly.Block');
// const {BlockDefinition} = goog.requireType('Blockly.blocks');
// TODO (6248): Properly import the BlockDefinition type.
/* eslint-disable-next-line no-unused-vars */
const {BlockDefinition} = goog.requireType('Blockly.blocks');
const BlockDefinition = Object;
const {Msg} = goog.require('Blockly.Msg');
const {Mutator} = goog.require('Blockly.Mutator');
/* eslint-disable-next-line no-unused-vars */
Expand Down
4 changes: 3 additions & 1 deletion blocks/loops.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ const Variables = goog.require('Blockly.Variables');
const xmlUtils = goog.require('Blockly.utils.xml');
/* eslint-disable-next-line no-unused-vars */
const {Block} = goog.requireType('Blockly.Block');
// const {BlockDefinition} = goog.requireType('Blockly.blocks');
// TODO (6248): Properly import the BlockDefinition type.
/* eslint-disable-next-line no-unused-vars */
const {BlockDefinition} = goog.requireType('Blockly.blocks');
const BlockDefinition = Object;
const {Msg} = goog.require('Blockly.Msg');
const {createBlockDefinitionsFromJsonArray, defineBlocks} = goog.require('Blockly.common');
/** @suppress {extraRequire} */
Expand Down
4 changes: 3 additions & 1 deletion blocks/math.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ const FieldDropdown = goog.require('Blockly.FieldDropdown');
const xmlUtils = goog.require('Blockly.utils.xml');
/* eslint-disable-next-line no-unused-vars */
const {Block} = goog.requireType('Blockly.Block');
// const {BlockDefinition} = goog.requireType('Blockly.blocks');
// TODO (6248): Properly import the BlockDefinition type.
/* eslint-disable-next-line no-unused-vars */
const {BlockDefinition} = goog.requireType('Blockly.blocks');
const BlockDefinition = Object;
const {createBlockDefinitionsFromJsonArray, defineBlocks} = goog.require('Blockly.common');
/** @suppress {extraRequire} */
goog.require('Blockly.FieldLabel');
Expand Down
4 changes: 3 additions & 1 deletion blocks/procedures.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ const xmlUtils = goog.require('Blockly.utils.xml');
const {Align} = goog.require('Blockly.Input');
/* eslint-disable-next-line no-unused-vars */
const {Block} = goog.requireType('Blockly.Block');
// const {BlockDefinition} = goog.requireType('Blockly.blocks');
// TODO (6248): Properly import the BlockDefinition type.
/* eslint-disable-next-line no-unused-vars */
const {BlockDefinition} = goog.requireType('Blockly.blocks');
const BlockDefinition = Object;
const {config} = goog.require('Blockly.config');
/* eslint-disable-next-line no-unused-vars */
const {FieldCheckbox} = goog.require('Blockly.FieldCheckbox');
Expand Down
4 changes: 3 additions & 1 deletion blocks/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ const xmlUtils = goog.require('Blockly.utils.xml');
const {Align} = goog.require('Blockly.Input');
/* eslint-disable-next-line no-unused-vars */
const {Block} = goog.requireType('Blockly.Block');
// const {BlockDefinition} = goog.requireType('Blockly.blocks');
// TODO (6248): Properly import the BlockDefinition type.
/* eslint-disable-next-line no-unused-vars */
const {BlockDefinition} = goog.requireType('Blockly.blocks');
const BlockDefinition = Object;
const {ConnectionType} = goog.require('Blockly.ConnectionType');
const {FieldDropdown} = goog.require('Blockly.FieldDropdown');
const {FieldImage} = goog.require('Blockly.FieldImage');
Expand Down
4 changes: 3 additions & 1 deletion blocks/variables.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ const Variables = goog.require('Blockly.Variables');
const xmlUtils = goog.require('Blockly.utils.xml');
/* eslint-disable-next-line no-unused-vars */
const {Block} = goog.requireType('Blockly.Block');
// const {BlockDefinition} = goog.requireType('Blockly.blocks');
// TODO (6248): Properly import the BlockDefinition type.
/* eslint-disable-next-line no-unused-vars */
const {BlockDefinition} = goog.requireType('Blockly.blocks');
const BlockDefinition = Object;
const {Msg} = goog.require('Blockly.Msg');
const {createBlockDefinitionsFromJsonArray, defineBlocks} = goog.require('Blockly.common');
/** @suppress {extraRequire} */
Expand Down
4 changes: 3 additions & 1 deletion blocks/variables_dynamic.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ const Variables = goog.require('Blockly.Variables');
const xml = goog.require('Blockly.utils.xml');
/* eslint-disable-next-line no-unused-vars */
const {Block} = goog.requireType('Blockly.Block');
// const {BlockDefinition} = goog.requireType('Blockly.blocks');
// TODO (6248): Properly import the BlockDefinition type.
/* eslint-disable-next-line no-unused-vars */
const {BlockDefinition} = goog.requireType('Blockly.blocks');
const BlockDefinition = Object;
const {Msg} = goog.require('Blockly.Msg');
const {createBlockDefinitionsFromJsonArray, defineBlocks} = goog.require('Blockly.common');
/** @suppress {extraRequire} */
Expand Down
6 changes: 3 additions & 3 deletions core/block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import * as goog from '../closure/goog/goog.js';
goog.declareModuleId('Blockly.Block');

// Unused import preserved for side-effects. Remove if unneeded.
import './events/events_block_change';
import './events/events_block_change.js';
// Unused import preserved for side-effects. Remove if unneeded.
import './events/events_block_create';
import './events/events_block_create.js';
// Unused import preserved for side-effects. Remove if unneeded.
import './events/events_block_delete';
import './events/events_block_delete.js';

import {Blocks} from './blocks.js';
/* eslint-disable-next-line no-unused-vars */
Expand Down
2 changes: 1 addition & 1 deletion core/block_animations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ interface CloneRect {
} // eslint-disable-line no-unused-vars

/** PID of disconnect UI animation. There can only be one at a time. */
let disconnectPid = 0;
let disconnectPid: AnyDuringMigration = 0;
BeksOmega marked this conversation as resolved.
Show resolved Hide resolved

/** SVG group of wobbling block. There can only be one at a time. */
// AnyDuringMigration because: Type 'null' is not assignable to type 'Element'.
Expand Down
8 changes: 4 additions & 4 deletions core/block_drag_surface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export class BlockDragSurfaceSvg {
const roundY = Math.round(y);
this.childSurfaceXY_.x = roundX;
this.childSurfaceXY_.y = roundY;
this.dragGroup_.setAttribute(
this.dragGroup_!.setAttribute(
'transform',
'translate(' + roundX + ',' + roundY + ') scale(' + scale + ')');
}
Expand All @@ -132,12 +132,12 @@ export class BlockDragSurfaceSvg {
* @private
*/
translateSurfaceInternal_() {
let x = this.surfaceXY_.x;
let y = this.surfaceXY_.y;
let x = this.surfaceXY_!.x;
let y = this.surfaceXY_!.y;
// Make sure the svg exists on a pixel boundary so that it is not fuzzy.
x = Math.round(x);
y = Math.round(y);
this.SVG_.style.display = 'block';
this.SVG_!.style.display = 'block';

// AnyDuringMigration because: Argument of type 'SVGElement | null' is not
// assignable to parameter of type 'Element'.
Expand Down
2 changes: 1 addition & 1 deletion core/block_dragger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import * as goog from '../closure/goog/goog.js';
goog.declareModuleId('Blockly.BlockDragger');

// Unused import preserved for side-effects. Remove if unneeded.
import './events/events_block_drag';
import './events/events_block_drag.js';

import * as blockAnimation from './block_animations.js';
/* eslint-disable-next-line no-unused-vars */
Expand Down
9 changes: 5 additions & 4 deletions core/block_svg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ goog.declareModuleId('Blockly.BlockSvg');

/* eslint-disable-next-line no-unused-vars */
// Unused import preserved for side-effects. Remove if unneeded.
import './theme';
import './theme.js';
// Unused import preserved for side-effects. Remove if unneeded.
import './events/events_selected';
import './events/events_selected.js';
// Unused import preserved for side-effects. Remove if unneeded.
import './touch';
import './touch.js';

import {Block} from './block.js';
import * as blockAnimations from './block_animations.js';
Expand Down Expand Up @@ -131,7 +131,8 @@ export class BlockSvg extends Block implements IASTNodeLocationSvg,
*/
// AnyDuringMigration because: Type 'null' is not assignable to type '{ [key:
// string]: number; }'.
private warningTextDb_: {[key: string]: number} = null as AnyDuringMigration;
private warningTextDb_: {[key: string]: AnyDuringMigration} =
null as AnyDuringMigration;

/** Block's mutator icon (if any). */
mutator: Mutator|null = null;
Expand Down
Loading