index.d.ts 79 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282
  1. import ts from 'typescript';
  2. /**
  3. * Callback type used for {@link forEachComment}.
  4. *
  5. * @category Callbacks
  6. */
  7. type ForEachCommentCallback = (fullText: string, comment: ts.CommentRange) => void;
  8. /**
  9. * Iterates over all comments owned by `node` or its children.
  10. *
  11. * @category Nodes - Other Utilities
  12. * @example
  13. * ```ts
  14. * declare const node: ts.Node;
  15. *
  16. * forEachComment(node, (fullText, comment) => {
  17. * console.log(`Found comment at position ${comment.pos}: '${fullText}'.`);
  18. * });
  19. * ```
  20. */
  21. declare function forEachComment(node: ts.Node, callback: ForEachCommentCallback, sourceFile?: ts.SourceFile): void;
  22. /**
  23. * An option that can be tested with {@link isCompilerOptionEnabled}.
  24. *
  25. * @category Compiler Options
  26. */
  27. type BooleanCompilerOptions = keyof {
  28. [K in keyof ts.CompilerOptions as NonNullable<ts.CompilerOptions[K]> extends boolean ? K : never]: unknown;
  29. };
  30. /**
  31. * Checks if a given compiler option is enabled.
  32. * It handles dependencies of options, e.g. `declaration` is implicitly enabled by `composite` or `strictNullChecks` is enabled by `strict`.
  33. * However, it does not check dependencies that are already checked and reported as errors, e.g. `checkJs` without `allowJs`.
  34. * This function only handles boolean flags.
  35. *
  36. * @category Compiler Options
  37. * @example
  38. * ```ts
  39. * const options = {
  40. * allowJs: true,
  41. * };
  42. *
  43. * isCompilerOptionEnabled(options, "allowJs"); // true
  44. * isCompilerOptionEnabled(options, "allowSyntheticDefaultImports"); // false
  45. * ```
  46. */
  47. declare function isCompilerOptionEnabled(options: ts.CompilerOptions, option: BooleanCompilerOptions): boolean;
  48. /**
  49. * An option that can be tested with {@link isStrictCompilerOptionEnabled}.
  50. *
  51. * @category Compiler Options
  52. */
  53. type StrictCompilerOption = "alwaysStrict" | "noImplicitAny" | "noImplicitThis" | "strictBindCallApply" | "strictFunctionTypes" | "strictNullChecks" | "strictPropertyInitialization";
  54. /**
  55. * Checks if a given compiler option is enabled, accounting for whether all flags
  56. * (except `strictPropertyInitialization`) have been enabled by `strict: true`.
  57. *
  58. * @category Compiler Options
  59. * @example
  60. * ```ts
  61. * const optionsLenient = {
  62. * noImplicitAny: true,
  63. * };
  64. *
  65. * isStrictCompilerOptionEnabled(optionsLenient, "noImplicitAny"); // true
  66. * isStrictCompilerOptionEnabled(optionsLenient, "noImplicitThis"); // false
  67. * ```
  68. *
  69. * @example
  70. * ```ts
  71. * const optionsStrict = {
  72. * noImplicitThis: false,
  73. * strict: true,
  74. * };
  75. *
  76. * isStrictCompilerOptionEnabled(optionsStrict, "noImplicitAny"); // true
  77. * isStrictCompilerOptionEnabled(optionsStrict, "noImplicitThis"); // false
  78. * ```
  79. */
  80. declare function isStrictCompilerOptionEnabled(options: ts.CompilerOptions, option: StrictCompilerOption): boolean;
  81. /**
  82. * Test if the given node has the given `ModifierFlags` set.
  83. *
  84. * @category Nodes - Flag Utilities
  85. * @example
  86. * ```ts
  87. * declare const node: ts.Node;
  88. *
  89. * if (isModifierFlagSet(node, ts.ModifierFlags.Abstract)) {
  90. * // ...
  91. * }
  92. * ```
  93. */
  94. declare function isModifierFlagSet(node: ts.Declaration, flag: ts.ModifierFlags): boolean;
  95. /**
  96. * Test if the given node has the given `NodeFlags` set.
  97. *
  98. * @category Nodes - Flag Utilities
  99. * @example
  100. * ```ts
  101. * declare const node: ts.Node;
  102. *
  103. * if (isNodeFlagSet(node, ts.NodeFlags.AwaitContext)) {
  104. * // ...
  105. * }
  106. * ```
  107. */
  108. declare const isNodeFlagSet: (node: ts.Node, flag: ts.NodeFlags) => boolean;
  109. /**
  110. * Test if the given node has the given `ObjectFlags` set.
  111. *
  112. * @category Nodes - Flag Utilities
  113. * @example
  114. * ```ts
  115. * declare const node: ts.Node;
  116. *
  117. * if (isObjectFlagSet(node, ts.ObjectFlags.Anonymous)) {
  118. * // ...
  119. * }
  120. * ```
  121. */
  122. declare function isObjectFlagSet(objectType: ts.ObjectType, flag: ts.ObjectFlags): boolean;
  123. /**
  124. * Test if the given node has the given `SymbolFlags` set.
  125. *
  126. * @category Nodes - Flag Utilities
  127. * @example
  128. * ```ts
  129. * declare const symbol: ts.Symbol;
  130. *
  131. * if (isSymbolFlagSet(symbol, ts.SymbolFlags.Accessor)) {
  132. * // ...
  133. * }
  134. * ```
  135. */
  136. declare const isSymbolFlagSet: (symbol: ts.Symbol, flag: ts.SymbolFlags) => boolean;
  137. /**
  138. * Test if the given node has the given `TypeFlags` set.
  139. *
  140. * @category Nodes - Flag Utilities
  141. * @example
  142. * ```ts
  143. * declare const type: ts.Type;
  144. *
  145. * if (isTypeFlagSet(type, ts.TypeFlags.Any)) {
  146. * // ...
  147. * }
  148. * ```
  149. */
  150. declare const isTypeFlagSet: (type: ts.Type, flag: ts.TypeFlags) => boolean;
  151. /**
  152. * Test if the given iterable includes a modifier of any of the given kinds.
  153. *
  154. * @category Modifier Utilities
  155. * @example
  156. * ```ts
  157. * declare const modifiers: ts.Modifier[];
  158. *
  159. * includesModifier(modifiers, ts.SyntaxKind.AbstractKeyword);
  160. * ```
  161. */
  162. declare function includesModifier(modifiers: Iterable<ts.Modifier> | undefined, ...kinds: ts.ModifierSyntaxKind[]): boolean;
  163. /**
  164. * An `AssertionExpression` that is declared as const.
  165. *
  166. * @category Node Types
  167. */
  168. type ConstAssertionExpression = ts.AssertionExpression & {
  169. type: ts.TypeReferenceNode;
  170. typeName: ConstAssertionIdentifier;
  171. };
  172. /**
  173. * An `Identifier` with an `escapedText` value of `"const"`.
  174. *
  175. * @category Node Types
  176. */
  177. type ConstAssertionIdentifier = ts.Identifier & {
  178. escapedText: ts.__String & "const";
  179. };
  180. /**
  181. * Test if a node is a {@link ConstAssertionExpression}.
  182. *
  183. * @category Nodes - Type Guards
  184. * @example
  185. * ```ts
  186. * declare const node: ts.Node;
  187. *
  188. * if (isConstAssertionExpression(node)) {
  189. * // ...
  190. * }
  191. * ```
  192. *
  193. * @returns Whether the given node appears to be a {@link ConstAssertionExpression}.
  194. */
  195. declare function isConstAssertionExpression(node: ts.AssertionExpression): node is ConstAssertionExpression;
  196. /**
  197. * Test if a node is an `IterationStatement`.
  198. *
  199. * @category Nodes - Type Guards
  200. * @example
  201. * ```ts
  202. * declare const node: ts.Node;
  203. *
  204. * if (isIterationStatement(node)) {
  205. * // ...
  206. * }
  207. * ```
  208. *
  209. * @returns Whether the given node appears to be an `IterationStatement`.
  210. */
  211. declare function isIterationStatement(node: ts.Node): node is ts.IterationStatement;
  212. /**
  213. * Test if a node is a `JSDocNamespaceDeclaration`.
  214. *
  215. * @category Nodes - Type Guards
  216. * @example
  217. * ```ts
  218. * declare const node: ts.Node;
  219. *
  220. * if (isJSDocNamespaceDeclaration(node)) {
  221. * // ...
  222. * }
  223. * ```
  224. *
  225. * @returns Whether the given node appears to be a `JSDocNamespaceDeclaration`.
  226. */
  227. declare function isJSDocNamespaceDeclaration(node: ts.Node): node is ts.JSDocNamespaceDeclaration;
  228. /**
  229. * Test if a node is a `JsxTagNamePropertyAccess`.
  230. *
  231. * @category Nodes - Type Guards
  232. * @example
  233. * ```ts
  234. * declare const node: ts.Node;
  235. *
  236. * if (isJsxTagNamePropertyAccess(node)) {
  237. * // ...
  238. * }
  239. * ```
  240. *
  241. * @returns Whether the given node appears to be a `JsxTagNamePropertyAccess`.
  242. */
  243. declare function isJsxTagNamePropertyAccess(node: ts.Node): node is ts.JsxTagNamePropertyAccess;
  244. /**
  245. * a `NamedDeclaration` that definitely has a name.
  246. *
  247. * @category Node Types
  248. */
  249. interface NamedDeclarationWithName extends ts.NamedDeclaration {
  250. name: ts.DeclarationName;
  251. }
  252. /**
  253. * Test if a node is a {@link NamedDeclarationWithName}.
  254. *
  255. * @category Nodes - Type Guards
  256. * @example
  257. * ```ts
  258. * declare const node: ts.Node;
  259. *
  260. * if (isNamedDeclarationWithName(node)) {
  261. * // ...
  262. * }
  263. * ```
  264. *
  265. * @returns Whether the given node appears to be a {@link NamedDeclarationWithName}.
  266. */
  267. declare function isNamedDeclarationWithName(node: ts.Declaration): node is NamedDeclarationWithName;
  268. /**
  269. * Test if a node is a `NamespaceDeclaration`.
  270. *
  271. * @category Nodes - Type Guards
  272. * @example
  273. * ```ts
  274. * declare const node: ts.Node;
  275. *
  276. * if (isNamespaceDeclaration(node)) {
  277. * // ...
  278. * }
  279. * ```
  280. *
  281. * @returns Whether the given node appears to be a `NamespaceDeclaration`.
  282. */
  283. declare function isNamespaceDeclaration(node: ts.Node): node is ts.NamespaceDeclaration;
  284. /**
  285. * A number or string-like literal.
  286. *
  287. * @category Node Types
  288. */
  289. type NumericOrStringLikeLiteral = ts.NumericLiteral | ts.StringLiteralLike;
  290. /**
  291. * Test if a node is a {@link NumericOrStringLikeLiteral}.
  292. *
  293. * @category Nodes - Type Guards
  294. * @example
  295. * ```ts
  296. * declare const node: ts.Node;
  297. *
  298. * if (isNumericOrStringLikeLiteral(node)) {
  299. * // ...
  300. * }
  301. * ```
  302. *
  303. * @returns Whether the given node appears to be a {@link NumericOrStringLikeLiteral}.
  304. */
  305. declare function isNumericOrStringLikeLiteral(node: ts.Node): node is NumericOrStringLikeLiteral;
  306. /**
  307. * Test if a node is a `PropertyAccessEntityNameExpression`.
  308. *
  309. * @category Nodes - Type Guards
  310. * @example
  311. * ```ts
  312. * declare const node: ts.Node;
  313. *
  314. * if (isPropertyAccessEntityNameExpression(node)) {
  315. * // ...
  316. * }
  317. * ```
  318. *
  319. * @returns Whether the given node appears to be a `PropertyAccessEntityNameExpression`.
  320. */
  321. declare function isPropertyAccessEntityNameExpression(node: ts.Node): node is ts.PropertyAccessEntityNameExpression;
  322. /**
  323. * Test if a node is a `SuperElementAccessExpression`.
  324. *
  325. * @category Nodes - Type Guards
  326. * @example
  327. * ```ts
  328. * declare const node: ts.Node;
  329. *
  330. * if (isSuperElementAccessExpression(node)) {
  331. * // ...
  332. * }
  333. * ```
  334. *
  335. * @returns Whether the given node appears to be a `SuperElementAccessExpression`.
  336. */
  337. declare function isSuperElementAccessExpression(node: ts.Node): node is ts.SuperElementAccessExpression;
  338. /**
  339. * Test if a node is a `SuperPropertyAccessExpression`.
  340. *
  341. * @category Nodes - Type Guards
  342. * @example
  343. * ```ts
  344. * declare const node: ts.Node;
  345. *
  346. * if (isSuperPropertyAccessExpression(node)) {
  347. * // ...
  348. * }
  349. * ```
  350. *
  351. * @returns Whether the given node appears to be a `SuperPropertyAccessExpression`.
  352. */
  353. declare function isSuperPropertyAccessExpression(node: ts.Node): node is ts.SuperPropertyAccessExpression;
  354. /**
  355. * A node that represents the any keyword.
  356. *
  357. * @category Node Types
  358. */
  359. type AnyKeyword = ts.KeywordToken<ts.SyntaxKind.AnyKeyword>;
  360. /**
  361. * A node that represents the bigint keyword.
  362. *
  363. * @category Node Types
  364. */
  365. type BigIntKeyword = ts.KeywordToken<ts.SyntaxKind.BigIntKeyword>;
  366. /**
  367. * A node that represents the boolean keyword.
  368. *
  369. * @category Node Types
  370. */
  371. type BooleanKeyword = ts.KeywordToken<ts.SyntaxKind.BooleanKeyword>;
  372. /**
  373. * A node that represents the false keyword.
  374. *
  375. * @category Node Types
  376. */
  377. type FalseKeyword = ts.KeywordToken<ts.SyntaxKind.FalseKeyword>;
  378. /**
  379. * A node that represents the import keyword.
  380. *
  381. * @category Node Types
  382. */
  383. type ImportKeyword = ts.KeywordToken<ts.SyntaxKind.ImportKeyword>;
  384. /**
  385. * A node that represents the never keyword.
  386. *
  387. * @category Node Types
  388. */
  389. type NeverKeyword = ts.KeywordToken<ts.SyntaxKind.NeverKeyword>;
  390. /**
  391. * A node that represents the null keyword.
  392. *
  393. * @category Node Types
  394. */
  395. type NullKeyword = ts.KeywordToken<ts.SyntaxKind.NullKeyword>;
  396. /**
  397. * A node that represents the number keyword.
  398. *
  399. * @category Node Types
  400. */
  401. type NumberKeyword = ts.KeywordToken<ts.SyntaxKind.NumberKeyword>;
  402. /**
  403. * A node that represents the object keyword.
  404. *
  405. * @category Node Types
  406. */
  407. type ObjectKeyword = ts.KeywordToken<ts.SyntaxKind.ObjectKeyword>;
  408. /**
  409. * A node that represents the string keyword.
  410. *
  411. * @category Node Types
  412. */
  413. type StringKeyword = ts.KeywordToken<ts.SyntaxKind.StringKeyword>;
  414. /**
  415. * A node that represents the super keyword.
  416. *
  417. * @category Node Types
  418. */
  419. type SuperKeyword = ts.KeywordToken<ts.SyntaxKind.SuperKeyword>;
  420. /**
  421. * A node that represents the symbol keyword.
  422. *
  423. * @category Node Types
  424. */
  425. type SymbolKeyword = ts.KeywordToken<ts.SyntaxKind.SymbolKeyword>;
  426. /**
  427. * A node that represents the this keyword.
  428. *
  429. * @category Node Types
  430. */
  431. type ThisKeyword = ts.KeywordToken<ts.SyntaxKind.ThisKeyword>;
  432. /**
  433. * A node that represents the true keyword.
  434. *
  435. * @category Node Types
  436. */
  437. type TrueKeyword = ts.KeywordToken<ts.SyntaxKind.TrueKeyword>;
  438. /**
  439. * A node that represents the undefined keyword.
  440. *
  441. * @category Node Types
  442. */
  443. type UndefinedKeyword = ts.KeywordToken<ts.SyntaxKind.UndefinedKeyword>;
  444. /**
  445. * A node that represents the unknown keyword.
  446. *
  447. * @category Node Types
  448. */
  449. type UnknownKeyword = ts.KeywordToken<ts.SyntaxKind.UnknownKeyword>;
  450. /**
  451. * A node that represents the void keyword.
  452. *
  453. * @category Node Types
  454. */
  455. type VoidKeyword = ts.KeywordToken<ts.SyntaxKind.VoidKeyword>;
  456. /**
  457. * Test if a node is an `AbstractKeyword`.
  458. *
  459. * @category Nodes - Type Guards
  460. * @example
  461. * ```ts
  462. * declare const node: ts.Node;
  463. *
  464. * if (isAbstractKeyword(node)) {
  465. * // ...
  466. * }
  467. * ```
  468. *
  469. * @returns Whether the given node appears to be an `AbstractKeyword`.
  470. */
  471. declare function isAbstractKeyword(node: ts.Node): node is ts.AbstractKeyword;
  472. /**
  473. * Test if a node is an `AccessorKeyword`.
  474. *
  475. * @category Nodes - Type Guards
  476. * @example
  477. * ```ts
  478. * declare const node: ts.Node;
  479. *
  480. * if (isAccessorKeyword(node)) {
  481. * // ...
  482. * }
  483. * ```
  484. *
  485. * @returns Whether the given node appears to be an `AccessorKeyword`.
  486. */
  487. declare function isAccessorKeyword(node: ts.Node): node is ts.AccessorKeyword;
  488. /**
  489. * Test if a node is an {@link AnyKeyword}.
  490. *
  491. * @category Nodes - Type Guards
  492. * @example
  493. * ```ts
  494. * declare const node: ts.Node;
  495. *
  496. * if (isAnyKeyword(node)) {
  497. * // ...
  498. * }
  499. * ```
  500. *
  501. * @returns Whether the given node appears to be an {@link AnyKeyword}.
  502. */
  503. declare function isAnyKeyword(node: ts.Node): node is AnyKeyword;
  504. /**
  505. * Test if a node is an `AssertKeyword`.
  506. *
  507. * @category Nodes - Type Guards
  508. * @example
  509. * ```ts
  510. * declare const node: ts.Node;
  511. *
  512. * if (isAssertKeyword(node)) {
  513. * // ...
  514. * }
  515. * ```
  516. *
  517. * @returns Whether the given node appears to be an `AssertKeyword`.
  518. */
  519. declare function isAssertKeyword(node: ts.Node): node is ts.AssertKeyword;
  520. /**
  521. * Test if a node is an `AssertsKeyword`.
  522. *
  523. * @deprecated With TypeScript v5, in favor of typescript's `isAssertsKeyword`.
  524. * @category Nodes - Type Guards
  525. * @example
  526. * ```ts
  527. * declare const node: ts.Node;
  528. *
  529. * if (isAssertsKeyword(node)) {
  530. * // ...
  531. * }
  532. * ```
  533. *
  534. * @returns Whether the given node appears to be an `AssertsKeyword`.
  535. */
  536. declare function isAssertsKeyword(node: ts.Node): node is ts.AssertsKeyword;
  537. /**
  538. * Test if a node is an `AsyncKeyword`.
  539. *
  540. * @category Nodes - Type Guards
  541. * @example
  542. * ```ts
  543. * declare const node: ts.Node;
  544. *
  545. * if (isAsyncKeyword(node)) {
  546. * // ...
  547. * }
  548. * ```
  549. *
  550. * @returns Whether the given node appears to be an `AsyncKeyword`.
  551. */
  552. declare function isAsyncKeyword(node: ts.Node): node is ts.AsyncKeyword;
  553. /**
  554. * Test if a node is an `AwaitKeyword`.
  555. *
  556. * @deprecated With TypeScript v5, in favor of typescript's `isAwaitKeyword`.
  557. * @category Nodes - Type Guards
  558. * @example
  559. * ```ts
  560. * declare const node: ts.Node;
  561. *
  562. * if (isAwaitKeyword(node)) {
  563. * // ...
  564. * }
  565. * ```
  566. *
  567. * @returns Whether the given node appears to be an `AwaitKeyword`.
  568. */
  569. declare function isAwaitKeyword(node: ts.Node): node is ts.AwaitKeyword;
  570. /**
  571. * Test if a node is a {@link BigIntKeyword}.
  572. *
  573. * @deprecated With TypeScript v5, in favor of typescript's `isBigIntKeyword`.
  574. * @category Nodes - Type Guards
  575. * @example
  576. * ```ts
  577. * declare const node: ts.Node;
  578. *
  579. * if (isBigIntKeyword(node)) {
  580. * // ...
  581. * }
  582. * ```
  583. *
  584. * @returns Whether the given node appears to be a {@link BigIntKeyword}.
  585. */
  586. declare function isBigIntKeyword(node: ts.Node): node is BigIntKeyword;
  587. /**
  588. * Test if a node is a {@link BooleanKeyword}.
  589. *
  590. * @deprecated With TypeScript v5, in favor of typescript's `isBooleanKeyword`.
  591. * @category Nodes - Type Guards
  592. * @example
  593. * ```ts
  594. * declare const node: ts.Node;
  595. *
  596. * if (isBooleanKeyword(node)) {
  597. * // ...
  598. * }
  599. * ```
  600. *
  601. * @returns Whether the given node appears to be a {@link BooleanKeyword}.
  602. */
  603. declare function isBooleanKeyword(node: ts.Node): node is BooleanKeyword;
  604. /**
  605. * Test if a node is a `ColonToken`.
  606. *
  607. * @deprecated With TypeScript v5, in favor of typescript's `isColonToken`.
  608. * @category Nodes - Type Guards
  609. * @example
  610. * ```ts
  611. * declare const node: ts.Node;
  612. *
  613. * if (isColonToken(node)) {
  614. * // ...
  615. * }
  616. * ```
  617. *
  618. * @returns Whether the given node appears to be a `ColonToken`.
  619. */
  620. declare function isColonToken(node: ts.Node): node is ts.ColonToken;
  621. /**
  622. * Test if a node is a `ConstKeyword`.
  623. *
  624. * @category Nodes - Type Guards
  625. * @example
  626. * ```ts
  627. * declare const node: ts.Node;
  628. *
  629. * if (isConstKeyword(node)) {
  630. * // ...
  631. * }
  632. * ```
  633. *
  634. * @returns Whether the given node appears to be a `ConstKeyword`.
  635. */
  636. declare function isConstKeyword(node: ts.Node): node is ts.ConstKeyword;
  637. /**
  638. * Test if a node is a `DeclareKeyword`.
  639. *
  640. * @category Nodes - Type Guards
  641. * @example
  642. * ```ts
  643. * declare const node: ts.Node;
  644. *
  645. * if (isDeclareKeyword(node)) {
  646. * // ...
  647. * }
  648. * ```
  649. *
  650. * @returns Whether the given node appears to be a `DeclareKeyword`.
  651. */
  652. declare function isDeclareKeyword(node: ts.Node): node is ts.DeclareKeyword;
  653. /**
  654. * Test if a node is a `DefaultKeyword`.
  655. *
  656. * @category Nodes - Type Guards
  657. * @example
  658. * ```ts
  659. * declare const node: ts.Node;
  660. *
  661. * if (isDefaultKeyword(node)) {
  662. * // ...
  663. * }
  664. * ```
  665. *
  666. * @returns Whether the given node appears to be a `DefaultKeyword`.
  667. */
  668. declare function isDefaultKeyword(node: ts.Node): node is ts.DefaultKeyword;
  669. /**
  670. * Test if a node is a `DotToken`.
  671. *
  672. * @category Nodes - Type Guards
  673. * @example
  674. * ```ts
  675. * declare const node: ts.Node;
  676. *
  677. * if (isDotToken(node)) {
  678. * // ...
  679. * }
  680. * ```
  681. *
  682. * @returns Whether the given node appears to be a `DotToken`.
  683. */
  684. declare function isDotToken(node: ts.Node): node is ts.DotToken;
  685. /**
  686. * Test if a node is an `EndOfFileToken`.
  687. *
  688. * @category Nodes - Type Guards
  689. * @example
  690. * ```ts
  691. * declare const node: ts.Node;
  692. *
  693. * if (isEndOfFileToken(node)) {
  694. * // ...
  695. * }
  696. * ```
  697. *
  698. * @returns Whether the given node appears to be an `EndOfFileToken`.
  699. */
  700. declare function isEndOfFileToken(node: ts.Node): node is ts.EndOfFileToken;
  701. /**
  702. * Test if a node is an `EqualsGreaterThanToken`.
  703. *
  704. * @deprecated With TypeScript v5, in favor of typescript's `isEqualsGreaterThanToken`.
  705. * @category Nodes - Type Guards
  706. * @example
  707. * ```ts
  708. * declare const node: ts.Node;
  709. *
  710. * if (isEqualsGreaterThanToken(node)) {
  711. * // ...
  712. * }
  713. * ```
  714. *
  715. * @returns Whether the given node appears to be an `EqualsGreaterThanToken`.
  716. */
  717. declare function isEqualsGreaterThanToken(node: ts.Node): node is ts.EqualsGreaterThanToken;
  718. /**
  719. * Test if a node is an `EqualsToken`.
  720. *
  721. * @category Nodes - Type Guards
  722. * @example
  723. * ```ts
  724. * declare const node: ts.Node;
  725. *
  726. * if (isEqualsToken(node)) {
  727. * // ...
  728. * }
  729. * ```
  730. *
  731. * @returns Whether the given node appears to be an `EqualsToken`.
  732. */
  733. declare function isEqualsToken(node: ts.Node): node is ts.EqualsToken;
  734. /**
  735. * Test if a node is an `ExclamationToken`.
  736. *
  737. * @deprecated With TypeScript v5, in favor of typescript's `isExclamationToken`.
  738. * @category Nodes - Type Guards
  739. * @example
  740. * ```ts
  741. * declare const node: ts.Node;
  742. *
  743. * if (isExclamationToken(node)) {
  744. * // ...
  745. * }
  746. * ```
  747. *
  748. * @returns Whether the given node appears to be an `ExclamationToken`.
  749. */
  750. declare function isExclamationToken(node: ts.Node): node is ts.ExclamationToken;
  751. /**
  752. * Test if a node is an `ExportKeyword`.
  753. *
  754. * @category Nodes - Type Guards
  755. * @example
  756. * ```ts
  757. * declare const node: ts.Node;
  758. *
  759. * if (isExportKeyword(node)) {
  760. * // ...
  761. * }
  762. * ```
  763. *
  764. * @returns Whether the given node appears to be an `ExportKeyword`.
  765. */
  766. declare function isExportKeyword(node: ts.Node): node is ts.ExportKeyword;
  767. /**
  768. * Test if a node is a {@link FalseKeyword}.
  769. *
  770. * @category Nodes - Type Guards
  771. * @example
  772. * ```ts
  773. * declare const node: ts.Node;
  774. *
  775. * if (isFalseKeyword(node)) {
  776. * // ...
  777. * }
  778. * ```
  779. *
  780. * @returns Whether the given node appears to be a {@link FalseKeyword}.
  781. */
  782. declare function isFalseKeyword(node: ts.Node): node is FalseKeyword;
  783. /**
  784. * Test if a node is a `FalseLiteral`.
  785. *
  786. * @category Nodes - Type Guards
  787. * @example
  788. * ```ts
  789. * declare const node: ts.Node;
  790. *
  791. * if (isFalseLiteral(node)) {
  792. * // ...
  793. * }
  794. * ```
  795. *
  796. * @returns Whether the given node appears to be a `FalseLiteral`.
  797. */
  798. declare function isFalseLiteral(node: ts.Node): node is ts.FalseLiteral;
  799. /**
  800. * Test if a node is an `ImportExpression`.
  801. *
  802. * @category Nodes - Type Guards
  803. * @example
  804. * ```ts
  805. * declare const node: ts.Node;
  806. *
  807. * if (isImportExpression(node)) {
  808. * // ...
  809. * }
  810. * ```
  811. *
  812. * @returns Whether the given node appears to be an `ImportExpression`.
  813. */
  814. declare function isImportExpression(node: ts.Node): node is ts.ImportExpression;
  815. /**
  816. * Test if a node is an {@link ImportKeyword}.
  817. *
  818. * @category Nodes - Type Guards
  819. * @example
  820. * ```ts
  821. * declare const node: ts.Node;
  822. *
  823. * if (isImportKeyword(node)) {
  824. * // ...
  825. * }
  826. * ```
  827. *
  828. * @returns Whether the given node appears to be an {@link ImportKeyword}.
  829. */
  830. declare function isImportKeyword(node: ts.Node): node is ImportKeyword;
  831. /**
  832. * Test if a node is an `InKeyword`.
  833. *
  834. * @category Nodes - Type Guards
  835. * @example
  836. * ```ts
  837. * declare const node: ts.Node;
  838. *
  839. * if (isInKeyword(node)) {
  840. * // ...
  841. * }
  842. * ```
  843. *
  844. * @returns Whether the given node appears to be an `InKeyword`.
  845. */
  846. declare function isInKeyword(node: ts.Node): node is ts.InKeyword;
  847. /**
  848. * Test if a node is an `InputFiles`.
  849. *
  850. * @deprecated With TypeScript v5
  851. * @category Nodes - Type Guards
  852. * @example
  853. * ```ts
  854. * declare const node: ts.Node;
  855. *
  856. * if (isInputFiles(node)) {
  857. * // ...
  858. * }
  859. * ```
  860. *
  861. * @returns Whether the given node appears to be an `InputFiles`.
  862. */
  863. declare function isInputFiles(node: ts.Node): node is ts.InputFiles;
  864. /**
  865. * Test if a node is a `JSDocText`.
  866. *
  867. * @category Nodes - Type Guards
  868. * @example
  869. * ```ts
  870. * declare const node: ts.Node;
  871. *
  872. * if (isJSDocText(node)) {
  873. * // ...
  874. * }
  875. * ```
  876. *
  877. * @returns Whether the given node appears to be a `JSDocText`.
  878. */
  879. declare function isJSDocText(node: ts.Node): node is ts.JSDocText;
  880. /**
  881. * Test if a node is a `JsonMinusNumericLiteral`.
  882. *
  883. * @category Nodes - Type Guards
  884. * @example
  885. * ```ts
  886. * declare const node: ts.Node;
  887. *
  888. * if (isJsonMinusNumericLiteral(node)) {
  889. * // ...
  890. * }
  891. * ```
  892. *
  893. * @returns Whether the given node appears to be a `JsonMinusNumericLiteral`.
  894. */
  895. declare function isJsonMinusNumericLiteral(node: ts.Node): node is ts.JsonMinusNumericLiteral;
  896. /**
  897. * Test if a node is a {@link NeverKeyword}.
  898. *
  899. * @category Nodes - Type Guards
  900. * @example
  901. * ```ts
  902. * declare const node: ts.Node;
  903. *
  904. * if (isNeverKeyword(node)) {
  905. * // ...
  906. * }
  907. * ```
  908. *
  909. * @returns Whether the given node appears to be a {@link NeverKeyword}.
  910. */
  911. declare function isNeverKeyword(node: ts.Node): node is NeverKeyword;
  912. /**
  913. * Test if a node is a {@link NullKeyword}.
  914. *
  915. * @category Nodes - Type Guards
  916. * @example
  917. * ```ts
  918. * declare const node: ts.Node;
  919. *
  920. * if (isNullKeyword(node)) {
  921. * // ...
  922. * }
  923. * ```
  924. *
  925. * @returns Whether the given node appears to be a {@link NullKeyword}.
  926. */
  927. declare function isNullKeyword(node: ts.Node): node is NullKeyword;
  928. /**
  929. * Test if a node is a `NullLiteral`.
  930. *
  931. * @category Nodes - Type Guards
  932. * @example
  933. * ```ts
  934. * declare const node: ts.Node;
  935. *
  936. * if (isNullLiteral(node)) {
  937. * // ...
  938. * }
  939. * ```
  940. *
  941. * @returns Whether the given node appears to be a `NullLiteral`.
  942. */
  943. declare function isNullLiteral(node: ts.Node): node is ts.NullLiteral;
  944. /**
  945. * Test if a node is a {@link NumberKeyword}.
  946. *
  947. * @category Nodes - Type Guards
  948. * @example
  949. * ```ts
  950. * declare const node: ts.Node;
  951. *
  952. * if (isNumberKeyword(node)) {
  953. * // ...
  954. * }
  955. * ```
  956. *
  957. * @returns Whether the given node appears to be a {@link NumberKeyword}.
  958. */
  959. declare function isNumberKeyword(node: ts.Node): node is NumberKeyword;
  960. /**
  961. * Test if a node is an {@link ObjectKeyword}.
  962. *
  963. * @category Nodes - Type Guards
  964. * @example
  965. * ```ts
  966. * declare const node: ts.Node;
  967. *
  968. * if (isObjectKeyword(node)) {
  969. * // ...
  970. * }
  971. * ```
  972. *
  973. * @returns Whether the given node appears to be an {@link ObjectKeyword}.
  974. */
  975. declare function isObjectKeyword(node: ts.Node): node is ObjectKeyword;
  976. /**
  977. * Test if a node is an `OutKeyword`.
  978. *
  979. * @category Nodes - Type Guards
  980. * @example
  981. * ```ts
  982. * declare const node: ts.Node;
  983. *
  984. * if (isOutKeyword(node)) {
  985. * // ...
  986. * }
  987. * ```
  988. *
  989. * @returns Whether the given node appears to be an `OutKeyword`.
  990. */
  991. declare function isOutKeyword(node: ts.Node): node is ts.OutKeyword;
  992. /**
  993. * Test if a node is an `OverrideKeyword`.
  994. *
  995. * @category Nodes - Type Guards
  996. * @example
  997. * ```ts
  998. * declare const node: ts.Node;
  999. *
  1000. * if (isOverrideKeyword(node)) {
  1001. * // ...
  1002. * }
  1003. * ```
  1004. *
  1005. * @returns Whether the given node appears to be an `OverrideKeyword`.
  1006. */
  1007. declare function isOverrideKeyword(node: ts.Node): node is ts.OverrideKeyword;
  1008. /**
  1009. * Test if a node is a `PrivateKeyword`.
  1010. *
  1011. * @category Nodes - Type Guards
  1012. * @example
  1013. * ```ts
  1014. * declare const node: ts.Node;
  1015. *
  1016. * if (isPrivateKeyword(node)) {
  1017. * // ...
  1018. * }
  1019. * ```
  1020. *
  1021. * @returns Whether the given node appears to be a `PrivateKeyword`.
  1022. */
  1023. declare function isPrivateKeyword(node: ts.Node): node is ts.PrivateKeyword;
  1024. /**
  1025. * Test if a node is a `ProtectedKeyword`.
  1026. *
  1027. * @category Nodes - Type Guards
  1028. * @example
  1029. * ```ts
  1030. * declare const node: ts.Node;
  1031. *
  1032. * if (isProtectedKeyword(node)) {
  1033. * // ...
  1034. * }
  1035. * ```
  1036. *
  1037. * @returns Whether the given node appears to be a `ProtectedKeyword`.
  1038. */
  1039. declare function isProtectedKeyword(node: ts.Node): node is ts.ProtectedKeyword;
  1040. /**
  1041. * Test if a node is a `PublicKeyword`.
  1042. *
  1043. * @category Nodes - Type Guards
  1044. * @example
  1045. * ```ts
  1046. * declare const node: ts.Node;
  1047. *
  1048. * if (isPublicKeyword(node)) {
  1049. * // ...
  1050. * }
  1051. * ```
  1052. *
  1053. * @returns Whether the given node appears to be a `PublicKeyword`.
  1054. */
  1055. declare function isPublicKeyword(node: ts.Node): node is ts.PublicKeyword;
  1056. /**
  1057. * Test if a node is a `QuestionDotToken`.
  1058. *
  1059. * @deprecated With TypeScript v5, in favor of typescript's `isQuestionDotToken`.
  1060. * @category Nodes - Type Guards
  1061. * @example
  1062. * ```ts
  1063. * declare const node: ts.Node;
  1064. *
  1065. * if (isQuestionDotToken(node)) {
  1066. * // ...
  1067. * }
  1068. * ```
  1069. *
  1070. * @returns Whether the given node appears to be a `QuestionDotToken`.
  1071. */
  1072. declare function isQuestionDotToken(node: ts.Node): node is ts.QuestionDotToken;
  1073. /**
  1074. * Test if a node is a `QuestionToken`.
  1075. *
  1076. * @deprecated With TypeScript v5, in favor of typescript's `isQuestionToken`.
  1077. * @category Nodes - Type Guards
  1078. * @example
  1079. * ```ts
  1080. * declare const node: ts.Node;
  1081. *
  1082. * if (isQuestionToken(node)) {
  1083. * // ...
  1084. * }
  1085. * ```
  1086. *
  1087. * @returns Whether the given node appears to be a `QuestionToken`.
  1088. */
  1089. declare function isQuestionToken(node: ts.Node): node is ts.QuestionToken;
  1090. /**
  1091. * Test if a node is a `ReadonlyKeyword`.
  1092. *
  1093. * @category Nodes - Type Guards
  1094. * @example
  1095. * ```ts
  1096. * declare const node: ts.Node;
  1097. *
  1098. * if (isReadonlyKeyword(node)) {
  1099. * // ...
  1100. * }
  1101. * ```
  1102. *
  1103. * @returns Whether the given node appears to be a `ReadonlyKeyword`.
  1104. */
  1105. declare function isReadonlyKeyword(node: ts.Node): node is ts.ReadonlyKeyword;
  1106. /**
  1107. * Test if a node is a `StaticKeyword`.
  1108. *
  1109. * @category Nodes - Type Guards
  1110. * @example
  1111. * ```ts
  1112. * declare const node: ts.Node;
  1113. *
  1114. * if (isStaticKeyword(node)) {
  1115. * // ...
  1116. * }
  1117. * ```
  1118. *
  1119. * @returns Whether the given node appears to be a `StaticKeyword`.
  1120. */
  1121. declare function isStaticKeyword(node: ts.Node): node is ts.StaticKeyword;
  1122. /**
  1123. * Test if a node is a {@link StringKeyword}.
  1124. *
  1125. * @category Nodes - Type Guards
  1126. * @example
  1127. * ```ts
  1128. * declare const node: ts.Node;
  1129. *
  1130. * if (isStringKeyword(node)) {
  1131. * // ...
  1132. * }
  1133. * ```
  1134. *
  1135. * @returns Whether the given node appears to be a {@link StringKeyword}.
  1136. */
  1137. declare function isStringKeyword(node: ts.Node): node is StringKeyword;
  1138. /**
  1139. * Test if a node is a `SuperExpression`.
  1140. *
  1141. * @category Nodes - Type Guards
  1142. * @example
  1143. * ```ts
  1144. * declare const node: ts.Node;
  1145. *
  1146. * if (isSuperExpression(node)) {
  1147. * // ...
  1148. * }
  1149. * ```
  1150. *
  1151. * @returns Whether the given node appears to be a `SuperExpression`.
  1152. */
  1153. declare function isSuperExpression(node: ts.Node): node is ts.SuperExpression;
  1154. /**
  1155. * Test if a node is a {@link SuperKeyword}.
  1156. *
  1157. * @category Nodes - Type Guards
  1158. * @example
  1159. * ```ts
  1160. * declare const node: ts.Node;
  1161. *
  1162. * if (isSuperKeyword(node)) {
  1163. * // ...
  1164. * }
  1165. * ```
  1166. *
  1167. * @returns Whether the given node appears to be a {@link SuperKeyword}.
  1168. */
  1169. declare function isSuperKeyword(node: ts.Node): node is SuperKeyword;
  1170. /**
  1171. * Test if a node is a {@link SymbolKeyword}.
  1172. *
  1173. * @category Nodes - Type Guards
  1174. * @example
  1175. * ```ts
  1176. * declare const node: ts.Node;
  1177. *
  1178. * if (isSymbolKeyword(node)) {
  1179. * // ...
  1180. * }
  1181. * ```
  1182. *
  1183. * @returns Whether the given node appears to be a {@link SymbolKeyword}.
  1184. */
  1185. declare function isSymbolKeyword(node: ts.Node): node is SymbolKeyword;
  1186. /**
  1187. * Test if a node is a `SyntaxList`.
  1188. *
  1189. * @category Nodes - Type Guards
  1190. * @example
  1191. * ```ts
  1192. * declare const node: ts.Node;
  1193. *
  1194. * if (isSyntaxList(node)) {
  1195. * // ...
  1196. * }
  1197. * ```
  1198. *
  1199. * @returns Whether the given node appears to be a `SyntaxList`.
  1200. */
  1201. declare function isSyntaxList(node: ts.Node): node is ts.SyntaxList;
  1202. /**
  1203. * Test if a node is a `ThisExpression`.
  1204. *
  1205. * @category Nodes - Type Guards
  1206. * @example
  1207. * ```ts
  1208. * declare const node: ts.Node;
  1209. *
  1210. * if (isThisExpression(node)) {
  1211. * // ...
  1212. * }
  1213. * ```
  1214. *
  1215. * @returns Whether the given node appears to be a `ThisExpression`.
  1216. */
  1217. declare function isThisExpression(node: ts.Node): node is ts.ThisExpression;
  1218. /**
  1219. * Test if a node is a {@link ThisKeyword}.
  1220. *
  1221. * @category Nodes - Type Guards
  1222. * @example
  1223. * ```ts
  1224. * declare const node: ts.Node;
  1225. *
  1226. * if (isThisKeyword(node)) {
  1227. * // ...
  1228. * }
  1229. * ```
  1230. *
  1231. * @returns Whether the given node appears to be a {@link ThisKeyword}.
  1232. */
  1233. declare function isThisKeyword(node: ts.Node): node is ThisKeyword;
  1234. /**
  1235. * Test if a node is a {@link TrueKeyword}.
  1236. *
  1237. * @category Nodes - Type Guards
  1238. * @example
  1239. * ```ts
  1240. * declare const node: ts.Node;
  1241. *
  1242. * if (isTrueKeyword(node)) {
  1243. * // ...
  1244. * }
  1245. * ```
  1246. *
  1247. * @returns Whether the given node appears to be a {@link TrueKeyword}.
  1248. */
  1249. declare function isTrueKeyword(node: ts.Node): node is TrueKeyword;
  1250. /**
  1251. * Test if a node is a `TrueLiteral`.
  1252. *
  1253. * @category Nodes - Type Guards
  1254. * @example
  1255. * ```ts
  1256. * declare const node: ts.Node;
  1257. *
  1258. * if (isTrueLiteral(node)) {
  1259. * // ...
  1260. * }
  1261. * ```
  1262. *
  1263. * @returns Whether the given node appears to be a `TrueLiteral`.
  1264. */
  1265. declare function isTrueLiteral(node: ts.Node): node is ts.TrueLiteral;
  1266. /**
  1267. * Test if a node is an {@link UndefinedKeyword}.
  1268. *
  1269. * @category Nodes - Type Guards
  1270. * @example
  1271. * ```ts
  1272. * declare const node: ts.Node;
  1273. *
  1274. * if (isUndefinedKeyword(node)) {
  1275. * // ...
  1276. * }
  1277. * ```
  1278. *
  1279. * @returns Whether the given node appears to be an {@link UndefinedKeyword}.
  1280. */
  1281. declare function isUndefinedKeyword(node: ts.Node): node is UndefinedKeyword;
  1282. /**
  1283. * Test if a node is an {@link UnknownKeyword}.
  1284. *
  1285. * @category Nodes - Type Guards
  1286. * @example
  1287. * ```ts
  1288. * declare const node: ts.Node;
  1289. *
  1290. * if (isUnknownKeyword(node)) {
  1291. * // ...
  1292. * }
  1293. * ```
  1294. *
  1295. * @returns Whether the given node appears to be an {@link UnknownKeyword}.
  1296. */
  1297. declare function isUnknownKeyword(node: ts.Node): node is UnknownKeyword;
  1298. /**
  1299. * Test if a node is an `UnparsedPrologue`.
  1300. *
  1301. * @deprecated With TypeScript v5
  1302. * @category Nodes - Type Guards
  1303. * @example
  1304. * ```ts
  1305. * declare const node: ts.Node;
  1306. *
  1307. * if (isUnparsedPrologue(node)) {
  1308. * // ...
  1309. * }
  1310. * ```
  1311. *
  1312. * @returns Whether the given node appears to be an `UnparsedPrologue`.
  1313. */
  1314. declare function isUnparsedPrologue(node: ts.Node): node is ts.UnparsedPrologue;
  1315. /**
  1316. * Test if a node is an `UnparsedSyntheticReference`.
  1317. *
  1318. * @deprecated With TypeScript v5
  1319. * @category Nodes - Type Guards
  1320. * @example
  1321. * ```ts
  1322. * declare const node: ts.Node;
  1323. *
  1324. * if (isUnparsedSyntheticReference(node)) {
  1325. * // ...
  1326. * }
  1327. * ```
  1328. *
  1329. * @returns Whether the given node appears to be an `UnparsedSyntheticReference`.
  1330. */
  1331. declare function isUnparsedSyntheticReference(node: ts.Node): node is ts.UnparsedSyntheticReference;
  1332. /**
  1333. * Test if a node is a {@link VoidKeyword}.
  1334. *
  1335. * @category Nodes - Type Guards
  1336. * @example
  1337. * ```ts
  1338. * declare const node: ts.Node;
  1339. *
  1340. * if (isVoidKeyword(node)) {
  1341. * // ...
  1342. * }
  1343. * ```
  1344. *
  1345. * @returns Whether the given node appears to be a {@link VoidKeyword}.
  1346. */
  1347. declare function isVoidKeyword(node: ts.Node): node is VoidKeyword;
  1348. /**
  1349. * Test if a node is an `AccessExpression`.
  1350. *
  1351. * @category Nodes - Type Guards
  1352. * @example
  1353. * ```ts
  1354. * declare const node: ts.Node;
  1355. *
  1356. * if (isAccessExpression(node)) {
  1357. * // ...
  1358. * }
  1359. * ```
  1360. *
  1361. * @returns Whether the given node appears to be an `AccessExpression`.
  1362. */
  1363. declare function isAccessExpression(node: ts.Node): node is ts.AccessExpression;
  1364. /**
  1365. * Test if a node is an `AccessibilityModifier`.
  1366. *
  1367. * @category Nodes - Type Guards
  1368. * @example
  1369. * ```ts
  1370. * declare const node: ts.Node;
  1371. *
  1372. * if (isAccessibilityModifier(node)) {
  1373. * // ...
  1374. * }
  1375. * ```
  1376. *
  1377. * @returns Whether the given node appears to be an `AccessibilityModifier`.
  1378. */
  1379. declare function isAccessibilityModifier(node: ts.Node): node is ts.AccessibilityModifier;
  1380. /**
  1381. * Test if a node is an `AccessorDeclaration`.
  1382. *
  1383. * @deprecated With TypeScript v5, in favor of typescript's `isAccessor`.
  1384. * @category Nodes - Type Guards
  1385. * @example
  1386. * ```ts
  1387. * declare const node: ts.Node;
  1388. *
  1389. * if (isAccessorDeclaration(node)) {
  1390. * // ...
  1391. * }
  1392. * ```
  1393. *
  1394. * @returns Whether the given node appears to be an `AccessorDeclaration`.
  1395. */
  1396. declare function isAccessorDeclaration(node: ts.Node): node is ts.AccessorDeclaration;
  1397. /**
  1398. * Test if a node is an `ArrayBindingElement`.
  1399. *
  1400. * @deprecated With TypeScript v5, in favor of typescript's `isArrayBindingElement`.
  1401. * @category Nodes - Type Guards
  1402. * @example
  1403. * ```ts
  1404. * declare const node: ts.Node;
  1405. *
  1406. * if (isArrayBindingElement(node)) {
  1407. * // ...
  1408. * }
  1409. * ```
  1410. *
  1411. * @returns Whether the given node appears to be an `ArrayBindingElement`.
  1412. */
  1413. declare function isArrayBindingElement(node: ts.Node): node is ts.ArrayBindingElement;
  1414. /**
  1415. * Test if a node is an `ArrayBindingOrAssignmentPattern`.
  1416. *
  1417. * @category Nodes - Type Guards
  1418. * @example
  1419. * ```ts
  1420. * declare const node: ts.Node;
  1421. *
  1422. * if (isArrayBindingOrAssignmentPattern(node)) {
  1423. * // ...
  1424. * }
  1425. * ```
  1426. *
  1427. * @returns Whether the given node appears to be an `ArrayBindingOrAssignmentPattern`.
  1428. */
  1429. declare function isArrayBindingOrAssignmentPattern(node: ts.Node): node is ts.ArrayBindingOrAssignmentPattern;
  1430. /**
  1431. * Test if a node is an `AssignmentPattern`.
  1432. *
  1433. * @category Nodes - Type Guards
  1434. * @example
  1435. * ```ts
  1436. * declare const node: ts.Node;
  1437. *
  1438. * if (isAssignmentPattern(node)) {
  1439. * // ...
  1440. * }
  1441. * ```
  1442. *
  1443. * @returns Whether the given node appears to be an `AssignmentPattern`.
  1444. */
  1445. declare function isAssignmentPattern(node: ts.Node): node is ts.AssignmentPattern;
  1446. /**
  1447. * Test if a node is a `BindingOrAssignmentElementRestIndicator`.
  1448. *
  1449. * @category Nodes - Type Guards
  1450. * @example
  1451. * ```ts
  1452. * declare const node: ts.Node;
  1453. *
  1454. * if (isBindingOrAssignmentElementRestIndicator(node)) {
  1455. * // ...
  1456. * }
  1457. * ```
  1458. *
  1459. * @returns Whether the given node appears to be a `BindingOrAssignmentElementRestIndicator`.
  1460. */
  1461. declare function isBindingOrAssignmentElementRestIndicator(node: ts.Node): node is ts.BindingOrAssignmentElementRestIndicator;
  1462. /**
  1463. * Test if a node is a `BindingOrAssignmentElementTarget`.
  1464. *
  1465. * @category Nodes - Type Guards
  1466. * @example
  1467. * ```ts
  1468. * declare const node: ts.Node;
  1469. *
  1470. * if (isBindingOrAssignmentElementTarget(node)) {
  1471. * // ...
  1472. * }
  1473. * ```
  1474. *
  1475. * @returns Whether the given node appears to be a `BindingOrAssignmentElementTarget`.
  1476. */
  1477. declare function isBindingOrAssignmentElementTarget(node: ts.Node): node is ts.BindingOrAssignmentElementTarget;
  1478. /**
  1479. * Test if a node is a `BindingOrAssignmentPattern`.
  1480. *
  1481. * @category Nodes - Type Guards
  1482. * @example
  1483. * ```ts
  1484. * declare const node: ts.Node;
  1485. *
  1486. * if (isBindingOrAssignmentPattern(node)) {
  1487. * // ...
  1488. * }
  1489. * ```
  1490. *
  1491. * @returns Whether the given node appears to be a `BindingOrAssignmentPattern`.
  1492. */
  1493. declare function isBindingOrAssignmentPattern(node: ts.Node): node is ts.BindingOrAssignmentPattern;
  1494. /**
  1495. * Test if a node is a `BindingPattern`.
  1496. *
  1497. * @category Nodes - Type Guards
  1498. * @example
  1499. * ```ts
  1500. * declare const node: ts.Node;
  1501. *
  1502. * if (isBindingPattern(node)) {
  1503. * // ...
  1504. * }
  1505. * ```
  1506. *
  1507. * @returns Whether the given node appears to be a `BindingPattern`.
  1508. */
  1509. declare function isBindingPattern(node: ts.Node): node is ts.BindingPattern;
  1510. /**
  1511. * Test if a node is a `BlockLike`.
  1512. *
  1513. * @category Nodes - Type Guards
  1514. * @example
  1515. * ```ts
  1516. * declare const node: ts.Node;
  1517. *
  1518. * if (isBlockLike(node)) {
  1519. * // ...
  1520. * }
  1521. * ```
  1522. *
  1523. * @returns Whether the given node appears to be a `BlockLike`.
  1524. */
  1525. declare function isBlockLike(node: ts.Node): node is ts.BlockLike;
  1526. /**
  1527. * Test if a node is a `BooleanLiteral`.
  1528. *
  1529. * @category Nodes - Type Guards
  1530. * @example
  1531. * ```ts
  1532. * declare const node: ts.Node;
  1533. *
  1534. * if (isBooleanLiteral(node)) {
  1535. * // ...
  1536. * }
  1537. * ```
  1538. *
  1539. * @returns Whether the given node appears to be a `BooleanLiteral`.
  1540. */
  1541. declare function isBooleanLiteral(node: ts.Node): node is ts.BooleanLiteral;
  1542. /**
  1543. * Test if a node is a `ClassLikeDeclaration`.
  1544. *
  1545. * @deprecated With TypeScript v5, in favor of typescript's `isClassLike`.
  1546. * @category Nodes - Type Guards
  1547. * @example
  1548. * ```ts
  1549. * declare const node: ts.Node;
  1550. *
  1551. * if (isClassLikeDeclaration(node)) {
  1552. * // ...
  1553. * }
  1554. * ```
  1555. *
  1556. * @returns Whether the given node appears to be a `ClassLikeDeclaration`.
  1557. */
  1558. declare function isClassLikeDeclaration(node: ts.Node): node is ts.ClassLikeDeclaration;
  1559. /**
  1560. * Test if a node is a `ClassMemberModifier`.
  1561. *
  1562. * @category Nodes - Type Guards
  1563. * @example
  1564. * ```ts
  1565. * declare const node: ts.Node;
  1566. *
  1567. * if (isClassMemberModifier(node)) {
  1568. * // ...
  1569. * }
  1570. * ```
  1571. *
  1572. * @returns Whether the given node appears to be a `ClassMemberModifier`.
  1573. */
  1574. declare function isClassMemberModifier(node: ts.Node): node is ts.ClassMemberModifier;
  1575. /**
  1576. * Test if a node is a `DeclarationName`.
  1577. *
  1578. * @category Nodes - Type Guards
  1579. * @example
  1580. * ```ts
  1581. * declare const node: ts.Node;
  1582. *
  1583. * if (isDeclarationName(node)) {
  1584. * // ...
  1585. * }
  1586. * ```
  1587. *
  1588. * @returns Whether the given node appears to be a `DeclarationName`.
  1589. */
  1590. declare function isDeclarationName(node: ts.Node): node is ts.DeclarationName;
  1591. /**
  1592. * Test if a node is a `DeclarationWithTypeParameterChildren`.
  1593. *
  1594. * @category Nodes - Type Guards
  1595. * @example
  1596. * ```ts
  1597. * declare const node: ts.Node;
  1598. *
  1599. * if (isDeclarationWithTypeParameterChildren(node)) {
  1600. * // ...
  1601. * }
  1602. * ```
  1603. *
  1604. * @returns Whether the given node appears to be a `DeclarationWithTypeParameterChildren`.
  1605. */
  1606. declare function isDeclarationWithTypeParameterChildren(node: ts.Node): node is ts.DeclarationWithTypeParameterChildren;
  1607. /**
  1608. * Test if a node is a `DeclarationWithTypeParameters`.
  1609. *
  1610. * @category Nodes - Type Guards
  1611. * @example
  1612. * ```ts
  1613. * declare const node: ts.Node;
  1614. *
  1615. * if (isDeclarationWithTypeParameters(node)) {
  1616. * // ...
  1617. * }
  1618. * ```
  1619. *
  1620. * @returns Whether the given node appears to be a `DeclarationWithTypeParameters`.
  1621. */
  1622. declare function isDeclarationWithTypeParameters(node: ts.Node): node is ts.DeclarationWithTypeParameters;
  1623. /**
  1624. * Test if a node is a `DestructuringPattern`.
  1625. *
  1626. * @category Nodes - Type Guards
  1627. * @example
  1628. * ```ts
  1629. * declare const node: ts.Node;
  1630. *
  1631. * if (isDestructuringPattern(node)) {
  1632. * // ...
  1633. * }
  1634. * ```
  1635. *
  1636. * @returns Whether the given node appears to be a `DestructuringPattern`.
  1637. */
  1638. declare function isDestructuringPattern(node: ts.Node): node is ts.DestructuringPattern;
  1639. /**
  1640. * Test if a node is an `EntityNameExpression`.
  1641. *
  1642. * @category Nodes - Type Guards
  1643. * @example
  1644. * ```ts
  1645. * declare const node: ts.Node;
  1646. *
  1647. * if (isEntityNameExpression(node)) {
  1648. * // ...
  1649. * }
  1650. * ```
  1651. *
  1652. * @returns Whether the given node appears to be an `EntityNameExpression`.
  1653. */
  1654. declare function isEntityNameExpression(node: ts.Node): node is ts.EntityNameExpression;
  1655. /**
  1656. * Test if a node is an `EntityNameOrEntityNameExpression`.
  1657. *
  1658. * @category Nodes - Type Guards
  1659. * @example
  1660. * ```ts
  1661. * declare const node: ts.Node;
  1662. *
  1663. * if (isEntityNameOrEntityNameExpression(node)) {
  1664. * // ...
  1665. * }
  1666. * ```
  1667. *
  1668. * @returns Whether the given node appears to be an `EntityNameOrEntityNameExpression`.
  1669. */
  1670. declare function isEntityNameOrEntityNameExpression(node: ts.Node): node is ts.EntityNameOrEntityNameExpression;
  1671. /**
  1672. * Test if a node is a `ForInOrOfStatement`.
  1673. *
  1674. * @category Nodes - Type Guards
  1675. * @example
  1676. * ```ts
  1677. * declare const node: ts.Node;
  1678. *
  1679. * if (isForInOrOfStatement(node)) {
  1680. * // ...
  1681. * }
  1682. * ```
  1683. *
  1684. * @returns Whether the given node appears to be a `ForInOrOfStatement`.
  1685. */
  1686. declare function isForInOrOfStatement(node: ts.Node): node is ts.ForInOrOfStatement;
  1687. /**
  1688. * Test if a node is a `FunctionLikeDeclaration`.
  1689. *
  1690. * @deprecated With TypeScript v5, in favor of typescript's `isFunctionLike`.
  1691. * @category Nodes - Type Guards
  1692. * @example
  1693. * ```ts
  1694. * declare const node: ts.Node;
  1695. *
  1696. * if (isFunctionLikeDeclaration(node)) {
  1697. * // ...
  1698. * }
  1699. * ```
  1700. *
  1701. * @returns Whether the given node appears to be a `FunctionLikeDeclaration`.
  1702. */
  1703. declare function isFunctionLikeDeclaration(node: ts.Node): node is ts.FunctionLikeDeclaration;
  1704. /**
  1705. * Test if a node is a `HasDecorators`.
  1706. *
  1707. * @category Nodes - Type Guards
  1708. * @example
  1709. * ```ts
  1710. * declare const node: ts.Node;
  1711. *
  1712. * if (hasDecorators(node)) {
  1713. * // ...
  1714. * }
  1715. * ```
  1716. *
  1717. * @returns Whether the given node appears to be a `HasDecorators`.
  1718. */
  1719. declare function hasDecorators(node: ts.Node): node is ts.HasDecorators;
  1720. /**
  1721. * Test if a node is a `HasExpressionInitializer`.
  1722. *
  1723. * @category Nodes - Type Guards
  1724. * @example
  1725. * ```ts
  1726. * declare const node: ts.Node;
  1727. *
  1728. * if (hasExpressionInitializer(node)) {
  1729. * // ...
  1730. * }
  1731. * ```
  1732. *
  1733. * @returns Whether the given node appears to be a `HasExpressionInitializer`.
  1734. */
  1735. declare function hasExpressionInitializer(node: ts.Node): node is ts.HasExpressionInitializer;
  1736. /**
  1737. * Test if a node is a `HasInitializer`.
  1738. *
  1739. * @category Nodes - Type Guards
  1740. * @example
  1741. * ```ts
  1742. * declare const node: ts.Node;
  1743. *
  1744. * if (hasInitializer(node)) {
  1745. * // ...
  1746. * }
  1747. * ```
  1748. *
  1749. * @returns Whether the given node appears to be a `HasInitializer`.
  1750. */
  1751. declare function hasInitializer(node: ts.Node): node is ts.HasInitializer;
  1752. /**
  1753. * Test if a node is a `HasJSDoc`.
  1754. *
  1755. * @category Nodes - Type Guards
  1756. * @example
  1757. * ```ts
  1758. * declare const node: ts.Node;
  1759. *
  1760. * if (hasJSDoc(node)) {
  1761. * // ...
  1762. * }
  1763. * ```
  1764. *
  1765. * @returns Whether the given node appears to be a `HasJSDoc`.
  1766. */
  1767. declare function hasJSDoc(node: ts.Node): node is ts.HasJSDoc;
  1768. /**
  1769. * Test if a node is a `HasModifiers`.
  1770. *
  1771. * @category Nodes - Type Guards
  1772. * @example
  1773. * ```ts
  1774. * declare const node: ts.Node;
  1775. *
  1776. * if (hasModifiers(node)) {
  1777. * // ...
  1778. * }
  1779. * ```
  1780. *
  1781. * @returns Whether the given node appears to be a `HasModifiers`.
  1782. */
  1783. declare function hasModifiers(node: ts.Node): node is ts.HasModifiers;
  1784. /**
  1785. * Test if a node is a `HasType`.
  1786. *
  1787. * @category Nodes - Type Guards
  1788. * @example
  1789. * ```ts
  1790. * declare const node: ts.Node;
  1791. *
  1792. * if (hasType(node)) {
  1793. * // ...
  1794. * }
  1795. * ```
  1796. *
  1797. * @returns Whether the given node appears to be a `HasType`.
  1798. */
  1799. declare function hasType(node: ts.Node): node is ts.HasType;
  1800. /**
  1801. * Test if a node is a `HasTypeArguments`.
  1802. *
  1803. * @category Nodes - Type Guards
  1804. * @example
  1805. * ```ts
  1806. * declare const node: ts.Node;
  1807. *
  1808. * if (hasTypeArguments(node)) {
  1809. * // ...
  1810. * }
  1811. * ```
  1812. *
  1813. * @returns Whether the given node appears to be a `HasTypeArguments`.
  1814. */
  1815. declare function hasTypeArguments(node: ts.Node): node is ts.HasTypeArguments;
  1816. /**
  1817. * Test if a node is a `JSDocComment`.
  1818. *
  1819. * @category Nodes - Type Guards
  1820. * @example
  1821. * ```ts
  1822. * declare const node: ts.Node;
  1823. *
  1824. * if (isJSDocComment(node)) {
  1825. * // ...
  1826. * }
  1827. * ```
  1828. *
  1829. * @returns Whether the given node appears to be a `JSDocComment`.
  1830. */
  1831. declare function isJSDocComment(node: ts.Node): node is ts.JSDocComment;
  1832. /**
  1833. * Test if a node is a `JSDocNamespaceBody`.
  1834. *
  1835. * @category Nodes - Type Guards
  1836. * @example
  1837. * ```ts
  1838. * declare const node: ts.Node;
  1839. *
  1840. * if (isJSDocNamespaceBody(node)) {
  1841. * // ...
  1842. * }
  1843. * ```
  1844. *
  1845. * @returns Whether the given node appears to be a `JSDocNamespaceBody`.
  1846. */
  1847. declare function isJSDocNamespaceBody(node: ts.Node): node is ts.JSDocNamespaceBody;
  1848. /**
  1849. * Test if a node is a `JSDocTypeReferencingNode`.
  1850. *
  1851. * @category Nodes - Type Guards
  1852. * @example
  1853. * ```ts
  1854. * declare const node: ts.Node;
  1855. *
  1856. * if (isJSDocTypeReferencingNode(node)) {
  1857. * // ...
  1858. * }
  1859. * ```
  1860. *
  1861. * @returns Whether the given node appears to be a `JSDocTypeReferencingNode`.
  1862. */
  1863. declare function isJSDocTypeReferencingNode(node: ts.Node): node is ts.JSDocTypeReferencingNode;
  1864. /**
  1865. * Test if a node is a `JsonObjectExpression`.
  1866. *
  1867. * @category Nodes - Type Guards
  1868. * @example
  1869. * ```ts
  1870. * declare const node: ts.Node;
  1871. *
  1872. * if (isJsonObjectExpression(node)) {
  1873. * // ...
  1874. * }
  1875. * ```
  1876. *
  1877. * @returns Whether the given node appears to be a `JsonObjectExpression`.
  1878. */
  1879. declare function isJsonObjectExpression(node: ts.Node): node is ts.JsonObjectExpression;
  1880. /**
  1881. * Test if a node is a `JsxAttributeLike`.
  1882. *
  1883. * @deprecated With TypeScript v5, in favor of typescript's `isJsxAttributeLike`.
  1884. * @category Nodes - Type Guards
  1885. * @example
  1886. * ```ts
  1887. * declare const node: ts.Node;
  1888. *
  1889. * if (isJsxAttributeLike(node)) {
  1890. * // ...
  1891. * }
  1892. * ```
  1893. *
  1894. * @returns Whether the given node appears to be a `JsxAttributeLike`.
  1895. */
  1896. declare function isJsxAttributeLike(node: ts.Node): node is ts.JsxAttributeLike;
  1897. /**
  1898. * Test if a node is a `JsxAttributeValue`.
  1899. *
  1900. * @category Nodes - Type Guards
  1901. * @example
  1902. * ```ts
  1903. * declare const node: ts.Node;
  1904. *
  1905. * if (isJsxAttributeValue(node)) {
  1906. * // ...
  1907. * }
  1908. * ```
  1909. *
  1910. * @returns Whether the given node appears to be a `JsxAttributeValue`.
  1911. */
  1912. declare function isJsxAttributeValue(node: ts.Node): node is ts.JsxAttributeValue;
  1913. /**
  1914. * Test if a node is a `JsxChild`.
  1915. *
  1916. * @deprecated With TypeScript v5, in favor of typescript's `isJsxChild`.
  1917. * @category Nodes - Type Guards
  1918. * @example
  1919. * ```ts
  1920. * declare const node: ts.Node;
  1921. *
  1922. * if (isJsxChild(node)) {
  1923. * // ...
  1924. * }
  1925. * ```
  1926. *
  1927. * @returns Whether the given node appears to be a `JsxChild`.
  1928. */
  1929. declare function isJsxChild(node: ts.Node): node is ts.JsxChild;
  1930. /**
  1931. * Test if a node is a `JsxTagNameExpression`.
  1932. *
  1933. * @deprecated With TypeScript v5, in favor of typescript's `isJsxTagNameExpression`.
  1934. * @category Nodes - Type Guards
  1935. * @example
  1936. * ```ts
  1937. * declare const node: ts.Node;
  1938. *
  1939. * if (isJsxTagNameExpression(node)) {
  1940. * // ...
  1941. * }
  1942. * ```
  1943. *
  1944. * @returns Whether the given node appears to be a `JsxTagNameExpression`.
  1945. */
  1946. declare function isJsxTagNameExpression(node: ts.Node): node is ts.JsxTagNameExpression;
  1947. /**
  1948. * Test if a node is a `LiteralToken`.
  1949. *
  1950. * @category Nodes - Type Guards
  1951. * @example
  1952. * ```ts
  1953. * declare const node: ts.Node;
  1954. *
  1955. * if (isLiteralToken(node)) {
  1956. * // ...
  1957. * }
  1958. * ```
  1959. *
  1960. * @returns Whether the given node appears to be a `LiteralToken`.
  1961. */
  1962. declare function isLiteralToken(node: ts.Node): node is ts.LiteralToken;
  1963. /**
  1964. * Test if a node is a `ModuleBody`.
  1965. *
  1966. * @deprecated With TypeScript v5, in favor of typescript's `isModuleBody`.
  1967. * @category Nodes - Type Guards
  1968. * @example
  1969. * ```ts
  1970. * declare const node: ts.Node;
  1971. *
  1972. * if (isModuleBody(node)) {
  1973. * // ...
  1974. * }
  1975. * ```
  1976. *
  1977. * @returns Whether the given node appears to be a `ModuleBody`.
  1978. */
  1979. declare function isModuleBody(node: ts.Node): node is ts.ModuleBody;
  1980. /**
  1981. * Test if a node is a `ModuleName`.
  1982. *
  1983. * @deprecated With TypeScript v5, in favor of typescript's `isModuleName`.
  1984. * @category Nodes - Type Guards
  1985. * @example
  1986. * ```ts
  1987. * declare const node: ts.Node;
  1988. *
  1989. * if (isModuleName(node)) {
  1990. * // ...
  1991. * }
  1992. * ```
  1993. *
  1994. * @returns Whether the given node appears to be a `ModuleName`.
  1995. */
  1996. declare function isModuleName(node: ts.Node): node is ts.ModuleName;
  1997. /**
  1998. * Test if a node is a `ModuleReference`.
  1999. *
  2000. * @deprecated With TypeScript v5, in favor of typescript's `isModuleReference`.
  2001. * @category Nodes - Type Guards
  2002. * @example
  2003. * ```ts
  2004. * declare const node: ts.Node;
  2005. *
  2006. * if (isModuleReference(node)) {
  2007. * // ...
  2008. * }
  2009. * ```
  2010. *
  2011. * @returns Whether the given node appears to be a `ModuleReference`.
  2012. */
  2013. declare function isModuleReference(node: ts.Node): node is ts.ModuleReference;
  2014. /**
  2015. * Test if a node is a `NamedImportBindings`.
  2016. *
  2017. * @deprecated With TypeScript v5, in favor of typescript's `isNamedImportBindings`.
  2018. * @category Nodes - Type Guards
  2019. * @example
  2020. * ```ts
  2021. * declare const node: ts.Node;
  2022. *
  2023. * if (isNamedImportBindings(node)) {
  2024. * // ...
  2025. * }
  2026. * ```
  2027. *
  2028. * @returns Whether the given node appears to be a `NamedImportBindings`.
  2029. */
  2030. declare function isNamedImportBindings(node: ts.Node): node is ts.NamedImportBindings;
  2031. /**
  2032. * Test if a node is a `NamedImportsOrExports`.
  2033. *
  2034. * @category Nodes - Type Guards
  2035. * @example
  2036. * ```ts
  2037. * declare const node: ts.Node;
  2038. *
  2039. * if (isNamedImportsOrExports(node)) {
  2040. * // ...
  2041. * }
  2042. * ```
  2043. *
  2044. * @returns Whether the given node appears to be a `NamedImportsOrExports`.
  2045. */
  2046. declare function isNamedImportsOrExports(node: ts.Node): node is ts.NamedImportsOrExports;
  2047. /**
  2048. * Test if a node is a `NamespaceBody`.
  2049. *
  2050. * @category Nodes - Type Guards
  2051. * @example
  2052. * ```ts
  2053. * declare const node: ts.Node;
  2054. *
  2055. * if (isNamespaceBody(node)) {
  2056. * // ...
  2057. * }
  2058. * ```
  2059. *
  2060. * @returns Whether the given node appears to be a `NamespaceBody`.
  2061. */
  2062. declare function isNamespaceBody(node: ts.Node): node is ts.NamespaceBody;
  2063. /**
  2064. * Test if a node is an `ObjectBindingOrAssignmentElement`.
  2065. *
  2066. * @category Nodes - Type Guards
  2067. * @example
  2068. * ```ts
  2069. * declare const node: ts.Node;
  2070. *
  2071. * if (isObjectBindingOrAssignmentElement(node)) {
  2072. * // ...
  2073. * }
  2074. * ```
  2075. *
  2076. * @returns Whether the given node appears to be an `ObjectBindingOrAssignmentElement`.
  2077. */
  2078. declare function isObjectBindingOrAssignmentElement(node: ts.Node): node is ts.ObjectBindingOrAssignmentElement;
  2079. /**
  2080. * Test if a node is an `ObjectBindingOrAssignmentPattern`.
  2081. *
  2082. * @category Nodes - Type Guards
  2083. * @example
  2084. * ```ts
  2085. * declare const node: ts.Node;
  2086. *
  2087. * if (isObjectBindingOrAssignmentPattern(node)) {
  2088. * // ...
  2089. * }
  2090. * ```
  2091. *
  2092. * @returns Whether the given node appears to be an `ObjectBindingOrAssignmentPattern`.
  2093. */
  2094. declare function isObjectBindingOrAssignmentPattern(node: ts.Node): node is ts.ObjectBindingOrAssignmentPattern;
  2095. /**
  2096. * Test if a node is an `ObjectTypeDeclaration`.
  2097. *
  2098. * @category Nodes - Type Guards
  2099. * @example
  2100. * ```ts
  2101. * declare const node: ts.Node;
  2102. *
  2103. * if (isObjectTypeDeclaration(node)) {
  2104. * // ...
  2105. * }
  2106. * ```
  2107. *
  2108. * @returns Whether the given node appears to be an `ObjectTypeDeclaration`.
  2109. */
  2110. declare function isObjectTypeDeclaration(node: ts.Node): node is ts.ObjectTypeDeclaration;
  2111. /**
  2112. * Test if a node is a `ParameterPropertyModifier`.
  2113. *
  2114. * @category Nodes - Type Guards
  2115. * @example
  2116. * ```ts
  2117. * declare const node: ts.Node;
  2118. *
  2119. * if (isParameterPropertyModifier(node)) {
  2120. * // ...
  2121. * }
  2122. * ```
  2123. *
  2124. * @returns Whether the given node appears to be a `ParameterPropertyModifier`.
  2125. */
  2126. declare function isParameterPropertyModifier(node: ts.Node): node is ts.ParameterPropertyModifier;
  2127. /**
  2128. * Test if a node is a `PropertyNameLiteral`.
  2129. *
  2130. * @category Nodes - Type Guards
  2131. * @example
  2132. * ```ts
  2133. * declare const node: ts.Node;
  2134. *
  2135. * if (isPropertyNameLiteral(node)) {
  2136. * // ...
  2137. * }
  2138. * ```
  2139. *
  2140. * @returns Whether the given node appears to be a `PropertyNameLiteral`.
  2141. */
  2142. declare function isPropertyNameLiteral(node: ts.Node): node is ts.PropertyNameLiteral;
  2143. /**
  2144. * Test if a node is a `PseudoLiteralToken`.
  2145. *
  2146. * @category Nodes - Type Guards
  2147. * @example
  2148. * ```ts
  2149. * declare const node: ts.Node;
  2150. *
  2151. * if (isPseudoLiteralToken(node)) {
  2152. * // ...
  2153. * }
  2154. * ```
  2155. *
  2156. * @returns Whether the given node appears to be a `PseudoLiteralToken`.
  2157. */
  2158. declare function isPseudoLiteralToken(node: ts.Node): node is ts.PseudoLiteralToken;
  2159. /**
  2160. * Test if a node is a `SignatureDeclaration`.
  2161. *
  2162. * @category Nodes - Type Guards
  2163. * @example
  2164. * ```ts
  2165. * declare const node: ts.Node;
  2166. *
  2167. * if (isSignatureDeclaration(node)) {
  2168. * // ...
  2169. * }
  2170. * ```
  2171. *
  2172. * @returns Whether the given node appears to be a `SignatureDeclaration`.
  2173. */
  2174. declare function isSignatureDeclaration(node: ts.Node): node is ts.SignatureDeclaration;
  2175. /**
  2176. * Test if a node is a `SuperProperty`.
  2177. *
  2178. * @category Nodes - Type Guards
  2179. * @example
  2180. * ```ts
  2181. * declare const node: ts.Node;
  2182. *
  2183. * if (isSuperProperty(node)) {
  2184. * // ...
  2185. * }
  2186. * ```
  2187. *
  2188. * @returns Whether the given node appears to be a `SuperProperty`.
  2189. */
  2190. declare function isSuperProperty(node: ts.Node): node is ts.SuperProperty;
  2191. /**
  2192. * Test if a node is a `TypeOnlyCompatibleAliasDeclaration`.
  2193. *
  2194. * @category Nodes - Type Guards
  2195. * @example
  2196. * ```ts
  2197. * declare const node: ts.Node;
  2198. *
  2199. * if (isTypeOnlyCompatibleAliasDeclaration(node)) {
  2200. * // ...
  2201. * }
  2202. * ```
  2203. *
  2204. * @returns Whether the given node appears to be a `TypeOnlyCompatibleAliasDeclaration`.
  2205. */
  2206. declare function isTypeOnlyCompatibleAliasDeclaration(node: ts.Node): node is ts.TypeOnlyCompatibleAliasDeclaration;
  2207. /**
  2208. * Test if a node is a `TypeReferenceType`.
  2209. *
  2210. * @category Nodes - Type Guards
  2211. * @example
  2212. * ```ts
  2213. * declare const node: ts.Node;
  2214. *
  2215. * if (isTypeReferenceType(node)) {
  2216. * // ...
  2217. * }
  2218. * ```
  2219. *
  2220. * @returns Whether the given node appears to be a `TypeReferenceType`.
  2221. */
  2222. declare function isTypeReferenceType(node: ts.Node): node is ts.TypeReferenceType;
  2223. /**
  2224. * Test if a node is an `UnionOrIntersectionTypeNode`.
  2225. *
  2226. * @category Nodes - Type Guards
  2227. * @example
  2228. * ```ts
  2229. * declare const node: ts.Node;
  2230. *
  2231. * if (isUnionOrIntersectionTypeNode(node)) {
  2232. * // ...
  2233. * }
  2234. * ```
  2235. *
  2236. * @returns Whether the given node appears to be an `UnionOrIntersectionTypeNode`.
  2237. */
  2238. declare function isUnionOrIntersectionTypeNode(node: ts.Node): node is ts.UnionOrIntersectionTypeNode;
  2239. /**
  2240. * Test if a node is an `UnparsedSourceText`.
  2241. *
  2242. * @deprecated With TypeScript v5
  2243. * @category Nodes - Type Guards
  2244. * @example
  2245. * ```ts
  2246. * declare const node: ts.Node;
  2247. *
  2248. * if (isUnparsedSourceText(node)) {
  2249. * // ...
  2250. * }
  2251. * ```
  2252. *
  2253. * @returns Whether the given node appears to be an `UnparsedSourceText`.
  2254. */
  2255. declare function isUnparsedSourceText(node: ts.Node): node is ts.UnparsedSourceText;
  2256. /**
  2257. * Test if a node is a `VariableLikeDeclaration`.
  2258. *
  2259. * @category Nodes - Type Guards
  2260. * @example
  2261. * ```ts
  2262. * declare const node: ts.Node;
  2263. *
  2264. * if (isVariableLikeDeclaration(node)) {
  2265. * // ...
  2266. * }
  2267. * ```
  2268. *
  2269. * @returns Whether the given node appears to be a `VariableLikeDeclaration`.
  2270. */
  2271. declare function isVariableLikeDeclaration(node: ts.Node): node is ts.VariableLikeDeclaration;
  2272. /**
  2273. * Is the node a scope boundary, specifically due to it being a function.
  2274. *
  2275. * @category Scope Utilities
  2276. * @example
  2277. * ```ts
  2278. * declare const node: ts.Node;
  2279. *
  2280. * if (isFunctionScopeBoundary(node, ts.ObjectFlags.Anonymous)) {
  2281. * // ...
  2282. * }
  2283. * ```
  2284. */
  2285. declare function isFunctionScopeBoundary(node: ts.Node): boolean;
  2286. /**
  2287. * Test of the kind given is for assignment.
  2288. *
  2289. * @category Syntax Utilities
  2290. * @example
  2291. * ```ts
  2292. * declare const kind: ts.SyntaxKind;
  2293. *
  2294. * isAssignmentKind(kind);
  2295. * ```
  2296. */
  2297. declare function isAssignmentKind(kind: ts.SyntaxKind): boolean;
  2298. /**
  2299. * Test if a string is numeric.
  2300. *
  2301. * @category Syntax Utilities
  2302. * @example
  2303. * ```ts
  2304. * isNumericPropertyName("abc"); // false
  2305. * isNumericPropertyName("123"); // true
  2306. * ```
  2307. */
  2308. declare function isNumericPropertyName(name: string | ts.__String): boolean;
  2309. /**
  2310. * Determines whether the given text can be used to access a property with a `PropertyAccessExpression` while preserving the property's name.
  2311. *
  2312. * @category Syntax Utilities
  2313. * @example
  2314. * ```ts
  2315. * isValidPropertyAccess("abc"); // true
  2316. * isValidPropertyAccess("123"); // false
  2317. * ```
  2318. */
  2319. declare function isValidPropertyAccess(text: string, languageVersion?: ts.ScriptTarget): boolean;
  2320. /**
  2321. * Callback type used for {@link forEachToken}.
  2322. *
  2323. * @category Callbacks
  2324. */
  2325. type ForEachTokenCallback = (token: ts.Node) => void;
  2326. /**
  2327. * Iterates over all tokens of `node`
  2328. *
  2329. * @category Nodes - Other Utilities
  2330. * @example
  2331. * ```ts
  2332. * declare const node: ts.Node;
  2333. *
  2334. * forEachToken(node, (token) => {
  2335. * console.log("Found token:", token.getText());
  2336. * });
  2337. * ```
  2338. *
  2339. * @param node - The node whose tokens should be visited
  2340. * @param callback - Is called for every token contained in `node`
  2341. */
  2342. declare function forEachToken(node: ts.Node, callback: ForEachTokenCallback, sourceFile?: ts.SourceFile): void;
  2343. /**
  2344. * Get the `CallSignatures` of the given type.
  2345. *
  2346. * @category Types - Getters
  2347. * @example
  2348. * ```ts
  2349. * declare const type: ts.Type;
  2350. *
  2351. * getCallSignaturesOfType(type);
  2352. * ```
  2353. */
  2354. declare function getCallSignaturesOfType(type: ts.Type): readonly ts.Signature[];
  2355. /**
  2356. * Get the property with the given name on the given type (if it exists).
  2357. *
  2358. * @category Types - Getters
  2359. * @example
  2360. * ```ts
  2361. * declare const property: ts.Symbol;
  2362. * declare const type: ts.Type;
  2363. *
  2364. * getPropertyOfType(type, property.getEscapedName());
  2365. * ```
  2366. */
  2367. declare function getPropertyOfType(type: ts.Type, name: ts.__String): ts.Symbol | undefined;
  2368. /**
  2369. * Retrieves a type symbol corresponding to a well-known string name.
  2370. *
  2371. * @category Types - Getters
  2372. * @example
  2373. * ```ts
  2374. * declare const type: ts.Type;
  2375. * declare const typeChecker: ts.TypeChecker;
  2376. *
  2377. * getWellKnownSymbolPropertyOfType(type, "asyncIterator", typeChecker);
  2378. * ```
  2379. */
  2380. declare function getWellKnownSymbolPropertyOfType(type: ts.Type, wellKnownSymbolName: string, typeChecker: ts.TypeChecker): ts.Symbol | undefined;
  2381. /**
  2382. * A "any" intrinsic type.
  2383. *
  2384. * @category Type Types
  2385. */
  2386. interface IntrinsicAnyType extends IntrinsicType {
  2387. intrinsicName: "any";
  2388. }
  2389. /**
  2390. * Determines whether the given type is the "any" intrinsic type.
  2391. *
  2392. * @category Types - Type Guards
  2393. * @example
  2394. * ```ts
  2395. * declare const type: ts.Type;
  2396. *
  2397. * if (isIntrinsicAnyType(type)) {
  2398. * // ...
  2399. * }
  2400. * ```
  2401. */
  2402. declare function isIntrinsicAnyType(type: ts.Type): type is IntrinsicAnyType;
  2403. /**
  2404. * A "boolean" intrinsic type.
  2405. *
  2406. * @category Type Types
  2407. */
  2408. interface IntrinsicBooleanType extends IntrinsicType {
  2409. intrinsicName: "boolean";
  2410. }
  2411. /**
  2412. * Determines whether the given type is the "boolean" intrinsic type.
  2413. *
  2414. * @category Types - Type Guards
  2415. * @example
  2416. * ```ts
  2417. * declare const type: ts.Type;
  2418. *
  2419. * if (isIntrinsicBooleanType(type)) {
  2420. * // ...
  2421. * }
  2422. * ```
  2423. */
  2424. declare function isIntrinsicBooleanType(type: ts.Type): type is IntrinsicBooleanType;
  2425. /**
  2426. * A "bigint" intrinsic type.
  2427. *
  2428. * @category Type Types
  2429. */
  2430. interface IntrinsicBigIntType extends IntrinsicType {
  2431. intrinsicName: "bigint";
  2432. }
  2433. /**
  2434. * Determines whether the given type is the "bigint" intrinsic type.
  2435. *
  2436. * @category Types - Type Guards
  2437. * @example
  2438. * ```ts
  2439. * declare const type: ts.Type;
  2440. *
  2441. * if (isIntrinsicBigIntType(type)) {
  2442. * // ...
  2443. * }
  2444. * ```
  2445. */
  2446. declare function isIntrinsicBigIntType(type: ts.Type): type is IntrinsicBigIntType;
  2447. /**
  2448. * An "error" intrinsic type.
  2449. *
  2450. * This refers to a type generated when TypeScript encounters an error while
  2451. * trying to resolve the type.
  2452. *
  2453. * @category Type Types
  2454. */
  2455. interface IntrinsicErrorType extends IntrinsicType {
  2456. intrinsicName: "error";
  2457. }
  2458. /**
  2459. * Determines whether the given type is the "error" intrinsic type.
  2460. *
  2461. * The intrinsic error type occurs when TypeScript encounters an error while
  2462. * trying to resolve the type.
  2463. *
  2464. * @category Types - Type Guards
  2465. * @example
  2466. * ```ts
  2467. * declare const type: ts.Type;
  2468. *
  2469. * if (isIntrinsicErrorType(type)) {
  2470. * // ...
  2471. * }
  2472. * ```
  2473. */
  2474. declare function isIntrinsicErrorType(type: ts.Type): type is IntrinsicErrorType;
  2475. /**
  2476. * A "symbol" intrinsic type.
  2477. *
  2478. * @category Type Types
  2479. */
  2480. interface IntrinsicESSymbolType extends IntrinsicType {
  2481. intrinsicName: "symbol";
  2482. }
  2483. /**
  2484. * Determines whether the given type is the "symbol" intrinsic type.
  2485. *
  2486. * @category Types - Type Guards
  2487. * @example
  2488. * ```ts
  2489. * declare const type: ts.Type;
  2490. *
  2491. * if (isIntrinsicESSymbolType(type)) {
  2492. * // ...
  2493. * }
  2494. * ```
  2495. */
  2496. declare function isIntrinsicESSymbolType(type: ts.Type): type is IntrinsicESSymbolType;
  2497. /**
  2498. * An intrinsic type.
  2499. *
  2500. * @category Type Types
  2501. */
  2502. interface IntrinsicType extends ts.Type {
  2503. intrinsicName: string;
  2504. objectFlags: ts.ObjectFlags;
  2505. }
  2506. /**
  2507. * Test if a type is an {@link IntrinsicType}.
  2508. *
  2509. * @category Types - Type Guards
  2510. * @example
  2511. * ```ts
  2512. * declare const type: ts.Type;
  2513. *
  2514. * if (isIntrinsicType(type)) {
  2515. * // ...
  2516. * }
  2517. * ```
  2518. */
  2519. declare function isIntrinsicType(type: ts.Type): type is IntrinsicType;
  2520. /**
  2521. * A "never" intrinsic type.
  2522. *
  2523. * @category Type Types
  2524. */
  2525. interface IntrinsicNeverType extends IntrinsicType {
  2526. intrinsicName: "never";
  2527. }
  2528. /**
  2529. * Determines whether the given type is the "never" intrinsic type.
  2530. *
  2531. * @category Types - Type Guards
  2532. * @example
  2533. * ```ts
  2534. * declare const type: ts.Type;
  2535. *
  2536. * if (isIntrinsicNeverType(type)) {
  2537. * // ...
  2538. * }
  2539. * ```
  2540. */
  2541. declare function isIntrinsicNeverType(type: ts.Type): type is IntrinsicNeverType;
  2542. /**
  2543. * A non-primitive intrinsic type.
  2544. * E.g. An "object" intrinsic type.
  2545. *
  2546. * @category Type Types
  2547. */
  2548. interface IntrinsicNonPrimitiveType extends IntrinsicType {
  2549. intrinsicName: "";
  2550. }
  2551. /**
  2552. * Determines whether the given type is a non-primitive intrinsic type.
  2553. * E.g. An "object" intrinsic type.
  2554. *
  2555. * @category Types - Type Guards
  2556. * @example
  2557. * ```ts
  2558. * declare const type: ts.Type;
  2559. *
  2560. * if (isIntrinsicNonPrimitiveType(type)) {
  2561. * // ...
  2562. * }
  2563. * ```
  2564. */
  2565. declare function isIntrinsicNonPrimitiveType(type: ts.Type): type is IntrinsicNonPrimitiveType;
  2566. /**
  2567. * A "null" intrinsic type.
  2568. *
  2569. * @category Type Types
  2570. */
  2571. interface IntrinsicNullType extends IntrinsicType {
  2572. intrinsicName: "null";
  2573. }
  2574. /**
  2575. * Determines whether the given type is the "null" intrinsic type.
  2576. *
  2577. * @category Types - Type Guards
  2578. * @example
  2579. * ```ts
  2580. * declare const type: ts.Type;
  2581. *
  2582. * if (isIntrinsicNullType(type)) {
  2583. * // ...
  2584. * }
  2585. * ```
  2586. */
  2587. declare function isIntrinsicNullType(type: ts.Type): type is IntrinsicNullType;
  2588. /**
  2589. * A "number" intrinsic type.
  2590. *
  2591. * @category Type Types
  2592. */
  2593. interface IntrinsicNumberType extends IntrinsicType {
  2594. intrinsicName: "number";
  2595. }
  2596. /**
  2597. * Determines whether the given type is the "number" intrinsic type.
  2598. *
  2599. * @category Types - Type Guards
  2600. * @example
  2601. * ```ts
  2602. * declare const type: ts.Type;
  2603. *
  2604. * if (isIntrinsicNumberType(type)) {
  2605. * // ...
  2606. * }
  2607. * ```
  2608. */
  2609. declare function isIntrinsicNumberType(type: ts.Type): type is IntrinsicNumberType;
  2610. /**
  2611. * A "string" intrinsic type.
  2612. *
  2613. * @category Type Types
  2614. */
  2615. interface IntrinsicStringType extends IntrinsicType {
  2616. intrinsicName: "string";
  2617. }
  2618. /**
  2619. * Determines whether the given type is the "string" intrinsic type.
  2620. *
  2621. * @category Types - Type Guards
  2622. * @example
  2623. * ```ts
  2624. * declare const type: ts.Type;
  2625. *
  2626. * if (isIntrinsicStringType(type)) {
  2627. * // ...
  2628. * }
  2629. * ```
  2630. */
  2631. declare function isIntrinsicStringType(type: ts.Type): type is IntrinsicStringType;
  2632. /**
  2633. * An "undefined" intrinsic type.
  2634. *
  2635. * @category Type Types
  2636. */
  2637. interface IntrinsicUndefinedType extends IntrinsicType {
  2638. intrinsicName: "undefined";
  2639. }
  2640. /**
  2641. * Determines whether the given type is the "undefined" intrinsic type.
  2642. *
  2643. * @category Types - Type Guards
  2644. * @example
  2645. * ```ts
  2646. * declare const type: ts.Type;
  2647. *
  2648. * if (isIntrinsicUndefinedType(type)) {
  2649. * // ...
  2650. * }
  2651. * ```
  2652. */
  2653. declare function isIntrinsicUndefinedType(type: ts.Type): type is IntrinsicUndefinedType;
  2654. /**
  2655. * An "unknown" intrinsic type.
  2656. *
  2657. * @category Type Types
  2658. */
  2659. interface IntrinsicUnknownType extends IntrinsicType {
  2660. intrinsicName: "unknown";
  2661. }
  2662. /**
  2663. * Determines whether the given type is the "unknown" intrinsic type.
  2664. *
  2665. * @category Types - Type Guards
  2666. * @example
  2667. * ```ts
  2668. * declare const type: ts.Type;
  2669. *
  2670. * if (isIntrinsicUnknownType(type)) {
  2671. * // ...
  2672. * }
  2673. * ```
  2674. */
  2675. declare function isIntrinsicUnknownType(type: ts.Type): type is IntrinsicUnknownType;
  2676. /**
  2677. * A "void" intrinsic type.
  2678. *
  2679. * @category Type Types
  2680. */
  2681. interface IntrinsicVoidType extends IntrinsicType {
  2682. intrinsicName: "void";
  2683. }
  2684. /**
  2685. * Determines whether the given type is the "void" intrinsic type.
  2686. *
  2687. * @category Types - Type Guards
  2688. * @example
  2689. * ```ts
  2690. * declare const type: ts.Type;
  2691. *
  2692. * if (isIntrinsicVoidType(type)) {
  2693. * // ...
  2694. * }
  2695. * ```
  2696. */
  2697. declare function isIntrinsicVoidType(type: ts.Type): type is IntrinsicVoidType;
  2698. /**
  2699. * A type that is both an {@link IntrinsicType} and a `FreshableType`
  2700. *
  2701. * @category Type Types
  2702. */
  2703. interface FreshableIntrinsicType extends ts.FreshableType, IntrinsicType {
  2704. }
  2705. /**
  2706. * Test if a type is a `FreshableIntrinsicType`.
  2707. *
  2708. * @category Types - Type Guards
  2709. * @example
  2710. * ```ts
  2711. * declare const type: ts.Type;
  2712. *
  2713. * if (isFreshableIntrinsicType(type)) {
  2714. * // ...
  2715. * }
  2716. */
  2717. declare function isFreshableIntrinsicType(type: ts.Type): type is FreshableIntrinsicType;
  2718. /**
  2719. * Test if a type is a `TupleTypeReference`.
  2720. *
  2721. * @category Types - Type Guards
  2722. * @example
  2723. * ```ts
  2724. * declare const type: ts.Type;
  2725. *
  2726. * if (isTupleTypeReference(type)) {
  2727. * // ...
  2728. * }
  2729. */
  2730. declare function isTupleTypeReference(type: ts.Type): type is ts.TupleTypeReference;
  2731. /**
  2732. * A boolean literal.
  2733. * i.e. Either a "true" or "false" literal.
  2734. *
  2735. * @category Type Types
  2736. */
  2737. interface BooleanLiteralType extends UnknownLiteralType {
  2738. intrinsicName: "true" | "false";
  2739. value: boolean;
  2740. }
  2741. /**
  2742. * Determines whether the given type is a boolean literal type.
  2743. *
  2744. * @category Types - Type Guards
  2745. * @example
  2746. * ```ts
  2747. * declare const type: ts.Type;
  2748. *
  2749. * if (isBooleanLiteralType(type)) {
  2750. * // ...
  2751. * }
  2752. * ```
  2753. */
  2754. declare function isBooleanLiteralType(type: ts.Type): type is BooleanLiteralType;
  2755. /**
  2756. * Test if a type is a `BigIntLiteralType`.
  2757. *
  2758. * @category Types - Type Guards
  2759. * @example
  2760. * ```ts
  2761. * declare const type: ts.Type;
  2762. *
  2763. * if (isBigIntLiteralType(type)) {
  2764. * // ...
  2765. * }
  2766. * ```
  2767. */
  2768. declare function isBigIntLiteralType(type: ts.Type): type is ts.BigIntLiteralType;
  2769. /**
  2770. * A "false" literal.
  2771. *
  2772. * @category Type Types
  2773. */
  2774. interface FalseLiteralType extends BooleanLiteralType {
  2775. intrinsicName: "false";
  2776. value: false;
  2777. }
  2778. /**
  2779. * Determines whether the given type is a boolean literal type for "false".
  2780. *
  2781. * @category Types - Type Guards
  2782. * @example
  2783. * ```ts
  2784. * declare const type: ts.Type;
  2785. *
  2786. * if (isFalseLiteralType(type)) {
  2787. * // ...
  2788. * }
  2789. * ```
  2790. */
  2791. declare function isFalseLiteralType(type: ts.Type): type is FalseLiteralType;
  2792. /**
  2793. * Test if a type is a `LiteralType`.
  2794. *
  2795. * @category Types - Type Guards
  2796. * @example
  2797. * ```ts
  2798. * declare const type: ts.Type;
  2799. *
  2800. * if (isLiteralType(type)) {
  2801. * // ...
  2802. * }
  2803. * ```
  2804. */
  2805. declare function isLiteralType(type: ts.Type): type is ts.LiteralType;
  2806. /**
  2807. * Test if a type is a `NumberLiteralType`.
  2808. *
  2809. * @category Types - Type Guards
  2810. * @example
  2811. * ```ts
  2812. * declare const type: ts.Type;
  2813. *
  2814. * if (isNumberLiteralType(type)) {
  2815. * // ...
  2816. * }
  2817. * ```
  2818. */
  2819. declare function isNumberLiteralType(type: ts.Type): type is ts.NumberLiteralType;
  2820. /**
  2821. * Test if a type is a `StringLiteralType`.
  2822. *
  2823. * @category Types - Type Guards
  2824. * @example
  2825. * ```ts
  2826. * declare const type: ts.Type;
  2827. *
  2828. * if (isStringLiteralType(type)) {
  2829. * // ...
  2830. * }
  2831. * ```
  2832. */
  2833. declare function isStringLiteralType(type: ts.Type): type is ts.StringLiteralType;
  2834. /**
  2835. * Test if a type is a `TemplateLiteralType`.
  2836. *
  2837. * @category Types - Type Guards
  2838. * @example
  2839. * ```ts
  2840. * declare const type: ts.Type;
  2841. *
  2842. * if (isTemplateLiteralType(type)) {
  2843. * // ...
  2844. * }
  2845. * ```
  2846. */
  2847. declare function isTemplateLiteralType(type: ts.Type): type is ts.TemplateLiteralType;
  2848. /**
  2849. * A "true" literal.
  2850. *
  2851. * @category Type Types
  2852. */
  2853. interface TrueLiteralType extends BooleanLiteralType {
  2854. intrinsicName: "true";
  2855. value: true;
  2856. }
  2857. /**
  2858. * Determines whether the given type is a boolean literal type for "true".
  2859. *
  2860. * @category Types - Type Guards
  2861. * @example
  2862. * ```ts
  2863. * declare const type: ts.Type;
  2864. *
  2865. * if (isTrueLiteralType(type)) {
  2866. * // ...
  2867. * }
  2868. * ```
  2869. */
  2870. declare function isTrueLiteralType(type: ts.Type): type is TrueLiteralType;
  2871. /**
  2872. * `LiteralType` from typescript except that it allows for it to work on arbitrary types.
  2873. *
  2874. * @category Type Types
  2875. */
  2876. interface UnknownLiteralType extends FreshableIntrinsicType {
  2877. value: unknown;
  2878. }
  2879. /**
  2880. * Test if a type is a {@link UnknownLiteralType}.
  2881. *
  2882. * @category Types - Type Guards
  2883. * @example
  2884. * ```ts
  2885. * declare const type: ts.Type;
  2886. *
  2887. * if (isUnknownLiteralType(type)) {
  2888. * // ...
  2889. * }
  2890. * ```
  2891. */
  2892. declare function isUnknownLiteralType(type: ts.Type): type is UnknownLiteralType;
  2893. /**
  2894. * Test if a type is a `EvolvingArrayType`.
  2895. *
  2896. * @category Types - Type Guards
  2897. * @example
  2898. * ```ts
  2899. * declare const type: ts.Type;
  2900. *
  2901. * if (isEvolvingArrayType(type)) {
  2902. * // ...
  2903. * }
  2904. * ```
  2905. */
  2906. declare function isEvolvingArrayType(type: ts.Type): type is ts.EvolvingArrayType;
  2907. /**
  2908. * Test if a type is a `TupleType`.
  2909. *
  2910. * @category Types - Type Guards
  2911. * @example
  2912. * ```ts
  2913. * declare const type: ts.Type;
  2914. *
  2915. * if (isTupleType(type)) {
  2916. * // ...
  2917. * }
  2918. * ```
  2919. */
  2920. declare function isTupleType(type: ts.Type): type is ts.TupleType;
  2921. /**
  2922. * Test if a type is a `TypeReference`.
  2923. *
  2924. * @category Types - Type Guards
  2925. * @example
  2926. * ```ts
  2927. * declare const type: ts.Type;
  2928. *
  2929. * if (isTypeReference(type)) {
  2930. * // ...
  2931. * }
  2932. * ```
  2933. */
  2934. declare function isTypeReference(type: ts.Type): type is ts.TypeReference;
  2935. /**
  2936. * Test if a type is a `ConditionalType`.
  2937. *
  2938. * @category Types - Type Guards
  2939. * @example
  2940. * ```ts
  2941. * declare const type: ts.Type;
  2942. *
  2943. * if (isConditionalType(type)) {
  2944. * // ...
  2945. * }
  2946. * ```
  2947. */
  2948. declare function isConditionalType(type: ts.Type): type is ts.ConditionalType;
  2949. /**
  2950. * Test if a type is a `EnumType`.
  2951. *
  2952. * @category Types - Type Guards
  2953. * @example
  2954. * ```ts
  2955. * declare const type: ts.Type;
  2956. *
  2957. * if (isEnumType(type)) {
  2958. * // ...
  2959. * }
  2960. * ```
  2961. */
  2962. declare function isEnumType(type: ts.Type): type is ts.EnumType;
  2963. /**
  2964. * Test if a type is a `FreshableType`.
  2965. *
  2966. * @category Types - Type Guards
  2967. * @example
  2968. * ```ts
  2969. * declare const type: ts.Type;
  2970. *
  2971. * if (isFreshableType(type)) {
  2972. * // ...
  2973. * }
  2974. * ```
  2975. */
  2976. declare function isFreshableType(type: ts.Type): type is ts.FreshableType;
  2977. /**
  2978. * Test if a type is a `IndexType`.
  2979. *
  2980. * @category Types - Type Guards
  2981. * @example
  2982. * ```ts
  2983. * declare const type: ts.Type;
  2984. *
  2985. * if (isIndexType(type)) {
  2986. * // ...
  2987. * }
  2988. * ```
  2989. */
  2990. declare function isIndexType(type: ts.Type): type is ts.IndexType;
  2991. /**
  2992. * Test if a type is a `IndexedAccessType`.
  2993. *
  2994. * @category Types - Type Guards
  2995. * @example
  2996. * ```ts
  2997. * declare const type: ts.Type;
  2998. *
  2999. * if (isIndexedAccessType(type)) {
  3000. * // ...
  3001. * }
  3002. * ```
  3003. */
  3004. declare function isIndexedAccessType(type: ts.Type): type is ts.IndexedAccessType;
  3005. /**
  3006. * Test if a type is a `InstantiableType`.
  3007. *
  3008. * @category Types - Type Guards
  3009. * @example
  3010. * ```ts
  3011. * declare const type: ts.Type;
  3012. *
  3013. * if (isInstantiableType(type)) {
  3014. * // ...
  3015. * }
  3016. * ```
  3017. */
  3018. declare function isInstantiableType(type: ts.Type): type is ts.InstantiableType;
  3019. /**
  3020. * Test if a type is a `IntersectionType`.
  3021. *
  3022. * @category Types - Type Guards
  3023. * @example
  3024. * ```ts
  3025. * declare const type: ts.Type;
  3026. *
  3027. * if (isIntersectionType(type)) {
  3028. * // ...
  3029. * }
  3030. * ```
  3031. */
  3032. declare function isIntersectionType(type: ts.Type): type is ts.IntersectionType;
  3033. /**
  3034. * Test if a type is a `ObjectType`.
  3035. *
  3036. * @category Types - Type Guards
  3037. * @example
  3038. * ```ts
  3039. * declare const type: ts.Type;
  3040. *
  3041. * if (isObjectType(type)) {
  3042. * // ...
  3043. * }
  3044. * ```
  3045. */
  3046. declare function isObjectType(type: ts.Type): type is ts.ObjectType;
  3047. /**
  3048. * Test if a type is a `StringMappingType`.
  3049. *
  3050. * @category Types - Type Guards
  3051. * @example
  3052. * ```ts
  3053. * declare const type: ts.Type;
  3054. *
  3055. * if (isStringMappingType(type)) {
  3056. * // ...
  3057. * }
  3058. * ```
  3059. */
  3060. declare function isStringMappingType(type: ts.Type): type is ts.StringMappingType;
  3061. /**
  3062. * Test if a type is a `SubstitutionType`.
  3063. *
  3064. * @category Types - Type Guards
  3065. * @example
  3066. * ```ts
  3067. * declare const type: ts.Type;
  3068. *
  3069. * if (isSubstitutionType(type)) {
  3070. * // ...
  3071. * }
  3072. * ```
  3073. */
  3074. declare function isSubstitutionType(type: ts.Type): type is ts.SubstitutionType;
  3075. /**
  3076. * Test if a type is a `TypeParameter`.
  3077. *
  3078. * @category Types - Type Guards
  3079. * @example
  3080. * ```ts
  3081. * declare const type: ts.Type;
  3082. *
  3083. * if (isTypeParameter(type)) {
  3084. * // ...
  3085. * }
  3086. * ```
  3087. */
  3088. declare function isTypeParameter(type: ts.Type): type is ts.TypeParameter;
  3089. /**
  3090. * Test if a type is a `TypeVariable`.
  3091. *
  3092. * @category Types - Type Guards
  3093. * @example
  3094. * ```ts
  3095. * declare const type: ts.Type;
  3096. *
  3097. * if (isTypeVariable(type)) {
  3098. * // ...
  3099. * }
  3100. * ```
  3101. */
  3102. declare function isTypeVariable(type: ts.Type): type is ts.TypeVariable;
  3103. /**
  3104. * Test if a type is a `UnionType`.
  3105. *
  3106. * @category Types - Type Guards
  3107. * @example
  3108. * ```ts
  3109. * declare const type: ts.Type;
  3110. *
  3111. * if (isUnionType(type)) {
  3112. * // ...
  3113. * }
  3114. * ```
  3115. */
  3116. declare function isUnionType(type: ts.Type): type is ts.UnionType;
  3117. /**
  3118. * Test if a type is a `UnionOrIntersectionType`.
  3119. *
  3120. * @category Types - Type Guards
  3121. * @example
  3122. * ```ts
  3123. * declare const type: ts.Type;
  3124. *
  3125. * if (isUnionOrIntersectionType(type)) {
  3126. * // ...
  3127. * }
  3128. * ```
  3129. */
  3130. declare function isUnionOrIntersectionType(type: ts.Type): type is ts.UnionOrIntersectionType;
  3131. /**
  3132. * Test if a type is a `UniqueESSymbolType`.
  3133. *
  3134. * @category Types - Type Guards
  3135. * @example
  3136. * ```ts
  3137. * declare const type: ts.Type;
  3138. *
  3139. * if (isUniqueESSymbolType(type)) {
  3140. * // ...
  3141. * }
  3142. * ```
  3143. */
  3144. declare function isUniqueESSymbolType(type: ts.Type): type is ts.UniqueESSymbolType;
  3145. /**
  3146. * Determines whether a type is definitely falsy. This function doesn't unwrap union types.
  3147. *
  3148. * @category Types - Utilities
  3149. * @example
  3150. * ```ts
  3151. * declare const type: ts.Type;
  3152. *
  3153. * if (isFalsyType(type)) {
  3154. * // ...
  3155. * }
  3156. * ```
  3157. */
  3158. declare function isFalsyType(type: ts.Type): boolean;
  3159. /**
  3160. * Get the union type parts of the given type.
  3161. *
  3162. * If the given type is not a union type, an array contain only that type will be returned.
  3163. *
  3164. * @category Types - Utilities
  3165. * @example
  3166. * ```ts
  3167. * declare const type: ts.Type;
  3168. *
  3169. * for (const typePart of intersectionTypeParts(type)) {
  3170. * // ...
  3171. * }
  3172. * ```
  3173. */
  3174. declare function intersectionTypeParts(type: ts.Type): ts.Type[];
  3175. /**
  3176. * Determines whether writing to a certain property of a given type is allowed.
  3177. *
  3178. * @category Types - Utilities
  3179. * @example
  3180. * ```ts
  3181. * declare const property: ts.Symbol;
  3182. * declare const type: ts.Type;
  3183. * declare const typeChecker: ts.TypeChecker;
  3184. *
  3185. * if (isPropertyReadonlyInType(type, property.getEscapedName(), typeChecker)) {
  3186. * // ...
  3187. * }
  3188. * ```
  3189. */
  3190. declare function isPropertyReadonlyInType(type: ts.Type, name: ts.__String, typeChecker: ts.TypeChecker): boolean;
  3191. /**
  3192. * Determines whether a type is thenable and thus can be used with `await`.
  3193. *
  3194. * @category Types - Utilities
  3195. * @example
  3196. * ```ts
  3197. * declare const node: ts.Node;
  3198. * declare const type: ts.Type;
  3199. * declare const typeChecker: ts.TypeChecker;
  3200. *
  3201. * if (isThenableType(typeChecker, node, type)) {
  3202. * // ...
  3203. * }
  3204. * ```
  3205. */
  3206. declare function isThenableType(typeChecker: ts.TypeChecker, node: ts.Node, type: ts.Type): boolean;
  3207. /**
  3208. * Determines whether a type is thenable and thus can be used with `await`.
  3209. *
  3210. * @category Types - Utilities
  3211. * @example
  3212. * ```ts
  3213. * declare const expression: ts.Expression;
  3214. * declare const typeChecker: ts.TypeChecker;
  3215. *
  3216. * if (isThenableType(typeChecker, expression)) {
  3217. * // ...
  3218. * }
  3219. * ```
  3220. *
  3221. * @example
  3222. * ```ts
  3223. * declare const expression: ts.Expression;
  3224. * declare const typeChecker: ts.TypeChecker;
  3225. * declare const type: ts.Type;
  3226. *
  3227. * if (isThenableType(typeChecker, expression, type)) {
  3228. * // ...
  3229. * }
  3230. * ```
  3231. */
  3232. declare function isThenableType(typeChecker: ts.TypeChecker, node: ts.Expression, type?: ts.Type): boolean;
  3233. /**
  3234. * Test if the given symbol has a readonly declaration.
  3235. *
  3236. * @category Symbols - Utilities
  3237. * @example
  3238. * ```ts
  3239. * declare const symbol: ts.Symbol;
  3240. * declare const typeChecker: ts.TypeChecker;
  3241. *
  3242. * if (symbolHasReadonlyDeclaration(symbol, typeChecker)) {
  3243. * // ...
  3244. * }
  3245. * ```
  3246. */
  3247. declare function symbolHasReadonlyDeclaration(symbol: ts.Symbol, typeChecker: ts.TypeChecker): boolean;
  3248. /**
  3249. * Get the union type parts of the given type.
  3250. *
  3251. * If the given type is not a union type, an array contain only that type will be returned.
  3252. *
  3253. * @category Types - Utilities
  3254. * @example
  3255. * ```ts
  3256. * declare const type: ts.Type;
  3257. *
  3258. * for (const typePart of unionTypeParts(type)) {
  3259. * // ...
  3260. * }
  3261. * ```
  3262. */
  3263. declare function unionTypeParts(type: ts.Type): ts.Type[];
  3264. 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 };