Add name params to Value.sassIndexToListIndex() and SassString.sassIndexToStringIndex(). (#3111)

This commit is contained in:
Awjin Ahn 2021-08-10 13:38:52 -07:00 committed by GitHub
parent c44ec5876e
commit 0c11d8576f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View File

@ -1,3 +1,8 @@
## Draft 2.1
* Add `name` parameters to `Value.sassIndexToListIndex()` and
`SassString.sassIndexToStringIndex()`.
## Draft 2
* Add `name` parameters to `assert*()` methods so that they can provide

View File

@ -190,8 +190,10 @@ export abstract class Value implements ValueObject {
*
* > Sass indices start counting at 1, and may be negative in order to index
* > from the end of the list.
*
* > The `name` parameter may be used for error reporting.
*/
sassIndexToListIndex(sassIndex: Value): number;
sassIndexToListIndex(sassIndex: Value, name?: string): number;
/**
* Asserts that `this` is a `SassBoolean`:
@ -940,6 +942,8 @@ export class SassString extends Value {
* > UTF-16 code units.
*
* - Return `jsIndex`.
*
* > The `name` parameter may be used for error reporting.
*/
sassIndexToStringIndex(sassIndex: Value): number;
sassIndexToStringIndex(sassIndex: Value, name?: string): number;
}