You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

builders.d.ts 106KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572
  1. import * as K from "./kinds";
  2. import { namedTypes } from "./namedTypes";
  3. export interface FileBuilder {
  4. (program: K.ProgramKind, name?: string | null): namedTypes.File;
  5. from(params: {
  6. comments?: K.CommentKind[] | null;
  7. loc?: K.SourceLocationKind | null;
  8. name?: string | null;
  9. program: K.ProgramKind;
  10. }): namedTypes.File;
  11. }
  12. export interface ProgramBuilder {
  13. (body: K.StatementKind[]): namedTypes.Program;
  14. from(params: {
  15. body: K.StatementKind[];
  16. comments?: K.CommentKind[] | null;
  17. directives?: K.DirectiveKind[];
  18. interpreter?: K.InterpreterDirectiveKind | null;
  19. loc?: K.SourceLocationKind | null;
  20. }): namedTypes.Program;
  21. }
  22. export interface IdentifierBuilder {
  23. (name: string): namedTypes.Identifier;
  24. from(params: {
  25. comments?: K.CommentKind[] | null;
  26. loc?: K.SourceLocationKind | null;
  27. name: string;
  28. optional?: boolean;
  29. typeAnnotation?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null;
  30. }): namedTypes.Identifier;
  31. }
  32. export interface BlockStatementBuilder {
  33. (body: K.StatementKind[]): namedTypes.BlockStatement;
  34. from(params: {
  35. body: K.StatementKind[];
  36. comments?: K.CommentKind[] | null;
  37. directives?: K.DirectiveKind[];
  38. loc?: K.SourceLocationKind | null;
  39. }): namedTypes.BlockStatement;
  40. }
  41. export interface EmptyStatementBuilder {
  42. (): namedTypes.EmptyStatement;
  43. from(params: {
  44. comments?: K.CommentKind[] | null;
  45. loc?: K.SourceLocationKind | null;
  46. }): namedTypes.EmptyStatement;
  47. }
  48. export interface ExpressionStatementBuilder {
  49. (expression: K.ExpressionKind): namedTypes.ExpressionStatement;
  50. from(params: {
  51. comments?: K.CommentKind[] | null;
  52. expression: K.ExpressionKind;
  53. loc?: K.SourceLocationKind | null;
  54. }): namedTypes.ExpressionStatement;
  55. }
  56. export interface IfStatementBuilder {
  57. (test: K.ExpressionKind, consequent: K.StatementKind, alternate?: K.StatementKind | null): namedTypes.IfStatement;
  58. from(params: {
  59. alternate?: K.StatementKind | null;
  60. comments?: K.CommentKind[] | null;
  61. consequent: K.StatementKind;
  62. loc?: K.SourceLocationKind | null;
  63. test: K.ExpressionKind;
  64. }): namedTypes.IfStatement;
  65. }
  66. export interface LabeledStatementBuilder {
  67. (label: K.IdentifierKind, body: K.StatementKind): namedTypes.LabeledStatement;
  68. from(params: {
  69. body: K.StatementKind;
  70. comments?: K.CommentKind[] | null;
  71. label: K.IdentifierKind;
  72. loc?: K.SourceLocationKind | null;
  73. }): namedTypes.LabeledStatement;
  74. }
  75. export interface BreakStatementBuilder {
  76. (label?: K.IdentifierKind | null): namedTypes.BreakStatement;
  77. from(params: {
  78. comments?: K.CommentKind[] | null;
  79. label?: K.IdentifierKind | null;
  80. loc?: K.SourceLocationKind | null;
  81. }): namedTypes.BreakStatement;
  82. }
  83. export interface ContinueStatementBuilder {
  84. (label?: K.IdentifierKind | null): namedTypes.ContinueStatement;
  85. from(params: {
  86. comments?: K.CommentKind[] | null;
  87. label?: K.IdentifierKind | null;
  88. loc?: K.SourceLocationKind | null;
  89. }): namedTypes.ContinueStatement;
  90. }
  91. export interface WithStatementBuilder {
  92. (object: K.ExpressionKind, body: K.StatementKind): namedTypes.WithStatement;
  93. from(params: {
  94. body: K.StatementKind;
  95. comments?: K.CommentKind[] | null;
  96. loc?: K.SourceLocationKind | null;
  97. object: K.ExpressionKind;
  98. }): namedTypes.WithStatement;
  99. }
  100. export interface SwitchStatementBuilder {
  101. (discriminant: K.ExpressionKind, cases: K.SwitchCaseKind[], lexical?: boolean): namedTypes.SwitchStatement;
  102. from(params: {
  103. cases: K.SwitchCaseKind[];
  104. comments?: K.CommentKind[] | null;
  105. discriminant: K.ExpressionKind;
  106. lexical?: boolean;
  107. loc?: K.SourceLocationKind | null;
  108. }): namedTypes.SwitchStatement;
  109. }
  110. export interface SwitchCaseBuilder {
  111. (test: K.ExpressionKind | null, consequent: K.StatementKind[]): namedTypes.SwitchCase;
  112. from(params: {
  113. comments?: K.CommentKind[] | null;
  114. consequent: K.StatementKind[];
  115. loc?: K.SourceLocationKind | null;
  116. test: K.ExpressionKind | null;
  117. }): namedTypes.SwitchCase;
  118. }
  119. export interface ReturnStatementBuilder {
  120. (argument: K.ExpressionKind | null): namedTypes.ReturnStatement;
  121. from(params: {
  122. argument: K.ExpressionKind | null;
  123. comments?: K.CommentKind[] | null;
  124. loc?: K.SourceLocationKind | null;
  125. }): namedTypes.ReturnStatement;
  126. }
  127. export interface ThrowStatementBuilder {
  128. (argument: K.ExpressionKind): namedTypes.ThrowStatement;
  129. from(params: {
  130. argument: K.ExpressionKind;
  131. comments?: K.CommentKind[] | null;
  132. loc?: K.SourceLocationKind | null;
  133. }): namedTypes.ThrowStatement;
  134. }
  135. export interface TryStatementBuilder {
  136. (block: K.BlockStatementKind, handler?: K.CatchClauseKind | null, finalizer?: K.BlockStatementKind | null): namedTypes.TryStatement;
  137. from(params: {
  138. block: K.BlockStatementKind;
  139. comments?: K.CommentKind[] | null;
  140. finalizer?: K.BlockStatementKind | null;
  141. guardedHandlers?: K.CatchClauseKind[];
  142. handler?: K.CatchClauseKind | null;
  143. handlers?: K.CatchClauseKind[];
  144. loc?: K.SourceLocationKind | null;
  145. }): namedTypes.TryStatement;
  146. }
  147. export interface CatchClauseBuilder {
  148. (param: K.PatternKind | null | undefined, guard: K.ExpressionKind | null | undefined, body: K.BlockStatementKind): namedTypes.CatchClause;
  149. from(params: {
  150. body: K.BlockStatementKind;
  151. comments?: K.CommentKind[] | null;
  152. guard?: K.ExpressionKind | null;
  153. loc?: K.SourceLocationKind | null;
  154. param?: K.PatternKind | null;
  155. }): namedTypes.CatchClause;
  156. }
  157. export interface WhileStatementBuilder {
  158. (test: K.ExpressionKind, body: K.StatementKind): namedTypes.WhileStatement;
  159. from(params: {
  160. body: K.StatementKind;
  161. comments?: K.CommentKind[] | null;
  162. loc?: K.SourceLocationKind | null;
  163. test: K.ExpressionKind;
  164. }): namedTypes.WhileStatement;
  165. }
  166. export interface DoWhileStatementBuilder {
  167. (body: K.StatementKind, test: K.ExpressionKind): namedTypes.DoWhileStatement;
  168. from(params: {
  169. body: K.StatementKind;
  170. comments?: K.CommentKind[] | null;
  171. loc?: K.SourceLocationKind | null;
  172. test: K.ExpressionKind;
  173. }): namedTypes.DoWhileStatement;
  174. }
  175. export interface ForStatementBuilder {
  176. (init: K.VariableDeclarationKind | K.ExpressionKind | null, test: K.ExpressionKind | null, update: K.ExpressionKind | null, body: K.StatementKind): namedTypes.ForStatement;
  177. from(params: {
  178. body: K.StatementKind;
  179. comments?: K.CommentKind[] | null;
  180. init: K.VariableDeclarationKind | K.ExpressionKind | null;
  181. loc?: K.SourceLocationKind | null;
  182. test: K.ExpressionKind | null;
  183. update: K.ExpressionKind | null;
  184. }): namedTypes.ForStatement;
  185. }
  186. export interface VariableDeclarationBuilder {
  187. (kind: "var" | "let" | "const", declarations: (K.VariableDeclaratorKind | K.IdentifierKind)[]): namedTypes.VariableDeclaration;
  188. from(params: {
  189. comments?: K.CommentKind[] | null;
  190. declarations: (K.VariableDeclaratorKind | K.IdentifierKind)[];
  191. kind: "var" | "let" | "const";
  192. loc?: K.SourceLocationKind | null;
  193. }): namedTypes.VariableDeclaration;
  194. }
  195. export interface ForInStatementBuilder {
  196. (left: K.VariableDeclarationKind | K.ExpressionKind, right: K.ExpressionKind, body: K.StatementKind): namedTypes.ForInStatement;
  197. from(params: {
  198. body: K.StatementKind;
  199. comments?: K.CommentKind[] | null;
  200. left: K.VariableDeclarationKind | K.ExpressionKind;
  201. loc?: K.SourceLocationKind | null;
  202. right: K.ExpressionKind;
  203. }): namedTypes.ForInStatement;
  204. }
  205. export interface DebuggerStatementBuilder {
  206. (): namedTypes.DebuggerStatement;
  207. from(params: {
  208. comments?: K.CommentKind[] | null;
  209. loc?: K.SourceLocationKind | null;
  210. }): namedTypes.DebuggerStatement;
  211. }
  212. export interface FunctionDeclarationBuilder {
  213. (id: K.IdentifierKind, params: K.PatternKind[], body: K.BlockStatementKind, generator?: boolean, expression?: boolean): namedTypes.FunctionDeclaration;
  214. from(params: {
  215. async?: boolean;
  216. body: K.BlockStatementKind;
  217. comments?: K.CommentKind[] | null;
  218. defaults?: (K.ExpressionKind | null)[];
  219. expression?: boolean;
  220. generator?: boolean;
  221. id: K.IdentifierKind;
  222. loc?: K.SourceLocationKind | null;
  223. params: K.PatternKind[];
  224. rest?: K.IdentifierKind | null;
  225. returnType?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null;
  226. typeParameters?: K.TypeParameterDeclarationKind | K.TSTypeParameterDeclarationKind | null;
  227. }): namedTypes.FunctionDeclaration;
  228. }
  229. export interface FunctionExpressionBuilder {
  230. (id: K.IdentifierKind | null | undefined, params: K.PatternKind[], body: K.BlockStatementKind, generator?: boolean, expression?: boolean): namedTypes.FunctionExpression;
  231. from(params: {
  232. async?: boolean;
  233. body: K.BlockStatementKind;
  234. comments?: K.CommentKind[] | null;
  235. defaults?: (K.ExpressionKind | null)[];
  236. expression?: boolean;
  237. generator?: boolean;
  238. id?: K.IdentifierKind | null;
  239. loc?: K.SourceLocationKind | null;
  240. params: K.PatternKind[];
  241. rest?: K.IdentifierKind | null;
  242. returnType?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null;
  243. typeParameters?: K.TypeParameterDeclarationKind | K.TSTypeParameterDeclarationKind | null;
  244. }): namedTypes.FunctionExpression;
  245. }
  246. export interface VariableDeclaratorBuilder {
  247. (id: K.PatternKind, init?: K.ExpressionKind | null): namedTypes.VariableDeclarator;
  248. from(params: {
  249. comments?: K.CommentKind[] | null;
  250. id: K.PatternKind;
  251. init?: K.ExpressionKind | null;
  252. loc?: K.SourceLocationKind | null;
  253. }): namedTypes.VariableDeclarator;
  254. }
  255. export interface ThisExpressionBuilder {
  256. (): namedTypes.ThisExpression;
  257. from(params: {
  258. comments?: K.CommentKind[] | null;
  259. loc?: K.SourceLocationKind | null;
  260. }): namedTypes.ThisExpression;
  261. }
  262. export interface ArrayExpressionBuilder {
  263. (elements: (K.ExpressionKind | K.SpreadElementKind | K.RestElementKind | null)[]): namedTypes.ArrayExpression;
  264. from(params: {
  265. comments?: K.CommentKind[] | null;
  266. elements: (K.ExpressionKind | K.SpreadElementKind | K.RestElementKind | null)[];
  267. loc?: K.SourceLocationKind | null;
  268. }): namedTypes.ArrayExpression;
  269. }
  270. export interface ObjectExpressionBuilder {
  271. (properties: (K.PropertyKind | K.ObjectMethodKind | K.ObjectPropertyKind | K.SpreadPropertyKind | K.SpreadElementKind)[]): namedTypes.ObjectExpression;
  272. from(params: {
  273. comments?: K.CommentKind[] | null;
  274. loc?: K.SourceLocationKind | null;
  275. properties: (K.PropertyKind | K.ObjectMethodKind | K.ObjectPropertyKind | K.SpreadPropertyKind | K.SpreadElementKind)[];
  276. }): namedTypes.ObjectExpression;
  277. }
  278. export interface PropertyBuilder {
  279. (kind: "init" | "get" | "set", key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind, value: K.ExpressionKind | K.PatternKind): namedTypes.Property;
  280. from(params: {
  281. comments?: K.CommentKind[] | null;
  282. computed?: boolean;
  283. decorators?: K.DecoratorKind[] | null;
  284. key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind;
  285. kind: "init" | "get" | "set";
  286. loc?: K.SourceLocationKind | null;
  287. method?: boolean;
  288. shorthand?: boolean;
  289. value: K.ExpressionKind | K.PatternKind;
  290. }): namedTypes.Property;
  291. }
  292. export interface LiteralBuilder {
  293. (value: string | boolean | null | number | RegExp): namedTypes.Literal;
  294. from(params: {
  295. comments?: K.CommentKind[] | null;
  296. loc?: K.SourceLocationKind | null;
  297. regex?: {
  298. pattern: string;
  299. flags: string;
  300. } | null;
  301. value: string | boolean | null | number | RegExp;
  302. }): namedTypes.Literal;
  303. }
  304. export interface SequenceExpressionBuilder {
  305. (expressions: K.ExpressionKind[]): namedTypes.SequenceExpression;
  306. from(params: {
  307. comments?: K.CommentKind[] | null;
  308. expressions: K.ExpressionKind[];
  309. loc?: K.SourceLocationKind | null;
  310. }): namedTypes.SequenceExpression;
  311. }
  312. export interface UnaryExpressionBuilder {
  313. (operator: "-" | "+" | "!" | "~" | "typeof" | "void" | "delete", argument: K.ExpressionKind, prefix?: boolean): namedTypes.UnaryExpression;
  314. from(params: {
  315. argument: K.ExpressionKind;
  316. comments?: K.CommentKind[] | null;
  317. loc?: K.SourceLocationKind | null;
  318. operator: "-" | "+" | "!" | "~" | "typeof" | "void" | "delete";
  319. prefix?: boolean;
  320. }): namedTypes.UnaryExpression;
  321. }
  322. export interface BinaryExpressionBuilder {
  323. (operator: "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "in" | "instanceof", left: K.ExpressionKind, right: K.ExpressionKind): namedTypes.BinaryExpression;
  324. from(params: {
  325. comments?: K.CommentKind[] | null;
  326. left: K.ExpressionKind;
  327. loc?: K.SourceLocationKind | null;
  328. operator: "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "in" | "instanceof";
  329. right: K.ExpressionKind;
  330. }): namedTypes.BinaryExpression;
  331. }
  332. export interface AssignmentExpressionBuilder {
  333. (operator: "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=", left: K.PatternKind | K.MemberExpressionKind, right: K.ExpressionKind): namedTypes.AssignmentExpression;
  334. from(params: {
  335. comments?: K.CommentKind[] | null;
  336. left: K.PatternKind | K.MemberExpressionKind;
  337. loc?: K.SourceLocationKind | null;
  338. operator: "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=";
  339. right: K.ExpressionKind;
  340. }): namedTypes.AssignmentExpression;
  341. }
  342. export interface MemberExpressionBuilder {
  343. (object: K.ExpressionKind, property: K.IdentifierKind | K.ExpressionKind, computed?: boolean): namedTypes.MemberExpression;
  344. from(params: {
  345. comments?: K.CommentKind[] | null;
  346. computed?: boolean;
  347. loc?: K.SourceLocationKind | null;
  348. object: K.ExpressionKind;
  349. property: K.IdentifierKind | K.ExpressionKind;
  350. }): namedTypes.MemberExpression;
  351. }
  352. export interface UpdateExpressionBuilder {
  353. (operator: "++" | "--", argument: K.ExpressionKind, prefix: boolean): namedTypes.UpdateExpression;
  354. from(params: {
  355. argument: K.ExpressionKind;
  356. comments?: K.CommentKind[] | null;
  357. loc?: K.SourceLocationKind | null;
  358. operator: "++" | "--";
  359. prefix: boolean;
  360. }): namedTypes.UpdateExpression;
  361. }
  362. export interface LogicalExpressionBuilder {
  363. (operator: "||" | "&&" | "??", left: K.ExpressionKind, right: K.ExpressionKind): namedTypes.LogicalExpression;
  364. from(params: {
  365. comments?: K.CommentKind[] | null;
  366. left: K.ExpressionKind;
  367. loc?: K.SourceLocationKind | null;
  368. operator: "||" | "&&" | "??";
  369. right: K.ExpressionKind;
  370. }): namedTypes.LogicalExpression;
  371. }
  372. export interface ConditionalExpressionBuilder {
  373. (test: K.ExpressionKind, consequent: K.ExpressionKind, alternate: K.ExpressionKind): namedTypes.ConditionalExpression;
  374. from(params: {
  375. alternate: K.ExpressionKind;
  376. comments?: K.CommentKind[] | null;
  377. consequent: K.ExpressionKind;
  378. loc?: K.SourceLocationKind | null;
  379. test: K.ExpressionKind;
  380. }): namedTypes.ConditionalExpression;
  381. }
  382. export interface NewExpressionBuilder {
  383. (callee: K.ExpressionKind, argumentsParam: (K.ExpressionKind | K.SpreadElementKind)[]): namedTypes.NewExpression;
  384. from(params: {
  385. arguments: (K.ExpressionKind | K.SpreadElementKind)[];
  386. callee: K.ExpressionKind;
  387. comments?: K.CommentKind[] | null;
  388. loc?: K.SourceLocationKind | null;
  389. typeArguments?: null | K.TypeParameterInstantiationKind;
  390. }): namedTypes.NewExpression;
  391. }
  392. export interface CallExpressionBuilder {
  393. (callee: K.ExpressionKind, argumentsParam: (K.ExpressionKind | K.SpreadElementKind)[]): namedTypes.CallExpression;
  394. from(params: {
  395. arguments: (K.ExpressionKind | K.SpreadElementKind)[];
  396. callee: K.ExpressionKind;
  397. comments?: K.CommentKind[] | null;
  398. loc?: K.SourceLocationKind | null;
  399. typeArguments?: null | K.TypeParameterInstantiationKind;
  400. }): namedTypes.CallExpression;
  401. }
  402. export interface RestElementBuilder {
  403. (argument: K.PatternKind): namedTypes.RestElement;
  404. from(params: {
  405. argument: K.PatternKind;
  406. comments?: K.CommentKind[] | null;
  407. loc?: K.SourceLocationKind | null;
  408. typeAnnotation?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null;
  409. }): namedTypes.RestElement;
  410. }
  411. export interface TypeAnnotationBuilder {
  412. (typeAnnotation: K.FlowTypeKind): namedTypes.TypeAnnotation;
  413. from(params: {
  414. comments?: K.CommentKind[] | null;
  415. loc?: K.SourceLocationKind | null;
  416. typeAnnotation: K.FlowTypeKind;
  417. }): namedTypes.TypeAnnotation;
  418. }
  419. export interface TSTypeAnnotationBuilder {
  420. (typeAnnotation: K.TSTypeKind | K.TSTypeAnnotationKind): namedTypes.TSTypeAnnotation;
  421. from(params: {
  422. comments?: K.CommentKind[] | null;
  423. loc?: K.SourceLocationKind | null;
  424. typeAnnotation: K.TSTypeKind | K.TSTypeAnnotationKind;
  425. }): namedTypes.TSTypeAnnotation;
  426. }
  427. export interface SpreadElementPatternBuilder {
  428. (argument: K.PatternKind): namedTypes.SpreadElementPattern;
  429. from(params: {
  430. argument: K.PatternKind;
  431. comments?: K.CommentKind[] | null;
  432. loc?: K.SourceLocationKind | null;
  433. }): namedTypes.SpreadElementPattern;
  434. }
  435. export interface ArrowFunctionExpressionBuilder {
  436. (params: K.PatternKind[], body: K.BlockStatementKind | K.ExpressionKind, expression?: boolean): namedTypes.ArrowFunctionExpression;
  437. from(params: {
  438. async?: boolean;
  439. body: K.BlockStatementKind | K.ExpressionKind;
  440. comments?: K.CommentKind[] | null;
  441. defaults?: (K.ExpressionKind | null)[];
  442. expression?: boolean;
  443. generator?: false;
  444. id?: null;
  445. loc?: K.SourceLocationKind | null;
  446. params: K.PatternKind[];
  447. rest?: K.IdentifierKind | null;
  448. returnType?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null;
  449. typeParameters?: K.TypeParameterDeclarationKind | K.TSTypeParameterDeclarationKind | null;
  450. }): namedTypes.ArrowFunctionExpression;
  451. }
  452. export interface ForOfStatementBuilder {
  453. (left: K.VariableDeclarationKind | K.PatternKind, right: K.ExpressionKind, body: K.StatementKind): namedTypes.ForOfStatement;
  454. from(params: {
  455. body: K.StatementKind;
  456. comments?: K.CommentKind[] | null;
  457. left: K.VariableDeclarationKind | K.PatternKind;
  458. loc?: K.SourceLocationKind | null;
  459. right: K.ExpressionKind;
  460. }): namedTypes.ForOfStatement;
  461. }
  462. export interface YieldExpressionBuilder {
  463. (argument: K.ExpressionKind | null, delegate?: boolean): namedTypes.YieldExpression;
  464. from(params: {
  465. argument: K.ExpressionKind | null;
  466. comments?: K.CommentKind[] | null;
  467. delegate?: boolean;
  468. loc?: K.SourceLocationKind | null;
  469. }): namedTypes.YieldExpression;
  470. }
  471. export interface GeneratorExpressionBuilder {
  472. (body: K.ExpressionKind, blocks: K.ComprehensionBlockKind[], filter: K.ExpressionKind | null): namedTypes.GeneratorExpression;
  473. from(params: {
  474. blocks: K.ComprehensionBlockKind[];
  475. body: K.ExpressionKind;
  476. comments?: K.CommentKind[] | null;
  477. filter: K.ExpressionKind | null;
  478. loc?: K.SourceLocationKind | null;
  479. }): namedTypes.GeneratorExpression;
  480. }
  481. export interface ComprehensionBlockBuilder {
  482. (left: K.PatternKind, right: K.ExpressionKind, each: boolean): namedTypes.ComprehensionBlock;
  483. from(params: {
  484. comments?: K.CommentKind[] | null;
  485. each: boolean;
  486. left: K.PatternKind;
  487. loc?: K.SourceLocationKind | null;
  488. right: K.ExpressionKind;
  489. }): namedTypes.ComprehensionBlock;
  490. }
  491. export interface ComprehensionExpressionBuilder {
  492. (body: K.ExpressionKind, blocks: K.ComprehensionBlockKind[], filter: K.ExpressionKind | null): namedTypes.ComprehensionExpression;
  493. from(params: {
  494. blocks: K.ComprehensionBlockKind[];
  495. body: K.ExpressionKind;
  496. comments?: K.CommentKind[] | null;
  497. filter: K.ExpressionKind | null;
  498. loc?: K.SourceLocationKind | null;
  499. }): namedTypes.ComprehensionExpression;
  500. }
  501. export interface ObjectPropertyBuilder {
  502. (key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind, value: K.ExpressionKind | K.PatternKind): namedTypes.ObjectProperty;
  503. from(params: {
  504. accessibility?: K.LiteralKind | null;
  505. comments?: K.CommentKind[] | null;
  506. computed?: boolean;
  507. key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind;
  508. loc?: K.SourceLocationKind | null;
  509. shorthand?: boolean;
  510. value: K.ExpressionKind | K.PatternKind;
  511. }): namedTypes.ObjectProperty;
  512. }
  513. export interface PropertyPatternBuilder {
  514. (key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind, pattern: K.PatternKind): namedTypes.PropertyPattern;
  515. from(params: {
  516. comments?: K.CommentKind[] | null;
  517. computed?: boolean;
  518. key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind;
  519. loc?: K.SourceLocationKind | null;
  520. pattern: K.PatternKind;
  521. }): namedTypes.PropertyPattern;
  522. }
  523. export interface ObjectPatternBuilder {
  524. (properties: (K.PropertyKind | K.PropertyPatternKind | K.SpreadPropertyPatternKind | K.SpreadPropertyKind | K.ObjectPropertyKind | K.RestPropertyKind)[]): namedTypes.ObjectPattern;
  525. from(params: {
  526. comments?: K.CommentKind[] | null;
  527. decorators?: K.DecoratorKind[] | null;
  528. loc?: K.SourceLocationKind | null;
  529. properties: (K.PropertyKind | K.PropertyPatternKind | K.SpreadPropertyPatternKind | K.SpreadPropertyKind | K.ObjectPropertyKind | K.RestPropertyKind)[];
  530. typeAnnotation?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null;
  531. }): namedTypes.ObjectPattern;
  532. }
  533. export interface ArrayPatternBuilder {
  534. (elements: (K.PatternKind | K.SpreadElementKind | null)[]): namedTypes.ArrayPattern;
  535. from(params: {
  536. comments?: K.CommentKind[] | null;
  537. elements: (K.PatternKind | K.SpreadElementKind | null)[];
  538. loc?: K.SourceLocationKind | null;
  539. }): namedTypes.ArrayPattern;
  540. }
  541. export interface MethodDefinitionBuilder {
  542. (kind: "constructor" | "method" | "get" | "set", key: K.ExpressionKind, value: K.FunctionKind, staticParam?: boolean): namedTypes.MethodDefinition;
  543. from(params: {
  544. comments?: K.CommentKind[] | null;
  545. computed?: boolean;
  546. decorators?: K.DecoratorKind[] | null;
  547. key: K.ExpressionKind;
  548. kind: "constructor" | "method" | "get" | "set";
  549. loc?: K.SourceLocationKind | null;
  550. static?: boolean;
  551. value: K.FunctionKind;
  552. }): namedTypes.MethodDefinition;
  553. }
  554. export interface SpreadElementBuilder {
  555. (argument: K.ExpressionKind): namedTypes.SpreadElement;
  556. from(params: {
  557. argument: K.ExpressionKind;
  558. comments?: K.CommentKind[] | null;
  559. loc?: K.SourceLocationKind | null;
  560. }): namedTypes.SpreadElement;
  561. }
  562. export interface AssignmentPatternBuilder {
  563. (left: K.PatternKind, right: K.ExpressionKind): namedTypes.AssignmentPattern;
  564. from(params: {
  565. comments?: K.CommentKind[] | null;
  566. left: K.PatternKind;
  567. loc?: K.SourceLocationKind | null;
  568. right: K.ExpressionKind;
  569. }): namedTypes.AssignmentPattern;
  570. }
  571. export interface ClassPropertyDefinitionBuilder {
  572. (definition: K.MethodDefinitionKind | K.VariableDeclaratorKind | K.ClassPropertyDefinitionKind | K.ClassPropertyKind): namedTypes.ClassPropertyDefinition;
  573. from(params: {
  574. comments?: K.CommentKind[] | null;
  575. definition: K.MethodDefinitionKind | K.VariableDeclaratorKind | K.ClassPropertyDefinitionKind | K.ClassPropertyKind;
  576. loc?: K.SourceLocationKind | null;
  577. }): namedTypes.ClassPropertyDefinition;
  578. }
  579. export interface ClassPropertyBuilder {
  580. (key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind, value: K.ExpressionKind | null, typeAnnotation?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null, staticParam?: boolean): namedTypes.ClassProperty;
  581. from(params: {
  582. access?: "public" | "private" | "protected" | undefined;
  583. comments?: K.CommentKind[] | null;
  584. computed?: boolean;
  585. key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind;
  586. loc?: K.SourceLocationKind | null;
  587. static?: boolean;
  588. typeAnnotation?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null;
  589. value: K.ExpressionKind | null;
  590. variance?: K.VarianceKind | "plus" | "minus" | null;
  591. }): namedTypes.ClassProperty;
  592. }
  593. export interface ClassBodyBuilder {
  594. (body: (K.MethodDefinitionKind | K.VariableDeclaratorKind | K.ClassPropertyDefinitionKind | K.ClassPropertyKind | K.ClassPrivatePropertyKind | K.ClassMethodKind | K.ClassPrivateMethodKind | K.TSDeclareMethodKind | K.TSCallSignatureDeclarationKind | K.TSConstructSignatureDeclarationKind | K.TSIndexSignatureKind | K.TSMethodSignatureKind | K.TSPropertySignatureKind)[]): namedTypes.ClassBody;
  595. from(params: {
  596. body: (K.MethodDefinitionKind | K.VariableDeclaratorKind | K.ClassPropertyDefinitionKind | K.ClassPropertyKind | K.ClassPrivatePropertyKind | K.ClassMethodKind | K.ClassPrivateMethodKind | K.TSDeclareMethodKind | K.TSCallSignatureDeclarationKind | K.TSConstructSignatureDeclarationKind | K.TSIndexSignatureKind | K.TSMethodSignatureKind | K.TSPropertySignatureKind)[];
  597. comments?: K.CommentKind[] | null;
  598. loc?: K.SourceLocationKind | null;
  599. }): namedTypes.ClassBody;
  600. }
  601. export interface ClassDeclarationBuilder {
  602. (id: K.IdentifierKind | null, body: K.ClassBodyKind, superClass?: K.ExpressionKind | null): namedTypes.ClassDeclaration;
  603. from(params: {
  604. body: K.ClassBodyKind;
  605. comments?: K.CommentKind[] | null;
  606. id: K.IdentifierKind | null;
  607. implements?: K.ClassImplementsKind[] | K.TSExpressionWithTypeArgumentsKind[];
  608. loc?: K.SourceLocationKind | null;
  609. superClass?: K.ExpressionKind | null;
  610. superTypeParameters?: K.TypeParameterInstantiationKind | K.TSTypeParameterInstantiationKind | null;
  611. typeParameters?: K.TypeParameterDeclarationKind | K.TSTypeParameterDeclarationKind | null;
  612. }): namedTypes.ClassDeclaration;
  613. }
  614. export interface ClassExpressionBuilder {
  615. (id: K.IdentifierKind | null | undefined, body: K.ClassBodyKind, superClass?: K.ExpressionKind | null): namedTypes.ClassExpression;
  616. from(params: {
  617. body: K.ClassBodyKind;
  618. comments?: K.CommentKind[] | null;
  619. id?: K.IdentifierKind | null;
  620. implements?: K.ClassImplementsKind[] | K.TSExpressionWithTypeArgumentsKind[];
  621. loc?: K.SourceLocationKind | null;
  622. superClass?: K.ExpressionKind | null;
  623. superTypeParameters?: K.TypeParameterInstantiationKind | K.TSTypeParameterInstantiationKind | null;
  624. typeParameters?: K.TypeParameterDeclarationKind | K.TSTypeParameterDeclarationKind | null;
  625. }): namedTypes.ClassExpression;
  626. }
  627. export interface ImportSpecifierBuilder {
  628. (imported: K.IdentifierKind, local?: K.IdentifierKind | null): namedTypes.ImportSpecifier;
  629. from(params: {
  630. comments?: K.CommentKind[] | null;
  631. id?: K.IdentifierKind | null;
  632. imported: K.IdentifierKind;
  633. loc?: K.SourceLocationKind | null;
  634. local?: K.IdentifierKind | null;
  635. name?: K.IdentifierKind | null;
  636. }): namedTypes.ImportSpecifier;
  637. }
  638. export interface ImportNamespaceSpecifierBuilder {
  639. (local?: K.IdentifierKind | null): namedTypes.ImportNamespaceSpecifier;
  640. from(params: {
  641. comments?: K.CommentKind[] | null;
  642. id?: K.IdentifierKind | null;
  643. loc?: K.SourceLocationKind | null;
  644. local?: K.IdentifierKind | null;
  645. name?: K.IdentifierKind | null;
  646. }): namedTypes.ImportNamespaceSpecifier;
  647. }
  648. export interface ImportDefaultSpecifierBuilder {
  649. (local?: K.IdentifierKind | null): namedTypes.ImportDefaultSpecifier;
  650. from(params: {
  651. comments?: K.CommentKind[] | null;
  652. id?: K.IdentifierKind | null;
  653. loc?: K.SourceLocationKind | null;
  654. local?: K.IdentifierKind | null;
  655. name?: K.IdentifierKind | null;
  656. }): namedTypes.ImportDefaultSpecifier;
  657. }
  658. export interface ImportDeclarationBuilder {
  659. (specifiers: (K.ImportSpecifierKind | K.ImportNamespaceSpecifierKind | K.ImportDefaultSpecifierKind)[] | undefined, source: K.LiteralKind, importKind?: "value" | "type"): namedTypes.ImportDeclaration;
  660. from(params: {
  661. comments?: K.CommentKind[] | null;
  662. importKind?: "value" | "type";
  663. loc?: K.SourceLocationKind | null;
  664. source: K.LiteralKind;
  665. specifiers?: (K.ImportSpecifierKind | K.ImportNamespaceSpecifierKind | K.ImportDefaultSpecifierKind)[];
  666. }): namedTypes.ImportDeclaration;
  667. }
  668. export interface TaggedTemplateExpressionBuilder {
  669. (tag: K.ExpressionKind, quasi: K.TemplateLiteralKind): namedTypes.TaggedTemplateExpression;
  670. from(params: {
  671. comments?: K.CommentKind[] | null;
  672. loc?: K.SourceLocationKind | null;
  673. quasi: K.TemplateLiteralKind;
  674. tag: K.ExpressionKind;
  675. }): namedTypes.TaggedTemplateExpression;
  676. }
  677. export interface TemplateLiteralBuilder {
  678. (quasis: K.TemplateElementKind[], expressions: K.ExpressionKind[]): namedTypes.TemplateLiteral;
  679. from(params: {
  680. comments?: K.CommentKind[] | null;
  681. expressions: K.ExpressionKind[];
  682. loc?: K.SourceLocationKind | null;
  683. quasis: K.TemplateElementKind[];
  684. }): namedTypes.TemplateLiteral;
  685. }
  686. export interface TemplateElementBuilder {
  687. (value: {
  688. cooked: string;
  689. raw: string;
  690. }, tail: boolean): namedTypes.TemplateElement;
  691. from(params: {
  692. comments?: K.CommentKind[] | null;
  693. loc?: K.SourceLocationKind | null;
  694. tail: boolean;
  695. value: {
  696. cooked: string;
  697. raw: string;
  698. };
  699. }): namedTypes.TemplateElement;
  700. }
  701. export interface SpreadPropertyBuilder {
  702. (argument: K.ExpressionKind): namedTypes.SpreadProperty;
  703. from(params: {
  704. argument: K.ExpressionKind;
  705. comments?: K.CommentKind[] | null;
  706. loc?: K.SourceLocationKind | null;
  707. }): namedTypes.SpreadProperty;
  708. }
  709. export interface SpreadPropertyPatternBuilder {
  710. (argument: K.PatternKind): namedTypes.SpreadPropertyPattern;
  711. from(params: {
  712. argument: K.PatternKind;
  713. comments?: K.CommentKind[] | null;
  714. loc?: K.SourceLocationKind | null;
  715. }): namedTypes.SpreadPropertyPattern;
  716. }
  717. export interface AwaitExpressionBuilder {
  718. (argument: K.ExpressionKind | null, all?: boolean): namedTypes.AwaitExpression;
  719. from(params: {
  720. all?: boolean;
  721. argument: K.ExpressionKind | null;
  722. comments?: K.CommentKind[] | null;
  723. loc?: K.SourceLocationKind | null;
  724. }): namedTypes.AwaitExpression;
  725. }
  726. export interface ImportExpressionBuilder {
  727. (source: K.ExpressionKind): namedTypes.ImportExpression;
  728. from(params: {
  729. comments?: K.CommentKind[] | null;
  730. loc?: K.SourceLocationKind | null;
  731. source: K.ExpressionKind;
  732. }): namedTypes.ImportExpression;
  733. }
  734. export interface JSXAttributeBuilder {
  735. (name: K.JSXIdentifierKind | K.JSXNamespacedNameKind, value?: K.LiteralKind | K.JSXExpressionContainerKind | null): namedTypes.JSXAttribute;
  736. from(params: {
  737. comments?: K.CommentKind[] | null;
  738. loc?: K.SourceLocationKind | null;
  739. name: K.JSXIdentifierKind | K.JSXNamespacedNameKind;
  740. value?: K.LiteralKind | K.JSXExpressionContainerKind | null;
  741. }): namedTypes.JSXAttribute;
  742. }
  743. export interface JSXIdentifierBuilder {
  744. (name: string): namedTypes.JSXIdentifier;
  745. from(params: {
  746. comments?: K.CommentKind[] | null;
  747. loc?: K.SourceLocationKind | null;
  748. name: string;
  749. optional?: boolean;
  750. typeAnnotation?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null;
  751. }): namedTypes.JSXIdentifier;
  752. }
  753. export interface JSXNamespacedNameBuilder {
  754. (namespace: K.JSXIdentifierKind, name: K.JSXIdentifierKind): namedTypes.JSXNamespacedName;
  755. from(params: {
  756. comments?: K.CommentKind[] | null;
  757. loc?: K.SourceLocationKind | null;
  758. name: K.JSXIdentifierKind;
  759. namespace: K.JSXIdentifierKind;
  760. }): namedTypes.JSXNamespacedName;
  761. }
  762. export interface JSXExpressionContainerBuilder {
  763. (expression: K.ExpressionKind): namedTypes.JSXExpressionContainer;
  764. from(params: {
  765. comments?: K.CommentKind[] | null;
  766. expression: K.ExpressionKind;
  767. loc?: K.SourceLocationKind | null;
  768. }): namedTypes.JSXExpressionContainer;
  769. }
  770. export interface JSXMemberExpressionBuilder {
  771. (object: K.JSXIdentifierKind | K.JSXMemberExpressionKind, property: K.JSXIdentifierKind): namedTypes.JSXMemberExpression;
  772. from(params: {
  773. comments?: K.CommentKind[] | null;
  774. computed?: boolean;
  775. loc?: K.SourceLocationKind | null;
  776. object: K.JSXIdentifierKind | K.JSXMemberExpressionKind;
  777. property: K.JSXIdentifierKind;
  778. }): namedTypes.JSXMemberExpression;
  779. }
  780. export interface JSXSpreadAttributeBuilder {
  781. (argument: K.ExpressionKind): namedTypes.JSXSpreadAttribute;
  782. from(params: {
  783. argument: K.ExpressionKind;
  784. comments?: K.CommentKind[] | null;
  785. loc?: K.SourceLocationKind | null;
  786. }): namedTypes.JSXSpreadAttribute;
  787. }
  788. export interface JSXElementBuilder {
  789. (openingElement: K.JSXOpeningElementKind, closingElement?: K.JSXClosingElementKind | null, children?: (K.JSXElementKind | K.JSXExpressionContainerKind | K.JSXFragmentKind | K.JSXTextKind | K.LiteralKind)[]): namedTypes.JSXElement;
  790. from(params: {
  791. attributes?: (K.JSXAttributeKind | K.JSXSpreadAttributeKind)[];
  792. children?: (K.JSXElementKind | K.JSXExpressionContainerKind | K.JSXFragmentKind | K.JSXTextKind | K.LiteralKind)[];
  793. closingElement?: K.JSXClosingElementKind | null;
  794. comments?: K.CommentKind[] | null;
  795. loc?: K.SourceLocationKind | null;
  796. name?: K.JSXIdentifierKind | K.JSXNamespacedNameKind | K.JSXMemberExpressionKind;
  797. openingElement: K.JSXOpeningElementKind;
  798. selfClosing?: boolean;
  799. }): namedTypes.JSXElement;
  800. }
  801. export interface JSXOpeningElementBuilder {
  802. (name: K.JSXIdentifierKind | K.JSXNamespacedNameKind | K.JSXMemberExpressionKind, attributes?: (K.JSXAttributeKind | K.JSXSpreadAttributeKind)[], selfClosing?: boolean): namedTypes.JSXOpeningElement;
  803. from(params: {
  804. attributes?: (K.JSXAttributeKind | K.JSXSpreadAttributeKind)[];
  805. comments?: K.CommentKind[] | null;
  806. loc?: K.SourceLocationKind | null;
  807. name: K.JSXIdentifierKind | K.JSXNamespacedNameKind | K.JSXMemberExpressionKind;
  808. selfClosing?: boolean;
  809. }): namedTypes.JSXOpeningElement;
  810. }
  811. export interface JSXClosingElementBuilder {
  812. (name: K.JSXIdentifierKind | K.JSXNamespacedNameKind | K.JSXMemberExpressionKind): namedTypes.JSXClosingElement;
  813. from(params: {
  814. comments?: K.CommentKind[] | null;
  815. loc?: K.SourceLocationKind | null;
  816. name: K.JSXIdentifierKind | K.JSXNamespacedNameKind | K.JSXMemberExpressionKind;
  817. }): namedTypes.JSXClosingElement;
  818. }
  819. export interface JSXFragmentBuilder {
  820. (openingElement: K.JSXOpeningFragmentKind, closingElement: K.JSXClosingFragmentKind, children?: (K.JSXElementKind | K.JSXExpressionContainerKind | K.JSXFragmentKind | K.JSXTextKind | K.LiteralKind)[]): namedTypes.JSXFragment;
  821. from(params: {
  822. children?: (K.JSXElementKind | K.JSXExpressionContainerKind | K.JSXFragmentKind | K.JSXTextKind | K.LiteralKind)[];
  823. closingElement: K.JSXClosingFragmentKind;
  824. comments?: K.CommentKind[] | null;
  825. loc?: K.SourceLocationKind | null;
  826. openingElement: K.JSXOpeningFragmentKind;
  827. }): namedTypes.JSXFragment;
  828. }
  829. export interface JSXTextBuilder {
  830. (value: string): namedTypes.JSXText;
  831. from(params: {
  832. comments?: K.CommentKind[] | null;
  833. loc?: K.SourceLocationKind | null;
  834. regex?: {
  835. pattern: string;
  836. flags: string;
  837. } | null;
  838. value: string;
  839. }): namedTypes.JSXText;
  840. }
  841. export interface JSXOpeningFragmentBuilder {
  842. (): namedTypes.JSXOpeningFragment;
  843. from(params: {
  844. comments?: K.CommentKind[] | null;
  845. loc?: K.SourceLocationKind | null;
  846. }): namedTypes.JSXOpeningFragment;
  847. }
  848. export interface JSXClosingFragmentBuilder {
  849. (): namedTypes.JSXClosingFragment;
  850. from(params: {
  851. comments?: K.CommentKind[] | null;
  852. loc?: K.SourceLocationKind | null;
  853. }): namedTypes.JSXClosingFragment;
  854. }
  855. export interface JSXEmptyExpressionBuilder {
  856. (): namedTypes.JSXEmptyExpression;
  857. from(params: {
  858. comments?: K.CommentKind[] | null;
  859. loc?: K.SourceLocationKind | null;
  860. }): namedTypes.JSXEmptyExpression;
  861. }
  862. export interface JSXSpreadChildBuilder {
  863. (expression: K.ExpressionKind): namedTypes.JSXSpreadChild;
  864. from(params: {
  865. comments?: K.CommentKind[] | null;
  866. expression: K.ExpressionKind;
  867. loc?: K.SourceLocationKind | null;
  868. }): namedTypes.JSXSpreadChild;
  869. }
  870. export interface TypeParameterDeclarationBuilder {
  871. (params: K.TypeParameterKind[]): namedTypes.TypeParameterDeclaration;
  872. from(params: {
  873. comments?: K.CommentKind[] | null;
  874. loc?: K.SourceLocationKind | null;
  875. params: K.TypeParameterKind[];
  876. }): namedTypes.TypeParameterDeclaration;
  877. }
  878. export interface TSTypeParameterDeclarationBuilder {
  879. (params: K.TSTypeParameterKind[]): namedTypes.TSTypeParameterDeclaration;
  880. from(params: {
  881. comments?: K.CommentKind[] | null;
  882. loc?: K.SourceLocationKind | null;
  883. params: K.TSTypeParameterKind[];
  884. }): namedTypes.TSTypeParameterDeclaration;
  885. }
  886. export interface TypeParameterInstantiationBuilder {
  887. (params: K.FlowTypeKind[]): namedTypes.TypeParameterInstantiation;
  888. from(params: {
  889. comments?: K.CommentKind[] | null;
  890. loc?: K.SourceLocationKind | null;
  891. params: K.FlowTypeKind[];
  892. }): namedTypes.TypeParameterInstantiation;
  893. }
  894. export interface TSTypeParameterInstantiationBuilder {
  895. (params: K.TSTypeKind[]): namedTypes.TSTypeParameterInstantiation;
  896. from(params: {
  897. comments?: K.CommentKind[] | null;
  898. loc?: K.SourceLocationKind | null;
  899. params: K.TSTypeKind[];
  900. }): namedTypes.TSTypeParameterInstantiation;
  901. }
  902. export interface ClassImplementsBuilder {
  903. (id: K.IdentifierKind): namedTypes.ClassImplements;
  904. from(params: {
  905. comments?: K.CommentKind[] | null;
  906. id: K.IdentifierKind;
  907. loc?: K.SourceLocationKind | null;
  908. superClass?: K.ExpressionKind | null;
  909. typeParameters?: K.TypeParameterInstantiationKind | null;
  910. }): namedTypes.ClassImplements;
  911. }
  912. export interface TSExpressionWithTypeArgumentsBuilder {
  913. (expression: K.IdentifierKind | K.TSQualifiedNameKind, typeParameters?: K.TSTypeParameterInstantiationKind | null): namedTypes.TSExpressionWithTypeArguments;
  914. from(params: {
  915. comments?: K.CommentKind[] | null;
  916. expression: K.IdentifierKind | K.TSQualifiedNameKind;
  917. loc?: K.SourceLocationKind | null;
  918. typeParameters?: K.TSTypeParameterInstantiationKind | null;
  919. }): namedTypes.TSExpressionWithTypeArguments;
  920. }
  921. export interface AnyTypeAnnotationBuilder {
  922. (): namedTypes.AnyTypeAnnotation;
  923. from(params: {
  924. comments?: K.CommentKind[] | null;
  925. loc?: K.SourceLocationKind | null;
  926. }): namedTypes.AnyTypeAnnotation;
  927. }
  928. export interface EmptyTypeAnnotationBuilder {
  929. (): namedTypes.EmptyTypeAnnotation;
  930. from(params: {
  931. comments?: K.CommentKind[] | null;
  932. loc?: K.SourceLocationKind | null;
  933. }): namedTypes.EmptyTypeAnnotation;
  934. }
  935. export interface MixedTypeAnnotationBuilder {
  936. (): namedTypes.MixedTypeAnnotation;
  937. from(params: {
  938. comments?: K.CommentKind[] | null;
  939. loc?: K.SourceLocationKind | null;
  940. }): namedTypes.MixedTypeAnnotation;
  941. }
  942. export interface VoidTypeAnnotationBuilder {
  943. (): namedTypes.VoidTypeAnnotation;
  944. from(params: {
  945. comments?: K.CommentKind[] | null;
  946. loc?: K.SourceLocationKind | null;
  947. }): namedTypes.VoidTypeAnnotation;
  948. }
  949. export interface NumberTypeAnnotationBuilder {
  950. (): namedTypes.NumberTypeAnnotation;
  951. from(params: {
  952. comments?: K.CommentKind[] | null;
  953. loc?: K.SourceLocationKind | null;
  954. }): namedTypes.NumberTypeAnnotation;
  955. }
  956. export interface NumberLiteralTypeAnnotationBuilder {
  957. (value: number, raw: string): namedTypes.NumberLiteralTypeAnnotation;
  958. from(params: {
  959. comments?: K.CommentKind[] | null;
  960. loc?: K.SourceLocationKind | null;
  961. raw: string;
  962. value: number;
  963. }): namedTypes.NumberLiteralTypeAnnotation;
  964. }
  965. export interface NumericLiteralTypeAnnotationBuilder {
  966. (value: number, raw: string): namedTypes.NumericLiteralTypeAnnotation;
  967. from(params: {
  968. comments?: K.CommentKind[] | null;
  969. loc?: K.SourceLocationKind | null;
  970. raw: string;
  971. value: number;
  972. }): namedTypes.NumericLiteralTypeAnnotation;
  973. }
  974. export interface StringTypeAnnotationBuilder {
  975. (): namedTypes.StringTypeAnnotation;
  976. from(params: {
  977. comments?: K.CommentKind[] | null;
  978. loc?: K.SourceLocationKind | null;
  979. }): namedTypes.StringTypeAnnotation;
  980. }
  981. export interface StringLiteralTypeAnnotationBuilder {
  982. (value: string, raw: string): namedTypes.StringLiteralTypeAnnotation;
  983. from(params: {
  984. comments?: K.CommentKind[] | null;
  985. loc?: K.SourceLocationKind | null;
  986. raw: string;
  987. value: string;
  988. }): namedTypes.StringLiteralTypeAnnotation;
  989. }
  990. export interface BooleanTypeAnnotationBuilder {
  991. (): namedTypes.BooleanTypeAnnotation;
  992. from(params: {
  993. comments?: K.CommentKind[] | null;
  994. loc?: K.SourceLocationKind | null;
  995. }): namedTypes.BooleanTypeAnnotation;
  996. }
  997. export interface BooleanLiteralTypeAnnotationBuilder {
  998. (value: boolean, raw: string): namedTypes.BooleanLiteralTypeAnnotation;
  999. from(params: {
  1000. comments?: K.CommentKind[] | null;
  1001. loc?: K.SourceLocationKind | null;
  1002. raw: string;
  1003. value: boolean;
  1004. }): namedTypes.BooleanLiteralTypeAnnotation;
  1005. }
  1006. export interface NullableTypeAnnotationBuilder {
  1007. (typeAnnotation: K.FlowTypeKind): namedTypes.NullableTypeAnnotation;
  1008. from(params: {
  1009. comments?: K.CommentKind[] | null;
  1010. loc?: K.SourceLocationKind | null;
  1011. typeAnnotation: K.FlowTypeKind;
  1012. }): namedTypes.NullableTypeAnnotation;
  1013. }
  1014. export interface NullLiteralTypeAnnotationBuilder {
  1015. (): namedTypes.NullLiteralTypeAnnotation;
  1016. from(params: {
  1017. comments?: K.CommentKind[] | null;
  1018. loc?: K.SourceLocationKind | null;
  1019. }): namedTypes.NullLiteralTypeAnnotation;
  1020. }
  1021. export interface NullTypeAnnotationBuilder {
  1022. (): namedTypes.NullTypeAnnotation;
  1023. from(params: {
  1024. comments?: K.CommentKind[] | null;
  1025. loc?: K.SourceLocationKind | null;
  1026. }): namedTypes.NullTypeAnnotation;
  1027. }
  1028. export interface ThisTypeAnnotationBuilder {
  1029. (): namedTypes.ThisTypeAnnotation;
  1030. from(params: {
  1031. comments?: K.CommentKind[] | null;
  1032. loc?: K.SourceLocationKind | null;
  1033. }): namedTypes.ThisTypeAnnotation;
  1034. }
  1035. export interface ExistsTypeAnnotationBuilder {
  1036. (): namedTypes.ExistsTypeAnnotation;
  1037. from(params: {
  1038. comments?: K.CommentKind[] | null;
  1039. loc?: K.SourceLocationKind | null;
  1040. }): namedTypes.ExistsTypeAnnotation;
  1041. }
  1042. export interface ExistentialTypeParamBuilder {
  1043. (): namedTypes.ExistentialTypeParam;
  1044. from(params: {
  1045. comments?: K.CommentKind[] | null;
  1046. loc?: K.SourceLocationKind | null;
  1047. }): namedTypes.ExistentialTypeParam;
  1048. }
  1049. export interface FunctionTypeAnnotationBuilder {
  1050. (params: K.FunctionTypeParamKind[], returnType: K.FlowTypeKind, rest: K.FunctionTypeParamKind | null, typeParameters: K.TypeParameterDeclarationKind | null): namedTypes.FunctionTypeAnnotation;
  1051. from(params: {
  1052. comments?: K.CommentKind[] | null;
  1053. loc?: K.SourceLocationKind | null;
  1054. params: K.FunctionTypeParamKind[];
  1055. rest: K.FunctionTypeParamKind | null;
  1056. returnType: K.FlowTypeKind;
  1057. typeParameters: K.TypeParameterDeclarationKind | null;
  1058. }): namedTypes.FunctionTypeAnnotation;
  1059. }
  1060. export interface FunctionTypeParamBuilder {
  1061. (name: K.IdentifierKind, typeAnnotation: K.FlowTypeKind, optional: boolean): namedTypes.FunctionTypeParam;
  1062. from(params: {
  1063. comments?: K.CommentKind[] | null;
  1064. loc?: K.SourceLocationKind | null;
  1065. name: K.IdentifierKind;
  1066. optional: boolean;
  1067. typeAnnotation: K.FlowTypeKind;
  1068. }): namedTypes.FunctionTypeParam;
  1069. }
  1070. export interface ArrayTypeAnnotationBuilder {
  1071. (elementType: K.FlowTypeKind): namedTypes.ArrayTypeAnnotation;
  1072. from(params: {
  1073. comments?: K.CommentKind[] | null;
  1074. elementType: K.FlowTypeKind;
  1075. loc?: K.SourceLocationKind | null;
  1076. }): namedTypes.ArrayTypeAnnotation;
  1077. }
  1078. export interface ObjectTypeAnnotationBuilder {
  1079. (properties: (K.ObjectTypePropertyKind | K.ObjectTypeSpreadPropertyKind)[], indexers?: K.ObjectTypeIndexerKind[], callProperties?: K.ObjectTypeCallPropertyKind[]): namedTypes.ObjectTypeAnnotation;
  1080. from(params: {
  1081. callProperties?: K.ObjectTypeCallPropertyKind[];
  1082. comments?: K.CommentKind[] | null;
  1083. exact?: boolean;
  1084. indexers?: K.ObjectTypeIndexerKind[];
  1085. inexact?: boolean | undefined;
  1086. internalSlots?: K.ObjectTypeInternalSlotKind[];
  1087. loc?: K.SourceLocationKind | null;
  1088. properties: (K.ObjectTypePropertyKind | K.ObjectTypeSpreadPropertyKind)[];
  1089. }): namedTypes.ObjectTypeAnnotation;
  1090. }
  1091. export interface ObjectTypePropertyBuilder {
  1092. (key: K.LiteralKind | K.IdentifierKind, value: K.FlowTypeKind, optional: boolean): namedTypes.ObjectTypeProperty;
  1093. from(params: {
  1094. comments?: K.CommentKind[] | null;
  1095. key: K.LiteralKind | K.IdentifierKind;
  1096. loc?: K.SourceLocationKind | null;
  1097. optional: boolean;
  1098. value: K.FlowTypeKind;
  1099. variance?: K.VarianceKind | "plus" | "minus" | null;
  1100. }): namedTypes.ObjectTypeProperty;
  1101. }
  1102. export interface ObjectTypeSpreadPropertyBuilder {
  1103. (argument: K.FlowTypeKind): namedTypes.ObjectTypeSpreadProperty;
  1104. from(params: {
  1105. argument: K.FlowTypeKind;
  1106. comments?: K.CommentKind[] | null;
  1107. loc?: K.SourceLocationKind | null;
  1108. }): namedTypes.ObjectTypeSpreadProperty;
  1109. }
  1110. export interface ObjectTypeIndexerBuilder {
  1111. (id: K.IdentifierKind, key: K.FlowTypeKind, value: K.FlowTypeKind): namedTypes.ObjectTypeIndexer;
  1112. from(params: {
  1113. comments?: K.CommentKind[] | null;
  1114. id: K.IdentifierKind;
  1115. key: K.FlowTypeKind;
  1116. loc?: K.SourceLocationKind | null;
  1117. value: K.FlowTypeKind;
  1118. variance?: K.VarianceKind | "plus" | "minus" | null;
  1119. }): namedTypes.ObjectTypeIndexer;
  1120. }
  1121. export interface ObjectTypeCallPropertyBuilder {
  1122. (value: K.FunctionTypeAnnotationKind): namedTypes.ObjectTypeCallProperty;
  1123. from(params: {
  1124. comments?: K.CommentKind[] | null;
  1125. loc?: K.SourceLocationKind | null;
  1126. static?: boolean;
  1127. value: K.FunctionTypeAnnotationKind;
  1128. }): namedTypes.ObjectTypeCallProperty;
  1129. }
  1130. export interface ObjectTypeInternalSlotBuilder {
  1131. (id: K.IdentifierKind, value: K.FlowTypeKind, optional: boolean, staticParam: boolean, method: boolean): namedTypes.ObjectTypeInternalSlot;
  1132. from(params: {
  1133. comments?: K.CommentKind[] | null;
  1134. id: K.IdentifierKind;
  1135. loc?: K.SourceLocationKind | null;
  1136. method: boolean;
  1137. optional: boolean;
  1138. static: boolean;
  1139. value: K.FlowTypeKind;
  1140. }): namedTypes.ObjectTypeInternalSlot;
  1141. }
  1142. export interface VarianceBuilder {
  1143. (kind: "plus" | "minus"): namedTypes.Variance;
  1144. from(params: {
  1145. comments?: K.CommentKind[] | null;
  1146. kind: "plus" | "minus";
  1147. loc?: K.SourceLocationKind | null;
  1148. }): namedTypes.Variance;
  1149. }
  1150. export interface QualifiedTypeIdentifierBuilder {
  1151. (qualification: K.IdentifierKind | K.QualifiedTypeIdentifierKind, id: K.IdentifierKind): namedTypes.QualifiedTypeIdentifier;
  1152. from(params: {
  1153. comments?: K.CommentKind[] | null;
  1154. id: K.IdentifierKind;
  1155. loc?: K.SourceLocationKind | null;
  1156. qualification: K.IdentifierKind | K.QualifiedTypeIdentifierKind;
  1157. }): namedTypes.QualifiedTypeIdentifier;
  1158. }
  1159. export interface GenericTypeAnnotationBuilder {
  1160. (id: K.IdentifierKind | K.QualifiedTypeIdentifierKind, typeParameters: K.TypeParameterInstantiationKind | null): namedTypes.GenericTypeAnnotation;
  1161. from(params: {
  1162. comments?: K.CommentKind[] | null;
  1163. id: K.IdentifierKind | K.QualifiedTypeIdentifierKind;
  1164. loc?: K.SourceLocationKind | null;
  1165. typeParameters: K.TypeParameterInstantiationKind | null;
  1166. }): namedTypes.GenericTypeAnnotation;
  1167. }
  1168. export interface MemberTypeAnnotationBuilder {
  1169. (object: K.IdentifierKind, property: K.MemberTypeAnnotationKind | K.GenericTypeAnnotationKind): namedTypes.MemberTypeAnnotation;
  1170. from(params: {
  1171. comments?: K.CommentKind[] | null;
  1172. loc?: K.SourceLocationKind | null;
  1173. object: K.IdentifierKind;
  1174. property: K.MemberTypeAnnotationKind | K.GenericTypeAnnotationKind;
  1175. }): namedTypes.MemberTypeAnnotation;
  1176. }
  1177. export interface UnionTypeAnnotationBuilder {
  1178. (types: K.FlowTypeKind[]): namedTypes.UnionTypeAnnotation;
  1179. from(params: {
  1180. comments?: K.CommentKind[] | null;
  1181. loc?: K.SourceLocationKind | null;
  1182. types: K.FlowTypeKind[];
  1183. }): namedTypes.UnionTypeAnnotation;
  1184. }
  1185. export interface IntersectionTypeAnnotationBuilder {
  1186. (types: K.FlowTypeKind[]): namedTypes.IntersectionTypeAnnotation;
  1187. from(params: {
  1188. comments?: K.CommentKind[] | null;
  1189. loc?: K.SourceLocationKind | null;
  1190. types: K.FlowTypeKind[];
  1191. }): namedTypes.IntersectionTypeAnnotation;
  1192. }
  1193. export interface TypeofTypeAnnotationBuilder {
  1194. (argument: K.FlowTypeKind): namedTypes.TypeofTypeAnnotation;
  1195. from(params: {
  1196. argument: K.FlowTypeKind;
  1197. comments?: K.CommentKind[] | null;
  1198. loc?: K.SourceLocationKind | null;
  1199. }): namedTypes.TypeofTypeAnnotation;
  1200. }
  1201. export interface TypeParameterBuilder {
  1202. (name: string, variance?: K.VarianceKind | "plus" | "minus" | null, bound?: K.TypeAnnotationKind | null): namedTypes.TypeParameter;
  1203. from(params: {
  1204. bound?: K.TypeAnnotationKind | null;
  1205. comments?: K.CommentKind[] | null;
  1206. loc?: K.SourceLocationKind | null;
  1207. name: string;
  1208. variance?: K.VarianceKind | "plus" | "minus" | null;
  1209. }): namedTypes.TypeParameter;
  1210. }
  1211. export interface InterfaceTypeAnnotationBuilder {
  1212. (body: K.ObjectTypeAnnotationKind, extendsParam?: K.InterfaceExtendsKind[] | null): namedTypes.InterfaceTypeAnnotation;
  1213. from(params: {
  1214. body: K.ObjectTypeAnnotationKind;
  1215. comments?: K.CommentKind[] | null;
  1216. extends?: K.InterfaceExtendsKind[] | null;
  1217. loc?: K.SourceLocationKind | null;
  1218. }): namedTypes.InterfaceTypeAnnotation;
  1219. }
  1220. export interface InterfaceExtendsBuilder {
  1221. (id: K.IdentifierKind): namedTypes.InterfaceExtends;
  1222. from(params: {
  1223. comments?: K.CommentKind[] | null;
  1224. id: K.IdentifierKind;
  1225. loc?: K.SourceLocationKind | null;
  1226. typeParameters?: K.TypeParameterInstantiationKind | null;
  1227. }): namedTypes.InterfaceExtends;
  1228. }
  1229. export interface InterfaceDeclarationBuilder {
  1230. (id: K.IdentifierKind, body: K.ObjectTypeAnnotationKind, extendsParam: K.InterfaceExtendsKind[]): namedTypes.InterfaceDeclaration;
  1231. from(params: {
  1232. body: K.ObjectTypeAnnotationKind;
  1233. comments?: K.CommentKind[] | null;
  1234. extends: K.InterfaceExtendsKind[];
  1235. id: K.IdentifierKind;
  1236. loc?: K.SourceLocationKind | null;
  1237. typeParameters?: K.TypeParameterDeclarationKind | null;
  1238. }): namedTypes.InterfaceDeclaration;
  1239. }
  1240. export interface DeclareInterfaceBuilder {
  1241. (id: K.IdentifierKind, body: K.ObjectTypeAnnotationKind, extendsParam: K.InterfaceExtendsKind[]): namedTypes.DeclareInterface;
  1242. from(params: {
  1243. body: K.ObjectTypeAnnotationKind;
  1244. comments?: K.CommentKind[] | null;
  1245. extends: K.InterfaceExtendsKind[];
  1246. id: K.IdentifierKind;
  1247. loc?: K.SourceLocationKind | null;
  1248. typeParameters?: K.TypeParameterDeclarationKind | null;
  1249. }): namedTypes.DeclareInterface;
  1250. }
  1251. export interface TypeAliasBuilder {
  1252. (id: K.IdentifierKind, typeParameters: K.TypeParameterDeclarationKind | null, right: K.FlowTypeKind): namedTypes.TypeAlias;
  1253. from(params: {
  1254. comments?: K.CommentKind[] | null;
  1255. id: K.IdentifierKind;
  1256. loc?: K.SourceLocationKind | null;
  1257. right: K.FlowTypeKind;
  1258. typeParameters: K.TypeParameterDeclarationKind | null;
  1259. }): namedTypes.TypeAlias;
  1260. }
  1261. export interface OpaqueTypeBuilder {
  1262. (id: K.IdentifierKind, typeParameters: K.TypeParameterDeclarationKind | null, impltype: K.FlowTypeKind, supertype: K.FlowTypeKind): namedTypes.OpaqueType;
  1263. from(params: {
  1264. comments?: K.CommentKind[] | null;
  1265. id: K.IdentifierKind;
  1266. impltype: K.FlowTypeKind;
  1267. loc?: K.SourceLocationKind | null;
  1268. supertype: K.FlowTypeKind;
  1269. typeParameters: K.TypeParameterDeclarationKind | null;
  1270. }): namedTypes.OpaqueType;
  1271. }
  1272. export interface DeclareTypeAliasBuilder {
  1273. (id: K.IdentifierKind, typeParameters: K.TypeParameterDeclarationKind | null, right: K.FlowTypeKind): namedTypes.DeclareTypeAlias;
  1274. from(params: {
  1275. comments?: K.CommentKind[] | null;
  1276. id: K.IdentifierKind;
  1277. loc?: K.SourceLocationKind | null;
  1278. right: K.FlowTypeKind;
  1279. typeParameters: K.TypeParameterDeclarationKind | null;
  1280. }): namedTypes.DeclareTypeAlias;
  1281. }
  1282. export interface DeclareOpaqueTypeBuilder {
  1283. (id: K.IdentifierKind, typeParameters: K.TypeParameterDeclarationKind | null): namedTypes.DeclareOpaqueType;
  1284. from(params: {
  1285. comments?: K.CommentKind[] | null;
  1286. id: K.IdentifierKind;
  1287. loc?: K.SourceLocationKind | null;
  1288. right: K.FlowTypeKind;
  1289. typeParameters: K.TypeParameterDeclarationKind | null;
  1290. }): namedTypes.DeclareOpaqueType;
  1291. }
  1292. export interface TypeCastExpressionBuilder {
  1293. (expression: K.ExpressionKind, typeAnnotation: K.TypeAnnotationKind): namedTypes.TypeCastExpression;
  1294. from(params: {
  1295. comments?: K.CommentKind[] | null;
  1296. expression: K.ExpressionKind;
  1297. loc?: K.SourceLocationKind | null;
  1298. typeAnnotation: K.TypeAnnotationKind;
  1299. }): namedTypes.TypeCastExpression;
  1300. }
  1301. export interface TupleTypeAnnotationBuilder {
  1302. (types: K.FlowTypeKind[]): namedTypes.TupleTypeAnnotation;
  1303. from(params: {
  1304. comments?: K.CommentKind[] | null;
  1305. loc?: K.SourceLocationKind | null;
  1306. types: K.FlowTypeKind[];
  1307. }): namedTypes.TupleTypeAnnotation;
  1308. }
  1309. export interface DeclareVariableBuilder {
  1310. (id: K.IdentifierKind): namedTypes.DeclareVariable;
  1311. from(params: {
  1312. comments?: K.CommentKind[] | null;
  1313. id: K.IdentifierKind;
  1314. loc?: K.SourceLocationKind | null;
  1315. }): namedTypes.DeclareVariable;
  1316. }
  1317. export interface DeclareFunctionBuilder {
  1318. (id: K.IdentifierKind): namedTypes.DeclareFunction;
  1319. from(params: {
  1320. comments?: K.CommentKind[] | null;
  1321. id: K.IdentifierKind;
  1322. loc?: K.SourceLocationKind | null;
  1323. }): namedTypes.DeclareFunction;
  1324. }
  1325. export interface DeclareClassBuilder {
  1326. (id: K.IdentifierKind): namedTypes.DeclareClass;
  1327. from(params: {
  1328. body: K.ObjectTypeAnnotationKind;
  1329. comments?: K.CommentKind[] | null;
  1330. extends: K.InterfaceExtendsKind[];
  1331. id: K.IdentifierKind;
  1332. loc?: K.SourceLocationKind | null;
  1333. typeParameters?: K.TypeParameterDeclarationKind | null;
  1334. }): namedTypes.DeclareClass;
  1335. }
  1336. export interface DeclareModuleBuilder {
  1337. (id: K.IdentifierKind | K.LiteralKind, body: K.BlockStatementKind): namedTypes.DeclareModule;
  1338. from(params: {
  1339. body: K.BlockStatementKind;
  1340. comments?: K.CommentKind[] | null;
  1341. id: K.IdentifierKind | K.LiteralKind;
  1342. loc?: K.SourceLocationKind | null;
  1343. }): namedTypes.DeclareModule;
  1344. }
  1345. export interface DeclareModuleExportsBuilder {
  1346. (typeAnnotation: K.TypeAnnotationKind): namedTypes.DeclareModuleExports;
  1347. from(params: {
  1348. comments?: K.CommentKind[] | null;
  1349. loc?: K.SourceLocationKind | null;
  1350. typeAnnotation: K.TypeAnnotationKind;
  1351. }): namedTypes.DeclareModuleExports;
  1352. }
  1353. export interface DeclareExportDeclarationBuilder {
  1354. (defaultParam: boolean, declaration: K.DeclareVariableKind | K.DeclareFunctionKind | K.DeclareClassKind | K.FlowTypeKind | null, specifiers?: (K.ExportSpecifierKind | K.ExportBatchSpecifierKind)[], source?: K.LiteralKind | null): namedTypes.DeclareExportDeclaration;
  1355. from(params: {
  1356. comments?: K.CommentKind[] | null;
  1357. declaration: K.DeclareVariableKind | K.DeclareFunctionKind | K.DeclareClassKind | K.FlowTypeKind | null;
  1358. default: boolean;
  1359. loc?: K.SourceLocationKind | null;
  1360. source?: K.LiteralKind | null;
  1361. specifiers?: (K.ExportSpecifierKind | K.ExportBatchSpecifierKind)[];
  1362. }): namedTypes.DeclareExportDeclaration;
  1363. }
  1364. export interface ExportSpecifierBuilder {
  1365. (local: K.IdentifierKind | null | undefined, exported: K.IdentifierKind): namedTypes.ExportSpecifier;
  1366. from(params: {
  1367. comments?: K.CommentKind[] | null;
  1368. exported: K.IdentifierKind;
  1369. id?: K.IdentifierKind | null;
  1370. loc?: K.SourceLocationKind | null;
  1371. local?: K.IdentifierKind | null;
  1372. name?: K.IdentifierKind | null;
  1373. }): namedTypes.ExportSpecifier;
  1374. }
  1375. export interface ExportBatchSpecifierBuilder {
  1376. (): namedTypes.ExportBatchSpecifier;
  1377. from(params: {
  1378. comments?: K.CommentKind[] | null;
  1379. loc?: K.SourceLocationKind | null;
  1380. }): namedTypes.ExportBatchSpecifier;
  1381. }
  1382. export interface DeclareExportAllDeclarationBuilder {
  1383. (source?: K.LiteralKind | null): namedTypes.DeclareExportAllDeclaration;
  1384. from(params: {
  1385. comments?: K.CommentKind[] | null;
  1386. loc?: K.SourceLocationKind | null;
  1387. source?: K.LiteralKind | null;
  1388. }): namedTypes.DeclareExportAllDeclaration;
  1389. }
  1390. export interface InferredPredicateBuilder {
  1391. (): namedTypes.InferredPredicate;
  1392. from(params: {
  1393. comments?: K.CommentKind[] | null;
  1394. loc?: K.SourceLocationKind | null;
  1395. }): namedTypes.InferredPredicate;
  1396. }
  1397. export interface DeclaredPredicateBuilder {
  1398. (value: K.ExpressionKind): namedTypes.DeclaredPredicate;
  1399. from(params: {
  1400. comments?: K.CommentKind[] | null;
  1401. loc?: K.SourceLocationKind | null;
  1402. value: K.ExpressionKind;
  1403. }): namedTypes.DeclaredPredicate;
  1404. }
  1405. export interface ExportDeclarationBuilder {
  1406. (defaultParam: boolean, declaration: K.DeclarationKind | K.ExpressionKind | null, specifiers?: (K.ExportSpecifierKind | K.ExportBatchSpecifierKind)[], source?: K.LiteralKind | null): namedTypes.ExportDeclaration;
  1407. from(params: {
  1408. comments?: K.CommentKind[] | null;
  1409. declaration: K.DeclarationKind | K.ExpressionKind | null;
  1410. default: boolean;
  1411. loc?: K.SourceLocationKind | null;
  1412. source?: K.LiteralKind | null;
  1413. specifiers?: (K.ExportSpecifierKind | K.ExportBatchSpecifierKind)[];
  1414. }): namedTypes.ExportDeclaration;
  1415. }
  1416. export interface BlockBuilder {
  1417. (value: string, leading?: boolean, trailing?: boolean): namedTypes.Block;
  1418. from(params: {
  1419. leading?: boolean;
  1420. loc?: K.SourceLocationKind | null;
  1421. trailing?: boolean;
  1422. value: string;
  1423. }): namedTypes.Block;
  1424. }
  1425. export interface LineBuilder {
  1426. (value: string, leading?: boolean, trailing?: boolean): namedTypes.Line;
  1427. from(params: {
  1428. leading?: boolean;
  1429. loc?: K.SourceLocationKind | null;
  1430. trailing?: boolean;
  1431. value: string;
  1432. }): namedTypes.Line;
  1433. }
  1434. export interface NoopBuilder {
  1435. (): namedTypes.Noop;
  1436. from(params: {
  1437. comments?: K.CommentKind[] | null;
  1438. loc?: K.SourceLocationKind | null;
  1439. }): namedTypes.Noop;
  1440. }
  1441. export interface DoExpressionBuilder {
  1442. (body: K.StatementKind[]): namedTypes.DoExpression;
  1443. from(params: {
  1444. body: K.StatementKind[];
  1445. comments?: K.CommentKind[] | null;
  1446. loc?: K.SourceLocationKind | null;
  1447. }): namedTypes.DoExpression;
  1448. }
  1449. export interface SuperBuilder {
  1450. (): namedTypes.Super;
  1451. from(params: {
  1452. comments?: K.CommentKind[] | null;
  1453. loc?: K.SourceLocationKind | null;
  1454. }): namedTypes.Super;
  1455. }
  1456. export interface BindExpressionBuilder {
  1457. (object: K.ExpressionKind | null, callee: K.ExpressionKind): namedTypes.BindExpression;
  1458. from(params: {
  1459. callee: K.ExpressionKind;
  1460. comments?: K.CommentKind[] | null;
  1461. loc?: K.SourceLocationKind | null;
  1462. object: K.ExpressionKind | null;
  1463. }): namedTypes.BindExpression;
  1464. }
  1465. export interface DecoratorBuilder {
  1466. (expression: K.ExpressionKind): namedTypes.Decorator;
  1467. from(params: {
  1468. comments?: K.CommentKind[] | null;
  1469. expression: K.ExpressionKind;
  1470. loc?: K.SourceLocationKind | null;
  1471. }): namedTypes.Decorator;
  1472. }
  1473. export interface MetaPropertyBuilder {
  1474. (meta: K.IdentifierKind, property: K.IdentifierKind): namedTypes.MetaProperty;
  1475. from(params: {
  1476. comments?: K.CommentKind[] | null;
  1477. loc?: K.SourceLocationKind | null;
  1478. meta: K.IdentifierKind;
  1479. property: K.IdentifierKind;
  1480. }): namedTypes.MetaProperty;
  1481. }
  1482. export interface ParenthesizedExpressionBuilder {
  1483. (expression: K.ExpressionKind): namedTypes.ParenthesizedExpression;
  1484. from(params: {
  1485. comments?: K.CommentKind[] | null;
  1486. expression: K.ExpressionKind;
  1487. loc?: K.SourceLocationKind | null;
  1488. }): namedTypes.ParenthesizedExpression;
  1489. }
  1490. export interface ExportDefaultDeclarationBuilder {
  1491. (declaration: K.DeclarationKind | K.ExpressionKind): namedTypes.ExportDefaultDeclaration;
  1492. from(params: {
  1493. comments?: K.CommentKind[] | null;
  1494. declaration: K.DeclarationKind | K.ExpressionKind;
  1495. loc?: K.SourceLocationKind | null;
  1496. }): namedTypes.ExportDefaultDeclaration;
  1497. }
  1498. export interface ExportNamedDeclarationBuilder {
  1499. (declaration: K.DeclarationKind | null, specifiers?: K.ExportSpecifierKind[], source?: K.LiteralKind | null): namedTypes.ExportNamedDeclaration;
  1500. from(params: {
  1501. comments?: K.CommentKind[] | null;
  1502. declaration: K.DeclarationKind | null;
  1503. loc?: K.SourceLocationKind | null;
  1504. source?: K.LiteralKind | null;
  1505. specifiers?: K.ExportSpecifierKind[];
  1506. }): namedTypes.ExportNamedDeclaration;
  1507. }
  1508. export interface ExportNamespaceSpecifierBuilder {
  1509. (exported: K.IdentifierKind): namedTypes.ExportNamespaceSpecifier;
  1510. from(params: {
  1511. comments?: K.CommentKind[] | null;
  1512. exported: K.IdentifierKind;
  1513. loc?: K.SourceLocationKind | null;
  1514. }): namedTypes.ExportNamespaceSpecifier;
  1515. }
  1516. export interface ExportDefaultSpecifierBuilder {
  1517. (exported: K.IdentifierKind): namedTypes.ExportDefaultSpecifier;
  1518. from(params: {
  1519. comments?: K.CommentKind[] | null;
  1520. exported: K.IdentifierKind;
  1521. loc?: K.SourceLocationKind | null;
  1522. }): namedTypes.ExportDefaultSpecifier;
  1523. }
  1524. export interface ExportAllDeclarationBuilder {
  1525. (exported: K.IdentifierKind | null, source: K.LiteralKind): namedTypes.ExportAllDeclaration;
  1526. from(params: {
  1527. comments?: K.CommentKind[] | null;
  1528. exported: K.IdentifierKind | null;
  1529. loc?: K.SourceLocationKind | null;
  1530. source: K.LiteralKind;
  1531. }): namedTypes.ExportAllDeclaration;
  1532. }
  1533. export interface CommentBlockBuilder {
  1534. (value: string, leading?: boolean, trailing?: boolean): namedTypes.CommentBlock;
  1535. from(params: {
  1536. leading?: boolean;
  1537. loc?: K.SourceLocationKind | null;
  1538. trailing?: boolean;
  1539. value: string;
  1540. }): namedTypes.CommentBlock;
  1541. }
  1542. export interface CommentLineBuilder {
  1543. (value: string, leading?: boolean, trailing?: boolean): namedTypes.CommentLine;
  1544. from(params: {
  1545. leading?: boolean;
  1546. loc?: K.SourceLocationKind | null;
  1547. trailing?: boolean;
  1548. value: string;
  1549. }): namedTypes.CommentLine;
  1550. }
  1551. export interface DirectiveBuilder {
  1552. (value: K.DirectiveLiteralKind): namedTypes.Directive;
  1553. from(params: {
  1554. comments?: K.CommentKind[] | null;
  1555. loc?: K.SourceLocationKind | null;
  1556. value: K.DirectiveLiteralKind;
  1557. }): namedTypes.Directive;
  1558. }
  1559. export interface DirectiveLiteralBuilder {
  1560. (value?: string): namedTypes.DirectiveLiteral;
  1561. from(params: {
  1562. comments?: K.CommentKind[] | null;
  1563. loc?: K.SourceLocationKind | null;
  1564. value?: string;
  1565. }): namedTypes.DirectiveLiteral;
  1566. }
  1567. export interface InterpreterDirectiveBuilder {
  1568. (value: string): namedTypes.InterpreterDirective;
  1569. from(params: {
  1570. comments?: K.CommentKind[] | null;
  1571. loc?: K.SourceLocationKind | null;
  1572. value: string;
  1573. }): namedTypes.InterpreterDirective;
  1574. }
  1575. export interface StringLiteralBuilder {
  1576. (value: string): namedTypes.StringLiteral;
  1577. from(params: {
  1578. comments?: K.CommentKind[] | null;
  1579. loc?: K.SourceLocationKind | null;
  1580. regex?: {
  1581. pattern: string;
  1582. flags: string;
  1583. } | null;
  1584. value: string;
  1585. }): namedTypes.StringLiteral;
  1586. }
  1587. export interface NumericLiteralBuilder {
  1588. (value: number): namedTypes.NumericLiteral;
  1589. from(params: {
  1590. comments?: K.CommentKind[] | null;
  1591. extra?: {
  1592. rawValue: number;
  1593. raw: string;
  1594. };
  1595. loc?: K.SourceLocationKind | null;
  1596. raw?: string | null;
  1597. regex?: {
  1598. pattern: string;
  1599. flags: string;
  1600. } | null;
  1601. value: number;
  1602. }): namedTypes.NumericLiteral;
  1603. }
  1604. export interface BigIntLiteralBuilder {
  1605. (value: string | number): namedTypes.BigIntLiteral;
  1606. from(params: {
  1607. comments?: K.CommentKind[] | null;
  1608. extra?: {
  1609. rawValue: string;
  1610. raw: string;
  1611. };
  1612. loc?: K.SourceLocationKind | null;
  1613. regex?: {
  1614. pattern: string;
  1615. flags: string;
  1616. } | null;
  1617. value: string | number;
  1618. }): namedTypes.BigIntLiteral;
  1619. }
  1620. export interface NullLiteralBuilder {
  1621. (): namedTypes.NullLiteral;
  1622. from(params: {
  1623. comments?: K.CommentKind[] | null;
  1624. loc?: K.SourceLocationKind | null;
  1625. regex?: {
  1626. pattern: string;
  1627. flags: string;
  1628. } | null;
  1629. value?: null;
  1630. }): namedTypes.NullLiteral;
  1631. }
  1632. export interface BooleanLiteralBuilder {
  1633. (value: boolean): namedTypes.BooleanLiteral;
  1634. from(params: {
  1635. comments?: K.CommentKind[] | null;
  1636. loc?: K.SourceLocationKind | null;
  1637. regex?: {
  1638. pattern: string;
  1639. flags: string;
  1640. } | null;
  1641. value: boolean;
  1642. }): namedTypes.BooleanLiteral;
  1643. }
  1644. export interface RegExpLiteralBuilder {
  1645. (pattern: string, flags: string): namedTypes.RegExpLiteral;
  1646. from(params: {
  1647. comments?: K.CommentKind[] | null;
  1648. flags: string;
  1649. loc?: K.SourceLocationKind | null;
  1650. pattern: string;
  1651. regex?: {
  1652. pattern: string;
  1653. flags: string;
  1654. } | null;
  1655. value?: RegExp;
  1656. }): namedTypes.RegExpLiteral;
  1657. }
  1658. export interface ObjectMethodBuilder {
  1659. (kind: "method" | "get" | "set", key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind, params: K.PatternKind[], body: K.BlockStatementKind, computed?: boolean): namedTypes.ObjectMethod;
  1660. from(params: {
  1661. accessibility?: K.LiteralKind | null;
  1662. async?: boolean;
  1663. body: K.BlockStatementKind;
  1664. comments?: K.CommentKind[] | null;
  1665. computed?: boolean;
  1666. decorators?: K.DecoratorKind[] | null;
  1667. defaults?: (K.ExpressionKind | null)[];
  1668. expression?: boolean;
  1669. generator?: boolean;
  1670. id?: K.IdentifierKind | null;
  1671. key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind;
  1672. kind: "method" | "get" | "set";
  1673. loc?: K.SourceLocationKind | null;
  1674. params: K.PatternKind[];
  1675. rest?: K.IdentifierKind | null;
  1676. returnType?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null;
  1677. typeParameters?: K.TypeParameterDeclarationKind | K.TSTypeParameterDeclarationKind | null;
  1678. }): namedTypes.ObjectMethod;
  1679. }
  1680. export interface ClassPrivatePropertyBuilder {
  1681. (key: K.PrivateNameKind, value?: K.ExpressionKind | null): namedTypes.ClassPrivateProperty;
  1682. from(params: {
  1683. access?: "public" | "private" | "protected" | undefined;
  1684. comments?: K.CommentKind[] | null;
  1685. computed?: boolean;
  1686. key: K.PrivateNameKind;
  1687. loc?: K.SourceLocationKind | null;
  1688. static?: boolean;
  1689. typeAnnotation?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null;
  1690. value?: K.ExpressionKind | null;
  1691. variance?: K.VarianceKind | "plus" | "minus" | null;
  1692. }): namedTypes.ClassPrivateProperty;
  1693. }
  1694. export interface ClassMethodBuilder {
  1695. (kind: "get" | "set" | "method" | "constructor" | undefined, key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind, params: K.PatternKind[], body: K.BlockStatementKind, computed?: boolean, staticParam?: boolean | null): namedTypes.ClassMethod;
  1696. from(params: {
  1697. abstract?: boolean | null;
  1698. access?: "public" | "private" | "protected" | null;
  1699. accessibility?: "public" | "private" | "protected" | null;
  1700. async?: boolean;
  1701. body: K.BlockStatementKind;
  1702. comments?: K.CommentKind[] | null;
  1703. computed?: boolean;
  1704. decorators?: K.DecoratorKind[] | null;
  1705. defaults?: (K.ExpressionKind | null)[];
  1706. expression?: boolean;
  1707. generator?: boolean;
  1708. id?: K.IdentifierKind | null;
  1709. key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind;
  1710. kind?: "get" | "set" | "method" | "constructor";
  1711. loc?: K.SourceLocationKind | null;
  1712. optional?: boolean | null;
  1713. params: K.PatternKind[];
  1714. rest?: K.IdentifierKind | null;
  1715. returnType?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null;
  1716. static?: boolean | null;
  1717. typeParameters?: K.TypeParameterDeclarationKind | K.TSTypeParameterDeclarationKind | null;
  1718. }): namedTypes.ClassMethod;
  1719. }
  1720. export interface ClassPrivateMethodBuilder {
  1721. (key: K.PrivateNameKind, params: K.PatternKind[], body: K.BlockStatementKind, kind?: "get" | "set" | "method" | "constructor", computed?: boolean, staticParam?: boolean | null): namedTypes.ClassPrivateMethod;
  1722. from(params: {
  1723. abstract?: boolean | null;
  1724. access?: "public" | "private" | "protected" | null;
  1725. accessibility?: "public" | "private" | "protected" | null;
  1726. async?: boolean;
  1727. body: K.BlockStatementKind;
  1728. comments?: K.CommentKind[] | null;
  1729. computed?: boolean;
  1730. decorators?: K.DecoratorKind[] | null;
  1731. defaults?: (K.ExpressionKind | null)[];
  1732. expression?: boolean;
  1733. generator?: boolean;
  1734. id?: K.IdentifierKind | null;
  1735. key: K.PrivateNameKind;
  1736. kind?: "get" | "set" | "method" | "constructor";
  1737. loc?: K.SourceLocationKind | null;
  1738. optional?: boolean | null;
  1739. params: K.PatternKind[];
  1740. rest?: K.IdentifierKind | null;
  1741. returnType?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null;
  1742. static?: boolean | null;
  1743. typeParameters?: K.TypeParameterDeclarationKind | K.TSTypeParameterDeclarationKind | null;
  1744. }): namedTypes.ClassPrivateMethod;
  1745. }
  1746. export interface PrivateNameBuilder {
  1747. (id: K.IdentifierKind): namedTypes.PrivateName;
  1748. from(params: {
  1749. comments?: K.CommentKind[] | null;
  1750. id: K.IdentifierKind;
  1751. loc?: K.SourceLocationKind | null;
  1752. }): namedTypes.PrivateName;
  1753. }
  1754. export interface RestPropertyBuilder {
  1755. (argument: K.ExpressionKind): namedTypes.RestProperty;
  1756. from(params: {
  1757. argument: K.ExpressionKind;
  1758. comments?: K.CommentKind[] | null;
  1759. loc?: K.SourceLocationKind | null;
  1760. }): namedTypes.RestProperty;
  1761. }
  1762. export interface ForAwaitStatementBuilder {
  1763. (left: K.VariableDeclarationKind | K.ExpressionKind, right: K.ExpressionKind, body: K.StatementKind): namedTypes.ForAwaitStatement;
  1764. from(params: {
  1765. body: K.StatementKind;
  1766. comments?: K.CommentKind[] | null;
  1767. left: K.VariableDeclarationKind | K.ExpressionKind;
  1768. loc?: K.SourceLocationKind | null;
  1769. right: K.ExpressionKind;
  1770. }): namedTypes.ForAwaitStatement;
  1771. }
  1772. export interface ImportBuilder {
  1773. (): namedTypes.Import;
  1774. from(params: {
  1775. comments?: K.CommentKind[] | null;
  1776. loc?: K.SourceLocationKind | null;
  1777. }): namedTypes.Import;
  1778. }
  1779. export interface TSQualifiedNameBuilder {
  1780. (left: K.IdentifierKind | K.TSQualifiedNameKind, right: K.IdentifierKind | K.TSQualifiedNameKind): namedTypes.TSQualifiedName;
  1781. from(params: {
  1782. comments?: K.CommentKind[] | null;
  1783. left: K.IdentifierKind | K.TSQualifiedNameKind;
  1784. loc?: K.SourceLocationKind | null;
  1785. right: K.IdentifierKind | K.TSQualifiedNameKind;
  1786. }): namedTypes.TSQualifiedName;
  1787. }
  1788. export interface TSTypeReferenceBuilder {
  1789. (typeName: K.IdentifierKind | K.TSQualifiedNameKind, typeParameters?: K.TSTypeParameterInstantiationKind | null): namedTypes.TSTypeReference;
  1790. from(params: {
  1791. comments?: K.CommentKind[] | null;
  1792. loc?: K.SourceLocationKind | null;
  1793. typeName: K.IdentifierKind | K.TSQualifiedNameKind;
  1794. typeParameters?: K.TSTypeParameterInstantiationKind | null;
  1795. }): namedTypes.TSTypeReference;
  1796. }
  1797. export interface TSAsExpressionBuilder {
  1798. (expression: K.ExpressionKind, typeAnnotation: K.TSTypeKind): namedTypes.TSAsExpression;
  1799. from(params: {
  1800. comments?: K.CommentKind[] | null;
  1801. expression: K.ExpressionKind;
  1802. extra?: {
  1803. parenthesized: boolean;
  1804. } | null;
  1805. loc?: K.SourceLocationKind | null;
  1806. typeAnnotation: K.TSTypeKind;
  1807. }): namedTypes.TSAsExpression;
  1808. }
  1809. export interface TSNonNullExpressionBuilder {
  1810. (expression: K.ExpressionKind): namedTypes.TSNonNullExpression;
  1811. from(params: {
  1812. comments?: K.CommentKind[] | null;
  1813. expression: K.ExpressionKind;
  1814. loc?: K.SourceLocationKind | null;
  1815. }): namedTypes.TSNonNullExpression;
  1816. }
  1817. export interface TSAnyKeywordBuilder {
  1818. (): namedTypes.TSAnyKeyword;
  1819. from(params: {
  1820. comments?: K.CommentKind[] | null;
  1821. loc?: K.SourceLocationKind | null;
  1822. }): namedTypes.TSAnyKeyword;
  1823. }
  1824. export interface TSBigIntKeywordBuilder {
  1825. (): namedTypes.TSBigIntKeyword;
  1826. from(params: {
  1827. comments?: K.CommentKind[] | null;
  1828. loc?: K.SourceLocationKind | null;
  1829. }): namedTypes.TSBigIntKeyword;
  1830. }
  1831. export interface TSBooleanKeywordBuilder {
  1832. (): namedTypes.TSBooleanKeyword;
  1833. from(params: {
  1834. comments?: K.CommentKind[] | null;
  1835. loc?: K.SourceLocationKind | null;
  1836. }): namedTypes.TSBooleanKeyword;
  1837. }
  1838. export interface TSNeverKeywordBuilder {
  1839. (): namedTypes.TSNeverKeyword;
  1840. from(params: {
  1841. comments?: K.CommentKind[] | null;
  1842. loc?: K.SourceLocationKind | null;
  1843. }): namedTypes.TSNeverKeyword;
  1844. }
  1845. export interface TSNullKeywordBuilder {
  1846. (): namedTypes.TSNullKeyword;
  1847. from(params: {
  1848. comments?: K.CommentKind[] | null;
  1849. loc?: K.SourceLocationKind | null;
  1850. }): namedTypes.TSNullKeyword;
  1851. }
  1852. export interface TSNumberKeywordBuilder {
  1853. (): namedTypes.TSNumberKeyword;
  1854. from(params: {
  1855. comments?: K.CommentKind[] | null;
  1856. loc?: K.SourceLocationKind | null;
  1857. }): namedTypes.TSNumberKeyword;
  1858. }
  1859. export interface TSObjectKeywordBuilder {
  1860. (): namedTypes.TSObjectKeyword;
  1861. from(params: {
  1862. comments?: K.CommentKind[] | null;
  1863. loc?: K.SourceLocationKind | null;
  1864. }): namedTypes.TSObjectKeyword;
  1865. }
  1866. export interface TSStringKeywordBuilder {
  1867. (): namedTypes.TSStringKeyword;
  1868. from(params: {
  1869. comments?: K.CommentKind[] | null;
  1870. loc?: K.SourceLocationKind | null;
  1871. }): namedTypes.TSStringKeyword;
  1872. }
  1873. export interface TSSymbolKeywordBuilder {
  1874. (): namedTypes.TSSymbolKeyword;
  1875. from(params: {
  1876. comments?: K.CommentKind[] | null;
  1877. loc?: K.SourceLocationKind | null;
  1878. }): namedTypes.TSSymbolKeyword;
  1879. }
  1880. export interface TSUndefinedKeywordBuilder {
  1881. (): namedTypes.TSUndefinedKeyword;
  1882. from(params: {
  1883. comments?: K.CommentKind[] | null;
  1884. loc?: K.SourceLocationKind | null;
  1885. }): namedTypes.TSUndefinedKeyword;
  1886. }
  1887. export interface TSUnknownKeywordBuilder {
  1888. (): namedTypes.TSUnknownKeyword;
  1889. from(params: {
  1890. comments?: K.CommentKind[] | null;
  1891. loc?: K.SourceLocationKind | null;
  1892. }): namedTypes.TSUnknownKeyword;
  1893. }
  1894. export interface TSVoidKeywordBuilder {
  1895. (): namedTypes.TSVoidKeyword;
  1896. from(params: {
  1897. comments?: K.CommentKind[] | null;
  1898. loc?: K.SourceLocationKind | null;
  1899. }): namedTypes.TSVoidKeyword;
  1900. }
  1901. export interface TSThisTypeBuilder {
  1902. (): namedTypes.TSThisType;
  1903. from(params: {
  1904. comments?: K.CommentKind[] | null;
  1905. loc?: K.SourceLocationKind | null;
  1906. }): namedTypes.TSThisType;
  1907. }
  1908. export interface TSArrayTypeBuilder {
  1909. (elementType: K.TSTypeKind): namedTypes.TSArrayType;
  1910. from(params: {
  1911. comments?: K.CommentKind[] | null;
  1912. elementType: K.TSTypeKind;
  1913. loc?: K.SourceLocationKind | null;
  1914. }): namedTypes.TSArrayType;
  1915. }
  1916. export interface TSLiteralTypeBuilder {
  1917. (literal: K.NumericLiteralKind | K.StringLiteralKind | K.BooleanLiteralKind | K.TemplateLiteralKind | K.UnaryExpressionKind): namedTypes.TSLiteralType;
  1918. from(params: {
  1919. comments?: K.CommentKind[] | null;
  1920. literal: K.NumericLiteralKind | K.StringLiteralKind | K.BooleanLiteralKind | K.TemplateLiteralKind | K.UnaryExpressionKind;
  1921. loc?: K.SourceLocationKind | null;
  1922. }): namedTypes.TSLiteralType;
  1923. }
  1924. export interface TSUnionTypeBuilder {
  1925. (types: K.TSTypeKind[]): namedTypes.TSUnionType;
  1926. from(params: {
  1927. comments?: K.CommentKind[] | null;
  1928. loc?: K.SourceLocationKind | null;
  1929. types: K.TSTypeKind[];
  1930. }): namedTypes.TSUnionType;
  1931. }
  1932. export interface TSIntersectionTypeBuilder {
  1933. (types: K.TSTypeKind[]): namedTypes.TSIntersectionType;
  1934. from(params: {
  1935. comments?: K.CommentKind[] | null;
  1936. loc?: K.SourceLocationKind | null;
  1937. types: K.TSTypeKind[];
  1938. }): namedTypes.TSIntersectionType;
  1939. }
  1940. export interface TSConditionalTypeBuilder {
  1941. (checkType: K.TSTypeKind, extendsType: K.TSTypeKind, trueType: K.TSTypeKind, falseType: K.TSTypeKind): namedTypes.TSConditionalType;
  1942. from(params: {
  1943. checkType: K.TSTypeKind;
  1944. comments?: K.CommentKind[] | null;
  1945. extendsType: K.TSTypeKind;
  1946. falseType: K.TSTypeKind;
  1947. loc?: K.SourceLocationKind | null;
  1948. trueType: K.TSTypeKind;
  1949. }): namedTypes.TSConditionalType;
  1950. }
  1951. export interface TSInferTypeBuilder {
  1952. (typeParameter: K.TSTypeParameterKind): namedTypes.TSInferType;
  1953. from(params: {
  1954. comments?: K.CommentKind[] | null;
  1955. loc?: K.SourceLocationKind | null;
  1956. typeParameter: K.TSTypeParameterKind;
  1957. }): namedTypes.TSInferType;
  1958. }
  1959. export interface TSTypeParameterBuilder {
  1960. (name: string, constraint?: K.TSTypeKind | undefined, defaultParam?: K.TSTypeKind | undefined): namedTypes.TSTypeParameter;
  1961. from(params: {
  1962. comments?: K.CommentKind[] | null;
  1963. constraint?: K.TSTypeKind | undefined;
  1964. default?: K.TSTypeKind | undefined;
  1965. loc?: K.SourceLocationKind | null;
  1966. name: string;
  1967. optional?: boolean;
  1968. typeAnnotation?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null;
  1969. }): namedTypes.TSTypeParameter;
  1970. }
  1971. export interface TSParenthesizedTypeBuilder {
  1972. (typeAnnotation: K.TSTypeKind): namedTypes.TSParenthesizedType;
  1973. from(params: {
  1974. comments?: K.CommentKind[] | null;
  1975. loc?: K.SourceLocationKind | null;
  1976. typeAnnotation: K.TSTypeKind;
  1977. }): namedTypes.TSParenthesizedType;
  1978. }
  1979. export interface TSFunctionTypeBuilder {
  1980. (parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[]): namedTypes.TSFunctionType;
  1981. from(params: {
  1982. comments?: K.CommentKind[] | null;
  1983. loc?: K.SourceLocationKind | null;
  1984. parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[];
  1985. typeAnnotation?: K.TSTypeAnnotationKind | null;
  1986. typeParameters?: K.TSTypeParameterDeclarationKind | null | undefined;
  1987. }): namedTypes.TSFunctionType;
  1988. }
  1989. export interface TSConstructorTypeBuilder {
  1990. (parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[]): namedTypes.TSConstructorType;
  1991. from(params: {
  1992. comments?: K.CommentKind[] | null;
  1993. loc?: K.SourceLocationKind | null;
  1994. parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[];
  1995. typeAnnotation?: K.TSTypeAnnotationKind | null;
  1996. typeParameters?: K.TSTypeParameterDeclarationKind | null | undefined;
  1997. }): namedTypes.TSConstructorType;
  1998. }
  1999. export interface TSDeclareFunctionBuilder {
  2000. (id: K.IdentifierKind | null | undefined, params: K.PatternKind[], returnType?: K.TSTypeAnnotationKind | K.NoopKind | null): namedTypes.TSDeclareFunction;
  2001. from(params: {
  2002. async?: boolean;
  2003. comments?: K.CommentKind[] | null;
  2004. declare?: boolean;
  2005. generator?: boolean;
  2006. id?: K.IdentifierKind | null;
  2007. loc?: K.SourceLocationKind | null;
  2008. params: K.PatternKind[];
  2009. returnType?: K.TSTypeAnnotationKind | K.NoopKind | null;
  2010. typeParameters?: K.TSTypeParameterDeclarationKind | null | undefined;
  2011. }): namedTypes.TSDeclareFunction;
  2012. }
  2013. export interface TSDeclareMethodBuilder {
  2014. (key: K.IdentifierKind | K.StringLiteralKind | K.NumericLiteralKind | K.ExpressionKind, params: K.PatternKind[], returnType?: K.TSTypeAnnotationKind | K.NoopKind | null): namedTypes.TSDeclareMethod;
  2015. from(params: {
  2016. abstract?: boolean;
  2017. access?: "public" | "private" | "protected" | undefined;
  2018. accessibility?: "public" | "private" | "protected" | undefined;
  2019. async?: boolean;
  2020. comments?: K.CommentKind[] | null;
  2021. computed?: boolean;
  2022. decorators?: K.DecoratorKind[] | null;
  2023. generator?: boolean;
  2024. key: K.IdentifierKind | K.StringLiteralKind | K.NumericLiteralKind | K.ExpressionKind;
  2025. kind?: "get" | "set" | "method" | "constructor";
  2026. loc?: K.SourceLocationKind | null;
  2027. optional?: boolean;
  2028. params: K.PatternKind[];
  2029. returnType?: K.TSTypeAnnotationKind | K.NoopKind | null;
  2030. static?: boolean;
  2031. typeParameters?: K.TSTypeParameterDeclarationKind | null | undefined;
  2032. }): namedTypes.TSDeclareMethod;
  2033. }
  2034. export interface TSMappedTypeBuilder {
  2035. (typeParameter: K.TSTypeParameterKind, typeAnnotation?: K.TSTypeKind | null): namedTypes.TSMappedType;
  2036. from(params: {
  2037. comments?: K.CommentKind[] | null;
  2038. loc?: K.SourceLocationKind | null;
  2039. optional?: boolean | "+" | "-";
  2040. readonly?: boolean | "+" | "-";
  2041. typeAnnotation?: K.TSTypeKind | null;
  2042. typeParameter: K.TSTypeParameterKind;
  2043. }): namedTypes.TSMappedType;
  2044. }
  2045. export interface TSTupleTypeBuilder {
  2046. (elementTypes: K.TSTypeKind[]): namedTypes.TSTupleType;
  2047. from(params: {
  2048. comments?: K.CommentKind[] | null;
  2049. elementTypes: K.TSTypeKind[];
  2050. loc?: K.SourceLocationKind | null;
  2051. }): namedTypes.TSTupleType;
  2052. }
  2053. export interface TSRestTypeBuilder {
  2054. (typeAnnotation: K.TSTypeKind): namedTypes.TSRestType;
  2055. from(params: {
  2056. comments?: K.CommentKind[] | null;
  2057. loc?: K.SourceLocationKind | null;
  2058. typeAnnotation: K.TSTypeKind;
  2059. }): namedTypes.TSRestType;
  2060. }
  2061. export interface TSOptionalTypeBuilder {
  2062. (typeAnnotation: K.TSTypeKind): namedTypes.TSOptionalType;
  2063. from(params: {
  2064. comments?: K.CommentKind[] | null;
  2065. loc?: K.SourceLocationKind | null;
  2066. typeAnnotation: K.TSTypeKind;
  2067. }): namedTypes.TSOptionalType;
  2068. }
  2069. export interface TSIndexedAccessTypeBuilder {
  2070. (objectType: K.TSTypeKind, indexType: K.TSTypeKind): namedTypes.TSIndexedAccessType;
  2071. from(params: {
  2072. comments?: K.CommentKind[] | null;
  2073. indexType: K.TSTypeKind;
  2074. loc?: K.SourceLocationKind | null;
  2075. objectType: K.TSTypeKind;
  2076. }): namedTypes.TSIndexedAccessType;
  2077. }
  2078. export interface TSTypeOperatorBuilder {
  2079. (operator: string): namedTypes.TSTypeOperator;
  2080. from(params: {
  2081. comments?: K.CommentKind[] | null;
  2082. loc?: K.SourceLocationKind | null;
  2083. operator: string;
  2084. typeAnnotation: K.TSTypeKind;
  2085. }): namedTypes.TSTypeOperator;
  2086. }
  2087. export interface TSIndexSignatureBuilder {
  2088. (parameters: K.IdentifierKind[], typeAnnotation?: K.TSTypeAnnotationKind | null): namedTypes.TSIndexSignature;
  2089. from(params: {
  2090. comments?: K.CommentKind[] | null;
  2091. loc?: K.SourceLocationKind | null;
  2092. parameters: K.IdentifierKind[];
  2093. readonly?: boolean;
  2094. typeAnnotation?: K.TSTypeAnnotationKind | null;
  2095. }): namedTypes.TSIndexSignature;
  2096. }
  2097. export interface TSPropertySignatureBuilder {
  2098. (key: K.ExpressionKind, typeAnnotation?: K.TSTypeAnnotationKind | null, optional?: boolean): namedTypes.TSPropertySignature;
  2099. from(params: {
  2100. comments?: K.CommentKind[] | null;
  2101. computed?: boolean;
  2102. initializer?: K.ExpressionKind | null;
  2103. key: K.ExpressionKind;
  2104. loc?: K.SourceLocationKind | null;
  2105. optional?: boolean;
  2106. readonly?: boolean;
  2107. typeAnnotation?: K.TSTypeAnnotationKind | null;
  2108. }): namedTypes.TSPropertySignature;
  2109. }
  2110. export interface TSMethodSignatureBuilder {
  2111. (key: K.ExpressionKind, parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[], typeAnnotation?: K.TSTypeAnnotationKind | null): namedTypes.TSMethodSignature;
  2112. from(params: {
  2113. comments?: K.CommentKind[] | null;
  2114. computed?: boolean;
  2115. key: K.ExpressionKind;
  2116. loc?: K.SourceLocationKind | null;
  2117. optional?: boolean;
  2118. parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[];
  2119. typeAnnotation?: K.TSTypeAnnotationKind | null;
  2120. typeParameters?: K.TSTypeParameterDeclarationKind | null | undefined;
  2121. }): namedTypes.TSMethodSignature;
  2122. }
  2123. export interface TSTypePredicateBuilder {
  2124. (parameterName: K.IdentifierKind | K.TSThisTypeKind, typeAnnotation: K.TSTypeAnnotationKind): namedTypes.TSTypePredicate;
  2125. from(params: {
  2126. comments?: K.CommentKind[] | null;
  2127. loc?: K.SourceLocationKind | null;
  2128. parameterName: K.IdentifierKind | K.TSThisTypeKind;
  2129. typeAnnotation: K.TSTypeAnnotationKind;
  2130. }): namedTypes.TSTypePredicate;
  2131. }
  2132. export interface TSCallSignatureDeclarationBuilder {
  2133. (parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[], typeAnnotation?: K.TSTypeAnnotationKind | null): namedTypes.TSCallSignatureDeclaration;
  2134. from(params: {
  2135. comments?: K.CommentKind[] | null;
  2136. loc?: K.SourceLocationKind | null;
  2137. parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[];
  2138. typeAnnotation?: K.TSTypeAnnotationKind | null;
  2139. typeParameters?: K.TSTypeParameterDeclarationKind | null | undefined;
  2140. }): namedTypes.TSCallSignatureDeclaration;
  2141. }
  2142. export interface TSConstructSignatureDeclarationBuilder {
  2143. (parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[], typeAnnotation?: K.TSTypeAnnotationKind | null): namedTypes.TSConstructSignatureDeclaration;
  2144. from(params: {
  2145. comments?: K.CommentKind[] | null;
  2146. loc?: K.SourceLocationKind | null;
  2147. parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[];
  2148. typeAnnotation?: K.TSTypeAnnotationKind | null;
  2149. typeParameters?: K.TSTypeParameterDeclarationKind | null | undefined;
  2150. }): namedTypes.TSConstructSignatureDeclaration;
  2151. }
  2152. export interface TSEnumMemberBuilder {
  2153. (id: K.IdentifierKind | K.StringLiteralKind, initializer?: K.ExpressionKind | null): namedTypes.TSEnumMember;
  2154. from(params: {
  2155. comments?: K.CommentKind[] | null;
  2156. id: K.IdentifierKind | K.StringLiteralKind;
  2157. initializer?: K.ExpressionKind | null;
  2158. loc?: K.SourceLocationKind | null;
  2159. }): namedTypes.TSEnumMember;
  2160. }
  2161. export interface TSTypeQueryBuilder {
  2162. (exprName: K.IdentifierKind | K.TSQualifiedNameKind | K.TSImportTypeKind): namedTypes.TSTypeQuery;
  2163. from(params: {
  2164. comments?: K.CommentKind[] | null;
  2165. exprName: K.IdentifierKind | K.TSQualifiedNameKind | K.TSImportTypeKind;
  2166. loc?: K.SourceLocationKind | null;
  2167. }): namedTypes.TSTypeQuery;
  2168. }
  2169. export interface TSImportTypeBuilder {
  2170. (argument: K.StringLiteralKind, qualifier?: K.IdentifierKind | K.TSQualifiedNameKind | undefined, typeParameters?: K.TSTypeParameterInstantiationKind | null): namedTypes.TSImportType;
  2171. from(params: {
  2172. argument: K.StringLiteralKind;
  2173. comments?: K.CommentKind[] | null;
  2174. loc?: K.SourceLocationKind | null;
  2175. qualifier?: K.IdentifierKind | K.TSQualifiedNameKind | undefined;
  2176. typeParameters?: K.TSTypeParameterInstantiationKind | null;
  2177. }): namedTypes.TSImportType;
  2178. }
  2179. export interface TSTypeLiteralBuilder {
  2180. (members: (K.TSCallSignatureDeclarationKind | K.TSConstructSignatureDeclarationKind | K.TSIndexSignatureKind | K.TSMethodSignatureKind | K.TSPropertySignatureKind)[]): namedTypes.TSTypeLiteral;
  2181. from(params: {
  2182. comments?: K.CommentKind[] | null;
  2183. loc?: K.SourceLocationKind | null;
  2184. members: (K.TSCallSignatureDeclarationKind | K.TSConstructSignatureDeclarationKind | K.TSIndexSignatureKind | K.TSMethodSignatureKind | K.TSPropertySignatureKind)[];
  2185. }): namedTypes.TSTypeLiteral;
  2186. }
  2187. export interface TSTypeAssertionBuilder {
  2188. (typeAnnotation: K.TSTypeKind, expression: K.ExpressionKind): namedTypes.TSTypeAssertion;
  2189. from(params: {
  2190. comments?: K.CommentKind[] | null;
  2191. expression: K.ExpressionKind;
  2192. extra?: {
  2193. parenthesized: boolean;
  2194. } | null;
  2195. loc?: K.SourceLocationKind | null;
  2196. typeAnnotation: K.TSTypeKind;
  2197. }): namedTypes.TSTypeAssertion;
  2198. }
  2199. export interface TSEnumDeclarationBuilder {
  2200. (id: K.IdentifierKind, members: K.TSEnumMemberKind[]): namedTypes.TSEnumDeclaration;
  2201. from(params: {
  2202. comments?: K.CommentKind[] | null;
  2203. const?: boolean;
  2204. declare?: boolean;
  2205. id: K.IdentifierKind;
  2206. initializer?: K.ExpressionKind | null;
  2207. loc?: K.SourceLocationKind | null;
  2208. members: K.TSEnumMemberKind[];
  2209. }): namedTypes.TSEnumDeclaration;
  2210. }
  2211. export interface TSTypeAliasDeclarationBuilder {
  2212. (id: K.IdentifierKind, typeAnnotation: K.TSTypeKind): namedTypes.TSTypeAliasDeclaration;
  2213. from(params: {
  2214. comments?: K.CommentKind[] | null;
  2215. declare?: boolean;
  2216. id: K.IdentifierKind;
  2217. loc?: K.SourceLocationKind | null;
  2218. typeAnnotation: K.TSTypeKind;
  2219. typeParameters?: K.TSTypeParameterDeclarationKind | null | undefined;
  2220. }): namedTypes.TSTypeAliasDeclaration;
  2221. }
  2222. export interface TSModuleBlockBuilder {
  2223. (body: K.StatementKind[]): namedTypes.TSModuleBlock;
  2224. from(params: {
  2225. body: K.StatementKind[];
  2226. comments?: K.CommentKind[] | null;
  2227. loc?: K.SourceLocationKind | null;
  2228. }): namedTypes.TSModuleBlock;
  2229. }
  2230. export interface TSModuleDeclarationBuilder {
  2231. (id: K.StringLiteralKind | K.IdentifierKind | K.TSQualifiedNameKind, body?: K.TSModuleBlockKind | K.TSModuleDeclarationKind | null): namedTypes.TSModuleDeclaration;
  2232. from(params: {
  2233. body?: K.TSModuleBlockKind | K.TSModuleDeclarationKind | null;
  2234. comments?: K.CommentKind[] | null;
  2235. declare?: boolean;
  2236. global?: boolean;
  2237. id: K.StringLiteralKind | K.IdentifierKind | K.TSQualifiedNameKind;
  2238. loc?: K.SourceLocationKind | null;
  2239. }): namedTypes.TSModuleDeclaration;
  2240. }
  2241. export interface TSImportEqualsDeclarationBuilder {
  2242. (id: K.IdentifierKind, moduleReference: K.IdentifierKind | K.TSQualifiedNameKind | K.TSExternalModuleReferenceKind): namedTypes.TSImportEqualsDeclaration;
  2243. from(params: {
  2244. comments?: K.CommentKind[] | null;
  2245. id: K.IdentifierKind;
  2246. isExport?: boolean;
  2247. loc?: K.SourceLocationKind | null;
  2248. moduleReference: K.IdentifierKind | K.TSQualifiedNameKind | K.TSExternalModuleReferenceKind;
  2249. }): namedTypes.TSImportEqualsDeclaration;
  2250. }
  2251. export interface TSExternalModuleReferenceBuilder {
  2252. (expression: K.StringLiteralKind): namedTypes.TSExternalModuleReference;
  2253. from(params: {
  2254. comments?: K.CommentKind[] | null;
  2255. expression: K.StringLiteralKind;
  2256. loc?: K.SourceLocationKind | null;
  2257. }): namedTypes.TSExternalModuleReference;
  2258. }
  2259. export interface TSExportAssignmentBuilder {
  2260. (expression: K.ExpressionKind): namedTypes.TSExportAssignment;
  2261. from(params: {
  2262. comments?: K.CommentKind[] | null;
  2263. expression: K.ExpressionKind;
  2264. loc?: K.SourceLocationKind | null;
  2265. }): namedTypes.TSExportAssignment;
  2266. }
  2267. export interface TSNamespaceExportDeclarationBuilder {
  2268. (id: K.IdentifierKind): namedTypes.TSNamespaceExportDeclaration;
  2269. from(params: {
  2270. comments?: K.CommentKind[] | null;
  2271. id: K.IdentifierKind;
  2272. loc?: K.SourceLocationKind | null;
  2273. }): namedTypes.TSNamespaceExportDeclaration;
  2274. }
  2275. export interface TSInterfaceBodyBuilder {
  2276. (body: (K.TSCallSignatureDeclarationKind | K.TSConstructSignatureDeclarationKind | K.TSIndexSignatureKind | K.TSMethodSignatureKind | K.TSPropertySignatureKind)[]): namedTypes.TSInterfaceBody;
  2277. from(params: {
  2278. body: (K.TSCallSignatureDeclarationKind | K.TSConstructSignatureDeclarationKind | K.TSIndexSignatureKind | K.TSMethodSignatureKind | K.TSPropertySignatureKind)[];
  2279. comments?: K.CommentKind[] | null;
  2280. loc?: K.SourceLocationKind | null;
  2281. }): namedTypes.TSInterfaceBody;
  2282. }
  2283. export interface TSInterfaceDeclarationBuilder {
  2284. (id: K.IdentifierKind | K.TSQualifiedNameKind, body: K.TSInterfaceBodyKind): namedTypes.TSInterfaceDeclaration;
  2285. from(params: {
  2286. body: K.TSInterfaceBodyKind;
  2287. comments?: K.CommentKind[] | null;
  2288. declare?: boolean;
  2289. extends?: K.TSExpressionWithTypeArgumentsKind[] | null;
  2290. id: K.IdentifierKind | K.TSQualifiedNameKind;
  2291. loc?: K.SourceLocationKind | null;
  2292. typeParameters?: K.TSTypeParameterDeclarationKind | null | undefined;
  2293. }): namedTypes.TSInterfaceDeclaration;
  2294. }
  2295. export interface TSParameterPropertyBuilder {
  2296. (parameter: K.IdentifierKind | K.AssignmentPatternKind): namedTypes.TSParameterProperty;
  2297. from(params: {
  2298. accessibility?: "public" | "private" | "protected" | undefined;
  2299. comments?: K.CommentKind[] | null;
  2300. loc?: K.SourceLocationKind | null;
  2301. parameter: K.IdentifierKind | K.AssignmentPatternKind;
  2302. readonly?: boolean;
  2303. }): namedTypes.TSParameterProperty;
  2304. }
  2305. export interface OptionalMemberExpressionBuilder {
  2306. (object: K.ExpressionKind, property: K.IdentifierKind | K.ExpressionKind, computed?: boolean, optional?: boolean): namedTypes.OptionalMemberExpression;
  2307. from(params: {
  2308. comments?: K.CommentKind[] | null;
  2309. computed?: boolean;
  2310. loc?: K.SourceLocationKind | null;
  2311. object: K.ExpressionKind;
  2312. optional?: boolean;
  2313. property: K.IdentifierKind | K.ExpressionKind;
  2314. }): namedTypes.OptionalMemberExpression;
  2315. }
  2316. export interface OptionalCallExpressionBuilder {
  2317. (callee: K.ExpressionKind, argumentsParam: (K.ExpressionKind | K.SpreadElementKind)[], optional?: boolean): namedTypes.OptionalCallExpression;
  2318. from(params: {
  2319. arguments: (K.ExpressionKind | K.SpreadElementKind)[];
  2320. callee: K.ExpressionKind;
  2321. comments?: K.CommentKind[] | null;
  2322. loc?: K.SourceLocationKind | null;
  2323. optional?: boolean;
  2324. typeArguments?: null | K.TypeParameterInstantiationKind;
  2325. }): namedTypes.OptionalCallExpression;
  2326. }
  2327. export interface builders {
  2328. file: FileBuilder;
  2329. program: ProgramBuilder;
  2330. identifier: IdentifierBuilder;
  2331. blockStatement: BlockStatementBuilder;
  2332. emptyStatement: EmptyStatementBuilder;
  2333. expressionStatement: ExpressionStatementBuilder;
  2334. ifStatement: IfStatementBuilder;
  2335. labeledStatement: LabeledStatementBuilder;
  2336. breakStatement: BreakStatementBuilder;
  2337. continueStatement: ContinueStatementBuilder;
  2338. withStatement: WithStatementBuilder;
  2339. switchStatement: SwitchStatementBuilder;
  2340. switchCase: SwitchCaseBuilder;
  2341. returnStatement: ReturnStatementBuilder;
  2342. throwStatement: ThrowStatementBuilder;
  2343. tryStatement: TryStatementBuilder;
  2344. catchClause: CatchClauseBuilder;
  2345. whileStatement: WhileStatementBuilder;
  2346. doWhileStatement: DoWhileStatementBuilder;
  2347. forStatement: ForStatementBuilder;
  2348. variableDeclaration: VariableDeclarationBuilder;
  2349. forInStatement: ForInStatementBuilder;
  2350. debuggerStatement: DebuggerStatementBuilder;
  2351. functionDeclaration: FunctionDeclarationBuilder;
  2352. functionExpression: FunctionExpressionBuilder;
  2353. variableDeclarator: VariableDeclaratorBuilder;
  2354. thisExpression: ThisExpressionBuilder;
  2355. arrayExpression: ArrayExpressionBuilder;
  2356. objectExpression: ObjectExpressionBuilder;
  2357. property: PropertyBuilder;
  2358. literal: LiteralBuilder;
  2359. sequenceExpression: SequenceExpressionBuilder;
  2360. unaryExpression: UnaryExpressionBuilder;
  2361. binaryExpression: BinaryExpressionBuilder;
  2362. assignmentExpression: AssignmentExpressionBuilder;
  2363. memberExpression: MemberExpressionBuilder;
  2364. updateExpression: UpdateExpressionBuilder;
  2365. logicalExpression: LogicalExpressionBuilder;
  2366. conditionalExpression: ConditionalExpressionBuilder;
  2367. newExpression: NewExpressionBuilder;
  2368. callExpression: CallExpressionBuilder;
  2369. restElement: RestElementBuilder;
  2370. typeAnnotation: TypeAnnotationBuilder;
  2371. tsTypeAnnotation: TSTypeAnnotationBuilder;
  2372. spreadElementPattern: SpreadElementPatternBuilder;
  2373. arrowFunctionExpression: ArrowFunctionExpressionBuilder;
  2374. forOfStatement: ForOfStatementBuilder;
  2375. yieldExpression: YieldExpressionBuilder;
  2376. generatorExpression: GeneratorExpressionBuilder;
  2377. comprehensionBlock: ComprehensionBlockBuilder;
  2378. comprehensionExpression: ComprehensionExpressionBuilder;
  2379. objectProperty: ObjectPropertyBuilder;
  2380. propertyPattern: PropertyPatternBuilder;
  2381. objectPattern: ObjectPatternBuilder;
  2382. arrayPattern: ArrayPatternBuilder;
  2383. methodDefinition: MethodDefinitionBuilder;
  2384. spreadElement: SpreadElementBuilder;
  2385. assignmentPattern: AssignmentPatternBuilder;
  2386. classPropertyDefinition: ClassPropertyDefinitionBuilder;
  2387. classProperty: ClassPropertyBuilder;
  2388. classBody: ClassBodyBuilder;
  2389. classDeclaration: ClassDeclarationBuilder;
  2390. classExpression: ClassExpressionBuilder;
  2391. importSpecifier: ImportSpecifierBuilder;
  2392. importNamespaceSpecifier: ImportNamespaceSpecifierBuilder;
  2393. importDefaultSpecifier: ImportDefaultSpecifierBuilder;
  2394. importDeclaration: ImportDeclarationBuilder;
  2395. taggedTemplateExpression: TaggedTemplateExpressionBuilder;
  2396. templateLiteral: TemplateLiteralBuilder;
  2397. templateElement: TemplateElementBuilder;
  2398. spreadProperty: SpreadPropertyBuilder;
  2399. spreadPropertyPattern: SpreadPropertyPatternBuilder;
  2400. awaitExpression: AwaitExpressionBuilder;
  2401. importExpression: ImportExpressionBuilder;
  2402. jsxAttribute: JSXAttributeBuilder;
  2403. jsxIdentifier: JSXIdentifierBuilder;
  2404. jsxNamespacedName: JSXNamespacedNameBuilder;
  2405. jsxExpressionContainer: JSXExpressionContainerBuilder;
  2406. jsxMemberExpression: JSXMemberExpressionBuilder;
  2407. jsxSpreadAttribute: JSXSpreadAttributeBuilder;
  2408. jsxElement: JSXElementBuilder;
  2409. jsxOpeningElement: JSXOpeningElementBuilder;
  2410. jsxClosingElement: JSXClosingElementBuilder;
  2411. jsxFragment: JSXFragmentBuilder;
  2412. jsxText: JSXTextBuilder;
  2413. jsxOpeningFragment: JSXOpeningFragmentBuilder;
  2414. jsxClosingFragment: JSXClosingFragmentBuilder;
  2415. jsxEmptyExpression: JSXEmptyExpressionBuilder;
  2416. jsxSpreadChild: JSXSpreadChildBuilder;
  2417. typeParameterDeclaration: TypeParameterDeclarationBuilder;
  2418. tsTypeParameterDeclaration: TSTypeParameterDeclarationBuilder;
  2419. typeParameterInstantiation: TypeParameterInstantiationBuilder;
  2420. tsTypeParameterInstantiation: TSTypeParameterInstantiationBuilder;
  2421. classImplements: ClassImplementsBuilder;
  2422. tsExpressionWithTypeArguments: TSExpressionWithTypeArgumentsBuilder;
  2423. anyTypeAnnotation: AnyTypeAnnotationBuilder;
  2424. emptyTypeAnnotation: EmptyTypeAnnotationBuilder;
  2425. mixedTypeAnnotation: MixedTypeAnnotationBuilder;
  2426. voidTypeAnnotation: VoidTypeAnnotationBuilder;
  2427. numberTypeAnnotation: NumberTypeAnnotationBuilder;
  2428. numberLiteralTypeAnnotation: NumberLiteralTypeAnnotationBuilder;
  2429. numericLiteralTypeAnnotation: NumericLiteralTypeAnnotationBuilder;
  2430. stringTypeAnnotation: StringTypeAnnotationBuilder;
  2431. stringLiteralTypeAnnotation: StringLiteralTypeAnnotationBuilder;
  2432. booleanTypeAnnotation: BooleanTypeAnnotationBuilder;
  2433. booleanLiteralTypeAnnotation: BooleanLiteralTypeAnnotationBuilder;
  2434. nullableTypeAnnotation: NullableTypeAnnotationBuilder;
  2435. nullLiteralTypeAnnotation: NullLiteralTypeAnnotationBuilder;
  2436. nullTypeAnnotation: NullTypeAnnotationBuilder;
  2437. thisTypeAnnotation: ThisTypeAnnotationBuilder;
  2438. existsTypeAnnotation: ExistsTypeAnnotationBuilder;
  2439. existentialTypeParam: ExistentialTypeParamBuilder;
  2440. functionTypeAnnotation: FunctionTypeAnnotationBuilder;
  2441. functionTypeParam: FunctionTypeParamBuilder;
  2442. arrayTypeAnnotation: ArrayTypeAnnotationBuilder;
  2443. objectTypeAnnotation: ObjectTypeAnnotationBuilder;
  2444. objectTypeProperty: ObjectTypePropertyBuilder;
  2445. objectTypeSpreadProperty: ObjectTypeSpreadPropertyBuilder;
  2446. objectTypeIndexer: ObjectTypeIndexerBuilder;
  2447. objectTypeCallProperty: ObjectTypeCallPropertyBuilder;
  2448. objectTypeInternalSlot: ObjectTypeInternalSlotBuilder;
  2449. variance: VarianceBuilder;
  2450. qualifiedTypeIdentifier: QualifiedTypeIdentifierBuilder;
  2451. genericTypeAnnotation: GenericTypeAnnotationBuilder;
  2452. memberTypeAnnotation: MemberTypeAnnotationBuilder;
  2453. unionTypeAnnotation: UnionTypeAnnotationBuilder;
  2454. intersectionTypeAnnotation: IntersectionTypeAnnotationBuilder;
  2455. typeofTypeAnnotation: TypeofTypeAnnotationBuilder;
  2456. typeParameter: TypeParameterBuilder;
  2457. interfaceTypeAnnotation: InterfaceTypeAnnotationBuilder;
  2458. interfaceExtends: InterfaceExtendsBuilder;
  2459. interfaceDeclaration: InterfaceDeclarationBuilder;
  2460. declareInterface: DeclareInterfaceBuilder;
  2461. typeAlias: TypeAliasBuilder;
  2462. opaqueType: OpaqueTypeBuilder;
  2463. declareTypeAlias: DeclareTypeAliasBuilder;
  2464. declareOpaqueType: DeclareOpaqueTypeBuilder;
  2465. typeCastExpression: TypeCastExpressionBuilder;
  2466. tupleTypeAnnotation: TupleTypeAnnotationBuilder;
  2467. declareVariable: DeclareVariableBuilder;
  2468. declareFunction: DeclareFunctionBuilder;
  2469. declareClass: DeclareClassBuilder;
  2470. declareModule: DeclareModuleBuilder;
  2471. declareModuleExports: DeclareModuleExportsBuilder;
  2472. declareExportDeclaration: DeclareExportDeclarationBuilder;
  2473. exportSpecifier: ExportSpecifierBuilder;
  2474. exportBatchSpecifier: ExportBatchSpecifierBuilder;
  2475. declareExportAllDeclaration: DeclareExportAllDeclarationBuilder;
  2476. inferredPredicate: InferredPredicateBuilder;
  2477. declaredPredicate: DeclaredPredicateBuilder;
  2478. exportDeclaration: ExportDeclarationBuilder;
  2479. block: BlockBuilder;
  2480. line: LineBuilder;
  2481. noop: NoopBuilder;
  2482. doExpression: DoExpressionBuilder;
  2483. super: SuperBuilder;
  2484. bindExpression: BindExpressionBuilder;
  2485. decorator: DecoratorBuilder;
  2486. metaProperty: MetaPropertyBuilder;
  2487. parenthesizedExpression: ParenthesizedExpressionBuilder;
  2488. exportDefaultDeclaration: ExportDefaultDeclarationBuilder;
  2489. exportNamedDeclaration: ExportNamedDeclarationBuilder;
  2490. exportNamespaceSpecifier: ExportNamespaceSpecifierBuilder;
  2491. exportDefaultSpecifier: ExportDefaultSpecifierBuilder;
  2492. exportAllDeclaration: ExportAllDeclarationBuilder;
  2493. commentBlock: CommentBlockBuilder;
  2494. commentLine: CommentLineBuilder;
  2495. directive: DirectiveBuilder;
  2496. directiveLiteral: DirectiveLiteralBuilder;
  2497. interpreterDirective: InterpreterDirectiveBuilder;
  2498. stringLiteral: StringLiteralBuilder;
  2499. numericLiteral: NumericLiteralBuilder;
  2500. bigIntLiteral: BigIntLiteralBuilder;
  2501. nullLiteral: NullLiteralBuilder;
  2502. booleanLiteral: BooleanLiteralBuilder;
  2503. regExpLiteral: RegExpLiteralBuilder;
  2504. objectMethod: ObjectMethodBuilder;
  2505. classPrivateProperty: ClassPrivatePropertyBuilder;
  2506. classMethod: ClassMethodBuilder;
  2507. classPrivateMethod: ClassPrivateMethodBuilder;
  2508. privateName: PrivateNameBuilder;
  2509. restProperty: RestPropertyBuilder;
  2510. forAwaitStatement: ForAwaitStatementBuilder;
  2511. import: ImportBuilder;
  2512. tsQualifiedName: TSQualifiedNameBuilder;
  2513. tsTypeReference: TSTypeReferenceBuilder;
  2514. tsAsExpression: TSAsExpressionBuilder;
  2515. tsNonNullExpression: TSNonNullExpressionBuilder;
  2516. tsAnyKeyword: TSAnyKeywordBuilder;
  2517. tsBigIntKeyword: TSBigIntKeywordBuilder;
  2518. tsBooleanKeyword: TSBooleanKeywordBuilder;
  2519. tsNeverKeyword: TSNeverKeywordBuilder;
  2520. tsNullKeyword: TSNullKeywordBuilder;
  2521. tsNumberKeyword: TSNumberKeywordBuilder;
  2522. tsObjectKeyword: TSObjectKeywordBuilder;
  2523. tsStringKeyword: TSStringKeywordBuilder;
  2524. tsSymbolKeyword: TSSymbolKeywordBuilder;
  2525. tsUndefinedKeyword: TSUndefinedKeywordBuilder;
  2526. tsUnknownKeyword: TSUnknownKeywordBuilder;
  2527. tsVoidKeyword: TSVoidKeywordBuilder;
  2528. tsThisType: TSThisTypeBuilder;
  2529. tsArrayType: TSArrayTypeBuilder;
  2530. tsLiteralType: TSLiteralTypeBuilder;
  2531. tsUnionType: TSUnionTypeBuilder;
  2532. tsIntersectionType: TSIntersectionTypeBuilder;
  2533. tsConditionalType: TSConditionalTypeBuilder;
  2534. tsInferType: TSInferTypeBuilder;
  2535. tsTypeParameter: TSTypeParameterBuilder;
  2536. tsParenthesizedType: TSParenthesizedTypeBuilder;
  2537. tsFunctionType: TSFunctionTypeBuilder;
  2538. tsConstructorType: TSConstructorTypeBuilder;
  2539. tsDeclareFunction: TSDeclareFunctionBuilder;
  2540. tsDeclareMethod: TSDeclareMethodBuilder;
  2541. tsMappedType: TSMappedTypeBuilder;
  2542. tsTupleType: TSTupleTypeBuilder;
  2543. tsRestType: TSRestTypeBuilder;
  2544. tsOptionalType: TSOptionalTypeBuilder;
  2545. tsIndexedAccessType: TSIndexedAccessTypeBuilder;
  2546. tsTypeOperator: TSTypeOperatorBuilder;
  2547. tsIndexSignature: TSIndexSignatureBuilder;
  2548. tsPropertySignature: TSPropertySignatureBuilder;
  2549. tsMethodSignature: TSMethodSignatureBuilder;
  2550. tsTypePredicate: TSTypePredicateBuilder;
  2551. tsCallSignatureDeclaration: TSCallSignatureDeclarationBuilder;
  2552. tsConstructSignatureDeclaration: TSConstructSignatureDeclarationBuilder;
  2553. tsEnumMember: TSEnumMemberBuilder;
  2554. tsTypeQuery: TSTypeQueryBuilder;
  2555. tsImportType: TSImportTypeBuilder;
  2556. tsTypeLiteral: TSTypeLiteralBuilder;
  2557. tsTypeAssertion: TSTypeAssertionBuilder;
  2558. tsEnumDeclaration: TSEnumDeclarationBuilder;
  2559. tsTypeAliasDeclaration: TSTypeAliasDeclarationBuilder;
  2560. tsModuleBlock: TSModuleBlockBuilder;
  2561. tsModuleDeclaration: TSModuleDeclarationBuilder;
  2562. tsImportEqualsDeclaration: TSImportEqualsDeclarationBuilder;
  2563. tsExternalModuleReference: TSExternalModuleReferenceBuilder;
  2564. tsExportAssignment: TSExportAssignmentBuilder;
  2565. tsNamespaceExportDeclaration: TSNamespaceExportDeclarationBuilder;
  2566. tsInterfaceBody: TSInterfaceBodyBuilder;
  2567. tsInterfaceDeclaration: TSInterfaceDeclarationBuilder;
  2568. tsParameterProperty: TSParameterPropertyBuilder;
  2569. optionalMemberExpression: OptionalMemberExpressionBuilder;
  2570. optionalCallExpression: OptionalCallExpressionBuilder;
  2571. [builderName: string]: any;
  2572. }