Skip to content

Commit

Permalink
fix: return type
Browse files Browse the repository at this point in the history
  • Loading branch information
tpluscode committed Jun 4, 2024
1 parent 4953eab commit 66c4d4a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apis/shared-dimensions/lib/handlers/collection.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { NamedNode, Quad } from '@rdfjs/types'
import $rdf from 'rdf-ext'
import clownface from 'clownface'
import clownface, { GraphPointer } from 'clownface'

Check warning on line 3 in apis/shared-dimensions/lib/handlers/collection.ts

View check run for this annotation

Codecov / codecov/patch

apis/shared-dimensions/lib/handlers/collection.ts#L3

Added line #L3 was not covered by tests
import { hydra, rdf } from '@tpluscode/rdf-ns-builders'

interface CollectionHandler {
Expand All @@ -11,7 +11,7 @@ interface CollectionHandler {
collection: NamedNode
}

export function getCollection({ collection, view, memberQuads, memberType, collectionType }: CollectionHandler) {
export function getCollection({ collection, view, memberQuads, memberType, collectionType }: CollectionHandler): GraphPointer<NamedNode> {

Check warning on line 14 in apis/shared-dimensions/lib/handlers/collection.ts

View check run for this annotation

Codecov / codecov/patch

apis/shared-dimensions/lib/handlers/collection.ts#L14

Added line #L14 was not covered by tests
const dataset = $rdf.dataset(memberQuads)

const graph = clownface({ dataset })
Expand All @@ -28,5 +28,5 @@ export function getCollection({ collection, view, memberQuads, memberType, colle
.addIn(hydra.view, collection)
}

return graph
return graph.node(collection)

Check warning on line 31 in apis/shared-dimensions/lib/handlers/collection.ts

View check run for this annotation

Codecov / codecov/patch

apis/shared-dimensions/lib/handlers/collection.ts#L24-L31

Added lines #L24 - L31 were not covered by tests
}

0 comments on commit 66c4d4a

Please sign in to comment.