Skip to content

Commit

Permalink
Remove generic parameters from DataFactory#fromTerm() overloads (#57)
Browse files Browse the repository at this point in the history
* Remove generic parameters from `DataFactory#fromTerm()` overloads

* Create shy-buckets-work.md

---------

Co-authored-by: Tomasz Pluskiewicz <[email protected]>
  • Loading branch information
Renegade334 and tpluscode authored Jan 14, 2025
1 parent 7665ef6 commit 6f54811
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/shy-buckets-work.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rdfjs/types": patch
---

Remove generic parameters from `DataFactory#fromTerm()` overloads which caused incompatibility with `@rdfjs/types` v1
13 changes: 6 additions & 7 deletions data-model.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,13 +300,12 @@ export interface DataFactory<OutQuad extends BaseQuad = Quad, InQuad extends Bas
* @return A new instance of the term such that newTermInstance.equals(original) returns true.
* @see Term
*/
fromTerm<T extends NamedNode>(original: T): NamedNode;
fromTerm<T extends BlankNode>(original: T): BlankNode;
fromTerm<T extends Literal>(original: T): Literal;
fromTerm<T extends Variable>(original: T): Variable;
fromTerm<T extends DefaultGraph>(original: T): DefaultGraph;
fromTerm<T extends BaseQuad>(original: T): OutQuad;
fromTerm<T extends Term>(original: T): T;
fromTerm(original: NamedNode): NamedNode;
fromTerm(original: BlankNode): BlankNode;
fromTerm(original: Literal): Literal;
fromTerm(original: Variable): Variable;
fromTerm(original: DefaultGraph): DefaultGraph;
fromTerm(original: BaseQuad): OutQuad;

/**
* @param original The original quad.
Expand Down

0 comments on commit 6f54811

Please sign in to comment.