mirror of
https://github.com/google/blockly.git
synced 2026-01-07 17:10:11 +01:00
chore: use prettier instead of clang-format (#7014)
* chore: add and configure prettier * chore: remove clang-format * chore: remove clang-format config * chore: lint additional ts files * chore: fix lint errors in blocks * chore: add prettier-ignore where needed * chore: ignore js blocks when formatting * chore: fix playground html syntax * chore: fix yaml spacing from merge * chore: convert text blocks to use arrow functions * chore: format everything with prettier * chore: fix lint unused imports in blocks
This commit is contained in:
committed by
GitHub
parent
af991f5e1b
commit
88ff901a72
@@ -7,7 +7,6 @@
|
||||
import type {Coordinate} from '../utils/coordinate.js';
|
||||
import type {Size} from '../utils/size.js';
|
||||
|
||||
|
||||
export interface IIcon {
|
||||
/**
|
||||
* @return the string representing the type of the icon.
|
||||
@@ -82,11 +81,18 @@ export interface IIcon {
|
||||
|
||||
/** Type guard that checks whether the given object is an IIcon. */
|
||||
export function isIcon(obj: any): obj is IIcon {
|
||||
return obj.getType !== undefined && obj.initView !== undefined &&
|
||||
obj.dispose !== undefined && obj.getWeight !== undefined &&
|
||||
obj.getSize !== undefined && obj.applyColour !== undefined &&
|
||||
obj.updateEditable !== undefined && obj.updateCollapsed !== undefined &&
|
||||
obj.isShownWhenCollapsed !== undefined &&
|
||||
obj.setOffsetInBlock !== undefined &&
|
||||
obj.onLocationChange !== undefined && obj.onClick !== undefined;
|
||||
return (
|
||||
obj.getType !== undefined &&
|
||||
obj.initView !== undefined &&
|
||||
obj.dispose !== undefined &&
|
||||
obj.getWeight !== undefined &&
|
||||
obj.getSize !== undefined &&
|
||||
obj.applyColour !== undefined &&
|
||||
obj.updateEditable !== undefined &&
|
||||
obj.updateCollapsed !== undefined &&
|
||||
obj.isShownWhenCollapsed !== undefined &&
|
||||
obj.setOffsetInBlock !== undefined &&
|
||||
obj.onLocationChange !== undefined &&
|
||||
obj.onClick !== undefined
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user