mirror of
https://github.com/google/blockly.git
synced 2026-01-09 10:00:09 +01:00
* chore: remove alias comments * chore: format * chore: remove extra newlines * chore: fix bad replaces
38 lines
766 B
TypeScript
38 lines
766 B
TypeScript
/**
|
|
* @license
|
|
* Copyright 2019 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/**
|
|
* The interface for an object that is copyable.
|
|
*
|
|
* @namespace Blockly.ICopyable
|
|
*/
|
|
import * as goog from '../../closure/goog/goog.js';
|
|
goog.declareModuleId('Blockly.ICopyable');
|
|
|
|
import type {WorkspaceSvg} from '../workspace_svg.js';
|
|
import type {ISelectable} from './i_selectable.js';
|
|
|
|
|
|
export interface ICopyable extends ISelectable {
|
|
/**
|
|
* Encode for copying.
|
|
*
|
|
* @returns Copy metadata.
|
|
* @internal
|
|
*/
|
|
toCopyData(): CopyData|null;
|
|
}
|
|
|
|
export namespace ICopyable {
|
|
export interface CopyData {
|
|
saveInfo: Object|Element;
|
|
source: WorkspaceSvg;
|
|
typeCounts: {[key: string]: number}|null;
|
|
}
|
|
}
|
|
|
|
export type CopyData = ICopyable.CopyData;
|