You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
438 B
11 lines
438 B
export function registerTarget(type, target, manager) {
|
|
const registry = manager.getRegistry();
|
|
const targetId = registry.addTarget(type, target);
|
|
return [targetId, () => registry.removeTarget(targetId)];
|
|
}
|
|
export function registerSource(type, source, manager) {
|
|
const registry = manager.getRegistry();
|
|
const sourceId = registry.addSource(type, source);
|
|
return [sourceId, () => registry.removeSource(sourceId)];
|
|
}
|