Skip to main content
Module

x/ts_morph/ts_morph.d.ts>TypeElementMemberedNode

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

Methods

Adds a member.

addMembers(members: string | WriterFunction | ReadonlyArray<string | WriterFunction | TypeElementMemberStructures>): (TypeElementTypes | CommentTypeElement)[]

Adds members.

insertMember(index: number, member: string | WriterFunction | TypeElementMemberStructures): TypeElementTypes | CommentTypeElement

Inserts a member.

insertMembers(index: number, members: string | WriterFunction | ReadonlyArray<string | WriterFunction | TypeElementMemberStructures>): (TypeElementTypes | CommentTypeElement)[]

Inserts members.

Add construct signature.

addConstructSignatures(structures: ReadonlyArray<OptionalKind<ConstructSignatureDeclarationStructure>>): ConstructSignatureDeclaration[]

Add construct signatures.

insertConstructSignature(index: number, structure: OptionalKind<ConstructSignatureDeclarationStructure>): ConstructSignatureDeclaration

Insert construct signature.

insertConstructSignatures(index: number, structures: ReadonlyArray<OptionalKind<ConstructSignatureDeclarationStructure>>): ConstructSignatureDeclaration[]

Insert construct signatures.

getConstructSignature(findFunction: (member: ConstructSignatureDeclaration) => boolean): ConstructSignatureDeclaration | undefined

Gets the first construct signature by a find function.

getConstructSignatureOrThrow(findFunction: (member: ConstructSignatureDeclaration) => boolean): ConstructSignatureDeclaration

Gets the first construct signature by a find function or throws if not found.

getConstructSignatures(): ConstructSignatureDeclaration[]

Gets the interface construct signatures.

Add call signature.

addCallSignatures(structures: ReadonlyArray<OptionalKind<CallSignatureDeclarationStructure>>): CallSignatureDeclaration[]

Add call signatures.

insertCallSignature(index: number, structure: OptionalKind<CallSignatureDeclarationStructure>): CallSignatureDeclaration

Insert call signature.

insertCallSignatures(index: number, structures: ReadonlyArray<OptionalKind<CallSignatureDeclarationStructure>>): CallSignatureDeclaration[]

Insert call signatures.

getCallSignature(findFunction: (member: CallSignatureDeclaration) => boolean): CallSignatureDeclaration | undefined

Gets the first call signature by a find function.

getCallSignatureOrThrow(findFunction: (member: CallSignatureDeclaration) => boolean): CallSignatureDeclaration

Gets the first call signature by a find function or throws if not found.

getCallSignatures(): CallSignatureDeclaration[]

Gets the interface call signatures.

Add index signature.

addIndexSignatures(structures: ReadonlyArray<OptionalKind<IndexSignatureDeclarationStructure>>): IndexSignatureDeclaration[]

Add index signatures.

insertIndexSignature(index: number, structure: OptionalKind<IndexSignatureDeclarationStructure>): IndexSignatureDeclaration

Insert index signature.

insertIndexSignatures(index: number, structures: ReadonlyArray<OptionalKind<IndexSignatureDeclarationStructure>>): IndexSignatureDeclaration[]

Insert index signatures.

getIndexSignature(findFunction: (member: IndexSignatureDeclaration) => boolean): IndexSignatureDeclaration | undefined

Gets the first index signature by a find function.

getIndexSignatureOrThrow(findFunction: (member: IndexSignatureDeclaration) => boolean): IndexSignatureDeclaration

Gets the first index signature by a find function or throws if not found.

getIndexSignatures(): IndexSignatureDeclaration[]

Gets the interface index signatures.

Add method.

addMethods(structures: ReadonlyArray<OptionalKind<MethodSignatureStructure>>): MethodSignature[]

Add methods.

insertMethod(index: number, structure: OptionalKind<MethodSignatureStructure>): MethodSignature

Insert method.

insertMethods(index: number, structures: ReadonlyArray<OptionalKind<MethodSignatureStructure>>): MethodSignature[]

Insert methods.

getMethod(name: string): MethodSignature | undefined

Gets the first method by name.

getMethod(findFunction: (member: MethodSignature) => boolean): MethodSignature | undefined

Gets the first method by a find function.

getMethodOrThrow(name: string): MethodSignature

Gets the first method by name or throws if not found.

getMethodOrThrow(findFunction: (member: MethodSignature) => boolean): MethodSignature

Gets the first method by a find function or throws if not found.

getMethods(): MethodSignature[]

Gets the interface method signatures.

Add property.

addProperties(structures: ReadonlyArray<OptionalKind<PropertySignatureStructure>>): PropertySignature[]

Add properties.

insertProperty(index: number, structure: OptionalKind<PropertySignatureStructure>): PropertySignature

Insert property.

insertProperties(index: number, structures: ReadonlyArray<OptionalKind<PropertySignatureStructure>>): PropertySignature[]

Insert properties.

getProperty(name: string): PropertySignature | undefined

Gets the first property by name.

getProperty(findFunction: (member: PropertySignature) => boolean): PropertySignature | undefined

Gets the first property by a find function.

getPropertyOrThrow(name: string): PropertySignature

Gets the first property by name or throws if not found.

getPropertyOrThrow(findFunction: (member: PropertySignature) => boolean): PropertySignature

Gets the first property by a find function or throws if not found.

getProperties(): PropertySignature[]

Gets the interface property signatures.

getMembers(): TypeElementTypes[]

Gets all the members.

getMembersWithComments(): (TypeElementTypes | CommentTypeElement)[]

Gets all the members with comment type elements.

function TypeElementMemberedNode
import { TypeElementMemberedNode } from "https://deno.land/x/ts_morph@15.1.0/ts_morph.d.ts";

Type Parameters

T extends Constructor<TypeElementMemberedNodeExtensionType>