make slice() function's doc more accurate

This commit is contained in:
synix 2024-04-26 11:49:52 +08:00
parent 43815d8292
commit 387be70ae9
2 changed files with 6 additions and 6 deletions

View File

@ -162,9 +162,9 @@ export class YArray extends AbstractType {
}
/**
* Preppends content to this YArray.
* Prepends content to this YArray.
*
* @param {Array<T>} content Array of content to preppend.
* @param {Array<T>} content Array of content to prepend.
*/
unshift (content) {
this.insert(0, content)
@ -206,7 +206,7 @@ export class YArray extends AbstractType {
}
/**
* Transforms this YArray to a JavaScript Array.
* Returns a portion of this YArray into a JavaScript Array selected from start to end (end not included).
*
* @param {number} [start]
* @param {number} [end]

View File

@ -380,9 +380,9 @@ export class YXmlFragment extends AbstractType {
}
/**
* Preppends content to this YArray.
* Prepends content to this YArray.
*
* @param {Array<YXmlElement|YXmlText>} content Array of content to preppend.
* @param {Array<YXmlElement|YXmlText>} content Array of content to prepend.
*/
unshift (content) {
this.insert(0, content)
@ -399,7 +399,7 @@ export class YXmlFragment extends AbstractType {
}
/**
* Transforms this YArray to a JavaScript Array.
* Returns a portion of this YXmlFragment into a JavaScript Array selected from start to end (end not included).
*
* @param {number} [start]
* @param {number} [end]