Formatter

This commit is contained in:
Neil Fraser
2024-03-26 09:19:07 +01:00
parent 1d4eafcd3b
commit b000e06932
3 changed files with 12 additions and 6 deletions

View File

@@ -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') {

View File

@@ -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)