(compiler-options transformation-context)
Gets the compiler options supplied to the transformer.
Returns: CompilerOptions
Gets the compiler options supplied to the transformer. **Returns:** `CompilerOptions`
(emit-notification-enabled? transformation-context node)
Determines whether before/after emit notifications should be raised in the pretty printer when it emits a node.
Parameters:
node
: Node
Returns: boolean
Determines whether before/after emit notifications should be raised in the pretty printer when it emits a node. **Parameters:** - `node`: `Node` **Returns:** `boolean`
(enable-emit-notification transformation-context kind)
Enables before/after emit notifications in the pretty printer for the provided SyntaxKind.
Parameters:
kind
: SyntaxKind
Returns: void
Enables before/after emit notifications in the pretty printer for the provided SyntaxKind. **Parameters:** - `kind`: `SyntaxKind` **Returns:** `void`
(enable-substitution transformation-context kind)
Enables expression substitutions in the pretty printer for the provided SyntaxKind.
Parameters:
kind
: SyntaxKind
Returns: void
Enables expression substitutions in the pretty printer for the provided SyntaxKind. **Parameters:** - `kind`: `SyntaxKind` **Returns:** `void`
(end-lexical-environment transformation-context)
Ends a lexical environment, returning any declarations.
Returns: Statement[] | undefined
Ends a lexical environment, returning any declarations. **Returns:** `Statement[] | undefined`
(factory transformation-context)
Returns: NodeFactory
**Returns:** `NodeFactory`
(hoist-function-declaration transformation-context node)
Hoists a function declaration to the containing scope.
Parameters:
node
: FunctionDeclaration
Returns: void
Hoists a function declaration to the containing scope. **Parameters:** - `node`: `FunctionDeclaration` **Returns:** `void`
(hoist-variable-declaration transformation-context node)
Hoists a variable declaration to the containing scope.
Parameters:
node
: Identifier
Returns: void
Hoists a variable declaration to the containing scope. **Parameters:** - `node`: `Identifier` **Returns:** `void`
(on-emit-node transformation-context)
Hook used to allow transformers to capture state before or after the printer emits a node.
NOTE: Transformation hooks should only be modified during Transformer
initialization,
before returning the NodeTransformer
callback.
Returns: (hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void) => void
Hook used to allow transformers to capture state before or after the printer emits a node. NOTE: Transformation hooks should only be modified during `Transformer` initialization, before returning the `NodeTransformer` callback. **Returns:** `(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void) => void`
(on-substitute-node transformation-context)
Hook used by transformers to substitute expressions just before they are emitted by the pretty printer.
NOTE: Transformation hooks should only be modified during Transformer
initialization,
before returning the NodeTransformer
callback.
Returns: (hint: EmitHint, node: Node) => Node
Hook used by transformers to substitute expressions just before they are emitted by the pretty printer. NOTE: Transformation hooks should only be modified during `Transformer` initialization, before returning the `NodeTransformer` callback. **Returns:** `(hint: EmitHint, node: Node) => Node`
(read-emit-helpers transformation-context)
Gets and resets the requested non-scoped emit helpers.
Returns: EmitHelper[] | undefined
Gets and resets the requested non-scoped emit helpers. **Returns:** `EmitHelper[] | undefined`
(request-emit-helper transformation-context helper)
Records a request for a non-scoped emit helper in the current context.
Parameters:
helper
: EmitHelper
Returns: void
Records a request for a non-scoped emit helper in the current context. **Parameters:** - `helper`: `EmitHelper` **Returns:** `void`
(resume-lexical-environment transformation-context)
Resumes a suspended lexical environment, usually before visiting a function body.
Returns: void
Resumes a suspended lexical environment, usually before visiting a function body. **Returns:** `void`
(set-on-emit-node! transformation-context value)
Hook used to allow transformers to capture state before or after the printer emits a node.
NOTE: Transformation hooks should only be modified during Transformer
initialization,
before returning the NodeTransformer
callback.
Hook used to allow transformers to capture state before or after the printer emits a node. NOTE: Transformation hooks should only be modified during `Transformer` initialization, before returning the `NodeTransformer` callback.
(set-on-substitute-node! transformation-context value)
Hook used by transformers to substitute expressions just before they are emitted by the pretty printer.
NOTE: Transformation hooks should only be modified during Transformer
initialization,
before returning the NodeTransformer
callback.
Hook used by transformers to substitute expressions just before they are emitted by the pretty printer. NOTE: Transformation hooks should only be modified during `Transformer` initialization, before returning the `NodeTransformer` callback.
(start-lexical-environment transformation-context)
Starts a new lexical environment.
Returns: void
Starts a new lexical environment. **Returns:** `void`
(substitution-enabled? transformation-context node)
Determines whether expression substitutions are enabled for the provided node.
Parameters:
node
: Node
Returns: boolean
Determines whether expression substitutions are enabled for the provided node. **Parameters:** - `node`: `Node` **Returns:** `boolean`
(suspend-lexical-environment transformation-context)
Suspends the current lexical environment, usually after visiting a parameter list.
Returns: void
Suspends the current lexical environment, usually after visiting a parameter list. **Returns:** `void`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close