@@ -111,7 +111,7 @@ export type Processor<
111
111
* * If the plugin sets a parser, then this should be the node type that
112
112
* the parser yields.
113
113
* * If the plugin sets a compiler, then this should be the result that
114
- * the compiler yields (`string`, `Buffer `, or something else).
114
+ * the compiler yields (`string`, `Uint8Array `, or something else).
115
115
* @param plugin
116
116
* Plugin (function) to use.
117
117
* Plugins are deduped based on identity: passing a function in twice will
@@ -162,7 +162,7 @@ export type Processor<
162
162
* * If the plugin sets a parser, then this should be the node type that
163
163
* the parser yields.
164
164
* * If the plugin sets a compiler, then this should be the result that
165
- * the compiler yields (`string`, `Buffer `, or something else).
165
+ * the compiler yields (`string`, `Uint8Array `, or something else).
166
166
* @param tuple
167
167
* A tuple where the first item is a plugin (function) to use and other
168
168
* items are options.
@@ -260,7 +260,7 @@ export type FrozenProcessor<
260
260
* @param file
261
261
* `VFile` or anything that can be given to `new VFile()`, optional.
262
262
* @returns
263
- * New content: compiled text (`string` or `Buffer `) or something else.
263
+ * New content: compiled text (`string` or `Uint8Array `) or something else.
264
264
* This depends on which plugins you use: typically text, but could for
265
265
* example be a React node.
266
266
*/
@@ -347,8 +347,8 @@ export type FrozenProcessor<
347
347
*
348
348
* The result from the compiler is stored on the file.
349
349
* What the result is depends on which plugins you use.
350
- * The result is typically text (`string` or `Buffer `), which can be retrieved
351
- * with `file.toString()` (or `String(file)`).
350
+ * The result is typically text (`string` or `Uint8Array `), which can be
351
+ * retrieved with `file.toString()` (or `String(file)`).
352
352
* In some cases, such as when using `rehypeReact` to create a React node,
353
353
* the result is stored on `file.result`.
354
354
*
@@ -375,8 +375,8 @@ export type FrozenProcessor<
375
375
*
376
376
* The result from the compiler is stored on the file.
377
377
* What the result is depends on which plugins you use.
378
- * The result is typically text (`string` or `Buffer `), which can be retrieved
379
- * with `file.toString()` (or `String(file)`).
378
+ * The result is typically text (`string` or `Uint8Array `), which can be
379
+ * retrieved with `file.toString()` (or `String(file)`).
380
380
* In some cases, such as when using `rehypeReact` to create a React node,
381
381
* the result is stored on `file.result`.
382
382
*
@@ -399,8 +399,8 @@ export type FrozenProcessor<
399
399
*
400
400
* The result from the compiler is stored on the file.
401
401
* What the result is depends on which plugins you use.
402
- * The result is typically text (`string` or `Buffer `), which can be retrieved
403
- * with `file.toString()` (or `String(file)`).
402
+ * The result is typically text (`string` or `Uint8Array `), which can be
403
+ * retrieved with `file.toString()` (or `String(file)`).
404
404
* In some cases, such as when using `rehypeReact` to create a React node,
405
405
* the result is stored on `file.result`.
406
406
*
@@ -502,7 +502,7 @@ export type FrozenProcessor<
502
502
* * If the plugin sets a parser, then this should be the node type that
503
503
* the parser yields.
504
504
* * If the plugin sets a compiler, then this should be the result that
505
- * the compiler yields (`string`, `Buffer `, or something else).
505
+ * the compiler yields (`string`, `Uint8Array `, or something else).
506
506
* @this
507
507
* The current processor.
508
508
* Plugins can configure the processor by interacting with `this.Parser` or
@@ -580,7 +580,7 @@ export type Preset = {
580
580
* * If the plugin sets a parser, then this should be the node type that
581
581
* the parser yields.
582
582
* * If the plugin sets a compiler, then this should be the result that
583
- * the compiler yields (`string`, `Buffer `, or something else).
583
+ * the compiler yields (`string`, `Uint8Array `, or something else).
584
584
*/
585
585
export type PluginTuple <
586
586
PluginParameters extends any [ ] = any [ ] ,
@@ -780,8 +780,8 @@ export class CompilerClass<Tree extends Node = Node, Result = unknown> {
780
780
* Compile a tree.
781
781
*
782
782
* @returns
783
- * New content: compiled text (`string` or `Buffer `, for `file.value`) or
784
- * something else (for `file.result`).
783
+ * New content: compiled text (`string` or `Uint8Array `, for
784
+ * `file.value`) or something else (for `file.result`).
785
785
*/
786
786
compile ( ) : Result
787
787
}
@@ -811,7 +811,7 @@ export class CompilerClass<Tree extends Node = Node, Result = unknown> {
811
811
* @param file
812
812
* File associated with `tree`.
813
813
* @returns
814
- * New content: compiled text (`string` or `Buffer `, for `file.value`) or
814
+ * New content: compiled text (`string` or `Uint8Array `, for `file.value`) or
815
815
* something else (for `file.result`).
816
816
*/
817
817
export type CompilerFunction < Tree extends Node = Node , Result = unknown > = (
0 commit comments