Module

x/ts_morph/ts_morph.d.ts>Structure

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

Properties

optional
leadingTrivia: string | WriterFunction | (string | WriterFunction)[]

Leading comments or whitespace.

optional
trailingTrivia: string | WriterFunction | (string | WriterFunction)[]

Trailing comments or whitespace.

variable Structure
import { Structure } from "https://dotland.deno.dev/x/ts_morph@17.0.0/ts_morph.d.ts";

Type guards for use on structures.

type

{ readonly hasName: <T extends Structure>(structure: T) => structure is T & { name: string; }; readonly isAssertEntry: (structure: unknown) => structure is AssertEntryStructure; readonly isAssertionKeyNamed: <T_1>(structure: T_1) => structure is T_1 & AssertionKeyNamedNodeStructure; readonly isCallSignature: (structure: unknown) => structure is CallSignatureDeclarationStructure; readonly isJSDocable: <T_2>(structure: T_2) => structure is T_2 & JSDocableNodeStructure; readonly isSignatured: <T_3>(structure: T_3) => structure is T_3 & SignaturedDeclarationStructure; readonly isParametered: <T_4>(structure: T_4) => structure is T_4 & ParameteredNodeStructure; readonly isReturnTyped: <T_5>(structure: T_5) => structure is T_5 & ReturnTypedNodeStructure; readonly isTypeParametered: <T_6>(structure: T_6) => structure is T_6 & TypeParameteredNodeStructure; readonly isClass: (structure: unknown) => structure is ClassDeclarationStructure; readonly isClassLikeDeclarationBase: <T_7>(structure: T_7) => structure is T_7 & ClassLikeDeclarationBaseStructure; readonly isNameable: <T_8>(structure: T_8) => structure is T_8 & NameableNodeStructure; readonly isImplementsClauseable: <T_9>(structure: T_9) => structure is T_9 & ImplementsClauseableNodeStructure; readonly isDecoratable: <T_10>(structure: T_10) => structure is T_10 & DecoratableNodeStructure; readonly isAbstractable: <T_11>(structure: T_11) => structure is T_11 & AbstractableNodeStructure; readonly isAmbientable: <T_12>(structure: T_12) => structure is T_12 & AmbientableNodeStructure; readonly isExportable: <T_13>(structure: T_13) => structure is T_13 & ExportableNodeStructure; readonly isClassStaticBlock: (structure: unknown) => structure is ClassStaticBlockDeclarationStructure; readonly isStatemented: <T_14>(structure: T_14) => structure is T_14 & StatementedNodeStructure; readonly isConstructorDeclarationOverload: (structure: unknown) => structure is ConstructorDeclarationOverloadStructure; readonly isScoped: <T_15>(structure: T_15) => structure is T_15 & ScopedNodeStructure; readonly isConstructor: (structure: unknown) => structure is ConstructorDeclarationStructure; readonly isFunctionLike: <T_16>(structure: T_16) => structure is T_16 & FunctionLikeDeclarationStructure; readonly isConstructSignature: (structure: unknown) => structure is ConstructSignatureDeclarationStructure; readonly isDecorator: (structure: unknown) => structure is DecoratorStructure; readonly isEnum: (structure: unknown) => structure is EnumDeclarationStructure; readonly isNamed: <T_17>(structure: T_17) => structure is T_17 & NamedNodeStructure; readonly isEnumMember: (structure: unknown) => structure is EnumMemberStructure; readonly isPropertyNamed: <T_18>(structure: T_18) => structure is T_18 & PropertyNamedNodeStructure; readonly isInitializerExpressionable: <T_19>(structure: T_19) => structure is T_19 & InitializerExpressionableNodeStructure; readonly isExportAssignment: (structure: unknown) => structure is ExportAssignmentStructure; readonly isExportDeclaration: (structure: unknown) => structure is ExportDeclarationStructure; readonly isExportSpecifier: (structure: unknown) => structure is ExportSpecifierStructure; readonly isFunctionDeclarationOverload: (structure: unknown) => structure is FunctionDeclarationOverloadStructure; readonly isAsyncable: <T_20>(structure: T_20) => structure is T_20 & AsyncableNodeStructure; readonly isGeneratorable: <T_21>(structure: T_21) => structure is T_21 & GeneratorableNodeStructure; readonly isFunction: (structure: unknown) => structure is FunctionDeclarationStructure; readonly isGetAccessor: (structure: unknown) => structure is GetAccessorDeclarationStructure; readonly isStaticable: <T_22>(structure: T_22) => structure is T_22 & StaticableNodeStructure; readonly isImportDeclaration: (structure: unknown) => structure is ImportDeclarationStructure; readonly isImportSpecifier: (structure: unknown) => structure is ImportSpecifierStructure; readonly isIndexSignature: (structure: unknown) => structure is IndexSignatureDeclarationStructure; readonly isReadonlyable: <T_23>(structure: T_23) => structure is T_23 & ReadonlyableNodeStructure; readonly isInterface: (structure: unknown) => structure is InterfaceDeclarationStructure; readonly isExtendsClauseable: <T_24>(structure: T_24) => structure is T_24 & ExtendsClauseableNodeStructure; readonly isTypeElementMembered: <T_25>(structure: T_25) => structure is T_25 & TypeElementMemberedNodeStructure; readonly isJSDoc: (structure: unknown) => structure is JSDocStructure; readonly isJSDocTag: (structure: unknown) => structure is JSDocTagStructure; readonly isJsxAttribute: (structure: unknown) => structure is JsxAttributeStructure; readonly isJsxElement: (structure: unknown) => structure is JsxElementStructure; readonly isJsxSelfClosingElement: (structure: unknown) => structure is JsxSelfClosingElementStructure; readonly isJsxTagNamed: <T_26>(structure: T_26) => structure is T_26 & JsxTagNamedNodeStructure; readonly isJsxAttributed: <T_27>(structure: T_27) => structure is T_27 & JsxAttributedNodeStructure; readonly isJsxSpreadAttribute: (structure: unknown) => structure is JsxSpreadAttributeStructure; readonly isMethodDeclarationOverload: (structure: unknown) => structure is MethodDeclarationOverloadStructure; readonly isQuestionTokenable: <T_28>(structure: T_28) => structure is T_28 & QuestionTokenableNodeStructure; readonly isOverrideable: <T_29>(structure: T_29) => structure is T_29 & OverrideableNodeStructure; readonly isMethod: (structure: unknown) => structure is MethodDeclarationStructure; readonly isMethodSignature: (structure: unknown) => structure is MethodSignatureStructure; readonly isModule: (structure: unknown) => structure is ModuleDeclarationStructure; readonly isModuleNamed: <T_30>(structure: T_30) => structure is T_30 & ModuleNamedNodeStructure; readonly isParameter: (structure: unknown) => structure is ParameterDeclarationStructure; readonly isBindingNamed: <T_31>(structure: T_31) => structure is T_31 & BindingNamedNodeStructure; readonly isTyped: <T_32>(structure: T_32) => structure is T_32 & TypedNodeStructure; readonly isScopeable: <T_33>(structure: T_33) => structure is T_33 & ScopeableNodeStructure; readonly isPropertyAssignment: (structure: unknown) => structure is PropertyAssignmentStructure; readonly isProperty: (structure: unknown) => structure is PropertyDeclarationStructure; readonly isExclamationTokenable: <T_34>(structure: T_34) => structure is T_34 & ExclamationTokenableNodeStructure; readonly isPropertySignature: (structure: unknown) => structure is PropertySignatureStructure; readonly isSetAccessor: (structure: unknown) => structure is SetAccessorDeclarationStructure; readonly isShorthandPropertyAssignment: (structure: unknown) => structure is ShorthandPropertyAssignmentStructure; readonly isSourceFile: (structure: unknown) => structure is SourceFileStructure; readonly isSpreadAssignment: (structure: unknown) => structure is SpreadAssignmentStructure; readonly isExpressioned: <T_35>(structure: T_35) => structure is T_35 & ExpressionedNodeStructure; readonly isTypeAlias: (structure: unknown) => structure is TypeAliasDeclarationStructure; readonly isTypeParameter: (structure: unknown) => structure is TypeParameterDeclarationStructure; readonly isVariableDeclaration: (structure: unknown) => structure is VariableDeclarationStructure; readonly isVariableStatement: (structure: unknown) => structure is VariableStatementStructure; }