fix: remaining enums that weren't properly exported (#6251)

* fix: remaining enums that weren't properly exported

* chore: format

* fix: add enum value exports

* chore: format
This commit is contained in:
Beka Westberg
2022-06-29 16:18:29 +00:00
committed by GitHub
parent e36a10327f
commit 7eb56ea715
2 changed files with 37 additions and 30 deletions
+15 -11
View File
@@ -52,12 +52,6 @@ const DUPLICATE_BLOCK_ERROR = 'The insertion marker ' +
'you are using a mutator, make sure your domToMutation method is ' +
'properly defined.';
export enum PreviewType {
INSERTION_MARKER = 0,
INPUT_OUTLINE = 1,
REPLACEMENT_FADE = 2,
}
/**
* Class that controls updates to connections during drags. It is primarily
* responsible for finding the closest eligible connection and highlighting or
@@ -65,11 +59,6 @@ export enum PreviewType {
* @alias Blockly.InsertionMarkerManager
*/
export class InsertionMarkerManager {
/**
* An enum describing different kinds of previews the InsertionMarkerManager
* could display.
*/
static PREVIEW_TYPE = PreviewType;
private readonly topBlock_: BlockSvg;
private readonly workspace_: WorkspaceSvg;
@@ -788,3 +777,18 @@ export class InsertionMarkerManager {
return result;
}
}
export namespace InsertionMarkerManager {
/**
* An enum describing different kinds of previews the InsertionMarkerManager
* could display.
*/
export enum PREVIEW_TYPE {
INSERTION_MARKER = 0,
INPUT_OUTLINE = 1,
REPLACEMENT_FADE = 2,
}
}
export type PreviewType = InsertionMarkerManager.PREVIEW_TYPE;
export const PreviewType = InsertionMarkerManager.PREVIEW_TYPE;
+22 -19
View File
@@ -47,30 +47,11 @@ interface PathLeftShape {
/** Maximum randomness in workspace units for bumping a block. */
const BUMP_RANDOMNESS = 10;
enum TrackedState {
WILL_TRACK = -1,
UNTRACKED = 0,
TRACKED = 1,
}
/**
* Class for a connection between blocks that may be rendered on screen.
* @alias Blockly.RenderedConnection
*/
export class RenderedConnection extends Connection {
/**
* Enum for different kinds of tracked states.
*
* WILL_TRACK means that this connection will add itself to
* the db on the next moveTo call it receives.
*
* UNTRACKED means that this connection will not add
* itself to the database until setTracking(true) is explicitly called.
*
* TRACKED means that this connection is currently being tracked.
*/
static TrackedState = TrackedState;
// TODO(b/109816955): remove '!', see go/strict-prop-init-fix.
sourceBlock_!: BlockSvg;
private readonly db_: ConnectionDB;
@@ -566,3 +547,25 @@ export class RenderedConnection extends Connection {
}
}
}
export namespace RenderedConnection {
/**
* Enum for different kinds of tracked states.
*
* WILL_TRACK means that this connection will add itself to
* the db on the next moveTo call it receives.
*
* UNTRACKED means that this connection will not add
* itself to the database until setTracking(true) is explicitly called.
*
* TRACKED means that this connection is currently being tracked.
*/
export enum TrackedState {
WILL_TRACK = -1,
UNTRACKED = 0,
TRACKED = 1,
}
}
export type TrackedState = RenderedConnection.TrackedState;
export const TrackedState = RenderedConnection.TrackedState;