Skip to content

Commit c635435

Browse files
authored
docs: Corrected the TSDoc of literal's languageOrDatatype (#61)
1 parent 1b1208d commit c635435

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

‎.changeset/rich-lizards-fry.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@rdfjs/types": patch
3+
---
4+
5+
Corrected the TSDoc of literal's languageOrDatatype

‎data-model.d.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,9 @@ export interface DataFactory<OutQuad extends BaseQuad = Quad, InQuad extends Bas
261261
* @param value The literal value.
262262
* @param languageOrDatatype The optional language, datatype, or directional language.
263263
* If `languageOrDatatype` is a NamedNode,
264-
* then it is used for the value of `NamedNode.datatype`.
265-
* If `languageOrDatatype` is a NamedNode, it is used for the value
266-
* of `NamedNode.language`.
264+
* then it is used for the value of `Literal.datatype`.
265+
* If `languageOrDatatype` is a string, it is used for the value
266+
* of `Literal.language`.
267267
* Otherwise, it is used as a directional language,
268268
* from which the language is set to `languageOrDatatype.language`
269269
* and the direction to `languageOrDatatype.direction`.

0 commit comments

Comments
 (0)