Module

x/ts_morph/mod.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://dotland.deno.dev/x/ts_morph@21.0.0/mod.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.

Add get accessor.

addGetAccessors(structures: ReadonlyArray<OptionalKind<GetAccessorDeclarationStructure>>): GetAccessorDeclaration[]

Add get accessors.

insertGetAccessor(index: number, structure: OptionalKind<GetAccessorDeclarationStructure>): GetAccessorDeclaration

Insert get accessor.

insertGetAccessors(index: number, structures: ReadonlyArray<OptionalKind<GetAccessorDeclarationStructure>>): GetAccessorDeclaration[]

Insert get accessors.

getGetAccessor(name: string): GetAccessorDeclaration | undefined

Gets the first get accessor by name.

getGetAccessor(findFunction: (member: GetAccessorDeclaration) => boolean): GetAccessorDeclaration | undefined

Gets the first get accessor by a find function.

getGetAccessorOrThrow(name: string): GetAccessorDeclaration

Gets the first get accessor by name or throws if not found.

getGetAccessorOrThrow(findFunction: (member: GetAccessorDeclaration) => boolean): GetAccessorDeclaration

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

getGetAccessors(): GetAccessorDeclaration[]

Gets the interface get accessor declarations.

Add set accessor.

addSetAccessors(structures: ReadonlyArray<OptionalKind<SetAccessorDeclarationStructure>>): SetAccessorDeclaration[]

Add set accessors.

insertSetAccessor(index: number, structure: OptionalKind<SetAccessorDeclarationStructure>): SetAccessorDeclaration

Insert set accessor.

insertSetAccessors(index: number, structures: ReadonlyArray<OptionalKind<SetAccessorDeclarationStructure>>): SetAccessorDeclaration[]

Insert set accessors.

getSetAccessor(name: string): SetAccessorDeclaration | undefined

Gets the first set accessor by name.

getSetAccessor(findFunction: (member: SetAccessorDeclaration) => boolean): SetAccessorDeclaration | undefined

Gets the first set accessor by a find function.

getSetAccessorOrThrow(name: string): SetAccessorDeclaration

Gets the first set accessor by name or throws if not found.

getSetAccessorOrThrow(findFunction: (member: SetAccessorDeclaration) => boolean): SetAccessorDeclaration

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

getSetAccessors(): SetAccessorDeclaration[]

Gets the interface set accessor declarations.

getMembers(): TypeElementTypes[]

Gets all the members.

getMembersWithComments(): (TypeElementTypes | CommentTypeElement)[]

Gets all the members with comment type elements.

function TypeElementMemberedNode
import { TypeElementMemberedNode } from "https://dotland.deno.dev/x/ts_morph@21.0.0/mod.ts";

Type Parameters

T extends Constructor<TypeElementMemberedNodeExtensionType>