Changeset - 6529768a96a2
[Not reviewed]
default
0 1 0
drewp@bigasterisk.com - 20 months ago 2023-05-30 08:01:53
drewp@bigasterisk.com
stronger types
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
light9/web/SyncedGraph.ts
Show inline comments
 
@@ -362,16 +362,17 @@ export class SyncedGraph {
 
  }
 

	
 
  nextNumberedResource(base: any) {
 
    return this.nextNumberedResources(base, 1)[0];
 
  }
 

	
 
  contextsWithPattern(s: any, p: any, o: any) {
 
  contextsWithPattern(s: Quad_Subject | null, p: Quad_Predicate | null, o: Quad_Object | null): N3.NamedNode[] {
 
    this.autoDeps.askedFor(s, p, o, null);
 
    const ctxs = [];
 
    const ctxs: N3.NamedNode[] = [];
 
    for (let q of Array.from(this.graph.getQuads(s, p, o, null))) {
 
      if (q.graph.termType != "NamedNode") throw `context was ${q.graph.id}`;
 
      ctxs.push(q.graph);
 
    }
 
    return unique(ctxs);
 
  }
 

	
 
  sortKey(uri: N3.NamedNode) {
0 comments (0 inline, 0 general)