123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282 |
- import ts from 'typescript';
- /**
- * Callback type used for {@link forEachComment}.
- *
- * @category Callbacks
- */
- type ForEachCommentCallback = (fullText: string, comment: ts.CommentRange) => void;
- /**
- * Iterates over all comments owned by `node` or its children.
- *
- * @category Nodes - Other Utilities
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * forEachComment(node, (fullText, comment) => {
- * console.log(`Found comment at position ${comment.pos}: '${fullText}'.`);
- * });
- * ```
- */
- declare function forEachComment(node: ts.Node, callback: ForEachCommentCallback, sourceFile?: ts.SourceFile): void;
- /**
- * An option that can be tested with {@link isCompilerOptionEnabled}.
- *
- * @category Compiler Options
- */
- type BooleanCompilerOptions = keyof {
- [K in keyof ts.CompilerOptions as NonNullable<ts.CompilerOptions[K]> extends boolean ? K : never]: unknown;
- };
- /**
- * Checks if a given compiler option is enabled.
- * It handles dependencies of options, e.g. `declaration` is implicitly enabled by `composite` or `strictNullChecks` is enabled by `strict`.
- * However, it does not check dependencies that are already checked and reported as errors, e.g. `checkJs` without `allowJs`.
- * This function only handles boolean flags.
- *
- * @category Compiler Options
- * @example
- * ```ts
- * const options = {
- * allowJs: true,
- * };
- *
- * isCompilerOptionEnabled(options, "allowJs"); // true
- * isCompilerOptionEnabled(options, "allowSyntheticDefaultImports"); // false
- * ```
- */
- declare function isCompilerOptionEnabled(options: ts.CompilerOptions, option: BooleanCompilerOptions): boolean;
- /**
- * An option that can be tested with {@link isStrictCompilerOptionEnabled}.
- *
- * @category Compiler Options
- */
- type StrictCompilerOption = "alwaysStrict" | "noImplicitAny" | "noImplicitThis" | "strictBindCallApply" | "strictFunctionTypes" | "strictNullChecks" | "strictPropertyInitialization";
- /**
- * Checks if a given compiler option is enabled, accounting for whether all flags
- * (except `strictPropertyInitialization`) have been enabled by `strict: true`.
- *
- * @category Compiler Options
- * @example
- * ```ts
- * const optionsLenient = {
- * noImplicitAny: true,
- * };
- *
- * isStrictCompilerOptionEnabled(optionsLenient, "noImplicitAny"); // true
- * isStrictCompilerOptionEnabled(optionsLenient, "noImplicitThis"); // false
- * ```
- *
- * @example
- * ```ts
- * const optionsStrict = {
- * noImplicitThis: false,
- * strict: true,
- * };
- *
- * isStrictCompilerOptionEnabled(optionsStrict, "noImplicitAny"); // true
- * isStrictCompilerOptionEnabled(optionsStrict, "noImplicitThis"); // false
- * ```
- */
- declare function isStrictCompilerOptionEnabled(options: ts.CompilerOptions, option: StrictCompilerOption): boolean;
- /**
- * Test if the given node has the given `ModifierFlags` set.
- *
- * @category Nodes - Flag Utilities
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isModifierFlagSet(node, ts.ModifierFlags.Abstract)) {
- * // ...
- * }
- * ```
- */
- declare function isModifierFlagSet(node: ts.Declaration, flag: ts.ModifierFlags): boolean;
- /**
- * Test if the given node has the given `NodeFlags` set.
- *
- * @category Nodes - Flag Utilities
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isNodeFlagSet(node, ts.NodeFlags.AwaitContext)) {
- * // ...
- * }
- * ```
- */
- declare const isNodeFlagSet: (node: ts.Node, flag: ts.NodeFlags) => boolean;
- /**
- * Test if the given node has the given `ObjectFlags` set.
- *
- * @category Nodes - Flag Utilities
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isObjectFlagSet(node, ts.ObjectFlags.Anonymous)) {
- * // ...
- * }
- * ```
- */
- declare function isObjectFlagSet(objectType: ts.ObjectType, flag: ts.ObjectFlags): boolean;
- /**
- * Test if the given node has the given `SymbolFlags` set.
- *
- * @category Nodes - Flag Utilities
- * @example
- * ```ts
- * declare const symbol: ts.Symbol;
- *
- * if (isSymbolFlagSet(symbol, ts.SymbolFlags.Accessor)) {
- * // ...
- * }
- * ```
- */
- declare const isSymbolFlagSet: (symbol: ts.Symbol, flag: ts.SymbolFlags) => boolean;
- /**
- * Test if the given node has the given `TypeFlags` set.
- *
- * @category Nodes - Flag Utilities
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isTypeFlagSet(type, ts.TypeFlags.Any)) {
- * // ...
- * }
- * ```
- */
- declare const isTypeFlagSet: (type: ts.Type, flag: ts.TypeFlags) => boolean;
- /**
- * Test if the given iterable includes a modifier of any of the given kinds.
- *
- * @category Modifier Utilities
- * @example
- * ```ts
- * declare const modifiers: ts.Modifier[];
- *
- * includesModifier(modifiers, ts.SyntaxKind.AbstractKeyword);
- * ```
- */
- declare function includesModifier(modifiers: Iterable<ts.Modifier> | undefined, ...kinds: ts.ModifierSyntaxKind[]): boolean;
- /**
- * An `AssertionExpression` that is declared as const.
- *
- * @category Node Types
- */
- type ConstAssertionExpression = ts.AssertionExpression & {
- type: ts.TypeReferenceNode;
- typeName: ConstAssertionIdentifier;
- };
- /**
- * An `Identifier` with an `escapedText` value of `"const"`.
- *
- * @category Node Types
- */
- type ConstAssertionIdentifier = ts.Identifier & {
- escapedText: ts.__String & "const";
- };
- /**
- * Test if a node is a {@link ConstAssertionExpression}.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isConstAssertionExpression(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a {@link ConstAssertionExpression}.
- */
- declare function isConstAssertionExpression(node: ts.AssertionExpression): node is ConstAssertionExpression;
- /**
- * Test if a node is an `IterationStatement`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isIterationStatement(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an `IterationStatement`.
- */
- declare function isIterationStatement(node: ts.Node): node is ts.IterationStatement;
- /**
- * Test if a node is a `JSDocNamespaceDeclaration`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isJSDocNamespaceDeclaration(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `JSDocNamespaceDeclaration`.
- */
- declare function isJSDocNamespaceDeclaration(node: ts.Node): node is ts.JSDocNamespaceDeclaration;
- /**
- * Test if a node is a `JsxTagNamePropertyAccess`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isJsxTagNamePropertyAccess(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `JsxTagNamePropertyAccess`.
- */
- declare function isJsxTagNamePropertyAccess(node: ts.Node): node is ts.JsxTagNamePropertyAccess;
- /**
- * a `NamedDeclaration` that definitely has a name.
- *
- * @category Node Types
- */
- interface NamedDeclarationWithName extends ts.NamedDeclaration {
- name: ts.DeclarationName;
- }
- /**
- * Test if a node is a {@link NamedDeclarationWithName}.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isNamedDeclarationWithName(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a {@link NamedDeclarationWithName}.
- */
- declare function isNamedDeclarationWithName(node: ts.Declaration): node is NamedDeclarationWithName;
- /**
- * Test if a node is a `NamespaceDeclaration`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isNamespaceDeclaration(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `NamespaceDeclaration`.
- */
- declare function isNamespaceDeclaration(node: ts.Node): node is ts.NamespaceDeclaration;
- /**
- * A number or string-like literal.
- *
- * @category Node Types
- */
- type NumericOrStringLikeLiteral = ts.NumericLiteral | ts.StringLiteralLike;
- /**
- * Test if a node is a {@link NumericOrStringLikeLiteral}.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isNumericOrStringLikeLiteral(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a {@link NumericOrStringLikeLiteral}.
- */
- declare function isNumericOrStringLikeLiteral(node: ts.Node): node is NumericOrStringLikeLiteral;
- /**
- * Test if a node is a `PropertyAccessEntityNameExpression`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isPropertyAccessEntityNameExpression(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `PropertyAccessEntityNameExpression`.
- */
- declare function isPropertyAccessEntityNameExpression(node: ts.Node): node is ts.PropertyAccessEntityNameExpression;
- /**
- * Test if a node is a `SuperElementAccessExpression`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isSuperElementAccessExpression(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `SuperElementAccessExpression`.
- */
- declare function isSuperElementAccessExpression(node: ts.Node): node is ts.SuperElementAccessExpression;
- /**
- * Test if a node is a `SuperPropertyAccessExpression`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isSuperPropertyAccessExpression(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `SuperPropertyAccessExpression`.
- */
- declare function isSuperPropertyAccessExpression(node: ts.Node): node is ts.SuperPropertyAccessExpression;
- /**
- * A node that represents the any keyword.
- *
- * @category Node Types
- */
- type AnyKeyword = ts.KeywordToken<ts.SyntaxKind.AnyKeyword>;
- /**
- * A node that represents the bigint keyword.
- *
- * @category Node Types
- */
- type BigIntKeyword = ts.KeywordToken<ts.SyntaxKind.BigIntKeyword>;
- /**
- * A node that represents the boolean keyword.
- *
- * @category Node Types
- */
- type BooleanKeyword = ts.KeywordToken<ts.SyntaxKind.BooleanKeyword>;
- /**
- * A node that represents the false keyword.
- *
- * @category Node Types
- */
- type FalseKeyword = ts.KeywordToken<ts.SyntaxKind.FalseKeyword>;
- /**
- * A node that represents the import keyword.
- *
- * @category Node Types
- */
- type ImportKeyword = ts.KeywordToken<ts.SyntaxKind.ImportKeyword>;
- /**
- * A node that represents the never keyword.
- *
- * @category Node Types
- */
- type NeverKeyword = ts.KeywordToken<ts.SyntaxKind.NeverKeyword>;
- /**
- * A node that represents the null keyword.
- *
- * @category Node Types
- */
- type NullKeyword = ts.KeywordToken<ts.SyntaxKind.NullKeyword>;
- /**
- * A node that represents the number keyword.
- *
- * @category Node Types
- */
- type NumberKeyword = ts.KeywordToken<ts.SyntaxKind.NumberKeyword>;
- /**
- * A node that represents the object keyword.
- *
- * @category Node Types
- */
- type ObjectKeyword = ts.KeywordToken<ts.SyntaxKind.ObjectKeyword>;
- /**
- * A node that represents the string keyword.
- *
- * @category Node Types
- */
- type StringKeyword = ts.KeywordToken<ts.SyntaxKind.StringKeyword>;
- /**
- * A node that represents the super keyword.
- *
- * @category Node Types
- */
- type SuperKeyword = ts.KeywordToken<ts.SyntaxKind.SuperKeyword>;
- /**
- * A node that represents the symbol keyword.
- *
- * @category Node Types
- */
- type SymbolKeyword = ts.KeywordToken<ts.SyntaxKind.SymbolKeyword>;
- /**
- * A node that represents the this keyword.
- *
- * @category Node Types
- */
- type ThisKeyword = ts.KeywordToken<ts.SyntaxKind.ThisKeyword>;
- /**
- * A node that represents the true keyword.
- *
- * @category Node Types
- */
- type TrueKeyword = ts.KeywordToken<ts.SyntaxKind.TrueKeyword>;
- /**
- * A node that represents the undefined keyword.
- *
- * @category Node Types
- */
- type UndefinedKeyword = ts.KeywordToken<ts.SyntaxKind.UndefinedKeyword>;
- /**
- * A node that represents the unknown keyword.
- *
- * @category Node Types
- */
- type UnknownKeyword = ts.KeywordToken<ts.SyntaxKind.UnknownKeyword>;
- /**
- * A node that represents the void keyword.
- *
- * @category Node Types
- */
- type VoidKeyword = ts.KeywordToken<ts.SyntaxKind.VoidKeyword>;
- /**
- * Test if a node is an `AbstractKeyword`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isAbstractKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an `AbstractKeyword`.
- */
- declare function isAbstractKeyword(node: ts.Node): node is ts.AbstractKeyword;
- /**
- * Test if a node is an `AccessorKeyword`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isAccessorKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an `AccessorKeyword`.
- */
- declare function isAccessorKeyword(node: ts.Node): node is ts.AccessorKeyword;
- /**
- * Test if a node is an {@link AnyKeyword}.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isAnyKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an {@link AnyKeyword}.
- */
- declare function isAnyKeyword(node: ts.Node): node is AnyKeyword;
- /**
- * Test if a node is an `AssertKeyword`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isAssertKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an `AssertKeyword`.
- */
- declare function isAssertKeyword(node: ts.Node): node is ts.AssertKeyword;
- /**
- * Test if a node is an `AssertsKeyword`.
- *
- * @deprecated With TypeScript v5, in favor of typescript's `isAssertsKeyword`.
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isAssertsKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an `AssertsKeyword`.
- */
- declare function isAssertsKeyword(node: ts.Node): node is ts.AssertsKeyword;
- /**
- * Test if a node is an `AsyncKeyword`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isAsyncKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an `AsyncKeyword`.
- */
- declare function isAsyncKeyword(node: ts.Node): node is ts.AsyncKeyword;
- /**
- * Test if a node is an `AwaitKeyword`.
- *
- * @deprecated With TypeScript v5, in favor of typescript's `isAwaitKeyword`.
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isAwaitKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an `AwaitKeyword`.
- */
- declare function isAwaitKeyword(node: ts.Node): node is ts.AwaitKeyword;
- /**
- * Test if a node is a {@link BigIntKeyword}.
- *
- * @deprecated With TypeScript v5, in favor of typescript's `isBigIntKeyword`.
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isBigIntKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a {@link BigIntKeyword}.
- */
- declare function isBigIntKeyword(node: ts.Node): node is BigIntKeyword;
- /**
- * Test if a node is a {@link BooleanKeyword}.
- *
- * @deprecated With TypeScript v5, in favor of typescript's `isBooleanKeyword`.
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isBooleanKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a {@link BooleanKeyword}.
- */
- declare function isBooleanKeyword(node: ts.Node): node is BooleanKeyword;
- /**
- * Test if a node is a `ColonToken`.
- *
- * @deprecated With TypeScript v5, in favor of typescript's `isColonToken`.
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isColonToken(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `ColonToken`.
- */
- declare function isColonToken(node: ts.Node): node is ts.ColonToken;
- /**
- * Test if a node is a `ConstKeyword`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isConstKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `ConstKeyword`.
- */
- declare function isConstKeyword(node: ts.Node): node is ts.ConstKeyword;
- /**
- * Test if a node is a `DeclareKeyword`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isDeclareKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `DeclareKeyword`.
- */
- declare function isDeclareKeyword(node: ts.Node): node is ts.DeclareKeyword;
- /**
- * Test if a node is a `DefaultKeyword`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isDefaultKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `DefaultKeyword`.
- */
- declare function isDefaultKeyword(node: ts.Node): node is ts.DefaultKeyword;
- /**
- * Test if a node is a `DotToken`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isDotToken(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `DotToken`.
- */
- declare function isDotToken(node: ts.Node): node is ts.DotToken;
- /**
- * Test if a node is an `EndOfFileToken`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isEndOfFileToken(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an `EndOfFileToken`.
- */
- declare function isEndOfFileToken(node: ts.Node): node is ts.EndOfFileToken;
- /**
- * Test if a node is an `EqualsGreaterThanToken`.
- *
- * @deprecated With TypeScript v5, in favor of typescript's `isEqualsGreaterThanToken`.
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isEqualsGreaterThanToken(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an `EqualsGreaterThanToken`.
- */
- declare function isEqualsGreaterThanToken(node: ts.Node): node is ts.EqualsGreaterThanToken;
- /**
- * Test if a node is an `EqualsToken`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isEqualsToken(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an `EqualsToken`.
- */
- declare function isEqualsToken(node: ts.Node): node is ts.EqualsToken;
- /**
- * Test if a node is an `ExclamationToken`.
- *
- * @deprecated With TypeScript v5, in favor of typescript's `isExclamationToken`.
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isExclamationToken(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an `ExclamationToken`.
- */
- declare function isExclamationToken(node: ts.Node): node is ts.ExclamationToken;
- /**
- * Test if a node is an `ExportKeyword`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isExportKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an `ExportKeyword`.
- */
- declare function isExportKeyword(node: ts.Node): node is ts.ExportKeyword;
- /**
- * Test if a node is a {@link FalseKeyword}.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isFalseKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a {@link FalseKeyword}.
- */
- declare function isFalseKeyword(node: ts.Node): node is FalseKeyword;
- /**
- * Test if a node is a `FalseLiteral`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isFalseLiteral(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `FalseLiteral`.
- */
- declare function isFalseLiteral(node: ts.Node): node is ts.FalseLiteral;
- /**
- * Test if a node is an `ImportExpression`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isImportExpression(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an `ImportExpression`.
- */
- declare function isImportExpression(node: ts.Node): node is ts.ImportExpression;
- /**
- * Test if a node is an {@link ImportKeyword}.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isImportKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an {@link ImportKeyword}.
- */
- declare function isImportKeyword(node: ts.Node): node is ImportKeyword;
- /**
- * Test if a node is an `InKeyword`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isInKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an `InKeyword`.
- */
- declare function isInKeyword(node: ts.Node): node is ts.InKeyword;
- /**
- * Test if a node is an `InputFiles`.
- *
- * @deprecated With TypeScript v5
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isInputFiles(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an `InputFiles`.
- */
- declare function isInputFiles(node: ts.Node): node is ts.InputFiles;
- /**
- * Test if a node is a `JSDocText`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isJSDocText(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `JSDocText`.
- */
- declare function isJSDocText(node: ts.Node): node is ts.JSDocText;
- /**
- * Test if a node is a `JsonMinusNumericLiteral`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isJsonMinusNumericLiteral(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `JsonMinusNumericLiteral`.
- */
- declare function isJsonMinusNumericLiteral(node: ts.Node): node is ts.JsonMinusNumericLiteral;
- /**
- * Test if a node is a {@link NeverKeyword}.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isNeverKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a {@link NeverKeyword}.
- */
- declare function isNeverKeyword(node: ts.Node): node is NeverKeyword;
- /**
- * Test if a node is a {@link NullKeyword}.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isNullKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a {@link NullKeyword}.
- */
- declare function isNullKeyword(node: ts.Node): node is NullKeyword;
- /**
- * Test if a node is a `NullLiteral`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isNullLiteral(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `NullLiteral`.
- */
- declare function isNullLiteral(node: ts.Node): node is ts.NullLiteral;
- /**
- * Test if a node is a {@link NumberKeyword}.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isNumberKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a {@link NumberKeyword}.
- */
- declare function isNumberKeyword(node: ts.Node): node is NumberKeyword;
- /**
- * Test if a node is an {@link ObjectKeyword}.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isObjectKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an {@link ObjectKeyword}.
- */
- declare function isObjectKeyword(node: ts.Node): node is ObjectKeyword;
- /**
- * Test if a node is an `OutKeyword`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isOutKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an `OutKeyword`.
- */
- declare function isOutKeyword(node: ts.Node): node is ts.OutKeyword;
- /**
- * Test if a node is an `OverrideKeyword`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isOverrideKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an `OverrideKeyword`.
- */
- declare function isOverrideKeyword(node: ts.Node): node is ts.OverrideKeyword;
- /**
- * Test if a node is a `PrivateKeyword`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isPrivateKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `PrivateKeyword`.
- */
- declare function isPrivateKeyword(node: ts.Node): node is ts.PrivateKeyword;
- /**
- * Test if a node is a `ProtectedKeyword`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isProtectedKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `ProtectedKeyword`.
- */
- declare function isProtectedKeyword(node: ts.Node): node is ts.ProtectedKeyword;
- /**
- * Test if a node is a `PublicKeyword`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isPublicKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `PublicKeyword`.
- */
- declare function isPublicKeyword(node: ts.Node): node is ts.PublicKeyword;
- /**
- * Test if a node is a `QuestionDotToken`.
- *
- * @deprecated With TypeScript v5, in favor of typescript's `isQuestionDotToken`.
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isQuestionDotToken(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `QuestionDotToken`.
- */
- declare function isQuestionDotToken(node: ts.Node): node is ts.QuestionDotToken;
- /**
- * Test if a node is a `QuestionToken`.
- *
- * @deprecated With TypeScript v5, in favor of typescript's `isQuestionToken`.
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isQuestionToken(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `QuestionToken`.
- */
- declare function isQuestionToken(node: ts.Node): node is ts.QuestionToken;
- /**
- * Test if a node is a `ReadonlyKeyword`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isReadonlyKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `ReadonlyKeyword`.
- */
- declare function isReadonlyKeyword(node: ts.Node): node is ts.ReadonlyKeyword;
- /**
- * Test if a node is a `StaticKeyword`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isStaticKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `StaticKeyword`.
- */
- declare function isStaticKeyword(node: ts.Node): node is ts.StaticKeyword;
- /**
- * Test if a node is a {@link StringKeyword}.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isStringKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a {@link StringKeyword}.
- */
- declare function isStringKeyword(node: ts.Node): node is StringKeyword;
- /**
- * Test if a node is a `SuperExpression`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isSuperExpression(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `SuperExpression`.
- */
- declare function isSuperExpression(node: ts.Node): node is ts.SuperExpression;
- /**
- * Test if a node is a {@link SuperKeyword}.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isSuperKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a {@link SuperKeyword}.
- */
- declare function isSuperKeyword(node: ts.Node): node is SuperKeyword;
- /**
- * Test if a node is a {@link SymbolKeyword}.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isSymbolKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a {@link SymbolKeyword}.
- */
- declare function isSymbolKeyword(node: ts.Node): node is SymbolKeyword;
- /**
- * Test if a node is a `SyntaxList`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isSyntaxList(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `SyntaxList`.
- */
- declare function isSyntaxList(node: ts.Node): node is ts.SyntaxList;
- /**
- * Test if a node is a `ThisExpression`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isThisExpression(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `ThisExpression`.
- */
- declare function isThisExpression(node: ts.Node): node is ts.ThisExpression;
- /**
- * Test if a node is a {@link ThisKeyword}.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isThisKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a {@link ThisKeyword}.
- */
- declare function isThisKeyword(node: ts.Node): node is ThisKeyword;
- /**
- * Test if a node is a {@link TrueKeyword}.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isTrueKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a {@link TrueKeyword}.
- */
- declare function isTrueKeyword(node: ts.Node): node is TrueKeyword;
- /**
- * Test if a node is a `TrueLiteral`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isTrueLiteral(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `TrueLiteral`.
- */
- declare function isTrueLiteral(node: ts.Node): node is ts.TrueLiteral;
- /**
- * Test if a node is an {@link UndefinedKeyword}.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isUndefinedKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an {@link UndefinedKeyword}.
- */
- declare function isUndefinedKeyword(node: ts.Node): node is UndefinedKeyword;
- /**
- * Test if a node is an {@link UnknownKeyword}.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isUnknownKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an {@link UnknownKeyword}.
- */
- declare function isUnknownKeyword(node: ts.Node): node is UnknownKeyword;
- /**
- * Test if a node is an `UnparsedPrologue`.
- *
- * @deprecated With TypeScript v5
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isUnparsedPrologue(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an `UnparsedPrologue`.
- */
- declare function isUnparsedPrologue(node: ts.Node): node is ts.UnparsedPrologue;
- /**
- * Test if a node is an `UnparsedSyntheticReference`.
- *
- * @deprecated With TypeScript v5
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isUnparsedSyntheticReference(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an `UnparsedSyntheticReference`.
- */
- declare function isUnparsedSyntheticReference(node: ts.Node): node is ts.UnparsedSyntheticReference;
- /**
- * Test if a node is a {@link VoidKeyword}.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isVoidKeyword(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a {@link VoidKeyword}.
- */
- declare function isVoidKeyword(node: ts.Node): node is VoidKeyword;
- /**
- * Test if a node is an `AccessExpression`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isAccessExpression(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an `AccessExpression`.
- */
- declare function isAccessExpression(node: ts.Node): node is ts.AccessExpression;
- /**
- * Test if a node is an `AccessibilityModifier`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isAccessibilityModifier(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an `AccessibilityModifier`.
- */
- declare function isAccessibilityModifier(node: ts.Node): node is ts.AccessibilityModifier;
- /**
- * Test if a node is an `AccessorDeclaration`.
- *
- * @deprecated With TypeScript v5, in favor of typescript's `isAccessor`.
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isAccessorDeclaration(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an `AccessorDeclaration`.
- */
- declare function isAccessorDeclaration(node: ts.Node): node is ts.AccessorDeclaration;
- /**
- * Test if a node is an `ArrayBindingElement`.
- *
- * @deprecated With TypeScript v5, in favor of typescript's `isArrayBindingElement`.
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isArrayBindingElement(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an `ArrayBindingElement`.
- */
- declare function isArrayBindingElement(node: ts.Node): node is ts.ArrayBindingElement;
- /**
- * Test if a node is an `ArrayBindingOrAssignmentPattern`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isArrayBindingOrAssignmentPattern(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an `ArrayBindingOrAssignmentPattern`.
- */
- declare function isArrayBindingOrAssignmentPattern(node: ts.Node): node is ts.ArrayBindingOrAssignmentPattern;
- /**
- * Test if a node is an `AssignmentPattern`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isAssignmentPattern(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an `AssignmentPattern`.
- */
- declare function isAssignmentPattern(node: ts.Node): node is ts.AssignmentPattern;
- /**
- * Test if a node is a `BindingOrAssignmentElementRestIndicator`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isBindingOrAssignmentElementRestIndicator(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `BindingOrAssignmentElementRestIndicator`.
- */
- declare function isBindingOrAssignmentElementRestIndicator(node: ts.Node): node is ts.BindingOrAssignmentElementRestIndicator;
- /**
- * Test if a node is a `BindingOrAssignmentElementTarget`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isBindingOrAssignmentElementTarget(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `BindingOrAssignmentElementTarget`.
- */
- declare function isBindingOrAssignmentElementTarget(node: ts.Node): node is ts.BindingOrAssignmentElementTarget;
- /**
- * Test if a node is a `BindingOrAssignmentPattern`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isBindingOrAssignmentPattern(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `BindingOrAssignmentPattern`.
- */
- declare function isBindingOrAssignmentPattern(node: ts.Node): node is ts.BindingOrAssignmentPattern;
- /**
- * Test if a node is a `BindingPattern`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isBindingPattern(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `BindingPattern`.
- */
- declare function isBindingPattern(node: ts.Node): node is ts.BindingPattern;
- /**
- * Test if a node is a `BlockLike`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isBlockLike(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `BlockLike`.
- */
- declare function isBlockLike(node: ts.Node): node is ts.BlockLike;
- /**
- * Test if a node is a `BooleanLiteral`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isBooleanLiteral(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `BooleanLiteral`.
- */
- declare function isBooleanLiteral(node: ts.Node): node is ts.BooleanLiteral;
- /**
- * Test if a node is a `ClassLikeDeclaration`.
- *
- * @deprecated With TypeScript v5, in favor of typescript's `isClassLike`.
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isClassLikeDeclaration(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `ClassLikeDeclaration`.
- */
- declare function isClassLikeDeclaration(node: ts.Node): node is ts.ClassLikeDeclaration;
- /**
- * Test if a node is a `ClassMemberModifier`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isClassMemberModifier(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `ClassMemberModifier`.
- */
- declare function isClassMemberModifier(node: ts.Node): node is ts.ClassMemberModifier;
- /**
- * Test if a node is a `DeclarationName`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isDeclarationName(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `DeclarationName`.
- */
- declare function isDeclarationName(node: ts.Node): node is ts.DeclarationName;
- /**
- * Test if a node is a `DeclarationWithTypeParameterChildren`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isDeclarationWithTypeParameterChildren(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `DeclarationWithTypeParameterChildren`.
- */
- declare function isDeclarationWithTypeParameterChildren(node: ts.Node): node is ts.DeclarationWithTypeParameterChildren;
- /**
- * Test if a node is a `DeclarationWithTypeParameters`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isDeclarationWithTypeParameters(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `DeclarationWithTypeParameters`.
- */
- declare function isDeclarationWithTypeParameters(node: ts.Node): node is ts.DeclarationWithTypeParameters;
- /**
- * Test if a node is a `DestructuringPattern`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isDestructuringPattern(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `DestructuringPattern`.
- */
- declare function isDestructuringPattern(node: ts.Node): node is ts.DestructuringPattern;
- /**
- * Test if a node is an `EntityNameExpression`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isEntityNameExpression(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an `EntityNameExpression`.
- */
- declare function isEntityNameExpression(node: ts.Node): node is ts.EntityNameExpression;
- /**
- * Test if a node is an `EntityNameOrEntityNameExpression`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isEntityNameOrEntityNameExpression(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an `EntityNameOrEntityNameExpression`.
- */
- declare function isEntityNameOrEntityNameExpression(node: ts.Node): node is ts.EntityNameOrEntityNameExpression;
- /**
- * Test if a node is a `ForInOrOfStatement`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isForInOrOfStatement(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `ForInOrOfStatement`.
- */
- declare function isForInOrOfStatement(node: ts.Node): node is ts.ForInOrOfStatement;
- /**
- * Test if a node is a `FunctionLikeDeclaration`.
- *
- * @deprecated With TypeScript v5, in favor of typescript's `isFunctionLike`.
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isFunctionLikeDeclaration(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `FunctionLikeDeclaration`.
- */
- declare function isFunctionLikeDeclaration(node: ts.Node): node is ts.FunctionLikeDeclaration;
- /**
- * Test if a node is a `HasDecorators`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (hasDecorators(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `HasDecorators`.
- */
- declare function hasDecorators(node: ts.Node): node is ts.HasDecorators;
- /**
- * Test if a node is a `HasExpressionInitializer`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (hasExpressionInitializer(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `HasExpressionInitializer`.
- */
- declare function hasExpressionInitializer(node: ts.Node): node is ts.HasExpressionInitializer;
- /**
- * Test if a node is a `HasInitializer`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (hasInitializer(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `HasInitializer`.
- */
- declare function hasInitializer(node: ts.Node): node is ts.HasInitializer;
- /**
- * Test if a node is a `HasJSDoc`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (hasJSDoc(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `HasJSDoc`.
- */
- declare function hasJSDoc(node: ts.Node): node is ts.HasJSDoc;
- /**
- * Test if a node is a `HasModifiers`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (hasModifiers(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `HasModifiers`.
- */
- declare function hasModifiers(node: ts.Node): node is ts.HasModifiers;
- /**
- * Test if a node is a `HasType`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (hasType(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `HasType`.
- */
- declare function hasType(node: ts.Node): node is ts.HasType;
- /**
- * Test if a node is a `HasTypeArguments`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (hasTypeArguments(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `HasTypeArguments`.
- */
- declare function hasTypeArguments(node: ts.Node): node is ts.HasTypeArguments;
- /**
- * Test if a node is a `JSDocComment`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isJSDocComment(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `JSDocComment`.
- */
- declare function isJSDocComment(node: ts.Node): node is ts.JSDocComment;
- /**
- * Test if a node is a `JSDocNamespaceBody`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isJSDocNamespaceBody(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `JSDocNamespaceBody`.
- */
- declare function isJSDocNamespaceBody(node: ts.Node): node is ts.JSDocNamespaceBody;
- /**
- * Test if a node is a `JSDocTypeReferencingNode`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isJSDocTypeReferencingNode(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `JSDocTypeReferencingNode`.
- */
- declare function isJSDocTypeReferencingNode(node: ts.Node): node is ts.JSDocTypeReferencingNode;
- /**
- * Test if a node is a `JsonObjectExpression`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isJsonObjectExpression(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `JsonObjectExpression`.
- */
- declare function isJsonObjectExpression(node: ts.Node): node is ts.JsonObjectExpression;
- /**
- * Test if a node is a `JsxAttributeLike`.
- *
- * @deprecated With TypeScript v5, in favor of typescript's `isJsxAttributeLike`.
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isJsxAttributeLike(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `JsxAttributeLike`.
- */
- declare function isJsxAttributeLike(node: ts.Node): node is ts.JsxAttributeLike;
- /**
- * Test if a node is a `JsxAttributeValue`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isJsxAttributeValue(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `JsxAttributeValue`.
- */
- declare function isJsxAttributeValue(node: ts.Node): node is ts.JsxAttributeValue;
- /**
- * Test if a node is a `JsxChild`.
- *
- * @deprecated With TypeScript v5, in favor of typescript's `isJsxChild`.
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isJsxChild(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `JsxChild`.
- */
- declare function isJsxChild(node: ts.Node): node is ts.JsxChild;
- /**
- * Test if a node is a `JsxTagNameExpression`.
- *
- * @deprecated With TypeScript v5, in favor of typescript's `isJsxTagNameExpression`.
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isJsxTagNameExpression(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `JsxTagNameExpression`.
- */
- declare function isJsxTagNameExpression(node: ts.Node): node is ts.JsxTagNameExpression;
- /**
- * Test if a node is a `LiteralToken`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isLiteralToken(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `LiteralToken`.
- */
- declare function isLiteralToken(node: ts.Node): node is ts.LiteralToken;
- /**
- * Test if a node is a `ModuleBody`.
- *
- * @deprecated With TypeScript v5, in favor of typescript's `isModuleBody`.
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isModuleBody(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `ModuleBody`.
- */
- declare function isModuleBody(node: ts.Node): node is ts.ModuleBody;
- /**
- * Test if a node is a `ModuleName`.
- *
- * @deprecated With TypeScript v5, in favor of typescript's `isModuleName`.
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isModuleName(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `ModuleName`.
- */
- declare function isModuleName(node: ts.Node): node is ts.ModuleName;
- /**
- * Test if a node is a `ModuleReference`.
- *
- * @deprecated With TypeScript v5, in favor of typescript's `isModuleReference`.
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isModuleReference(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `ModuleReference`.
- */
- declare function isModuleReference(node: ts.Node): node is ts.ModuleReference;
- /**
- * Test if a node is a `NamedImportBindings`.
- *
- * @deprecated With TypeScript v5, in favor of typescript's `isNamedImportBindings`.
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isNamedImportBindings(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `NamedImportBindings`.
- */
- declare function isNamedImportBindings(node: ts.Node): node is ts.NamedImportBindings;
- /**
- * Test if a node is a `NamedImportsOrExports`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isNamedImportsOrExports(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `NamedImportsOrExports`.
- */
- declare function isNamedImportsOrExports(node: ts.Node): node is ts.NamedImportsOrExports;
- /**
- * Test if a node is a `NamespaceBody`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isNamespaceBody(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `NamespaceBody`.
- */
- declare function isNamespaceBody(node: ts.Node): node is ts.NamespaceBody;
- /**
- * Test if a node is an `ObjectBindingOrAssignmentElement`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isObjectBindingOrAssignmentElement(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an `ObjectBindingOrAssignmentElement`.
- */
- declare function isObjectBindingOrAssignmentElement(node: ts.Node): node is ts.ObjectBindingOrAssignmentElement;
- /**
- * Test if a node is an `ObjectBindingOrAssignmentPattern`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isObjectBindingOrAssignmentPattern(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an `ObjectBindingOrAssignmentPattern`.
- */
- declare function isObjectBindingOrAssignmentPattern(node: ts.Node): node is ts.ObjectBindingOrAssignmentPattern;
- /**
- * Test if a node is an `ObjectTypeDeclaration`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isObjectTypeDeclaration(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an `ObjectTypeDeclaration`.
- */
- declare function isObjectTypeDeclaration(node: ts.Node): node is ts.ObjectTypeDeclaration;
- /**
- * Test if a node is a `ParameterPropertyModifier`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isParameterPropertyModifier(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `ParameterPropertyModifier`.
- */
- declare function isParameterPropertyModifier(node: ts.Node): node is ts.ParameterPropertyModifier;
- /**
- * Test if a node is a `PropertyNameLiteral`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isPropertyNameLiteral(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `PropertyNameLiteral`.
- */
- declare function isPropertyNameLiteral(node: ts.Node): node is ts.PropertyNameLiteral;
- /**
- * Test if a node is a `PseudoLiteralToken`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isPseudoLiteralToken(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `PseudoLiteralToken`.
- */
- declare function isPseudoLiteralToken(node: ts.Node): node is ts.PseudoLiteralToken;
- /**
- * Test if a node is a `SignatureDeclaration`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isSignatureDeclaration(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `SignatureDeclaration`.
- */
- declare function isSignatureDeclaration(node: ts.Node): node is ts.SignatureDeclaration;
- /**
- * Test if a node is a `SuperProperty`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isSuperProperty(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `SuperProperty`.
- */
- declare function isSuperProperty(node: ts.Node): node is ts.SuperProperty;
- /**
- * Test if a node is a `TypeOnlyCompatibleAliasDeclaration`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isTypeOnlyCompatibleAliasDeclaration(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `TypeOnlyCompatibleAliasDeclaration`.
- */
- declare function isTypeOnlyCompatibleAliasDeclaration(node: ts.Node): node is ts.TypeOnlyCompatibleAliasDeclaration;
- /**
- * Test if a node is a `TypeReferenceType`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isTypeReferenceType(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `TypeReferenceType`.
- */
- declare function isTypeReferenceType(node: ts.Node): node is ts.TypeReferenceType;
- /**
- * Test if a node is an `UnionOrIntersectionTypeNode`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isUnionOrIntersectionTypeNode(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an `UnionOrIntersectionTypeNode`.
- */
- declare function isUnionOrIntersectionTypeNode(node: ts.Node): node is ts.UnionOrIntersectionTypeNode;
- /**
- * Test if a node is an `UnparsedSourceText`.
- *
- * @deprecated With TypeScript v5
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isUnparsedSourceText(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be an `UnparsedSourceText`.
- */
- declare function isUnparsedSourceText(node: ts.Node): node is ts.UnparsedSourceText;
- /**
- * Test if a node is a `VariableLikeDeclaration`.
- *
- * @category Nodes - Type Guards
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isVariableLikeDeclaration(node)) {
- * // ...
- * }
- * ```
- *
- * @returns Whether the given node appears to be a `VariableLikeDeclaration`.
- */
- declare function isVariableLikeDeclaration(node: ts.Node): node is ts.VariableLikeDeclaration;
- /**
- * Is the node a scope boundary, specifically due to it being a function.
- *
- * @category Scope Utilities
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * if (isFunctionScopeBoundary(node, ts.ObjectFlags.Anonymous)) {
- * // ...
- * }
- * ```
- */
- declare function isFunctionScopeBoundary(node: ts.Node): boolean;
- /**
- * Test of the kind given is for assignment.
- *
- * @category Syntax Utilities
- * @example
- * ```ts
- * declare const kind: ts.SyntaxKind;
- *
- * isAssignmentKind(kind);
- * ```
- */
- declare function isAssignmentKind(kind: ts.SyntaxKind): boolean;
- /**
- * Test if a string is numeric.
- *
- * @category Syntax Utilities
- * @example
- * ```ts
- * isNumericPropertyName("abc"); // false
- * isNumericPropertyName("123"); // true
- * ```
- */
- declare function isNumericPropertyName(name: string | ts.__String): boolean;
- /**
- * Determines whether the given text can be used to access a property with a `PropertyAccessExpression` while preserving the property's name.
- *
- * @category Syntax Utilities
- * @example
- * ```ts
- * isValidPropertyAccess("abc"); // true
- * isValidPropertyAccess("123"); // false
- * ```
- */
- declare function isValidPropertyAccess(text: string, languageVersion?: ts.ScriptTarget): boolean;
- /**
- * Callback type used for {@link forEachToken}.
- *
- * @category Callbacks
- */
- type ForEachTokenCallback = (token: ts.Node) => void;
- /**
- * Iterates over all tokens of `node`
- *
- * @category Nodes - Other Utilities
- * @example
- * ```ts
- * declare const node: ts.Node;
- *
- * forEachToken(node, (token) => {
- * console.log("Found token:", token.getText());
- * });
- * ```
- *
- * @param node - The node whose tokens should be visited
- * @param callback - Is called for every token contained in `node`
- */
- declare function forEachToken(node: ts.Node, callback: ForEachTokenCallback, sourceFile?: ts.SourceFile): void;
- /**
- * Get the `CallSignatures` of the given type.
- *
- * @category Types - Getters
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * getCallSignaturesOfType(type);
- * ```
- */
- declare function getCallSignaturesOfType(type: ts.Type): readonly ts.Signature[];
- /**
- * Get the property with the given name on the given type (if it exists).
- *
- * @category Types - Getters
- * @example
- * ```ts
- * declare const property: ts.Symbol;
- * declare const type: ts.Type;
- *
- * getPropertyOfType(type, property.getEscapedName());
- * ```
- */
- declare function getPropertyOfType(type: ts.Type, name: ts.__String): ts.Symbol | undefined;
- /**
- * Retrieves a type symbol corresponding to a well-known string name.
- *
- * @category Types - Getters
- * @example
- * ```ts
- * declare const type: ts.Type;
- * declare const typeChecker: ts.TypeChecker;
- *
- * getWellKnownSymbolPropertyOfType(type, "asyncIterator", typeChecker);
- * ```
- */
- declare function getWellKnownSymbolPropertyOfType(type: ts.Type, wellKnownSymbolName: string, typeChecker: ts.TypeChecker): ts.Symbol | undefined;
- /**
- * A "any" intrinsic type.
- *
- * @category Type Types
- */
- interface IntrinsicAnyType extends IntrinsicType {
- intrinsicName: "any";
- }
- /**
- * Determines whether the given type is the "any" intrinsic type.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isIntrinsicAnyType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isIntrinsicAnyType(type: ts.Type): type is IntrinsicAnyType;
- /**
- * A "boolean" intrinsic type.
- *
- * @category Type Types
- */
- interface IntrinsicBooleanType extends IntrinsicType {
- intrinsicName: "boolean";
- }
- /**
- * Determines whether the given type is the "boolean" intrinsic type.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isIntrinsicBooleanType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isIntrinsicBooleanType(type: ts.Type): type is IntrinsicBooleanType;
- /**
- * A "bigint" intrinsic type.
- *
- * @category Type Types
- */
- interface IntrinsicBigIntType extends IntrinsicType {
- intrinsicName: "bigint";
- }
- /**
- * Determines whether the given type is the "bigint" intrinsic type.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isIntrinsicBigIntType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isIntrinsicBigIntType(type: ts.Type): type is IntrinsicBigIntType;
- /**
- * An "error" intrinsic type.
- *
- * This refers to a type generated when TypeScript encounters an error while
- * trying to resolve the type.
- *
- * @category Type Types
- */
- interface IntrinsicErrorType extends IntrinsicType {
- intrinsicName: "error";
- }
- /**
- * Determines whether the given type is the "error" intrinsic type.
- *
- * The intrinsic error type occurs when TypeScript encounters an error while
- * trying to resolve the type.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isIntrinsicErrorType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isIntrinsicErrorType(type: ts.Type): type is IntrinsicErrorType;
- /**
- * A "symbol" intrinsic type.
- *
- * @category Type Types
- */
- interface IntrinsicESSymbolType extends IntrinsicType {
- intrinsicName: "symbol";
- }
- /**
- * Determines whether the given type is the "symbol" intrinsic type.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isIntrinsicESSymbolType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isIntrinsicESSymbolType(type: ts.Type): type is IntrinsicESSymbolType;
- /**
- * An intrinsic type.
- *
- * @category Type Types
- */
- interface IntrinsicType extends ts.Type {
- intrinsicName: string;
- objectFlags: ts.ObjectFlags;
- }
- /**
- * Test if a type is an {@link IntrinsicType}.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isIntrinsicType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isIntrinsicType(type: ts.Type): type is IntrinsicType;
- /**
- * A "never" intrinsic type.
- *
- * @category Type Types
- */
- interface IntrinsicNeverType extends IntrinsicType {
- intrinsicName: "never";
- }
- /**
- * Determines whether the given type is the "never" intrinsic type.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isIntrinsicNeverType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isIntrinsicNeverType(type: ts.Type): type is IntrinsicNeverType;
- /**
- * A non-primitive intrinsic type.
- * E.g. An "object" intrinsic type.
- *
- * @category Type Types
- */
- interface IntrinsicNonPrimitiveType extends IntrinsicType {
- intrinsicName: "";
- }
- /**
- * Determines whether the given type is a non-primitive intrinsic type.
- * E.g. An "object" intrinsic type.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isIntrinsicNonPrimitiveType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isIntrinsicNonPrimitiveType(type: ts.Type): type is IntrinsicNonPrimitiveType;
- /**
- * A "null" intrinsic type.
- *
- * @category Type Types
- */
- interface IntrinsicNullType extends IntrinsicType {
- intrinsicName: "null";
- }
- /**
- * Determines whether the given type is the "null" intrinsic type.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isIntrinsicNullType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isIntrinsicNullType(type: ts.Type): type is IntrinsicNullType;
- /**
- * A "number" intrinsic type.
- *
- * @category Type Types
- */
- interface IntrinsicNumberType extends IntrinsicType {
- intrinsicName: "number";
- }
- /**
- * Determines whether the given type is the "number" intrinsic type.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isIntrinsicNumberType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isIntrinsicNumberType(type: ts.Type): type is IntrinsicNumberType;
- /**
- * A "string" intrinsic type.
- *
- * @category Type Types
- */
- interface IntrinsicStringType extends IntrinsicType {
- intrinsicName: "string";
- }
- /**
- * Determines whether the given type is the "string" intrinsic type.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isIntrinsicStringType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isIntrinsicStringType(type: ts.Type): type is IntrinsicStringType;
- /**
- * An "undefined" intrinsic type.
- *
- * @category Type Types
- */
- interface IntrinsicUndefinedType extends IntrinsicType {
- intrinsicName: "undefined";
- }
- /**
- * Determines whether the given type is the "undefined" intrinsic type.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isIntrinsicUndefinedType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isIntrinsicUndefinedType(type: ts.Type): type is IntrinsicUndefinedType;
- /**
- * An "unknown" intrinsic type.
- *
- * @category Type Types
- */
- interface IntrinsicUnknownType extends IntrinsicType {
- intrinsicName: "unknown";
- }
- /**
- * Determines whether the given type is the "unknown" intrinsic type.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isIntrinsicUnknownType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isIntrinsicUnknownType(type: ts.Type): type is IntrinsicUnknownType;
- /**
- * A "void" intrinsic type.
- *
- * @category Type Types
- */
- interface IntrinsicVoidType extends IntrinsicType {
- intrinsicName: "void";
- }
- /**
- * Determines whether the given type is the "void" intrinsic type.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isIntrinsicVoidType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isIntrinsicVoidType(type: ts.Type): type is IntrinsicVoidType;
- /**
- * A type that is both an {@link IntrinsicType} and a `FreshableType`
- *
- * @category Type Types
- */
- interface FreshableIntrinsicType extends ts.FreshableType, IntrinsicType {
- }
- /**
- * Test if a type is a `FreshableIntrinsicType`.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isFreshableIntrinsicType(type)) {
- * // ...
- * }
- */
- declare function isFreshableIntrinsicType(type: ts.Type): type is FreshableIntrinsicType;
- /**
- * Test if a type is a `TupleTypeReference`.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isTupleTypeReference(type)) {
- * // ...
- * }
- */
- declare function isTupleTypeReference(type: ts.Type): type is ts.TupleTypeReference;
- /**
- * A boolean literal.
- * i.e. Either a "true" or "false" literal.
- *
- * @category Type Types
- */
- interface BooleanLiteralType extends UnknownLiteralType {
- intrinsicName: "true" | "false";
- value: boolean;
- }
- /**
- * Determines whether the given type is a boolean literal type.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isBooleanLiteralType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isBooleanLiteralType(type: ts.Type): type is BooleanLiteralType;
- /**
- * Test if a type is a `BigIntLiteralType`.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isBigIntLiteralType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isBigIntLiteralType(type: ts.Type): type is ts.BigIntLiteralType;
- /**
- * A "false" literal.
- *
- * @category Type Types
- */
- interface FalseLiteralType extends BooleanLiteralType {
- intrinsicName: "false";
- value: false;
- }
- /**
- * Determines whether the given type is a boolean literal type for "false".
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isFalseLiteralType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isFalseLiteralType(type: ts.Type): type is FalseLiteralType;
- /**
- * Test if a type is a `LiteralType`.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isLiteralType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isLiteralType(type: ts.Type): type is ts.LiteralType;
- /**
- * Test if a type is a `NumberLiteralType`.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isNumberLiteralType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isNumberLiteralType(type: ts.Type): type is ts.NumberLiteralType;
- /**
- * Test if a type is a `StringLiteralType`.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isStringLiteralType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isStringLiteralType(type: ts.Type): type is ts.StringLiteralType;
- /**
- * Test if a type is a `TemplateLiteralType`.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isTemplateLiteralType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isTemplateLiteralType(type: ts.Type): type is ts.TemplateLiteralType;
- /**
- * A "true" literal.
- *
- * @category Type Types
- */
- interface TrueLiteralType extends BooleanLiteralType {
- intrinsicName: "true";
- value: true;
- }
- /**
- * Determines whether the given type is a boolean literal type for "true".
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isTrueLiteralType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isTrueLiteralType(type: ts.Type): type is TrueLiteralType;
- /**
- * `LiteralType` from typescript except that it allows for it to work on arbitrary types.
- *
- * @category Type Types
- */
- interface UnknownLiteralType extends FreshableIntrinsicType {
- value: unknown;
- }
- /**
- * Test if a type is a {@link UnknownLiteralType}.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isUnknownLiteralType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isUnknownLiteralType(type: ts.Type): type is UnknownLiteralType;
- /**
- * Test if a type is a `EvolvingArrayType`.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isEvolvingArrayType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isEvolvingArrayType(type: ts.Type): type is ts.EvolvingArrayType;
- /**
- * Test if a type is a `TupleType`.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isTupleType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isTupleType(type: ts.Type): type is ts.TupleType;
- /**
- * Test if a type is a `TypeReference`.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isTypeReference(type)) {
- * // ...
- * }
- * ```
- */
- declare function isTypeReference(type: ts.Type): type is ts.TypeReference;
- /**
- * Test if a type is a `ConditionalType`.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isConditionalType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isConditionalType(type: ts.Type): type is ts.ConditionalType;
- /**
- * Test if a type is a `EnumType`.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isEnumType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isEnumType(type: ts.Type): type is ts.EnumType;
- /**
- * Test if a type is a `FreshableType`.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isFreshableType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isFreshableType(type: ts.Type): type is ts.FreshableType;
- /**
- * Test if a type is a `IndexType`.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isIndexType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isIndexType(type: ts.Type): type is ts.IndexType;
- /**
- * Test if a type is a `IndexedAccessType`.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isIndexedAccessType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isIndexedAccessType(type: ts.Type): type is ts.IndexedAccessType;
- /**
- * Test if a type is a `InstantiableType`.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isInstantiableType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isInstantiableType(type: ts.Type): type is ts.InstantiableType;
- /**
- * Test if a type is a `IntersectionType`.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isIntersectionType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isIntersectionType(type: ts.Type): type is ts.IntersectionType;
- /**
- * Test if a type is a `ObjectType`.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isObjectType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isObjectType(type: ts.Type): type is ts.ObjectType;
- /**
- * Test if a type is a `StringMappingType`.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isStringMappingType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isStringMappingType(type: ts.Type): type is ts.StringMappingType;
- /**
- * Test if a type is a `SubstitutionType`.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isSubstitutionType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isSubstitutionType(type: ts.Type): type is ts.SubstitutionType;
- /**
- * Test if a type is a `TypeParameter`.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isTypeParameter(type)) {
- * // ...
- * }
- * ```
- */
- declare function isTypeParameter(type: ts.Type): type is ts.TypeParameter;
- /**
- * Test if a type is a `TypeVariable`.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isTypeVariable(type)) {
- * // ...
- * }
- * ```
- */
- declare function isTypeVariable(type: ts.Type): type is ts.TypeVariable;
- /**
- * Test if a type is a `UnionType`.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isUnionType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isUnionType(type: ts.Type): type is ts.UnionType;
- /**
- * Test if a type is a `UnionOrIntersectionType`.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isUnionOrIntersectionType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isUnionOrIntersectionType(type: ts.Type): type is ts.UnionOrIntersectionType;
- /**
- * Test if a type is a `UniqueESSymbolType`.
- *
- * @category Types - Type Guards
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isUniqueESSymbolType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isUniqueESSymbolType(type: ts.Type): type is ts.UniqueESSymbolType;
- /**
- * Determines whether a type is definitely falsy. This function doesn't unwrap union types.
- *
- * @category Types - Utilities
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * if (isFalsyType(type)) {
- * // ...
- * }
- * ```
- */
- declare function isFalsyType(type: ts.Type): boolean;
- /**
- * Get the union type parts of the given type.
- *
- * If the given type is not a union type, an array contain only that type will be returned.
- *
- * @category Types - Utilities
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * for (const typePart of intersectionTypeParts(type)) {
- * // ...
- * }
- * ```
- */
- declare function intersectionTypeParts(type: ts.Type): ts.Type[];
- /**
- * Determines whether writing to a certain property of a given type is allowed.
- *
- * @category Types - Utilities
- * @example
- * ```ts
- * declare const property: ts.Symbol;
- * declare const type: ts.Type;
- * declare const typeChecker: ts.TypeChecker;
- *
- * if (isPropertyReadonlyInType(type, property.getEscapedName(), typeChecker)) {
- * // ...
- * }
- * ```
- */
- declare function isPropertyReadonlyInType(type: ts.Type, name: ts.__String, typeChecker: ts.TypeChecker): boolean;
- /**
- * Determines whether a type is thenable and thus can be used with `await`.
- *
- * @category Types - Utilities
- * @example
- * ```ts
- * declare const node: ts.Node;
- * declare const type: ts.Type;
- * declare const typeChecker: ts.TypeChecker;
- *
- * if (isThenableType(typeChecker, node, type)) {
- * // ...
- * }
- * ```
- */
- declare function isThenableType(typeChecker: ts.TypeChecker, node: ts.Node, type: ts.Type): boolean;
- /**
- * Determines whether a type is thenable and thus can be used with `await`.
- *
- * @category Types - Utilities
- * @example
- * ```ts
- * declare const expression: ts.Expression;
- * declare const typeChecker: ts.TypeChecker;
- *
- * if (isThenableType(typeChecker, expression)) {
- * // ...
- * }
- * ```
- *
- * @example
- * ```ts
- * declare const expression: ts.Expression;
- * declare const typeChecker: ts.TypeChecker;
- * declare const type: ts.Type;
- *
- * if (isThenableType(typeChecker, expression, type)) {
- * // ...
- * }
- * ```
- */
- declare function isThenableType(typeChecker: ts.TypeChecker, node: ts.Expression, type?: ts.Type): boolean;
- /**
- * Test if the given symbol has a readonly declaration.
- *
- * @category Symbols - Utilities
- * @example
- * ```ts
- * declare const symbol: ts.Symbol;
- * declare const typeChecker: ts.TypeChecker;
- *
- * if (symbolHasReadonlyDeclaration(symbol, typeChecker)) {
- * // ...
- * }
- * ```
- */
- declare function symbolHasReadonlyDeclaration(symbol: ts.Symbol, typeChecker: ts.TypeChecker): boolean;
- /**
- * Get the union type parts of the given type.
- *
- * If the given type is not a union type, an array contain only that type will be returned.
- *
- * @category Types - Utilities
- * @example
- * ```ts
- * declare const type: ts.Type;
- *
- * for (const typePart of unionTypeParts(type)) {
- * // ...
- * }
- * ```
- */
- declare function unionTypeParts(type: ts.Type): ts.Type[];
- export { AnyKeyword, BigIntKeyword, BooleanCompilerOptions, BooleanKeyword, BooleanLiteralType, ConstAssertionExpression, ConstAssertionIdentifier, FalseKeyword, FalseLiteralType, ForEachCommentCallback, ForEachTokenCallback, FreshableIntrinsicType, ImportKeyword, IntrinsicAnyType, IntrinsicBigIntType, IntrinsicBooleanType, IntrinsicESSymbolType, IntrinsicErrorType, IntrinsicNeverType, IntrinsicNonPrimitiveType, IntrinsicNullType, IntrinsicNumberType, IntrinsicStringType, IntrinsicType, IntrinsicUndefinedType, IntrinsicUnknownType, IntrinsicVoidType, NamedDeclarationWithName, NeverKeyword, NullKeyword, NumberKeyword, NumericOrStringLikeLiteral, ObjectKeyword, StrictCompilerOption, StringKeyword, SuperKeyword, SymbolKeyword, ThisKeyword, TrueKeyword, TrueLiteralType, UndefinedKeyword, UnknownKeyword, UnknownLiteralType, VoidKeyword, forEachComment, forEachToken, getCallSignaturesOfType, getPropertyOfType, getWellKnownSymbolPropertyOfType, hasDecorators, hasExpressionInitializer, hasInitializer, hasJSDoc, hasModifiers, hasType, hasTypeArguments, includesModifier, intersectionTypeParts, isAbstractKeyword, isAccessExpression, isAccessibilityModifier, isAccessorDeclaration, isAccessorKeyword, isAnyKeyword, isArrayBindingElement, isArrayBindingOrAssignmentPattern, isAssertKeyword, isAssertsKeyword, isAssignmentKind, isAssignmentPattern, isAsyncKeyword, isAwaitKeyword, isBigIntKeyword, isBigIntLiteralType, isBindingOrAssignmentElementRestIndicator, isBindingOrAssignmentElementTarget, isBindingOrAssignmentPattern, isBindingPattern, isBlockLike, isBooleanKeyword, isBooleanLiteral, isBooleanLiteralType, isClassLikeDeclaration, isClassMemberModifier, isColonToken, isCompilerOptionEnabled, isConditionalType, isConstAssertionExpression, isConstKeyword, isDeclarationName, isDeclarationWithTypeParameterChildren, isDeclarationWithTypeParameters, isDeclareKeyword, isDefaultKeyword, isDestructuringPattern, isDotToken, isEndOfFileToken, isEntityNameExpression, isEntityNameOrEntityNameExpression, isEnumType, isEqualsGreaterThanToken, isEqualsToken, isEvolvingArrayType, isExclamationToken, isExportKeyword, isFalseKeyword, isFalseLiteral, isFalseLiteralType, isFalsyType, isForInOrOfStatement, isFreshableIntrinsicType, isFreshableType, isFunctionLikeDeclaration, isFunctionScopeBoundary, isImportExpression, isImportKeyword, isInKeyword, isIndexType, isIndexedAccessType, isInputFiles, isInstantiableType, isIntersectionType, isIntrinsicAnyType, isIntrinsicBigIntType, isIntrinsicBooleanType, isIntrinsicESSymbolType, isIntrinsicErrorType, isIntrinsicNeverType, isIntrinsicNonPrimitiveType, isIntrinsicNullType, isIntrinsicNumberType, isIntrinsicStringType, isIntrinsicType, isIntrinsicUndefinedType, isIntrinsicUnknownType, isIntrinsicVoidType, isIterationStatement, isJSDocComment, isJSDocNamespaceBody, isJSDocNamespaceDeclaration, isJSDocText, isJSDocTypeReferencingNode, isJsonMinusNumericLiteral, isJsonObjectExpression, isJsxAttributeLike, isJsxAttributeValue, isJsxChild, isJsxTagNameExpression, isJsxTagNamePropertyAccess, isLiteralToken, isLiteralType, isModifierFlagSet, isModuleBody, isModuleName, isModuleReference, isNamedDeclarationWithName, isNamedImportBindings, isNamedImportsOrExports, isNamespaceBody, isNamespaceDeclaration, isNeverKeyword, isNodeFlagSet, isNullKeyword, isNullLiteral, isNumberKeyword, isNumberLiteralType, isNumericOrStringLikeLiteral, isNumericPropertyName, isObjectBindingOrAssignmentElement, isObjectBindingOrAssignmentPattern, isObjectFlagSet, isObjectKeyword, isObjectType, isObjectTypeDeclaration, isOutKeyword, isOverrideKeyword, isParameterPropertyModifier, isPrivateKeyword, isPropertyAccessEntityNameExpression, isPropertyNameLiteral, isPropertyReadonlyInType, isProtectedKeyword, isPseudoLiteralToken, isPublicKeyword, isQuestionDotToken, isQuestionToken, isReadonlyKeyword, isSignatureDeclaration, isStaticKeyword, isStrictCompilerOptionEnabled, isStringKeyword, isStringLiteralType, isStringMappingType, isSubstitutionType, isSuperElementAccessExpression, isSuperExpression, isSuperKeyword, isSuperProperty, isSuperPropertyAccessExpression, isSymbolFlagSet, isSymbolKeyword, isSyntaxList, isTemplateLiteralType, isThenableType, isThisExpression, isThisKeyword, isTrueKeyword, isTrueLiteral, isTrueLiteralType, isTupleType, isTupleTypeReference, isTypeFlagSet, isTypeOnlyCompatibleAliasDeclaration, isTypeParameter, isTypeReference, isTypeReferenceType, isTypeVariable, isUndefinedKeyword, isUnionOrIntersectionType, isUnionOrIntersectionTypeNode, isUnionType, isUniqueESSymbolType, isUnknownKeyword, isUnknownLiteralType, isUnparsedPrologue, isUnparsedSourceText, isUnparsedSyntheticReference, isValidPropertyAccess, isVariableLikeDeclaration, isVoidKeyword, symbolHasReadonlyDeclaration, unionTypeParts };
|