Skip to content

Commit

Permalink
Also allow null directions
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensworks committed Nov 9, 2023
1 parent 5eb5b3f commit 14f33a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions data-model.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export interface Literal {
/**
* the direction of the language-tagged string.
*/
direction?: 'ltr' | 'rtl' | '';
direction?: 'ltr' | 'rtl' | '' | null;
/**
* A NamedNode whose IRI represents the datatype of the literal.
*/
Expand Down Expand Up @@ -298,5 +298,5 @@ export interface DataFactory<OutQuad extends BaseQuad = Quad, InQuad extends Bas

export interface DirectionalLanguage {
language: string;
direction?: 'ltr' | 'rtl' | '';
direction?: 'ltr' | 'rtl' | '' | null;
}
2 changes: 1 addition & 1 deletion rdf-js-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function test_terms() {
const termType3: string = literal.termType;
const value3: string = literal.value;
const language3: string = literal.language;
const dir3: 'ltr' | 'rtl' | '' | undefined = literal.direction;
const dir3: 'ltr' | 'rtl' | '' | null | undefined = literal.direction;
const datatype3: NamedNode = literal.datatype;
let literalEqual: boolean = literal.equals(someTerm);
literalEqual = literal.equals(null);
Expand Down

0 comments on commit 14f33a2

Please sign in to comment.