refactor: blocks plugins (#1956)

This commit is contained in:
Mo
2022-11-08 13:31:48 -06:00
committed by GitHub
parent bfca244061
commit 70a9dbcea6
73 changed files with 1448 additions and 1049 deletions

View File

@@ -0,0 +1,13 @@
import { ItemLink } from './ItemLink'
import { LinkableItem } from './LinkableItem'
export function createLinkFromItem<I extends LinkableItem = LinkableItem>(
itemA: I,
type: 'linked' | 'linked-by',
): ItemLink<I> {
return {
id: `${itemA.uuid}-${type}`,
item: itemA,
type,
}
}