diff --git a/.changeset/famous-parrots-rush.md b/.changeset/famous-parrots-rush.md new file mode 100644 index 0000000..61eaa41 --- /dev/null +++ b/.changeset/famous-parrots-rush.md @@ -0,0 +1,5 @@ +--- +"@rdfjs/types": minor +--- + +Add optional direction for literals diff --git a/data-model.d.ts b/data-model.d.ts index 6fff406..78c1f28 100644 --- a/data-model.d.ts +++ b/data-model.d.ts @@ -73,6 +73,10 @@ export interface Literal { * @link http://tools.ietf.org/html/bcp47 */ language: string; + /** + * the direction of the language-tagged string. + */ + direction?: 'ltr' | 'rtl' | '' | null; /** * A NamedNode whose IRI represents the datatype of the literal. */ @@ -81,7 +85,7 @@ export interface Literal { /** * @param other The term to compare with. * @return True if and only if other has termType "Literal" - * and the same `value`, `language`, and `datatype`. + * and the same `value`, `language`, `direction`, and `datatype`. */ equals(other: Term | null | undefined): boolean; } @@ -254,16 +258,19 @@ export interface DataFactory {};