refactor: blocks plugins (#1956)
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user