mirror of
https://github.com/google/blockly.git
synced 2026-03-12 16:20:12 +01:00
Formatter
This commit is contained in:
@@ -43,7 +43,7 @@ export const TEST_ONLY = {typeMap};
|
||||
* This enables an error to be thrown if a name of conflicting case is used.
|
||||
*/
|
||||
const noCaseNameMap: {
|
||||
[key: string]: {[key: string]: string}
|
||||
[key: string]: {[key: string]: string};
|
||||
} = Object.create(null);
|
||||
|
||||
/**
|
||||
@@ -168,7 +168,10 @@ export function register<T>(
|
||||
* @param registryItem A class or object that we are checking for the required
|
||||
* properties.
|
||||
*/
|
||||
function validateItem(type: string, registryItem: Function | AnyDuringMigration) {
|
||||
function validateItem(
|
||||
type: string,
|
||||
registryItem: Function | AnyDuringMigration,
|
||||
) {
|
||||
switch (type) {
|
||||
case String(Type.FIELD):
|
||||
if (typeof registryItem.fromJson !== 'function') {
|
||||
|
||||
@@ -76,7 +76,10 @@ export class CollapsibleToolboxCategory
|
||||
// Separators can exist as either a flyout item or a toolbox item so
|
||||
// decide where it goes based on the type of the previous item.
|
||||
if (
|
||||
!registry.hasItem(registry.Type.TOOLBOX_ITEM, itemDef['kind'].toLowerCase()) ||
|
||||
!registry.hasItem(
|
||||
registry.Type.TOOLBOX_ITEM,
|
||||
itemDef['kind'].toLowerCase(),
|
||||
) ||
|
||||
(itemDef['kind'].toLowerCase() ===
|
||||
ToolboxSeparator.registrationName &&
|
||||
prevIsFlyoutItem)
|
||||
|
||||
Reference in New Issue
Block a user