Module

x/ts_morph/mod.ts>MappedTypeNode

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
class MappedTypeNode
extends TypeNode<ts.MappedTypeNode>
import { MappedTypeNode } from "https://dotland.deno.dev/x/ts_morph@18.0.0/mod.ts";

Methods

getNameTypeNode(): TypeNode | undefined

Gets the mapped type node's name type node if any.

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

Gets the mapped type node's name type node or throws if it doesn't exist.

getParent(): NodeParentType<ts.MappedTypeNode>
getParentOrThrow(message?: string | (() => string)): NonNullable<NodeParentType<ts.MappedTypeNode>>
getQuestionToken():
| Node<ts.QuestionToken>
| Node<ts.PlusToken>
| Node<ts.MinusToken>
| undefined

Gets the mapped type's question token.

getQuestionTokenOrThrow(message?: string | (() => string)): Node<ts.QuestionToken> | Node<ts.PlusToken> | Node<ts.MinusToken>

Gets the mapped type's question token or throws if not exist.

getReadonlyToken():
| Node<ts.ReadonlyKeyword>
| Node<ts.PlusToken>
| Node<ts.MinusToken>
| undefined

Gets the mapped type's readonly token.

getReadonlyTokenOrThrow(message?: string | (() => string)): Node<ts.ReadonlyKeyword> | Node<ts.PlusToken> | Node<ts.MinusToken>

Gets the mapped type's readonly token or throws if not exist.

getTypeNode(): TypeNode | undefined

Gets the mapped type node's type node if it exists or returns undefined when not.

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

Gets the mapped type node's type node if it exists or throws when undefined.

Gets the mapped type node's type parameter.