Skip to content

Commit e1b5162

Browse files
committed
Refactor code-style
1 parent 1e0863a commit e1b5162

File tree

2 files changed

+27
-27
lines changed

2 files changed

+27
-27
lines changed

index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ declare const emptyObjectSymbol: unique symbol
2828
/**
2929
* Interface of known results from compilers.
3030
*
31-
* Normally, compilers result in text ({@link Value `Value`} of `vfile`).
31+
* Normally, compilers result in text ({@linkcode Value} of `vfile`).
3232
* When you compile to something else, such as a React node (as in,
3333
* `rehype-react`), you can augment this interface to include that type.
3434
*
@@ -45,7 +45,7 @@ declare const emptyObjectSymbol: unique symbol
4545
* export {} // You may not need this, but it makes sure the file is a module.
4646
* ```
4747
*
48-
* Use {@link CompileResults `CompileResults`} to access the values.
48+
* Use {@linkcode CompileResults} to access the values.
4949
*/
5050
export interface CompileResultMap {
5151
// Note: if `Value` from `VFile` is changed, this should too.

lib/index.js

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* Acceptable results from compilers.
1717
*
1818
* To register custom results, add them to
19-
* {@link CompileResultMap `CompileResultMap`}.
19+
* {@linkcode CompileResultMap}.
2020
*/
2121

2222
/**
@@ -28,8 +28,8 @@
2828
* A **compiler** handles the compiling of a syntax tree to something else
2929
* (in most cases, text) (TypeScript type).
3030
*
31-
* It is used in the stringify phase and called with a {@link Node `Node`}
32-
* and {@link VFile `VFile`} representation of the document to compile.
31+
* It is used in the stringify phase and called with a {@linkcode Node}
32+
* and {@linkcode VFile} representation of the document to compile.
3333
* It should return the textual representation of the given tree (typically
3434
* `string`).
3535
*
@@ -42,7 +42,7 @@
4242
* > result values.
4343
* >
4444
* > To register custom results in TypeScript, add them to
45-
* > {@link CompileResultMap `CompileResultMap`}.
45+
* > {@linkcode CompileResultMap}.
4646
*
4747
* [rehype-react]: https://github.com/rehypejs/rehype-react
4848
* @param {Tree} tree
@@ -61,9 +61,9 @@
6161
* A **parser** handles the parsing of text to a syntax tree.
6262
*
6363
* It is used in the parse phase and is called with a `string` and
64-
* {@link VFile `VFile`} of the document to parse.
64+
* {@linkcode VFile} of the document to parse.
6565
* It must return the syntax tree representation of the given file
66-
* ({@link Node `Node`}).
66+
* ({@linkcode Node}).
6767
* @param {string} document
6868
* Document to parse.
6969
* @param {VFile} file
@@ -94,20 +94,20 @@
9494
* @template {Node | string | undefined} [Input=Node]
9595
* Value that is expected as input (default: `Node`).
9696
*
97-
* * If the plugin returns a {@link Transformer `Transformer`}, this
97+
* * If the plugin returns a {@linkcode Transformer}, this
9898
* should be the node it expects.
99-
* * If the plugin sets a {@link Parser `Parser`}, this should be
99+
* * If the plugin sets a {@linkcode Parser}, this should be
100100
* `string`.
101-
* * If the plugin sets a {@link Compiler `Compiler`}, this should be the
101+
* * If the plugin sets a {@linkcode Compiler}, this should be the
102102
* node it expects.
103103
* @template [Output=Input]
104104
* Value that is yielded as output (default: `Input`).
105105
*
106-
* * If the plugin returns a {@link Transformer `Transformer`}, this
106+
* * If the plugin returns a {@linkcode Transformer}, this
107107
* should be the node that that yields.
108-
* * If the plugin sets a {@link Parser `Parser`}, this should be the
108+
* * If the plugin sets a {@linkcode Parser}, this should be the
109109
* node that it yields.
110-
* * If the plugin sets a {@link Compiler `Compiler`}, this should be
110+
* * If the plugin sets a {@linkcode Compiler}, this should be
111111
* result it yields.
112112
* @typedef {(
113113
* (this: Processor, ...parameters: PluginParameters) =>
@@ -146,20 +146,20 @@
146146
* @template {Node | string | undefined} [Input=undefined]
147147
* Value that is expected as input (optional).
148148
*
149-
* * If the plugin returns a {@link Transformer `Transformer`}, this
149+
* * If the plugin returns a {@linkcode Transformer}, this
150150
* should be the node it expects.
151-
* * If the plugin sets a {@link Parser `Parser`}, this should be
151+
* * If the plugin sets a {@linkcode Parser}, this should be
152152
* `string`.
153-
* * If the plugin sets a {@link Compiler `Compiler`}, this should be the
153+
* * If the plugin sets a {@linkcode Compiler}, this should be the
154154
* node it expects.
155155
* @template [Output=undefined] (optional).
156156
* Value that is yielded as output.
157157
*
158-
* * If the plugin returns a {@link Transformer `Transformer`}, this
158+
* * If the plugin returns a {@linkcode Transformer}, this
159159
* should be the node that that yields.
160-
* * If the plugin sets a {@link Parser `Parser`}, this should be the
160+
* * If the plugin sets a {@linkcode Parser}, this should be the
161161
* node that it yields.
162-
* * If the plugin sets a {@link Compiler `Compiler`}, this should be
162+
* * If the plugin sets a {@linkcode Compiler}, this should be
163163
* result it yields.
164164
* @typedef {(
165165
* [
@@ -340,10 +340,10 @@
340340
* VFile :
341341
* VFile & {result: Result}
342342
* )} VFileWithOutput
343-
* Type to generate a {@link VFile `VFile`} corresponding to a compiler result.
343+
* Type to generate a {@linkcode VFile} corresponding to a compiler result.
344344
*
345345
* If a result that is not acceptable on a `VFile` is used, that will
346-
* be stored on the `result` field of {@link VFile `VFile`}.
346+
* be stored on the `result` field of {@linkcode VFile}.
347347
*/
348348

349349
import {bail} from 'bail'
@@ -489,7 +489,7 @@ export class Processor extends CallableInstance {
489489
* @deprecated
490490
* This is a private internal method and should not be used.
491491
* @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
492-
* New *unfrozen* processor ({@link Processor `Processor`}) that is
492+
* New *unfrozen* processor ({@linkcode Processor}) that is
493493
* configured to work the same as its ancestor.
494494
* When the descendant processor is configured in the future it does not
495495
* affect the ancestral processor.
@@ -525,7 +525,7 @@ export class Processor extends CallableInstance {
525525
* > Call the processor first to create a new unfrozen processor.
526526
*
527527
* > **Note**: to register custom data in TypeScript, augment the
528-
* > {@link Data `Data`} interface.
528+
* > {@linkcode Data} interface.
529529
*
530530
* @example
531531
* This example show how to get and set info:
@@ -706,7 +706,7 @@ export class Processor extends CallableInstance {
706706
* > result values.
707707
* >
708708
* > To register custom results in TypeScript, add them to
709-
* > {@link CompileResultMap `CompileResultMap`}.
709+
* > {@linkcode CompileResultMap}.
710710
*
711711
* [rehype-react]: https://github.com/rehypejs/rehype-react
712712
*/
@@ -802,7 +802,7 @@ export class Processor extends CallableInstance {
802802
* > result values.
803803
* >
804804
* > To register custom results in TypeScript, add them to
805-
* > {@link CompileResultMap `CompileResultMap`}.
805+
* > {@linkcode CompileResultMap}.
806806
*
807807
* [rehype-react]: https://github.com/rehypejs/rehype-react
808808
*/
@@ -988,7 +988,7 @@ export class Processor extends CallableInstance {
988988
* > result values.
989989
* >
990990
* > To register custom results in TypeScript, add them to
991-
* > {@link CompileResultMap `CompileResultMap`}.
991+
* > {@linkcode CompileResultMap}.
992992
*
993993
* [rehype-react]: https://github.com/rehypejs/rehype-react
994994
*/

0 commit comments

Comments
 (0)