Skip to content

Commit

Permalink
types: add support for buffer, other return values
Browse files Browse the repository at this point in the history
Reviewed-by: Christian Murphy <christian.murphy.42@gmail.com>

Closes GH-144.
  • Loading branch information
wooorm authored Jul 4, 2021
1 parent 4bfd6c8 commit b22bf8e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,9 +357,9 @@ export interface Compiler {
/**
* Transform an AST node/tree into text
*
* @returns Compiled text
* @returns Compiled text (for `file.value`) or something else (for `file.result`)
*/
compile(): string
compile(): unknown
}

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

/**
* Access results from transforms
Expand Down

0 comments on commit b22bf8e

Please sign in to comment.