@@ -31,17 +31,17 @@ export class ImportanceCommand implements ISlashCommand {
3131 `
3232 ) ;
3333 if ( ! maxOutDegreeQuery . length ) return 0 ;
34- const maxOutDegree = maxOutDegreeQuery [ 0 ] . get ( "outDegree" ) . toNumber ( ) ;
34+ const maxOutDegree = maxOutDegreeQuery [ 0 ] as unknown as number ;
3535
3636 const outDegree = await db . run (
3737 `
3838 MATCH (n:Node { id: $id })<-[]-(x)
3939 RETURN count(x) AS outDegree
40- `,
40+ `,
4141 { id : node . id }
4242 ) ;
4343 if ( ! outDegree . length ) return 0 ;
44- const centrality = outDegree [ 0 ] . get ( "outDegree" ) . toNumber ( ) ;
44+ const centrality = outDegree [ 0 ] as unknown as number ;
4545
4646 const relativeCentrality = centrality / maxOutDegree ;
4747 return relativeCentrality ;
@@ -58,7 +58,7 @@ export class ImportanceCommand implements ISlashCommand {
5858 `
5959 ) ;
6060 if ( ! maxInDegreeQuery . length ) return 0 ;
61- const maxInDegree = maxInDegreeQuery [ 0 ] . get ( "inDegree" ) . toNumber ( ) ;
61+ const maxInDegree = maxInDegreeQuery [ 0 ] as unknown as number ;
6262
6363 const inDegree = await db . run (
6464 `
@@ -68,7 +68,7 @@ export class ImportanceCommand implements ISlashCommand {
6868 { id : node . id }
6969 ) ;
7070 if ( ! inDegree . length ) return 0 ;
71- const criticality = inDegree [ 0 ] . get ( "inDegree" ) . toNumber ( ) ;
71+ const criticality = inDegree [ 0 ] as unknown as number ;
7272
7373 const relativeCriticality = criticality / maxInDegree ;
7474 return relativeCriticality ;
0 commit comments