mirror of
https://github.com/google/blockly.git
synced 2026-01-04 23:50:12 +01:00
feat: make ICopyable generic and update clipboard APIs (#7348)
* chore: rename module-local variables to not conflict * feat: make ICopyable generic and update clipboard APIs * chore: switch over more things to use generic ICopyables * chore: fix shortcut items using copy paste * chore: add test for interface between clipboard and pasters * chore: export isCopyable * chore: format * chore: fixup PR comments * chore: add deprecation tags
This commit is contained in:
@@ -36,7 +36,7 @@ import {Gesture} from './gesture.js';
|
||||
import {Grid} from './grid.js';
|
||||
import type {IASTNodeLocationSvg} from './interfaces/i_ast_node_location_svg.js';
|
||||
import type {IBoundedElement} from './interfaces/i_bounded_element.js';
|
||||
import type {ICopyable} from './interfaces/i_copyable.js';
|
||||
import type {ICopyData, ICopyable} from './interfaces/i_copyable.js';
|
||||
import type {IDragTarget} from './interfaces/i_drag_target.js';
|
||||
import type {IFlyout} from './interfaces/i_flyout.js';
|
||||
import type {IMetricsManager} from './interfaces/i_metrics_manager.js';
|
||||
@@ -1300,7 +1300,7 @@ export class WorkspaceSvg extends Workspace implements IASTNodeLocationSvg {
|
||||
*/
|
||||
paste(
|
||||
state: AnyDuringMigration | Element | DocumentFragment,
|
||||
): ICopyable | null {
|
||||
): ICopyable<ICopyData> | null {
|
||||
if (!this.rendered || (!state['type'] && !state['tagName'])) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user