diff --git a/types/n3/index.d.ts b/types/n3/index.d.ts index 63e89ab7e3..c3906c86f0 100644 --- a/types/n3/index.d.ts +++ b/types/n3/index.d.ts @@ -100,7 +100,7 @@ export class Quad extends BaseQuad implements RDF.Quad { toJSON(): string; } -export class Triple extends Quad implements RDF.Triple {} +export class Triple extends Quad implements RDF.Quad {} export namespace DataFactory { function namedNode(value: string): NamedNode; diff --git a/types/rdf-ext/rdf-ext-tests.ts b/types/rdf-ext/rdf-ext-tests.ts index 138c62f8ed..8776b6b9fd 100644 --- a/types/rdf-ext/rdf-ext-tests.ts +++ b/types/rdf-ext/rdf-ext-tests.ts @@ -178,7 +178,7 @@ function static_Triple_fromBaseTerms(): Quad { const predicate: NamedNode = {}; const object: NamedNode = {}; - return rdf.triple(subject, predicate, object); + return rdf.quad(subject, predicate, object); } function instance_Quad_fromBaseTerms(): Quad { @@ -197,7 +197,7 @@ function instance_Triple_fromBaseTerms(): Quad { const predicate: NamedNode = {}; const object: NamedNode = {}; - return factory.triple(subject, predicate, object); + return factory.quad(subject, predicate, object); } function Quad_toJSON(): boolean { diff --git a/types/rdf-js/index.d.ts b/types/rdf-js/index.d.ts index cdbabba932..47219d31e2 100644 --- a/types/rdf-js/index.d.ts +++ b/types/rdf-js/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for the RDFJS specification 2.0 +// Type definitions for the RDFJS specification 3.0 // Project: https://github.com/rdfjs/representation-task-force // Definitions by: Ruben Taelman // Laurens Rietveld @@ -200,7 +200,7 @@ export interface BaseQuad { * @param other The term to compare with. * @return True if and only if the argument is a) of the same type b) has all components equal. */ - equals(other: BaseQuad): boolean; + equals(other: BaseQuad | null | undefined): boolean; } /** @@ -232,19 +232,11 @@ export interface Quad extends BaseQuad { * @param other The term to compare with. * @return True if and only if the argument is a) of the same type b) has all components equal. */ - equals(other: BaseQuad): boolean; + equals(other: BaseQuad | null | undefined): boolean; } /** - * An RDF triple, containing the subject, predicate, object terms. - * - * Triple is an alias of Quad. - */ -// tslint:disable-next-line no-empty-interface -export interface Triple extends Quad {} - -/** - * A factory for instantiating RDF terms, triples and quads. + * A factory for instantiating RDF terms and quads. */ export interface DataFactory { /** @@ -288,17 +280,6 @@ export interface DataFactory {}; const term: NamedNode = {}; - const triple: Quad = dataFactory.triple(term, term, term); interface QuadBnode extends BaseQuad { subject: Term; predicate: Term; diff --git a/types/rdfjs__dataset/rdfjs__dataset-tests.ts b/types/rdfjs__dataset/rdfjs__dataset-tests.ts index 77b9af117c..2506fe2950 100644 --- a/types/rdfjs__dataset/rdfjs__dataset-tests.ts +++ b/types/rdfjs__dataset/rdfjs__dataset-tests.ts @@ -8,5 +8,5 @@ const variable: RDF.Variable = rdf.variable('foo'); const graph: RDF.DefaultGraph = rdf.defaultGraph(); const defaultGraph: RDF.DefaultGraph = rdf.defaultGraphInstance; const namedNode: RDF.NamedNode = rdf.namedNode('foo'); -const triple: RDF.Triple = rdf.triple(namedNode, variable, literal); +const triple: RDF.Quad = rdf.quad(namedNode, variable, literal); const quad: RDF.Quad = rdf.quad(namedNode, variable, literal, graph);