Skip to content

Commit

Permalink
chore: clean up rdf validate types
Browse files Browse the repository at this point in the history
  • Loading branch information
blushi committed Feb 20, 2023
1 parent df2781e commit 9026562
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions web-registry/src/lib/rdf/rdf.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Parser from '@rdfjs/parser-jsonld';
import factory from 'rdf-ext';
import DatasetExt from 'rdf-ext/lib/Dataset';
import { ValidationReport } from 'rdf-validate-shacl';
import { Readable } from 'stream';

import {
Expand Down Expand Up @@ -36,11 +35,7 @@ async function loadDataset(jsonLd: string): Promise<DatasetExt> {
* If an optional group is passed, it will validate against shapes
* of the given sh:group.
*/
export async function validate(
shapesJSON: any,
dataJSON: any,
group?: string,
): ValidationReport {
export async function validate(shapesJSON: any, dataJSON: any, group?: string) {
const shapes = await loadDataset(JSON.stringify(shapesJSON));
const data = await loadDataset(JSON.stringify(dataJSON));
const result = await import('./rdf-lib').then(async ({ SHACLValidator }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ declare module 'rdf-validate-shacl' {
import * as RDF from 'rdf-js';
import DataFactory = require('./src/data-factory');

export import ValidationReport = require('./src/validation-report');
import ValidationReport = require('./src/validation-report');

declare namespace SHACLValidator {
interface Options {
Expand Down

0 comments on commit 9026562

Please sign in to comment.