Skip to content

Commit b22bf8e

Browse files
authored
types: add support for buffer, other return values
Reviewed-by: Christian Murphy <christian.murphy.42@gmail.com> Closes GH-144.
1 parent 4bfd6c8 commit b22bf8e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

types/index.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -357,9 +357,9 @@ export interface Compiler {
357357
/**
358358
* Transform an AST node/tree into text
359359
*
360-
* @returns Compiled text
360+
* @returns Compiled text (for `file.value`) or something else (for `file.result`)
361361
*/
362-
compile(): string
362+
compile(): unknown
363363
}
364364

365365
/**
@@ -373,9 +373,9 @@ export type CompilerConstructor = new (node: Node, file: VFile) => Compiler
373373
*
374374
* @param node Node/tree to be stringified
375375
* @param file File associated with node
376-
* @returns Compiled text
376+
* @returns Compiled text (for `file.value`) or something else (for `file.result`)
377377
*/
378-
export type CompilerFunction = (node: Node, file: VFile) => string
378+
export type CompilerFunction = (node: Node, file: VFile) => unknown
379379

380380
/**
381381
* Access results from transforms

0 commit comments

Comments
 (0)