graphology-types
Advanced tools
Comparing version 0.24.2 to 0.24.3
@@ -15,3 +15,5 @@ /** | ||
type UpdateHints = {attributes?: Array<string>}; | ||
type UpdateHints<ItemAttributes extends Attributes = Attributes> = { | ||
attributes?: Array<keyof ItemAttributes>; | ||
}; | ||
@@ -281,4 +283,8 @@ type GraphOptions = { | ||
edgeAttributesUpdated(payload: AttributeUpdatePayload<EdgeAttributes>): void; | ||
eachNodeAttributesUpdated(payload: {hints: UpdateHints}): void; | ||
eachEdgeAttributesUpdated(payload: {hints: UpdateHints}): void; | ||
eachNodeAttributesUpdated(payload: { | ||
hints: UpdateHints<NodeAttributes>; | ||
}): void; | ||
eachEdgeAttributesUpdated(payload: { | ||
hints: UpdateHints<EdgeAttributes>; | ||
}): void; | ||
}; | ||
@@ -686,4 +692,4 @@ | ||
updateEachNodeAttributes( | ||
updater: NodeMapper<NodeAttributes>, | ||
hints?: UpdateHints | ||
updater: NodeMapper<NodeAttributes, NodeAttributes>, | ||
hints?: UpdateHints<NodeAttributes> | ||
): void; | ||
@@ -725,4 +731,4 @@ | ||
updateEachEdgeAttributes( | ||
updater: EdgeMapper<EdgeAttributes>, | ||
hints?: UpdateHints | ||
updater: EdgeMapper<EdgeAttributes, NodeAttributes, EdgeAttributes>, | ||
hints?: UpdateHints<EdgeAttributes> | ||
): void; | ||
@@ -729,0 +735,0 @@ |
{ | ||
"name": "graphology-types", | ||
"version": "0.24.2", | ||
"version": "0.24.3", | ||
"description": "TypeScript declaration for graphology.", | ||
@@ -5,0 +5,0 @@ "main": "index.d.ts", |
58132
1845