@@ -191,8 +191,8 @@ export const toSpecifiedGraph = (core: CoreGraph, spec: GraphSpec): SpecifiedGra
191191 * @returns CoreGraph without spec
192192 */
193193export const fromSpecifiedGraph = ( specified : SpecifiedGraph ) : CoreGraph => {
194-
195- const { spec, ...core } = specified ;
194+
195+ const { spec : _spec , ...core } = specified ;
196196 return core ;
197197} ;
198198
@@ -217,8 +217,8 @@ export const toDocumentedGraph = (core: CoreGraph, meta: CoreGraphMeta): Documen
217217 * @returns CoreGraph without metadata
218218 */
219219export const fromDocumentedGraph = ( document : DocumentedGraph ) : CoreGraph => {
220-
221- const { meta, ...core } = document ;
220+
221+ const { meta : _meta , ...core } = document ;
222222 return core ;
223223} ;
224224
@@ -342,8 +342,8 @@ export const toCoreGraph = (graph:
342342 // Already CoreGraph
343343 if ( "nodes" in graph && "edges" in graph && ! ( "vertices" in graph ) ) {
344344 // Remove spec/meta if present
345-
346- const { spec, meta, ...core } = graph as SpecifiedGraph &
345+
346+ const { spec : _spec , meta : _meta , ...core } = graph as SpecifiedGraph &
347347 DocumentedGraph &
348348 CoreGraph ;
349349 return core ;
@@ -377,7 +377,7 @@ export const toCoreGraph = (graph:
377377 * @param node
378378 */
379379const extractNodeAttributes = ( node : CoreGraphNode ) : Record < string , unknown > | undefined => {
380- const { id, label, type, partition, ...rest } = node ;
380+ const { id : _id , label : _label , type : _type , partition : _partition , ...rest } = node ;
381381 return Object . keys ( rest ) . length > 0 ? rest : undefined ;
382382} ;
383383
@@ -386,7 +386,7 @@ const extractNodeAttributes = (node: CoreGraphNode): Record<string, unknown> | u
386386 * @param edge
387387 */
388388const extractEdgeAttributes = ( edge : CoreGraphEdge ) : Record < string , unknown > | undefined => {
389- const { source, target, weight, directed, type, ...rest } = edge ;
389+ const { source : _source , target : _target , weight : _weight , directed : _directed , type : _type , ...rest } = edge ;
390390 return Object . keys ( rest ) . length > 0 ? rest : undefined ;
391391} ;
392392
@@ -395,7 +395,7 @@ const extractEdgeAttributes = (edge: CoreGraphEdge): Record<string, unknown> | u
395395 * @param node
396396 */
397397const extractGmlNodeAttributes = ( node : GmlGraphNode ) : Record < string , unknown > | undefined => {
398- const { id, label, ...rest } = node ;
398+ const { id : _id , label : _label , ...rest } = node ;
399399 return Object . keys ( rest ) . length > 0 ? rest : undefined ;
400400} ;
401401
@@ -404,6 +404,6 @@ const extractGmlNodeAttributes = (node: GmlGraphNode): Record<string, unknown> |
404404 * @param edge
405405 */
406406const extractGmlEdgeAttributes = ( edge : GmlGraphEdge ) : Record < string , unknown > | undefined => {
407- const { source, target, weight, directed, ...rest } = edge ;
407+ const { source : _source , target : _target , weight : _weight , directed : _directed , ...rest } = edge ;
408408 return Object . keys ( rest ) . length > 0 ? rest : undefined ;
409409} ;
0 commit comments