Skip to content

Commit

Permalink
Refactor docs
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Aug 14, 2023
1 parent a44db46 commit 7148746
Show file tree
Hide file tree
Showing 5 changed files with 1,025 additions and 655 deletions.
10 changes: 5 additions & 5 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {VFileValue} from 'vfile'
import type {Value} from 'vfile'
import type {CompileResults} from './lib/index.js'

export type {
Expand All @@ -8,13 +8,13 @@ export type {
CompilerClass,
CompilerFunction,
// `Data` is typed and exposed below.
Parser,
ParserClass,
ParserFunction,
Pluggable,
PluggableList,
Plugin,
PluginTuple,
Parser,
ParserClass,
ParserFunction,
Preset,
ProcessCallback,
Processor,
Expand All @@ -29,7 +29,7 @@ export {unified} from './lib/index.js'
/**
* Interface of known results from compilers.
*
* Normally, compilers result in text ({@link VFileValue `VFileValue`}).
* Normally, compilers result in text ({@link Value `Value`} of `vfile`).
* When you compile to something else, such as a React node (as in,
* `rehype-react`), you can augment this interface to include that type.
*
Expand Down
4 changes: 4 additions & 0 deletions index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,10 @@ declare module './index.js' {
interface CompileResultMap {
ReactNode: ReactNode
}

interface Data {
something?: string | undefined
}
}

// Compile plugin (to a non-node).
Expand Down
Loading

0 comments on commit 7148746

Please sign in to comment.