mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
69 lines
3.2 KiB
Plaintext
69 lines
3.2 KiB
Plaintext
//// [tests/cases/conformance/jsdoc/jsdocVariadicInOverload.ts] ////
|
|
|
|
=== typeTagForMultipleVariableDeclarations.js ===
|
|
// based on code from unifiedjs/unified
|
|
class Node {}
|
|
>Node : Symbol(Node, Decl(typeTagForMultipleVariableDeclarations.js, 0, 0))
|
|
|
|
/**
|
|
* @template {Node | undefined} [ParseTree=undefined]
|
|
* Output of `parse` (optional).
|
|
* @template {Node | undefined} [HeadTree=undefined]
|
|
* Input for `run` (optional).
|
|
* @template {Node | undefined} [TailTree=undefined]
|
|
* Output for `run` (optional).
|
|
* @template {Node | undefined} [CompileTree=undefined]
|
|
* Input of `stringify` (optional).
|
|
* @template {string | undefined} [CompileResult=undefined]
|
|
* Output of `stringify` (optional).
|
|
*/
|
|
export class Processor {
|
|
>Processor : Symbol(Processor, Decl(typeTagForMultipleVariableDeclarations.js, 1, 13))
|
|
|
|
/**
|
|
* @overload
|
|
* @param {string | null | undefined} [preset]
|
|
* @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
|
|
*
|
|
* @template {Array<unknown>} [Parameters=[]]
|
|
* @template {Node | string | undefined} [Input=undefined]
|
|
* @template [Output=Input]
|
|
* @overload
|
|
* @param {number} plugin
|
|
* @param {...(Parameters | [boolean])} parameters
|
|
* @returns {Processor}
|
|
*
|
|
* @param {string | number | boolean | null | undefined} value
|
|
* Usable value.
|
|
* @param {...unknown} parameters
|
|
* Parameters, when a plugin is given as a usable value.
|
|
* @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}
|
|
* Current processor.
|
|
*/
|
|
use(value, ...parameters) {
|
|
>use : Symbol(Processor.use, Decl(typeTagForMultipleVariableDeclarations.js, 16, 6), Decl(typeTagForMultipleVariableDeclarations.js, 23, 6), Decl(typeTagForMultipleVariableDeclarations.js, 14, 24))
|
|
>value : Symbol(value, Decl(typeTagForMultipleVariableDeclarations.js, 35, 6))
|
|
>parameters : Symbol(parameters, Decl(typeTagForMultipleVariableDeclarations.js, 35, 12))
|
|
|
|
return this;
|
|
>this : Symbol(Processor, Decl(typeTagForMultipleVariableDeclarations.js, 1, 13))
|
|
}
|
|
}
|
|
var p = new Processor();
|
|
>p : Symbol(p, Decl(typeTagForMultipleVariableDeclarations.js, 39, 3))
|
|
>Processor : Symbol(Processor, Decl(typeTagForMultipleVariableDeclarations.js, 1, 13))
|
|
|
|
var x = 1, y = 2, z = 3;
|
|
>x : Symbol(x, Decl(typeTagForMultipleVariableDeclarations.js, 40, 3))
|
|
>y : Symbol(y, Decl(typeTagForMultipleVariableDeclarations.js, 40, 10))
|
|
>z : Symbol(z, Decl(typeTagForMultipleVariableDeclarations.js, 40, 17))
|
|
|
|
p.use(x, y, z);
|
|
>p.use : Symbol(Processor.use, Decl(typeTagForMultipleVariableDeclarations.js, 16, 6), Decl(typeTagForMultipleVariableDeclarations.js, 23, 6), Decl(typeTagForMultipleVariableDeclarations.js, 14, 24))
|
|
>p : Symbol(p, Decl(typeTagForMultipleVariableDeclarations.js, 39, 3))
|
|
>use : Symbol(Processor.use, Decl(typeTagForMultipleVariableDeclarations.js, 16, 6), Decl(typeTagForMultipleVariableDeclarations.js, 23, 6), Decl(typeTagForMultipleVariableDeclarations.js, 14, 24))
|
|
>x : Symbol(x, Decl(typeTagForMultipleVariableDeclarations.js, 40, 3))
|
|
>y : Symbol(y, Decl(typeTagForMultipleVariableDeclarations.js, 40, 10))
|
|
>z : Symbol(z, Decl(typeTagForMultipleVariableDeclarations.js, 40, 17))
|
|
|