Skip to main content
Module

x/ts_morph/mod.ts>ReturnTypedNode

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Latest
interface ReturnTypedNode
import { type ReturnTypedNode } from "https://deno.land/x/ts_morph@22.0.0/mod.ts";

Methods

getReturnType(): Type

Gets the return type.

getReturnTypeNode(): TypeNode | undefined

Gets the return type node or undefined if none exists.

getReturnTypeNodeOrThrow(message?: string | (() => string)): TypeNode

Gets the return type node or throws if none exists.

setReturnType(textOrWriterFunction: string | WriterFunction): this

Sets the return type of the node.

removeReturnType(): this

Removes the return type.

getSignature(): Signature

Gets the signature of the node from the type checker.

function ReturnTypedNode
import { ReturnTypedNode } from "https://deno.land/x/ts_morph@22.0.0/mod.ts";

Type Parameters

T extends Constructor<ReturnTypedNodeExtensionType>

Returns

Constructor<ReturnTypedNode> & T