@shikijs/types 4.2.0 → 4.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +9 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -342,6 +342,14 @@ interface TokenBase {
|
|
|
342
342
|
* The start offset of the token, relative to the input code. 0-indexed.
|
|
343
343
|
*/
|
|
344
344
|
offset: number;
|
|
345
|
+
/**
|
|
346
|
+
* The type of the token
|
|
347
|
+
* 0 - other
|
|
348
|
+
* 1 - comment
|
|
349
|
+
* 2 - string
|
|
350
|
+
* 3 - regex
|
|
351
|
+
*/
|
|
352
|
+
type?: number;
|
|
345
353
|
/**
|
|
346
354
|
* Explanation of
|
|
347
355
|
*
|
|
@@ -389,7 +397,7 @@ interface TokenizeWithThemeOptions {
|
|
|
389
397
|
*
|
|
390
398
|
* @default false
|
|
391
399
|
*/
|
|
392
|
-
includeExplanation?: boolean | 'scopeName';
|
|
400
|
+
includeExplanation?: boolean | 'scopeName' | 'tokenType';
|
|
393
401
|
/**
|
|
394
402
|
* A map of color names to new color values.
|
|
395
403
|
*
|