types.d.ts 406 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518
  1. /*
  2. * This file was automatically generated.
  3. * DO NOT MODIFY BY HAND.
  4. * Run `yarn special-lint-fix` to update
  5. */
  6. import { Buffer } from "buffer";
  7. import { Scope } from "eslint-scope";
  8. import {
  9. ArrayExpression,
  10. ArrayPattern,
  11. ArrowFunctionExpression,
  12. AssignmentExpression,
  13. AssignmentPattern,
  14. AssignmentProperty,
  15. AwaitExpression,
  16. BaseNode,
  17. BigIntLiteral,
  18. BinaryExpression,
  19. BlockStatement,
  20. BreakStatement,
  21. CatchClause,
  22. ChainExpression,
  23. ClassBody,
  24. ClassDeclaration,
  25. ClassExpression,
  26. Comment,
  27. ConditionalExpression,
  28. ContinueStatement,
  29. DebuggerStatement,
  30. Directive,
  31. DoWhileStatement,
  32. EmptyStatement,
  33. ExportAllDeclaration as ExportAllDeclarationImport,
  34. ExportDefaultDeclaration,
  35. ExportNamedDeclaration as ExportNamedDeclarationImport,
  36. ExportSpecifier,
  37. ExpressionStatement,
  38. ForInStatement,
  39. ForOfStatement,
  40. ForStatement,
  41. FunctionDeclaration,
  42. FunctionExpression,
  43. Identifier,
  44. IfStatement,
  45. ImportDeclaration as ImportDeclarationImport,
  46. ImportDefaultSpecifier,
  47. ImportExpression as ImportExpressionImport,
  48. ImportNamespaceSpecifier,
  49. ImportSpecifier,
  50. LabeledStatement,
  51. LogicalExpression,
  52. MemberExpression,
  53. MetaProperty,
  54. MethodDefinition,
  55. NewExpression,
  56. ObjectExpression,
  57. ObjectPattern,
  58. PrivateIdentifier,
  59. Program,
  60. Property,
  61. PropertyDefinition,
  62. RegExpLiteral,
  63. RestElement,
  64. ReturnStatement,
  65. SequenceExpression,
  66. SimpleCallExpression,
  67. SimpleLiteral,
  68. SpreadElement,
  69. StaticBlock,
  70. Super,
  71. SwitchCase,
  72. SwitchStatement,
  73. TaggedTemplateExpression,
  74. TemplateElement,
  75. TemplateLiteral,
  76. ThisExpression,
  77. ThrowStatement,
  78. TryStatement,
  79. UnaryExpression,
  80. UpdateExpression,
  81. VariableDeclaration,
  82. VariableDeclarator,
  83. WhileStatement,
  84. WithStatement,
  85. YieldExpression
  86. } from "estree";
  87. import {
  88. IncomingMessage,
  89. ServerOptions as ServerOptionsImport,
  90. ServerResponse
  91. } from "http";
  92. import { ListenOptions, Server } from "net";
  93. import { validate as validateFunction } from "schema-utils";
  94. import { default as ValidationError } from "schema-utils/declarations/ValidationError";
  95. import { ValidationErrorConfiguration } from "schema-utils/declarations/validate";
  96. import {
  97. AsArray,
  98. AsyncParallelHook,
  99. AsyncSeriesBailHook,
  100. AsyncSeriesHook,
  101. AsyncSeriesWaterfallHook,
  102. HookMap,
  103. IfSet,
  104. MultiHook,
  105. SyncBailHook,
  106. SyncHook,
  107. SyncWaterfallHook,
  108. TapOptions
  109. } from "tapable";
  110. import { SecureContextOptions, TlsOptions } from "tls";
  111. import { URL } from "url";
  112. import { Context } from "vm";
  113. declare interface Abortable {
  114. /**
  115. * When provided the corresponding `AbortController` can be used to cancel an asynchronous action.
  116. */
  117. signal?: AbortSignal;
  118. }
  119. declare class AbstractLibraryPlugin<T> {
  120. constructor(__0: {
  121. /**
  122. * name of the plugin
  123. */
  124. pluginName: string;
  125. /**
  126. * used library type
  127. */
  128. type: string;
  129. });
  130. /**
  131. * Apply the plugin
  132. */
  133. apply(compiler: Compiler): void;
  134. parseOptions(library: LibraryOptions): false | T;
  135. finishEntryModule(
  136. module: Module,
  137. entryName: string,
  138. libraryContext: LibraryContext<T>
  139. ): void;
  140. embedInRuntimeBailout(
  141. module: Module,
  142. renderContext: RenderContextJavascriptModulesPlugin,
  143. libraryContext: LibraryContext<T>
  144. ): undefined | string;
  145. strictRuntimeBailout(
  146. renderContext: RenderContextJavascriptModulesPlugin,
  147. libraryContext: LibraryContext<T>
  148. ): undefined | string;
  149. runtimeRequirements(
  150. chunk: Chunk,
  151. set: Set<string>,
  152. libraryContext: LibraryContext<T>
  153. ): void;
  154. render(
  155. source: Source,
  156. renderContext: RenderContextJavascriptModulesPlugin,
  157. libraryContext: LibraryContext<T>
  158. ): Source;
  159. renderStartup(
  160. source: Source,
  161. module: Module,
  162. renderContext: StartupRenderContext,
  163. libraryContext: LibraryContext<T>
  164. ): Source;
  165. chunkHash(
  166. chunk: Chunk,
  167. hash: Hash,
  168. chunkHashContext: ChunkHashContext,
  169. libraryContext: LibraryContext<T>
  170. ): void;
  171. static COMMON_LIBRARY_NAME_MESSAGE: string;
  172. }
  173. declare interface AdditionalData {
  174. [index: string]: any;
  175. webpackAST: object;
  176. }
  177. declare class AggressiveMergingPlugin {
  178. constructor(options?: AggressiveMergingPluginOptions);
  179. options: AggressiveMergingPluginOptions;
  180. /**
  181. * Apply the plugin
  182. */
  183. apply(compiler: Compiler): void;
  184. }
  185. declare interface AggressiveMergingPluginOptions {
  186. /**
  187. * minimal size reduction to trigger merging
  188. */
  189. minSizeReduce?: number;
  190. }
  191. declare class AggressiveSplittingPlugin {
  192. constructor(options?: AggressiveSplittingPluginOptions);
  193. options: AggressiveSplittingPluginOptions;
  194. /**
  195. * Apply the plugin
  196. */
  197. apply(compiler: Compiler): void;
  198. static wasChunkRecorded(chunk: Chunk): boolean;
  199. }
  200. declare interface AggressiveSplittingPluginOptions {
  201. /**
  202. * Extra cost for each chunk (Default: 9.8kiB).
  203. */
  204. chunkOverhead?: number;
  205. /**
  206. * Extra cost multiplicator for entry chunks (Default: 10).
  207. */
  208. entryChunkMultiplicator?: number;
  209. /**
  210. * Byte, max size of per file (Default: 50kiB).
  211. */
  212. maxSize?: number;
  213. /**
  214. * Byte, split point. (Default: 30kiB).
  215. */
  216. minSize?: number;
  217. }
  218. type Algorithm = string | typeof Hash;
  219. type Alias = string | false | string[];
  220. declare interface AliasOption {
  221. alias: Alias;
  222. name: string;
  223. onlyModule?: boolean;
  224. }
  225. type AliasOptionNewRequest = string | false | string[];
  226. declare interface AliasOptions {
  227. [index: string]: AliasOptionNewRequest;
  228. }
  229. declare interface Argument {
  230. description?: string;
  231. simpleType: SimpleType;
  232. multiple: boolean;
  233. configs: ArgumentConfig[];
  234. }
  235. declare interface ArgumentConfig {
  236. description?: string;
  237. negatedDescription?: string;
  238. path: string;
  239. multiple: boolean;
  240. type: "string" | "number" | "boolean" | "path" | "enum" | "RegExp" | "reset";
  241. values?: any[];
  242. }
  243. type ArrayBufferView =
  244. | Uint8Array
  245. | Uint8ClampedArray
  246. | Uint16Array
  247. | Uint32Array
  248. | Int8Array
  249. | Int16Array
  250. | Int32Array
  251. | BigUint64Array
  252. | BigInt64Array
  253. | Float32Array
  254. | Float64Array
  255. | DataView;
  256. declare interface Asset {
  257. /**
  258. * the filename of the asset
  259. */
  260. name: string;
  261. /**
  262. * source of the asset
  263. */
  264. source: Source;
  265. /**
  266. * info about the asset
  267. */
  268. info: AssetInfo;
  269. }
  270. declare interface AssetDependencyMeta {
  271. sourceType: "css-url";
  272. }
  273. declare interface AssetEmittedInfo {
  274. content: Buffer;
  275. source: Source;
  276. compilation: Compilation;
  277. outputPath: string;
  278. targetPath: string;
  279. }
  280. type AssetFilterItemTypes =
  281. | string
  282. | RegExp
  283. | ((name: string, asset: StatsAsset) => boolean);
  284. /**
  285. * Options object for data url generation.
  286. */
  287. declare interface AssetGeneratorDataUrlOptions {
  288. /**
  289. * Asset encoding (defaults to base64).
  290. */
  291. encoding?: false | "base64";
  292. /**
  293. * Asset mimetype (getting from file extension by default).
  294. */
  295. mimetype?: string;
  296. }
  297. type AssetGeneratorOptions = AssetInlineGeneratorOptions &
  298. AssetResourceGeneratorOptions;
  299. type AssetInfo = KnownAssetInfo & Record<string, any>;
  300. /**
  301. * Generator options for asset/inline modules.
  302. */
  303. declare interface AssetInlineGeneratorOptions {
  304. /**
  305. * Whether or not this asset module should be considered binary. This can be set to 'false' to treat this asset module as text.
  306. */
  307. binary?: boolean;
  308. /**
  309. * The options for data url generator.
  310. */
  311. dataUrl?:
  312. | AssetGeneratorDataUrlOptions
  313. | ((
  314. source: string | Buffer,
  315. context: { filename: string; module: Module }
  316. ) => string);
  317. }
  318. /**
  319. * Options object for DataUrl condition.
  320. */
  321. declare interface AssetParserDataUrlOptions {
  322. /**
  323. * Maximum size of asset that should be inline as modules. Default: 8kb.
  324. */
  325. maxSize?: number;
  326. }
  327. /**
  328. * Parser options for asset modules.
  329. */
  330. declare interface AssetParserOptions {
  331. /**
  332. * The condition for inlining the asset as DataUrl.
  333. */
  334. dataUrlCondition?:
  335. | AssetParserDataUrlOptions
  336. | ((
  337. source: string | Buffer,
  338. context: { filename: string; module: Module }
  339. ) => boolean);
  340. }
  341. /**
  342. * Generator options for asset/resource modules.
  343. */
  344. declare interface AssetResourceGeneratorOptions {
  345. /**
  346. * Whether or not this asset module should be considered binary. This can be set to 'false' to treat this asset module as text.
  347. */
  348. binary?: boolean;
  349. /**
  350. * Emit an output asset from this asset module. This can be set to 'false' to omit emitting e. g. for SSR.
  351. */
  352. emit?: boolean;
  353. /**
  354. * Specifies the filename template of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
  355. */
  356. filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
  357. /**
  358. * Emit the asset in the specified folder relative to 'output.path'. This should only be needed when custom 'publicPath' is specified to match the folder structure there.
  359. */
  360. outputPath?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
  361. /**
  362. * The 'publicPath' specifies the public URL address of the output files when referenced in a browser.
  363. */
  364. publicPath?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
  365. }
  366. declare class AsyncDependenciesBlock extends DependenciesBlock {
  367. constructor(
  368. groupOptions:
  369. | null
  370. | (RawChunkGroupOptions & { name?: null | string } & {
  371. entryOptions?: EntryOptions;
  372. }),
  373. loc?: null | SyntheticDependencyLocation | RealDependencyLocation,
  374. request?: null | string
  375. );
  376. groupOptions: RawChunkGroupOptions & { name?: null | string } & {
  377. entryOptions?: EntryOptions;
  378. };
  379. loc?: null | SyntheticDependencyLocation | RealDependencyLocation;
  380. request?: null | string;
  381. chunkName?: null | string;
  382. module: any;
  383. }
  384. declare abstract class AsyncQueue<T, K, R> {
  385. hooks: {
  386. beforeAdd: AsyncSeriesHook<[T]>;
  387. added: SyncHook<[T]>;
  388. beforeStart: AsyncSeriesHook<[T]>;
  389. started: SyncHook<[T]>;
  390. result: SyncHook<
  391. [T, undefined | null | WebpackError, undefined | null | R]
  392. >;
  393. };
  394. getContext(): string;
  395. setContext(value: string): void;
  396. add(item: T, callback: CallbackAsyncQueue<R>): void;
  397. invalidate(item: T): void;
  398. /**
  399. * Waits for an already started item
  400. */
  401. waitFor(item: T, callback: CallbackAsyncQueue<R>): void;
  402. stop(): void;
  403. increaseParallelism(): void;
  404. decreaseParallelism(): void;
  405. isProcessing(item: T): boolean;
  406. isQueued(item: T): boolean;
  407. isDone(item: T): boolean;
  408. clear(): void;
  409. }
  410. declare class AsyncWebAssemblyModulesPlugin {
  411. constructor(options: AsyncWebAssemblyModulesPluginOptions);
  412. options: AsyncWebAssemblyModulesPluginOptions;
  413. /**
  414. * Apply the plugin
  415. */
  416. apply(compiler: Compiler): void;
  417. renderModule(
  418. module: Module,
  419. renderContext: WebAssemblyRenderContext,
  420. hooks: CompilationHooksAsyncWebAssemblyModulesPlugin
  421. ): Source;
  422. static getCompilationHooks(
  423. compilation: Compilation
  424. ): CompilationHooksAsyncWebAssemblyModulesPlugin;
  425. }
  426. declare interface AsyncWebAssemblyModulesPluginOptions {
  427. /**
  428. * mangle imports
  429. */
  430. mangleImports?: boolean;
  431. }
  432. declare class AutomaticPrefetchPlugin {
  433. constructor();
  434. /**
  435. * Apply the plugin
  436. */
  437. apply(compiler: Compiler): void;
  438. }
  439. type AuxiliaryComment = string | LibraryCustomUmdCommentObject;
  440. declare interface BackendApi {
  441. dispose: (arg0: (arg0?: null | Error) => void) => void;
  442. module: (arg0: Module) => ModuleResult;
  443. }
  444. declare class BannerPlugin {
  445. constructor(options: BannerPluginArgument);
  446. options: BannerPluginOptions;
  447. banner: (data: { hash?: string; chunk: Chunk; filename: string }) => string;
  448. /**
  449. * Apply the plugin
  450. */
  451. apply(compiler: Compiler): void;
  452. }
  453. type BannerPluginArgument =
  454. | string
  455. | BannerPluginOptions
  456. | ((data: { hash?: string; chunk: Chunk; filename: string }) => string);
  457. declare interface BannerPluginOptions {
  458. /**
  459. * Specifies the banner.
  460. */
  461. banner:
  462. | string
  463. | ((data: { hash?: string; chunk: Chunk; filename: string }) => string);
  464. /**
  465. * If true, the banner will only be added to the entry chunks.
  466. */
  467. entryOnly?: boolean;
  468. /**
  469. * Exclude all modules matching any of these conditions.
  470. */
  471. exclude?: string | RegExp | Rule[];
  472. /**
  473. * If true, banner will be placed at the end of the output.
  474. */
  475. footer?: boolean;
  476. /**
  477. * Include all modules matching any of these conditions.
  478. */
  479. include?: string | RegExp | Rule[];
  480. /**
  481. * If true, banner will not be wrapped in a comment.
  482. */
  483. raw?: boolean;
  484. /**
  485. * Specifies the stage when add a banner.
  486. */
  487. stage?: number;
  488. /**
  489. * Include all modules that pass test assertion.
  490. */
  491. test?: string | RegExp | Rule[];
  492. }
  493. declare interface BaseResolveRequest {
  494. path: string | false;
  495. context?: object;
  496. descriptionFilePath?: string;
  497. descriptionFileRoot?: string;
  498. descriptionFileData?: JsonObjectTypes;
  499. relativePath?: string;
  500. ignoreSymlinks?: boolean;
  501. fullySpecified?: boolean;
  502. __innerRequest?: string;
  503. __innerRequest_request?: string;
  504. __innerRequest_relativePath?: string;
  505. }
  506. declare abstract class BasicEvaluatedExpression {
  507. type: number;
  508. range?: [number, number];
  509. falsy: boolean;
  510. truthy: boolean;
  511. nullish?: boolean;
  512. sideEffects: boolean;
  513. bool?: boolean;
  514. number?: number;
  515. bigint?: bigint;
  516. regExp?: RegExp;
  517. string?: string;
  518. quasis?: BasicEvaluatedExpression[];
  519. parts?: BasicEvaluatedExpression[];
  520. array?: any[];
  521. items?: BasicEvaluatedExpression[];
  522. options?: BasicEvaluatedExpression[];
  523. prefix?: null | BasicEvaluatedExpression;
  524. postfix?: null | BasicEvaluatedExpression;
  525. wrappedInnerExpressions?: BasicEvaluatedExpression[];
  526. identifier?: string | VariableInfoInterface;
  527. rootInfo?: string | VariableInfoInterface;
  528. getMembers?: () => string[];
  529. getMembersOptionals?: () => boolean[];
  530. getMemberRanges?: () => [number, number][];
  531. expression?:
  532. | Program
  533. | ImportDeclarationImport
  534. | ExportNamedDeclarationImport
  535. | ExportAllDeclarationImport
  536. | ImportExpressionImport
  537. | UnaryExpression
  538. | ArrayExpression
  539. | ArrowFunctionExpression
  540. | AssignmentExpression
  541. | AwaitExpression
  542. | BinaryExpression
  543. | SimpleCallExpression
  544. | NewExpression
  545. | ChainExpression
  546. | ClassExpression
  547. | ConditionalExpression
  548. | FunctionExpression
  549. | Identifier
  550. | SimpleLiteral
  551. | RegExpLiteral
  552. | BigIntLiteral
  553. | LogicalExpression
  554. | MemberExpression
  555. | MetaProperty
  556. | ObjectExpression
  557. | SequenceExpression
  558. | TaggedTemplateExpression
  559. | TemplateLiteral
  560. | ThisExpression
  561. | UpdateExpression
  562. | YieldExpression
  563. | SpreadElement
  564. | PrivateIdentifier
  565. | FunctionDeclaration
  566. | VariableDeclaration
  567. | ClassDeclaration
  568. | ExpressionStatement
  569. | BlockStatement
  570. | StaticBlock
  571. | EmptyStatement
  572. | DebuggerStatement
  573. | WithStatement
  574. | ReturnStatement
  575. | LabeledStatement
  576. | BreakStatement
  577. | ContinueStatement
  578. | IfStatement
  579. | SwitchStatement
  580. | ThrowStatement
  581. | TryStatement
  582. | WhileStatement
  583. | DoWhileStatement
  584. | ForStatement
  585. | ForInStatement
  586. | ForOfStatement
  587. | ExportDefaultDeclaration
  588. | MethodDefinition
  589. | PropertyDefinition
  590. | VariableDeclarator
  591. | SwitchCase
  592. | CatchClause
  593. | ObjectPattern
  594. | ArrayPattern
  595. | RestElement
  596. | AssignmentPattern
  597. | Property
  598. | Super
  599. | AssignmentProperty
  600. | ClassBody
  601. | ImportSpecifier
  602. | ImportDefaultSpecifier
  603. | ImportNamespaceSpecifier
  604. | ExportSpecifier
  605. | TemplateElement;
  606. isUnknown(): boolean;
  607. isNull(): boolean;
  608. isUndefined(): boolean;
  609. isString(): boolean;
  610. isNumber(): boolean;
  611. isBigInt(): boolean;
  612. isBoolean(): boolean;
  613. isRegExp(): boolean;
  614. isConditional(): boolean;
  615. isArray(): boolean;
  616. isConstArray(): boolean;
  617. isIdentifier(): boolean;
  618. isWrapped(): boolean;
  619. isTemplateString(): boolean;
  620. /**
  621. * Is expression a primitive or an object type value?
  622. */
  623. isPrimitiveType(): undefined | boolean;
  624. /**
  625. * Is expression a runtime or compile-time value?
  626. */
  627. isCompileTimeValue(): boolean;
  628. /**
  629. * Gets the compile-time value of the expression
  630. */
  631. asCompileTimeValue(): any;
  632. isTruthy(): boolean;
  633. isFalsy(): boolean;
  634. isNullish(): undefined | boolean;
  635. /**
  636. * Can this expression have side effects?
  637. */
  638. couldHaveSideEffects(): boolean;
  639. /**
  640. * Creates a boolean representation of this evaluated expression.
  641. */
  642. asBool(): undefined | boolean;
  643. /**
  644. * Creates a nullish coalescing representation of this evaluated expression.
  645. */
  646. asNullish(): undefined | boolean;
  647. /**
  648. * Creates a string representation of this evaluated expression.
  649. */
  650. asString(): undefined | string;
  651. setString(string: string): BasicEvaluatedExpression;
  652. setUndefined(): BasicEvaluatedExpression;
  653. setNull(): BasicEvaluatedExpression;
  654. /**
  655. * Set's the value of this expression to a number
  656. */
  657. setNumber(number: number): BasicEvaluatedExpression;
  658. /**
  659. * Set's the value of this expression to a BigInt
  660. */
  661. setBigInt(bigint: bigint): BasicEvaluatedExpression;
  662. /**
  663. * Set's the value of this expression to a boolean
  664. */
  665. setBoolean(bool: boolean): BasicEvaluatedExpression;
  666. /**
  667. * Set's the value of this expression to a regular expression
  668. */
  669. setRegExp(regExp: RegExp): BasicEvaluatedExpression;
  670. /**
  671. * Set's the value of this expression to a particular identifier and its members.
  672. */
  673. setIdentifier(
  674. identifier: string | VariableInfoInterface,
  675. rootInfo: string | VariableInfoInterface,
  676. getMembers: () => string[],
  677. getMembersOptionals?: () => boolean[],
  678. getMemberRanges?: () => [number, number][]
  679. ): BasicEvaluatedExpression;
  680. /**
  681. * Wraps an array of expressions with a prefix and postfix expression.
  682. */
  683. setWrapped(
  684. prefix?: null | BasicEvaluatedExpression,
  685. postfix?: null | BasicEvaluatedExpression,
  686. innerExpressions?: BasicEvaluatedExpression[]
  687. ): BasicEvaluatedExpression;
  688. /**
  689. * Stores the options of a conditional expression.
  690. */
  691. setOptions(options: BasicEvaluatedExpression[]): BasicEvaluatedExpression;
  692. /**
  693. * Adds options to a conditional expression.
  694. */
  695. addOptions(options: BasicEvaluatedExpression[]): BasicEvaluatedExpression;
  696. /**
  697. * Set's the value of this expression to an array of expressions.
  698. */
  699. setItems(items: BasicEvaluatedExpression[]): BasicEvaluatedExpression;
  700. /**
  701. * Set's the value of this expression to an array of strings.
  702. */
  703. setArray(array: string[]): BasicEvaluatedExpression;
  704. /**
  705. * Set's the value of this expression to a processed/unprocessed template string. Used
  706. * for evaluating TemplateLiteral expressions in the JavaScript Parser.
  707. */
  708. setTemplateString(
  709. quasis: BasicEvaluatedExpression[],
  710. parts: BasicEvaluatedExpression[],
  711. kind: "raw" | "cooked"
  712. ): BasicEvaluatedExpression;
  713. templateStringKind?: "raw" | "cooked";
  714. setTruthy(): BasicEvaluatedExpression;
  715. setFalsy(): BasicEvaluatedExpression;
  716. /**
  717. * Set's the value of the expression to nullish.
  718. */
  719. setNullish(value: boolean): BasicEvaluatedExpression;
  720. /**
  721. * Set's the range for the expression.
  722. */
  723. setRange(range: [number, number]): BasicEvaluatedExpression;
  724. /**
  725. * Set whether or not the expression has side effects.
  726. */
  727. setSideEffects(sideEffects?: boolean): BasicEvaluatedExpression;
  728. /**
  729. * Set the expression node for the expression.
  730. */
  731. setExpression(
  732. expression?:
  733. | Program
  734. | ImportDeclarationImport
  735. | ExportNamedDeclarationImport
  736. | ExportAllDeclarationImport
  737. | ImportExpressionImport
  738. | UnaryExpression
  739. | ArrayExpression
  740. | ArrowFunctionExpression
  741. | AssignmentExpression
  742. | AwaitExpression
  743. | BinaryExpression
  744. | SimpleCallExpression
  745. | NewExpression
  746. | ChainExpression
  747. | ClassExpression
  748. | ConditionalExpression
  749. | FunctionExpression
  750. | Identifier
  751. | SimpleLiteral
  752. | RegExpLiteral
  753. | BigIntLiteral
  754. | LogicalExpression
  755. | MemberExpression
  756. | MetaProperty
  757. | ObjectExpression
  758. | SequenceExpression
  759. | TaggedTemplateExpression
  760. | TemplateLiteral
  761. | ThisExpression
  762. | UpdateExpression
  763. | YieldExpression
  764. | SpreadElement
  765. | PrivateIdentifier
  766. | FunctionDeclaration
  767. | VariableDeclaration
  768. | ClassDeclaration
  769. | ExpressionStatement
  770. | BlockStatement
  771. | StaticBlock
  772. | EmptyStatement
  773. | DebuggerStatement
  774. | WithStatement
  775. | ReturnStatement
  776. | LabeledStatement
  777. | BreakStatement
  778. | ContinueStatement
  779. | IfStatement
  780. | SwitchStatement
  781. | ThrowStatement
  782. | TryStatement
  783. | WhileStatement
  784. | DoWhileStatement
  785. | ForStatement
  786. | ForInStatement
  787. | ForOfStatement
  788. | ExportDefaultDeclaration
  789. | MethodDefinition
  790. | PropertyDefinition
  791. | VariableDeclarator
  792. | SwitchCase
  793. | CatchClause
  794. | ObjectPattern
  795. | ArrayPattern
  796. | RestElement
  797. | AssignmentPattern
  798. | Property
  799. | Super
  800. | AssignmentProperty
  801. | ClassBody
  802. | ImportSpecifier
  803. | ImportDefaultSpecifier
  804. | ImportNamespaceSpecifier
  805. | ExportSpecifier
  806. | TemplateElement
  807. ): BasicEvaluatedExpression;
  808. }
  809. declare interface Bootstrap {
  810. header: string[];
  811. beforeStartup: string[];
  812. startup: string[];
  813. afterStartup: string[];
  814. allowInlineStartup: boolean;
  815. }
  816. type BufferEncoding =
  817. | "ascii"
  818. | "utf8"
  819. | "utf-8"
  820. | "utf16le"
  821. | "utf-16le"
  822. | "ucs2"
  823. | "ucs-2"
  824. | "latin1"
  825. | "binary"
  826. | "base64"
  827. | "base64url"
  828. | "hex";
  829. type BufferEncodingOption = "buffer" | { encoding: "buffer" };
  830. type BuildInfo = KnownBuildInfo & Record<string, any>;
  831. type BuildMeta = KnownBuildMeta & Record<string, any>;
  832. declare abstract class ByTypeGenerator extends Generator {
  833. map: Record<string, Generator>;
  834. }
  835. declare const CIRCULAR_CONNECTION: unique symbol;
  836. declare class Cache {
  837. constructor();
  838. hooks: {
  839. get: AsyncSeriesBailHook<
  840. [
  841. string,
  842. null | Etag,
  843. ((result: any, callback: (arg0?: Error) => void) => void)[]
  844. ],
  845. any
  846. >;
  847. store: AsyncParallelHook<[string, null | Etag, any]>;
  848. storeBuildDependencies: AsyncParallelHook<[Iterable<string>]>;
  849. beginIdle: SyncHook<[]>;
  850. endIdle: AsyncParallelHook<[]>;
  851. shutdown: AsyncParallelHook<[]>;
  852. };
  853. get<T>(
  854. identifier: string,
  855. etag: null | Etag,
  856. callback: CallbackCacheCache<T>
  857. ): void;
  858. store<T>(
  859. identifier: string,
  860. etag: null | Etag,
  861. data: T,
  862. callback: CallbackCacheCache<void>
  863. ): void;
  864. /**
  865. * After this method has succeeded the cache can only be restored when build dependencies are
  866. */
  867. storeBuildDependencies(
  868. dependencies: Iterable<string>,
  869. callback: CallbackCacheCache<void>
  870. ): void;
  871. beginIdle(): void;
  872. endIdle(callback: CallbackCacheCache<void>): void;
  873. shutdown(callback: CallbackCacheCache<void>): void;
  874. static STAGE_MEMORY: number;
  875. static STAGE_DEFAULT: number;
  876. static STAGE_DISK: number;
  877. static STAGE_NETWORK: number;
  878. }
  879. declare abstract class CacheFacade {
  880. getChildCache(name: string): CacheFacade;
  881. getItemCache(identifier: string, etag: null | Etag): ItemCacheFacade;
  882. getLazyHashedEtag(obj: HashableObject): Etag;
  883. mergeEtags(a: Etag, b: Etag): Etag;
  884. get<T>(
  885. identifier: string,
  886. etag: null | Etag,
  887. callback: CallbackCacheCacheFacade<T>
  888. ): void;
  889. getPromise<T>(identifier: string, etag: null | Etag): Promise<T>;
  890. store<T>(
  891. identifier: string,
  892. etag: null | Etag,
  893. data: T,
  894. callback: CallbackCacheCacheFacade<void>
  895. ): void;
  896. storePromise<T>(
  897. identifier: string,
  898. etag: null | Etag,
  899. data: T
  900. ): Promise<void>;
  901. provide<T>(
  902. identifier: string,
  903. etag: null | Etag,
  904. computer: (arg0: CallbackNormalErrorCache<T>) => void,
  905. callback: CallbackNormalErrorCache<T>
  906. ): void;
  907. providePromise<T>(
  908. identifier: string,
  909. etag: null | Etag,
  910. computer: () => T | Promise<T>
  911. ): Promise<T>;
  912. }
  913. declare interface CacheGroupSource {
  914. key?: string;
  915. priority?: number;
  916. getName?: (
  917. module?: Module,
  918. chunks?: Chunk[],
  919. key?: string
  920. ) => undefined | string;
  921. chunksFilter?: (chunk: Chunk) => undefined | boolean;
  922. enforce?: boolean;
  923. minSize: SplitChunksSizes;
  924. minSizeReduction: SplitChunksSizes;
  925. minRemainingSize: SplitChunksSizes;
  926. enforceSizeThreshold: SplitChunksSizes;
  927. maxAsyncSize: SplitChunksSizes;
  928. maxInitialSize: SplitChunksSizes;
  929. minChunks?: number;
  930. maxAsyncRequests?: number;
  931. maxInitialRequests?: number;
  932. filename?: string | ((arg0: PathData, arg1?: AssetInfo) => string);
  933. idHint?: string;
  934. automaticNameDelimiter?: string;
  935. reuseExistingChunk?: boolean;
  936. usedExports?: boolean;
  937. }
  938. declare interface CacheGroupsContext {
  939. moduleGraph: ModuleGraph;
  940. chunkGraph: ChunkGraph;
  941. }
  942. type CacheOptionsNormalized = false | FileCacheOptions | MemoryCacheOptions;
  943. declare class CachedSource extends Source {
  944. constructor(source: Source);
  945. constructor(source: Source | (() => Source), cachedData?: any);
  946. original(): Source;
  947. originalLazy(): Source | (() => Source);
  948. getCachedData(): any;
  949. }
  950. type CallExpression = SimpleCallExpression | NewExpression;
  951. declare interface CallExpressionInfo {
  952. type: "call";
  953. call: CallExpression;
  954. calleeName: string;
  955. rootInfo: string | VariableInfo;
  956. getCalleeMembers: () => string[];
  957. name: string;
  958. getMembers: () => string[];
  959. getMembersOptionals: () => boolean[];
  960. getMemberRanges: () => [number, number][];
  961. }
  962. declare interface CallbackAsyncQueue<T> {
  963. (err?: null | WebpackError, result?: null | T): any;
  964. }
  965. declare interface CallbackCacheCache<T> {
  966. (err: null | WebpackError, result?: T): void;
  967. }
  968. declare interface CallbackCacheCacheFacade<T> {
  969. (err?: null | Error, result?: null | T): void;
  970. }
  971. declare interface CallbackFunction_1<T> {
  972. (err: null | Error, result?: T): any;
  973. }
  974. declare interface CallbackFunction_2<T> {
  975. (err?: null | Error, result?: T): any;
  976. }
  977. declare interface CallbackNormalErrorCache<T> {
  978. (err?: null | Error, result?: T): void;
  979. }
  980. declare interface CallbackNormalModuleFactory<T> {
  981. (err?: null | Error, stats?: T): void;
  982. }
  983. declare interface CallbackWebpack<T> {
  984. (err: null | Error, stats?: T): void;
  985. }
  986. type Cell<T> = undefined | T;
  987. declare class Chunk {
  988. constructor(name?: string, backCompat?: boolean);
  989. id: null | string | number;
  990. ids: null | ChunkId[];
  991. debugId: number;
  992. name?: string;
  993. idNameHints: SortableSet<string>;
  994. preventIntegration: boolean;
  995. filenameTemplate?: string | ((arg0: PathData, arg1?: AssetInfo) => string);
  996. cssFilenameTemplate?: string | ((arg0: PathData, arg1?: AssetInfo) => string);
  997. runtime: RuntimeSpec;
  998. files: Set<string>;
  999. auxiliaryFiles: Set<string>;
  1000. rendered: boolean;
  1001. hash?: string;
  1002. contentHash: Record<string, string>;
  1003. renderedHash?: string;
  1004. chunkReason?: string;
  1005. extraAsync: boolean;
  1006. get entryModule(): Module;
  1007. hasEntryModule(): boolean;
  1008. addModule(module: Module): boolean;
  1009. removeModule(module: Module): void;
  1010. getNumberOfModules(): number;
  1011. get modulesIterable(): Iterable<Module>;
  1012. compareTo(otherChunk: Chunk): 0 | 1 | -1;
  1013. containsModule(module: Module): boolean;
  1014. getModules(): Module[];
  1015. remove(): void;
  1016. moveModule(module: Module, otherChunk: Chunk): void;
  1017. integrate(otherChunk: Chunk): boolean;
  1018. canBeIntegrated(otherChunk: Chunk): boolean;
  1019. isEmpty(): boolean;
  1020. modulesSize(): number;
  1021. size(options?: ChunkSizeOptions): number;
  1022. integratedSize(otherChunk: Chunk, options: ChunkSizeOptions): number;
  1023. getChunkModuleMaps(filterFn: (m: Module) => boolean): ChunkModuleMaps;
  1024. hasModuleInGraph(
  1025. filterFn: (m: Module) => boolean,
  1026. filterChunkFn?: (c: Chunk, chunkGraph: ChunkGraph) => boolean
  1027. ): boolean;
  1028. getChunkMaps(realHash: boolean): ChunkMaps;
  1029. hasRuntime(): boolean;
  1030. canBeInitial(): boolean;
  1031. isOnlyInitial(): boolean;
  1032. getEntryOptions(): undefined | EntryOptions;
  1033. addGroup(chunkGroup: ChunkGroup): void;
  1034. removeGroup(chunkGroup: ChunkGroup): void;
  1035. isInGroup(chunkGroup: ChunkGroup): boolean;
  1036. getNumberOfGroups(): number;
  1037. get groupsIterable(): SortableSet<ChunkGroup>;
  1038. disconnectFromGroups(): void;
  1039. split(newChunk: Chunk): void;
  1040. updateHash(hash: Hash, chunkGraph: ChunkGraph): void;
  1041. getAllAsyncChunks(): Set<Chunk>;
  1042. getAllInitialChunks(): Set<Chunk>;
  1043. getAllReferencedChunks(): Set<Chunk>;
  1044. getAllReferencedAsyncEntrypoints(): Set<Entrypoint>;
  1045. hasAsyncChunks(): boolean;
  1046. getChildIdsByOrders(
  1047. chunkGraph: ChunkGraph,
  1048. filterFn?: (c: Chunk, chunkGraph: ChunkGraph) => boolean
  1049. ): Record<string, (string | number)[]>;
  1050. getChildrenOfTypeInOrder(
  1051. chunkGraph: ChunkGraph,
  1052. type: string
  1053. ): undefined | { onChunks: Chunk[]; chunks: Set<Chunk> }[];
  1054. getChildIdsByOrdersMap(
  1055. chunkGraph: ChunkGraph,
  1056. includeDirectChildren?: boolean,
  1057. filterFn?: (c: Chunk, chunkGraph: ChunkGraph) => boolean
  1058. ): Record<string | number, Record<string, (string | number)[]>>;
  1059. hasChildByOrder(
  1060. chunkGraph: ChunkGraph,
  1061. type: string,
  1062. includeDirectChildren?: boolean,
  1063. filterFn?: (c: Chunk, chunkGraph: ChunkGraph) => boolean
  1064. ): boolean;
  1065. }
  1066. declare class ChunkGraph {
  1067. constructor(moduleGraph: ModuleGraph, hashFunction?: string | typeof Hash);
  1068. moduleGraph: ModuleGraph;
  1069. connectChunkAndModule(chunk: Chunk, module: Module): void;
  1070. disconnectChunkAndModule(chunk: Chunk, module: Module): void;
  1071. disconnectChunk(chunk: Chunk): void;
  1072. attachModules(chunk: Chunk, modules: Iterable<Module>): void;
  1073. attachRuntimeModules(chunk: Chunk, modules: Iterable<RuntimeModule>): void;
  1074. attachFullHashModules(chunk: Chunk, modules: Iterable<RuntimeModule>): void;
  1075. attachDependentHashModules(
  1076. chunk: Chunk,
  1077. modules: Iterable<RuntimeModule>
  1078. ): void;
  1079. replaceModule(oldModule: Module, newModule: Module): void;
  1080. isModuleInChunk(module: Module, chunk: Chunk): boolean;
  1081. isModuleInChunkGroup(module: Module, chunkGroup: ChunkGroup): boolean;
  1082. isEntryModule(module: Module): boolean;
  1083. getModuleChunksIterable(module: Module): Iterable<Chunk>;
  1084. getOrderedModuleChunksIterable(
  1085. module: Module,
  1086. sortFn: (arg0: Chunk, arg1: Chunk) => 0 | 1 | -1
  1087. ): Iterable<Chunk>;
  1088. getModuleChunks(module: Module): Chunk[];
  1089. getNumberOfModuleChunks(module: Module): number;
  1090. getModuleRuntimes(module: Module): RuntimeSpecSet;
  1091. getNumberOfChunkModules(chunk: Chunk): number;
  1092. getNumberOfChunkFullHashModules(chunk: Chunk): number;
  1093. getChunkModulesIterable(chunk: Chunk): Iterable<Module>;
  1094. getChunkModulesIterableBySourceType(
  1095. chunk: Chunk,
  1096. sourceType: string
  1097. ): undefined | Iterable<Module>;
  1098. setChunkModuleSourceTypes(
  1099. chunk: Chunk,
  1100. module: Module,
  1101. sourceTypes: Set<string>
  1102. ): void;
  1103. getChunkModuleSourceTypes(chunk: Chunk, module: Module): ReadonlySet<string>;
  1104. getModuleSourceTypes(module: Module): ReadonlySet<string>;
  1105. getOrderedChunkModulesIterable(
  1106. chunk: Chunk,
  1107. comparator: (arg0: Module, arg1: Module) => 0 | 1 | -1
  1108. ): Iterable<Module>;
  1109. getOrderedChunkModulesIterableBySourceType(
  1110. chunk: Chunk,
  1111. sourceType: string,
  1112. comparator: (arg0: Module, arg1: Module) => 0 | 1 | -1
  1113. ): undefined | Iterable<Module>;
  1114. getChunkModules(chunk: Chunk): Module[];
  1115. getOrderedChunkModules(
  1116. chunk: Chunk,
  1117. comparator: (arg0: Module, arg1: Module) => 0 | 1 | -1
  1118. ): Module[];
  1119. getChunkModuleIdMap(
  1120. chunk: Chunk,
  1121. filterFn: (m: Module) => boolean,
  1122. includeAllChunks?: boolean
  1123. ): Record<string | number, (string | number)[]>;
  1124. getChunkModuleRenderedHashMap(
  1125. chunk: Chunk,
  1126. filterFn: (m: Module) => boolean,
  1127. hashLength?: number,
  1128. includeAllChunks?: boolean
  1129. ): Record<string | number, Record<string | number, string>>;
  1130. getChunkConditionMap(
  1131. chunk: Chunk,
  1132. filterFn: (c: Chunk, chunkGraph: ChunkGraph) => boolean
  1133. ): Record<string | number, boolean>;
  1134. hasModuleInGraph(
  1135. chunk: Chunk,
  1136. filterFn: (m: Module) => boolean,
  1137. filterChunkFn?: (c: Chunk, chunkGraph: ChunkGraph) => boolean
  1138. ): boolean;
  1139. compareChunks(chunkA: Chunk, chunkB: Chunk): 0 | 1 | -1;
  1140. getChunkModulesSize(chunk: Chunk): number;
  1141. getChunkModulesSizes(chunk: Chunk): Record<string, number>;
  1142. getChunkRootModules(chunk: Chunk): Module[];
  1143. getChunkSize(chunk: Chunk, options?: ChunkSizeOptions): number;
  1144. getIntegratedChunksSize(
  1145. chunkA: Chunk,
  1146. chunkB: Chunk,
  1147. options?: ChunkSizeOptions
  1148. ): number;
  1149. canChunksBeIntegrated(chunkA: Chunk, chunkB: Chunk): boolean;
  1150. integrateChunks(chunkA: Chunk, chunkB: Chunk): void;
  1151. upgradeDependentToFullHashModules(chunk: Chunk): void;
  1152. isEntryModuleInChunk(module: Module, chunk: Chunk): boolean;
  1153. connectChunkAndEntryModule(
  1154. chunk: Chunk,
  1155. module: Module,
  1156. entrypoint: Entrypoint
  1157. ): void;
  1158. connectChunkAndRuntimeModule(chunk: Chunk, module: RuntimeModule): void;
  1159. addFullHashModuleToChunk(chunk: Chunk, module: RuntimeModule): void;
  1160. addDependentHashModuleToChunk(chunk: Chunk, module: RuntimeModule): void;
  1161. disconnectChunkAndEntryModule(chunk: Chunk, module: Module): void;
  1162. disconnectChunkAndRuntimeModule(chunk: Chunk, module: RuntimeModule): void;
  1163. disconnectEntryModule(module: Module): void;
  1164. disconnectEntries(chunk: Chunk): void;
  1165. getNumberOfEntryModules(chunk: Chunk): number;
  1166. getNumberOfRuntimeModules(chunk: Chunk): number;
  1167. getChunkEntryModulesIterable(chunk: Chunk): Iterable<Module>;
  1168. getChunkEntryDependentChunksIterable(chunk: Chunk): Iterable<Chunk>;
  1169. hasChunkEntryDependentChunks(chunk: Chunk): boolean;
  1170. getChunkRuntimeModulesIterable(chunk: Chunk): Iterable<RuntimeModule>;
  1171. getChunkRuntimeModulesInOrder(chunk: Chunk): RuntimeModule[];
  1172. getChunkFullHashModulesIterable(
  1173. chunk: Chunk
  1174. ): undefined | Iterable<RuntimeModule>;
  1175. getChunkFullHashModulesSet(
  1176. chunk: Chunk
  1177. ): undefined | ReadonlySet<RuntimeModule>;
  1178. getChunkDependentHashModulesIterable(
  1179. chunk: Chunk
  1180. ): undefined | Iterable<RuntimeModule>;
  1181. getChunkEntryModulesWithChunkGroupIterable(
  1182. chunk: Chunk
  1183. ): Iterable<[Module, undefined | Entrypoint]>;
  1184. getBlockChunkGroup(depBlock: AsyncDependenciesBlock): undefined | ChunkGroup;
  1185. connectBlockAndChunkGroup(
  1186. depBlock: AsyncDependenciesBlock,
  1187. chunkGroup: ChunkGroup
  1188. ): void;
  1189. disconnectChunkGroup(chunkGroup: ChunkGroup): void;
  1190. getModuleId(module: Module): null | string | number;
  1191. setModuleId(module: Module, id: ModuleId): void;
  1192. getRuntimeId(runtime: string): string | number;
  1193. setRuntimeId(runtime: string, id: string | number): void;
  1194. hasModuleHashes(module: Module, runtime: RuntimeSpec): boolean;
  1195. getModuleHash(module: Module, runtime: RuntimeSpec): string;
  1196. getRenderedModuleHash(module: Module, runtime: RuntimeSpec): string;
  1197. setModuleHashes(
  1198. module: Module,
  1199. runtime: RuntimeSpec,
  1200. hash: string,
  1201. renderedHash: string
  1202. ): void;
  1203. addModuleRuntimeRequirements(
  1204. module: Module,
  1205. runtime: RuntimeSpec,
  1206. items: Set<string>,
  1207. transferOwnership?: boolean
  1208. ): void;
  1209. addChunkRuntimeRequirements(chunk: Chunk, items: Set<string>): void;
  1210. addTreeRuntimeRequirements(chunk: Chunk, items: Iterable<string>): void;
  1211. getModuleRuntimeRequirements(
  1212. module: Module,
  1213. runtime: RuntimeSpec
  1214. ): ReadonlySet<string>;
  1215. getChunkRuntimeRequirements(chunk: Chunk): ReadonlySet<string>;
  1216. getModuleGraphHash(
  1217. module: Module,
  1218. runtime: RuntimeSpec,
  1219. withConnections?: boolean
  1220. ): string;
  1221. getModuleGraphHashBigInt(
  1222. module: Module,
  1223. runtime: RuntimeSpec,
  1224. withConnections?: boolean
  1225. ): bigint;
  1226. getTreeRuntimeRequirements(chunk: Chunk): ReadonlySet<string>;
  1227. static getChunkGraphForModule(
  1228. module: Module,
  1229. deprecateMessage: string,
  1230. deprecationCode: string
  1231. ): ChunkGraph;
  1232. static setChunkGraphForModule(module: Module, chunkGraph: ChunkGraph): void;
  1233. static clearChunkGraphForModule(module: Module): void;
  1234. static getChunkGraphForChunk(
  1235. chunk: Chunk,
  1236. deprecateMessage: string,
  1237. deprecationCode: string
  1238. ): ChunkGraph;
  1239. static setChunkGraphForChunk(chunk: Chunk, chunkGraph: ChunkGraph): void;
  1240. static clearChunkGraphForChunk(chunk: Chunk): void;
  1241. }
  1242. declare abstract class ChunkGroup {
  1243. groupDebugId: number;
  1244. options: ChunkGroupOptions;
  1245. chunks: Chunk[];
  1246. origins: OriginRecord[];
  1247. index?: number;
  1248. /**
  1249. * when a new chunk is added to a chunkGroup, addingOptions will occur.
  1250. */
  1251. addOptions(options: ChunkGroupOptions): void;
  1252. /**
  1253. * returns the name of current ChunkGroup
  1254. * sets a new name for current ChunkGroup
  1255. */
  1256. name?: null | string;
  1257. /**
  1258. * get a uniqueId for ChunkGroup, made up of its member Chunk debugId's
  1259. */
  1260. get debugId(): string;
  1261. /**
  1262. * get a unique id for ChunkGroup, made up of its member Chunk id's
  1263. */
  1264. get id(): string;
  1265. /**
  1266. * Performs an unshift of a specific chunk
  1267. */
  1268. unshiftChunk(chunk: Chunk): boolean;
  1269. /**
  1270. * inserts a chunk before another existing chunk in group
  1271. */
  1272. insertChunk(chunk: Chunk, before: Chunk): boolean;
  1273. /**
  1274. * add a chunk into ChunkGroup. Is pushed on or prepended
  1275. */
  1276. pushChunk(chunk: Chunk): boolean;
  1277. replaceChunk(oldChunk: Chunk, newChunk: Chunk): undefined | boolean;
  1278. removeChunk(chunk: Chunk): boolean;
  1279. isInitial(): boolean;
  1280. addChild(group: ChunkGroup): boolean;
  1281. getChildren(): ChunkGroup[];
  1282. getNumberOfChildren(): number;
  1283. get childrenIterable(): SortableSet<ChunkGroup>;
  1284. removeChild(group: ChunkGroup): boolean;
  1285. addParent(parentChunk: ChunkGroup): boolean;
  1286. getParents(): ChunkGroup[];
  1287. getNumberOfParents(): number;
  1288. hasParent(parent: ChunkGroup): boolean;
  1289. get parentsIterable(): SortableSet<ChunkGroup>;
  1290. removeParent(chunkGroup: ChunkGroup): boolean;
  1291. addAsyncEntrypoint(entrypoint: Entrypoint): boolean;
  1292. get asyncEntrypointsIterable(): SortableSet<ChunkGroup>;
  1293. getBlocks(): AsyncDependenciesBlock[];
  1294. getNumberOfBlocks(): number;
  1295. hasBlock(block: AsyncDependenciesBlock): boolean;
  1296. get blocksIterable(): Iterable<AsyncDependenciesBlock>;
  1297. addBlock(block: AsyncDependenciesBlock): boolean;
  1298. addOrigin(
  1299. module: null | Module,
  1300. loc: DependencyLocation,
  1301. request: string
  1302. ): void;
  1303. getFiles(): string[];
  1304. remove(): void;
  1305. sortItems(): void;
  1306. /**
  1307. * Sorting predicate which allows current ChunkGroup to be compared against another.
  1308. * Sorting values are based off of number of chunks in ChunkGroup.
  1309. */
  1310. compareTo(chunkGraph: ChunkGraph, otherGroup: ChunkGroup): 0 | 1 | -1;
  1311. getChildrenByOrders(
  1312. moduleGraph: ModuleGraph,
  1313. chunkGraph: ChunkGraph
  1314. ): Record<string, ChunkGroup[]>;
  1315. /**
  1316. * Sets the top-down index of a module in this ChunkGroup
  1317. */
  1318. setModulePreOrderIndex(module: Module, index: number): void;
  1319. /**
  1320. * Gets the top-down index of a module in this ChunkGroup
  1321. */
  1322. getModulePreOrderIndex(module: Module): undefined | number;
  1323. /**
  1324. * Sets the bottom-up index of a module in this ChunkGroup
  1325. */
  1326. setModulePostOrderIndex(module: Module, index: number): void;
  1327. /**
  1328. * Gets the bottom-up index of a module in this ChunkGroup
  1329. */
  1330. getModulePostOrderIndex(module: Module): undefined | number;
  1331. checkConstraints(): void;
  1332. getModuleIndex: (module: Module) => undefined | number;
  1333. getModuleIndex2: (module: Module) => undefined | number;
  1334. }
  1335. type ChunkGroupOptions = RawChunkGroupOptions & { name?: null | string };
  1336. declare interface ChunkHashContext {
  1337. /**
  1338. * results of code generation
  1339. */
  1340. codeGenerationResults: CodeGenerationResults;
  1341. /**
  1342. * the runtime template
  1343. */
  1344. runtimeTemplate: RuntimeTemplate;
  1345. /**
  1346. * the module graph
  1347. */
  1348. moduleGraph: ModuleGraph;
  1349. /**
  1350. * the chunk graph
  1351. */
  1352. chunkGraph: ChunkGraph;
  1353. }
  1354. type ChunkId = string | number;
  1355. declare interface ChunkMaps {
  1356. hash: Record<string | number, string>;
  1357. contentHash: Record<string | number, Record<string, string>>;
  1358. name: Record<string | number, string>;
  1359. }
  1360. declare class ChunkModuleIdRangePlugin {
  1361. constructor(options: ChunkModuleIdRangePluginOptions);
  1362. options: ChunkModuleIdRangePluginOptions;
  1363. /**
  1364. * Apply the plugin
  1365. */
  1366. apply(compiler: Compiler): void;
  1367. }
  1368. declare interface ChunkModuleIdRangePluginOptions {
  1369. /**
  1370. * the chunk name
  1371. */
  1372. name: string;
  1373. /**
  1374. * order
  1375. */
  1376. order?: "index" | "index2" | "preOrderIndex" | "postOrderIndex";
  1377. /**
  1378. * start id
  1379. */
  1380. start?: number;
  1381. /**
  1382. * end id
  1383. */
  1384. end?: number;
  1385. }
  1386. declare interface ChunkModuleMaps {
  1387. id: Record<string | number, (string | number)[]>;
  1388. hash: Record<string | number, string>;
  1389. }
  1390. declare interface ChunkPathData {
  1391. id: string | number;
  1392. name?: string;
  1393. hash: string;
  1394. hashWithLength?: (arg0: number) => string;
  1395. contentHash?: Record<string, string>;
  1396. contentHashWithLength?: Record<string, (length: number) => string>;
  1397. }
  1398. declare class ChunkPrefetchPreloadPlugin {
  1399. constructor();
  1400. apply(compiler: Compiler): void;
  1401. }
  1402. declare interface ChunkRenderContextCssModulesPlugin {
  1403. /**
  1404. * the chunk
  1405. */
  1406. chunk: Chunk;
  1407. /**
  1408. * the chunk graph
  1409. */
  1410. chunkGraph: ChunkGraph;
  1411. /**
  1412. * results of code generation
  1413. */
  1414. codeGenerationResults: CodeGenerationResults;
  1415. /**
  1416. * the runtime template
  1417. */
  1418. runtimeTemplate: RuntimeTemplate;
  1419. /**
  1420. * undo path to css file
  1421. */
  1422. undoPath: string;
  1423. }
  1424. declare interface ChunkRenderContextJavascriptModulesPlugin {
  1425. /**
  1426. * the chunk
  1427. */
  1428. chunk: Chunk;
  1429. /**
  1430. * the dependency templates
  1431. */
  1432. dependencyTemplates: DependencyTemplates;
  1433. /**
  1434. * the runtime template
  1435. */
  1436. runtimeTemplate: RuntimeTemplate;
  1437. /**
  1438. * the module graph
  1439. */
  1440. moduleGraph: ModuleGraph;
  1441. /**
  1442. * the chunk graph
  1443. */
  1444. chunkGraph: ChunkGraph;
  1445. /**
  1446. * results of code generation
  1447. */
  1448. codeGenerationResults: CodeGenerationResults;
  1449. /**
  1450. * init fragments for the chunk
  1451. */
  1452. chunkInitFragments: InitFragment<ChunkRenderContextJavascriptModulesPlugin>[];
  1453. /**
  1454. * rendering in strict context
  1455. */
  1456. strictMode?: boolean;
  1457. }
  1458. declare interface ChunkSizeOptions {
  1459. /**
  1460. * constant overhead for a chunk
  1461. */
  1462. chunkOverhead?: number;
  1463. /**
  1464. * multiplicator for initial chunks
  1465. */
  1466. entryChunkMultiplicator?: number;
  1467. }
  1468. declare abstract class ChunkTemplate {
  1469. hooks: Readonly<{
  1470. renderManifest: {
  1471. tap: <AdditionalOptions>(
  1472. options:
  1473. | string
  1474. | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
  1475. fn: (
  1476. arg0: RenderManifestEntry[],
  1477. arg1: RenderManifestOptions
  1478. ) => RenderManifestEntry[]
  1479. ) => void;
  1480. };
  1481. modules: {
  1482. tap: <AdditionalOptions>(
  1483. options:
  1484. | string
  1485. | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
  1486. fn: (
  1487. arg0: Source,
  1488. arg1: ModuleTemplate,
  1489. arg2: RenderContextJavascriptModulesPlugin
  1490. ) => Source
  1491. ) => void;
  1492. };
  1493. render: {
  1494. tap: <AdditionalOptions>(
  1495. options:
  1496. | string
  1497. | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
  1498. fn: (
  1499. arg0: Source,
  1500. arg1: ModuleTemplate,
  1501. arg2: RenderContextJavascriptModulesPlugin
  1502. ) => Source
  1503. ) => void;
  1504. };
  1505. renderWithEntry: {
  1506. tap: <AdditionalOptions>(
  1507. options:
  1508. | string
  1509. | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
  1510. fn: (arg0: Source, arg1: Chunk) => Source
  1511. ) => void;
  1512. };
  1513. hash: {
  1514. tap: <AdditionalOptions>(
  1515. options:
  1516. | string
  1517. | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
  1518. fn: (arg0: Hash) => void
  1519. ) => void;
  1520. };
  1521. hashForChunk: {
  1522. tap: <AdditionalOptions>(
  1523. options:
  1524. | string
  1525. | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
  1526. fn: (arg0: Hash, arg1: Chunk, arg2: ChunkHashContext) => void
  1527. ) => void;
  1528. };
  1529. }>;
  1530. get outputOptions(): Output;
  1531. }
  1532. /**
  1533. * Advanced options for cleaning assets.
  1534. */
  1535. declare interface CleanOptions {
  1536. /**
  1537. * Log the assets that should be removed instead of deleting them.
  1538. */
  1539. dry?: boolean;
  1540. /**
  1541. * Keep these assets.
  1542. */
  1543. keep?: string | RegExp | ((filename: string) => boolean);
  1544. }
  1545. declare class CleanPlugin {
  1546. constructor(options?: CleanOptions);
  1547. options: {
  1548. /**
  1549. * Log the assets that should be removed instead of deleting them.
  1550. */
  1551. dry: boolean;
  1552. /**
  1553. * Keep these assets.
  1554. */
  1555. keep?: string | RegExp | ((filename: string) => boolean);
  1556. };
  1557. /**
  1558. * Apply the plugin
  1559. */
  1560. apply(compiler: Compiler): void;
  1561. static getCompilationHooks(
  1562. compilation: Compilation
  1563. ): CleanPluginCompilationHooks;
  1564. }
  1565. declare interface CleanPluginCompilationHooks {
  1566. /**
  1567. * when returning true the file/directory will be kept during cleaning, returning false will clean it and ignore the following plugins and config
  1568. */
  1569. keep: SyncBailHook<[string], boolean | void>;
  1570. }
  1571. declare interface CodeGenerationContext {
  1572. /**
  1573. * the dependency templates
  1574. */
  1575. dependencyTemplates: DependencyTemplates;
  1576. /**
  1577. * the runtime template
  1578. */
  1579. runtimeTemplate: RuntimeTemplate;
  1580. /**
  1581. * the module graph
  1582. */
  1583. moduleGraph: ModuleGraph;
  1584. /**
  1585. * the chunk graph
  1586. */
  1587. chunkGraph: ChunkGraph;
  1588. /**
  1589. * the runtimes code should be generated for
  1590. */
  1591. runtime: RuntimeSpec;
  1592. /**
  1593. * when in concatenated module, information about other concatenated modules
  1594. */
  1595. concatenationScope?: ConcatenationScope;
  1596. /**
  1597. * code generation results of other modules (need to have a codeGenerationDependency to use that)
  1598. */
  1599. codeGenerationResults?: CodeGenerationResults;
  1600. /**
  1601. * the compilation
  1602. */
  1603. compilation?: Compilation;
  1604. /**
  1605. * source types
  1606. */
  1607. sourceTypes?: ReadonlySet<string>;
  1608. }
  1609. declare interface CodeGenerationResult {
  1610. /**
  1611. * the resulting sources for all source types
  1612. */
  1613. sources: Map<string, Source>;
  1614. /**
  1615. * the resulting data for all source types
  1616. */
  1617. data?: Map<string, any>;
  1618. /**
  1619. * the runtime requirements
  1620. */
  1621. runtimeRequirements: null | ReadonlySet<string>;
  1622. /**
  1623. * a hash of the code generation result (will be automatically calculated from sources and runtimeRequirements if not provided)
  1624. */
  1625. hash?: string;
  1626. }
  1627. declare abstract class CodeGenerationResults {
  1628. map: Map<Module, RuntimeSpecMap<CodeGenerationResult>>;
  1629. get(module: Module, runtime: RuntimeSpec): CodeGenerationResult;
  1630. has(module: Module, runtime: RuntimeSpec): boolean;
  1631. getSource(module: Module, runtime: RuntimeSpec, sourceType: string): Source;
  1632. getRuntimeRequirements(
  1633. module: Module,
  1634. runtime: RuntimeSpec
  1635. ): null | ReadonlySet<string>;
  1636. getData(module: Module, runtime: RuntimeSpec, key: string): any;
  1637. getHash(module: Module, runtime: RuntimeSpec): any;
  1638. add(module: Module, runtime: RuntimeSpec, result: CodeGenerationResult): void;
  1639. }
  1640. type CodeValue =
  1641. | undefined
  1642. | null
  1643. | string
  1644. | number
  1645. | bigint
  1646. | boolean
  1647. | Function
  1648. | RegExp
  1649. | RuntimeValue
  1650. | {
  1651. [index: string]: RecursiveArrayOrRecord<
  1652. | undefined
  1653. | null
  1654. | string
  1655. | number
  1656. | bigint
  1657. | boolean
  1658. | Function
  1659. | RegExp
  1660. | RuntimeValue
  1661. >;
  1662. }
  1663. | RecursiveArrayOrRecord<
  1664. | undefined
  1665. | null
  1666. | string
  1667. | number
  1668. | bigint
  1669. | boolean
  1670. | Function
  1671. | RegExp
  1672. | RuntimeValue
  1673. >[];
  1674. type CodeValuePrimitive =
  1675. | undefined
  1676. | null
  1677. | string
  1678. | number
  1679. | bigint
  1680. | boolean
  1681. | Function
  1682. | RegExp;
  1683. declare interface Comparator<T> {
  1684. (arg0: T, arg1: T): 0 | 1 | -1;
  1685. }
  1686. declare class CompatSource extends Source {
  1687. constructor(sourceLike: SourceLike);
  1688. static from(sourceLike: SourceLike): Source;
  1689. }
  1690. declare class Compilation {
  1691. /**
  1692. * Creates an instance of Compilation.
  1693. */
  1694. constructor(compiler: Compiler, params: CompilationParams);
  1695. hooks: Readonly<{
  1696. buildModule: SyncHook<[Module]>;
  1697. rebuildModule: SyncHook<[Module]>;
  1698. failedModule: SyncHook<[Module, WebpackError]>;
  1699. succeedModule: SyncHook<[Module]>;
  1700. stillValidModule: SyncHook<[Module]>;
  1701. addEntry: SyncHook<[Dependency, EntryOptions]>;
  1702. failedEntry: SyncHook<[Dependency, EntryOptions, Error]>;
  1703. succeedEntry: SyncHook<[Dependency, EntryOptions, Module]>;
  1704. dependencyReferencedExports: SyncWaterfallHook<
  1705. [(string[] | ReferencedExport)[], Dependency, RuntimeSpec]
  1706. >;
  1707. executeModule: SyncHook<[ExecuteModuleArgument, ExecuteModuleContext]>;
  1708. prepareModuleExecution: AsyncParallelHook<
  1709. [ExecuteModuleArgument, ExecuteModuleContext]
  1710. >;
  1711. finishModules: AsyncSeriesHook<[Iterable<Module>]>;
  1712. finishRebuildingModule: AsyncSeriesHook<[Module]>;
  1713. unseal: SyncHook<[]>;
  1714. seal: SyncHook<[]>;
  1715. beforeChunks: SyncHook<[]>;
  1716. /**
  1717. * The `afterChunks` hook is called directly after the chunks and module graph have
  1718. * been created and before the chunks and modules have been optimized. This hook is useful to
  1719. * inspect, analyze, and/or modify the chunk graph.
  1720. */
  1721. afterChunks: SyncHook<[Iterable<Chunk>]>;
  1722. optimizeDependencies: SyncBailHook<[Iterable<Module>], boolean | void>;
  1723. afterOptimizeDependencies: SyncHook<[Iterable<Module>]>;
  1724. optimize: SyncHook<[]>;
  1725. optimizeModules: SyncBailHook<[Iterable<Module>], boolean | void>;
  1726. afterOptimizeModules: SyncHook<[Iterable<Module>]>;
  1727. optimizeChunks: SyncBailHook<
  1728. [Iterable<Chunk>, ChunkGroup[]],
  1729. boolean | void
  1730. >;
  1731. afterOptimizeChunks: SyncHook<[Iterable<Chunk>, ChunkGroup[]]>;
  1732. optimizeTree: AsyncSeriesHook<[Iterable<Chunk>, Iterable<Module>]>;
  1733. afterOptimizeTree: SyncHook<[Iterable<Chunk>, Iterable<Module>]>;
  1734. optimizeChunkModules: AsyncSeriesBailHook<
  1735. [Iterable<Chunk>, Iterable<Module>],
  1736. void
  1737. >;
  1738. afterOptimizeChunkModules: SyncHook<[Iterable<Chunk>, Iterable<Module>]>;
  1739. shouldRecord: SyncBailHook<[], boolean | void>;
  1740. additionalChunkRuntimeRequirements: SyncHook<
  1741. [Chunk, Set<string>, RuntimeRequirementsContext]
  1742. >;
  1743. runtimeRequirementInChunk: HookMap<
  1744. SyncBailHook<[Chunk, Set<string>, RuntimeRequirementsContext], void>
  1745. >;
  1746. additionalModuleRuntimeRequirements: SyncHook<
  1747. [Module, Set<string>, RuntimeRequirementsContext]
  1748. >;
  1749. runtimeRequirementInModule: HookMap<
  1750. SyncBailHook<[Module, Set<string>, RuntimeRequirementsContext], void>
  1751. >;
  1752. additionalTreeRuntimeRequirements: SyncHook<
  1753. [Chunk, Set<string>, RuntimeRequirementsContext]
  1754. >;
  1755. runtimeRequirementInTree: HookMap<
  1756. SyncBailHook<[Chunk, Set<string>, RuntimeRequirementsContext], void>
  1757. >;
  1758. runtimeModule: SyncHook<[RuntimeModule, Chunk]>;
  1759. reviveModules: SyncHook<[Iterable<Module>, any]>;
  1760. beforeModuleIds: SyncHook<[Iterable<Module>]>;
  1761. moduleIds: SyncHook<[Iterable<Module>]>;
  1762. optimizeModuleIds: SyncHook<[Iterable<Module>]>;
  1763. afterOptimizeModuleIds: SyncHook<[Iterable<Module>]>;
  1764. reviveChunks: SyncHook<[Iterable<Chunk>, any]>;
  1765. beforeChunkIds: SyncHook<[Iterable<Chunk>]>;
  1766. chunkIds: SyncHook<[Iterable<Chunk>]>;
  1767. optimizeChunkIds: SyncHook<[Iterable<Chunk>]>;
  1768. afterOptimizeChunkIds: SyncHook<[Iterable<Chunk>]>;
  1769. recordModules: SyncHook<[Iterable<Module>, any]>;
  1770. recordChunks: SyncHook<[Iterable<Chunk>, any]>;
  1771. optimizeCodeGeneration: SyncHook<[Iterable<Module>]>;
  1772. beforeModuleHash: SyncHook<[]>;
  1773. afterModuleHash: SyncHook<[]>;
  1774. beforeCodeGeneration: SyncHook<[]>;
  1775. afterCodeGeneration: SyncHook<[]>;
  1776. beforeRuntimeRequirements: SyncHook<[]>;
  1777. afterRuntimeRequirements: SyncHook<[]>;
  1778. beforeHash: SyncHook<[]>;
  1779. contentHash: SyncHook<[Chunk]>;
  1780. afterHash: SyncHook<[]>;
  1781. recordHash: SyncHook<[any]>;
  1782. record: SyncHook<[Compilation, any]>;
  1783. beforeModuleAssets: SyncHook<[]>;
  1784. shouldGenerateChunkAssets: SyncBailHook<[], boolean | void>;
  1785. beforeChunkAssets: SyncHook<[]>;
  1786. additionalChunkAssets: FakeHook<
  1787. Pick<
  1788. AsyncSeriesHook<[Set<Chunk>]>,
  1789. "name" | "tap" | "tapAsync" | "tapPromise"
  1790. >
  1791. >;
  1792. additionalAssets: FakeHook<
  1793. Pick<AsyncSeriesHook<[]>, "name" | "tap" | "tapAsync" | "tapPromise">
  1794. >;
  1795. optimizeChunkAssets: FakeHook<
  1796. Pick<
  1797. AsyncSeriesHook<[Set<Chunk>]>,
  1798. "name" | "tap" | "tapAsync" | "tapPromise"
  1799. >
  1800. >;
  1801. afterOptimizeChunkAssets: FakeHook<
  1802. Pick<
  1803. AsyncSeriesHook<[Set<Chunk>]>,
  1804. "name" | "tap" | "tapAsync" | "tapPromise"
  1805. >
  1806. >;
  1807. optimizeAssets: AsyncSeriesHook<
  1808. [CompilationAssets],
  1809. ProcessAssetsAdditionalOptions
  1810. >;
  1811. afterOptimizeAssets: SyncHook<[CompilationAssets]>;
  1812. processAssets: AsyncSeriesHook<
  1813. [CompilationAssets],
  1814. ProcessAssetsAdditionalOptions
  1815. >;
  1816. afterProcessAssets: SyncHook<[CompilationAssets]>;
  1817. processAdditionalAssets: AsyncSeriesHook<[CompilationAssets]>;
  1818. needAdditionalSeal: SyncBailHook<[], boolean | void>;
  1819. afterSeal: AsyncSeriesHook<[]>;
  1820. renderManifest: SyncWaterfallHook<
  1821. [RenderManifestEntry[], RenderManifestOptions]
  1822. >;
  1823. fullHash: SyncHook<[Hash]>;
  1824. chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
  1825. moduleAsset: SyncHook<[Module, string]>;
  1826. chunkAsset: SyncHook<[Chunk, string]>;
  1827. assetPath: SyncWaterfallHook<[string, object, undefined | AssetInfo]>;
  1828. needAdditionalPass: SyncBailHook<[], boolean | void>;
  1829. childCompiler: SyncHook<[Compiler, string, number]>;
  1830. log: SyncBailHook<[string, LogEntry], boolean | void>;
  1831. processWarnings: SyncWaterfallHook<[WebpackError[]]>;
  1832. processErrors: SyncWaterfallHook<[WebpackError[]]>;
  1833. statsPreset: HookMap<
  1834. SyncHook<[Partial<NormalizedStatsOptions>, CreateStatsOptionsContext]>
  1835. >;
  1836. statsNormalize: SyncHook<
  1837. [Partial<NormalizedStatsOptions>, CreateStatsOptionsContext]
  1838. >;
  1839. statsFactory: SyncHook<[StatsFactory, NormalizedStatsOptions]>;
  1840. statsPrinter: SyncHook<[StatsPrinter, NormalizedStatsOptions]>;
  1841. get normalModuleLoader(): SyncHook<
  1842. [LoaderContextNormalModule<any>, NormalModule]
  1843. >;
  1844. }>;
  1845. name?: string;
  1846. startTime?: number;
  1847. endTime?: number;
  1848. compiler: Compiler;
  1849. resolverFactory: ResolverFactory;
  1850. inputFileSystem: InputFileSystem;
  1851. fileSystemInfo: FileSystemInfo;
  1852. valueCacheVersions: Map<string, string | Set<string>>;
  1853. requestShortener: RequestShortener;
  1854. compilerPath: string;
  1855. logger: WebpackLogger;
  1856. options: WebpackOptionsNormalized;
  1857. outputOptions: OutputNormalized;
  1858. bail: boolean;
  1859. profile: boolean;
  1860. params: CompilationParams;
  1861. mainTemplate: MainTemplate;
  1862. chunkTemplate: ChunkTemplate;
  1863. runtimeTemplate: RuntimeTemplate;
  1864. moduleTemplates: ModuleTemplates;
  1865. moduleMemCaches?: Map<Module, WeakTupleMap<any, any>>;
  1866. moduleMemCaches2?: Map<Module, WeakTupleMap<any, any>>;
  1867. moduleGraph: ModuleGraph;
  1868. chunkGraph: ChunkGraph;
  1869. codeGenerationResults: CodeGenerationResults;
  1870. processDependenciesQueue: AsyncQueue<Module, Module, Module>;
  1871. addModuleQueue: AsyncQueue<Module, string, Module>;
  1872. factorizeQueue: AsyncQueue<
  1873. FactorizeModuleOptions,
  1874. string,
  1875. Module | ModuleFactoryResult
  1876. >;
  1877. buildQueue: AsyncQueue<Module, Module, Module>;
  1878. rebuildQueue: AsyncQueue<Module, Module, Module>;
  1879. /**
  1880. * Modules in value are building during the build of Module in key.
  1881. * Means value blocking key from finishing.
  1882. * Needed to detect build cycles.
  1883. */
  1884. creatingModuleDuringBuild: WeakMap<Module, Set<Module>>;
  1885. entries: Map<string, EntryData>;
  1886. globalEntry: EntryData;
  1887. entrypoints: Map<string, Entrypoint>;
  1888. asyncEntrypoints: Entrypoint[];
  1889. chunks: Set<Chunk>;
  1890. chunkGroups: ChunkGroup[];
  1891. namedChunkGroups: Map<string, ChunkGroup>;
  1892. namedChunks: Map<string, Chunk>;
  1893. modules: Set<Module>;
  1894. records: any;
  1895. additionalChunkAssets: string[];
  1896. assets: CompilationAssets;
  1897. assetsInfo: Map<string, AssetInfo>;
  1898. errors: WebpackError[];
  1899. warnings: WebpackError[];
  1900. children: Compilation[];
  1901. logging: Map<string, LogEntry[]>;
  1902. dependencyFactories: Map<DepConstructor, ModuleFactory>;
  1903. dependencyTemplates: DependencyTemplates;
  1904. childrenCounters: Record<string, number>;
  1905. usedChunkIds: Set<string | number>;
  1906. usedModuleIds: Set<number>;
  1907. needAdditionalPass: boolean;
  1908. builtModules: WeakSet<Module>;
  1909. codeGeneratedModules: WeakSet<Module>;
  1910. buildTimeExecutedModules: WeakSet<Module>;
  1911. emittedAssets: Set<string>;
  1912. comparedForEmitAssets: Set<string>;
  1913. fileDependencies: LazySet<string>;
  1914. contextDependencies: LazySet<string>;
  1915. missingDependencies: LazySet<string>;
  1916. buildDependencies: LazySet<string>;
  1917. compilationDependencies: { add: (item: string) => LazySet<string> };
  1918. getStats(): Stats;
  1919. createStatsOptions(
  1920. optionsOrPreset?: string | boolean | StatsOptions,
  1921. context?: CreateStatsOptionsContext
  1922. ): NormalizedStatsOptions;
  1923. createStatsFactory(options: NormalizedStatsOptions): StatsFactory;
  1924. createStatsPrinter(options: NormalizedStatsOptions): StatsPrinter;
  1925. getCache(name: string): CacheFacade;
  1926. getLogger(name: string | (() => string)): WebpackLogger;
  1927. addModule(
  1928. module: Module,
  1929. callback: (err?: null | WebpackError, result?: null | Module) => void
  1930. ): void;
  1931. /**
  1932. * Fetches a module from a compilation by its identifier
  1933. */
  1934. getModule(module: Module): Module;
  1935. /**
  1936. * Attempts to search for a module by its identifier
  1937. */
  1938. findModule(identifier: string): undefined | Module;
  1939. /**
  1940. * Schedules a build of the module object
  1941. */
  1942. buildModule(
  1943. module: Module,
  1944. callback: (err?: null | WebpackError, result?: null | Module) => void
  1945. ): void;
  1946. processModuleDependencies(
  1947. module: Module,
  1948. callback: (err?: null | WebpackError, result?: null | Module) => void
  1949. ): void;
  1950. processModuleDependenciesNonRecursive(module: Module): void;
  1951. handleModuleCreation(
  1952. __0: HandleModuleCreationOptions,
  1953. callback: (err?: null | WebpackError, result?: null | Module) => void
  1954. ): void;
  1955. addModuleChain(
  1956. context: string,
  1957. dependency: Dependency,
  1958. callback: (err?: null | WebpackError, result?: null | Module) => void
  1959. ): void;
  1960. addModuleTree(
  1961. __0: {
  1962. /**
  1963. * context string path
  1964. */
  1965. context: string;
  1966. /**
  1967. * dependency used to create Module chain
  1968. */
  1969. dependency: Dependency;
  1970. /**
  1971. * additional context info for the root module
  1972. */
  1973. contextInfo?: Partial<ModuleFactoryCreateDataContextInfo>;
  1974. },
  1975. callback: (err?: null | WebpackError, result?: null | Module) => void
  1976. ): void;
  1977. addEntry(
  1978. context: string,
  1979. entry: Dependency,
  1980. optionsOrName: string | EntryOptions,
  1981. callback: (err?: null | WebpackError, result?: null | Module) => void
  1982. ): void;
  1983. addInclude(
  1984. context: string,
  1985. dependency: Dependency,
  1986. options: EntryOptions,
  1987. callback: (err?: null | WebpackError, result?: null | Module) => void
  1988. ): void;
  1989. rebuildModule(
  1990. module: Module,
  1991. callback: (err?: null | WebpackError, result?: null | Module) => void
  1992. ): void;
  1993. finish(callback: (err?: null | WebpackError) => void): void;
  1994. unseal(): void;
  1995. seal(callback: (err?: null | WebpackError) => void): void;
  1996. reportDependencyErrorsAndWarnings(
  1997. module: Module,
  1998. blocks: DependenciesBlock[]
  1999. ): boolean;
  2000. codeGeneration(callback: (err?: null | WebpackError) => void): void;
  2001. processRuntimeRequirements(__0?: {
  2002. /**
  2003. * the chunk graph
  2004. */
  2005. chunkGraph?: ChunkGraph;
  2006. /**
  2007. * modules
  2008. */
  2009. modules?: Iterable<Module>;
  2010. /**
  2011. * chunks
  2012. */
  2013. chunks?: Iterable<Chunk>;
  2014. /**
  2015. * codeGenerationResults
  2016. */
  2017. codeGenerationResults?: CodeGenerationResults;
  2018. /**
  2019. * chunkGraphEntries
  2020. */
  2021. chunkGraphEntries?: Iterable<Chunk>;
  2022. }): void;
  2023. addRuntimeModule(
  2024. chunk: Chunk,
  2025. module: RuntimeModule,
  2026. chunkGraph?: ChunkGraph
  2027. ): void;
  2028. /**
  2029. * If `module` is passed, `loc` and `request` must also be passed.
  2030. */
  2031. addChunkInGroup(
  2032. groupOptions: string | ChunkGroupOptions,
  2033. module?: Module,
  2034. loc?: SyntheticDependencyLocation | RealDependencyLocation,
  2035. request?: string
  2036. ): ChunkGroup;
  2037. addAsyncEntrypoint(
  2038. options: EntryOptions,
  2039. module: Module,
  2040. loc: DependencyLocation,
  2041. request: string
  2042. ): Entrypoint;
  2043. /**
  2044. * This method first looks to see if a name is provided for a new chunk,
  2045. * and first looks to see if any named chunks already exist and reuse that chunk instead.
  2046. */
  2047. addChunk(name?: string): Chunk;
  2048. assignDepth(module: Module): void;
  2049. assignDepths(modules: Set<Module>): void;
  2050. getDependencyReferencedExports(
  2051. dependency: Dependency,
  2052. runtime: RuntimeSpec
  2053. ): (string[] | ReferencedExport)[];
  2054. removeReasonsOfDependencyBlock(
  2055. module: Module,
  2056. block: DependenciesBlockLike
  2057. ): void;
  2058. patchChunksAfterReasonRemoval(module: Module, chunk: Chunk): void;
  2059. removeChunkFromDependencies(block: DependenciesBlock, chunk: Chunk): void;
  2060. assignRuntimeIds(): void;
  2061. sortItemsWithChunkIds(): void;
  2062. summarizeDependencies(): void;
  2063. createModuleHashes(): void;
  2064. createHash(): {
  2065. module: Module;
  2066. hash: string;
  2067. runtime: RuntimeSpec;
  2068. runtimes: RuntimeSpec[];
  2069. }[];
  2070. fullHash?: string;
  2071. hash?: string;
  2072. emitAsset(file: string, source: Source, assetInfo?: AssetInfo): void;
  2073. updateAsset(
  2074. file: string,
  2075. newSourceOrFunction: Source | ((arg0: Source) => Source),
  2076. assetInfoUpdateOrFunction?: AssetInfo | ((arg0?: AssetInfo) => AssetInfo)
  2077. ): void;
  2078. renameAsset(file: string, newFile: string): void;
  2079. deleteAsset(file: string): void;
  2080. getAssets(): Readonly<Asset>[];
  2081. getAsset(name: string): undefined | Readonly<Asset>;
  2082. clearAssets(): void;
  2083. createModuleAssets(): void;
  2084. getRenderManifest(options: RenderManifestOptions): RenderManifestEntry[];
  2085. createChunkAssets(callback: (err?: null | WebpackError) => void): void;
  2086. getPath(filename: TemplatePath, data?: PathData): string;
  2087. getPathWithInfo(
  2088. filename: TemplatePath,
  2089. data?: PathData
  2090. ): InterpolatedPathAndAssetInfo;
  2091. getAssetPath(filename: TemplatePath, data: PathData): string;
  2092. getAssetPathWithInfo(
  2093. filename: TemplatePath,
  2094. data: PathData
  2095. ): InterpolatedPathAndAssetInfo;
  2096. getWarnings(): WebpackError[];
  2097. getErrors(): WebpackError[];
  2098. /**
  2099. * This function allows you to run another instance of webpack inside of webpack however as
  2100. * a child with different settings and configurations (if desired) applied. It copies all hooks, plugins
  2101. * from parent (or top level compiler) and creates a child Compilation
  2102. */
  2103. createChildCompiler(
  2104. name: string,
  2105. outputOptions?: Partial<OutputNormalized>,
  2106. plugins?: (
  2107. | ((this: Compiler, compiler: Compiler) => void)
  2108. | WebpackPluginInstance
  2109. )[]
  2110. ): Compiler;
  2111. executeModule(
  2112. module: Module,
  2113. options: ExecuteModuleOptions,
  2114. callback: (err: null | WebpackError, result?: ExecuteModuleResult) => void
  2115. ): void;
  2116. checkConstraints(): void;
  2117. factorizeModule: {
  2118. (
  2119. options: FactorizeModuleOptions & { factoryResult?: false },
  2120. callback: (err?: null | WebpackError, result?: null | Module) => void
  2121. ): void;
  2122. (
  2123. options: FactorizeModuleOptions & { factoryResult: true },
  2124. callback: (
  2125. err?: null | WebpackError,
  2126. result?: ModuleFactoryResult
  2127. ) => void
  2128. ): void;
  2129. };
  2130. /**
  2131. * Add additional assets to the compilation.
  2132. */
  2133. static PROCESS_ASSETS_STAGE_ADDITIONAL: number;
  2134. /**
  2135. * Basic preprocessing of assets.
  2136. */
  2137. static PROCESS_ASSETS_STAGE_PRE_PROCESS: number;
  2138. /**
  2139. * Derive new assets from existing assets.
  2140. * Existing assets should not be treated as complete.
  2141. */
  2142. static PROCESS_ASSETS_STAGE_DERIVED: number;
  2143. /**
  2144. * Add additional sections to existing assets, like a banner or initialization code.
  2145. */
  2146. static PROCESS_ASSETS_STAGE_ADDITIONS: number;
  2147. /**
  2148. * Optimize existing assets in a general way.
  2149. */
  2150. static PROCESS_ASSETS_STAGE_OPTIMIZE: number;
  2151. /**
  2152. * Optimize the count of existing assets, e. g. by merging them.
  2153. * Only assets of the same type should be merged.
  2154. * For assets of different types see PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE.
  2155. */
  2156. static PROCESS_ASSETS_STAGE_OPTIMIZE_COUNT: number;
  2157. /**
  2158. * Optimize the compatibility of existing assets, e. g. add polyfills or vendor-prefixes.
  2159. */
  2160. static PROCESS_ASSETS_STAGE_OPTIMIZE_COMPATIBILITY: number;
  2161. /**
  2162. * Optimize the size of existing assets, e. g. by minimizing or omitting whitespace.
  2163. */
  2164. static PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE: number;
  2165. /**
  2166. * Add development tooling to assets, e. g. by extracting a SourceMap.
  2167. */
  2168. static PROCESS_ASSETS_STAGE_DEV_TOOLING: number;
  2169. /**
  2170. * Optimize the count of existing assets, e. g. by inlining assets of into other assets.
  2171. * Only assets of different types should be inlined.
  2172. * For assets of the same type see PROCESS_ASSETS_STAGE_OPTIMIZE_COUNT.
  2173. */
  2174. static PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE: number;
  2175. /**
  2176. * Summarize the list of existing assets
  2177. * e. g. creating an assets manifest of Service Workers.
  2178. */
  2179. static PROCESS_ASSETS_STAGE_SUMMARIZE: number;
  2180. /**
  2181. * Optimize the hashes of the assets, e. g. by generating real hashes of the asset content.
  2182. */
  2183. static PROCESS_ASSETS_STAGE_OPTIMIZE_HASH: number;
  2184. /**
  2185. * Optimize the transfer of existing assets, e. g. by preparing a compressed (gzip) file as separate asset.
  2186. */
  2187. static PROCESS_ASSETS_STAGE_OPTIMIZE_TRANSFER: number;
  2188. /**
  2189. * Analyse existing assets.
  2190. */
  2191. static PROCESS_ASSETS_STAGE_ANALYSE: number;
  2192. /**
  2193. * Creating assets for reporting purposes.
  2194. */
  2195. static PROCESS_ASSETS_STAGE_REPORT: number;
  2196. }
  2197. declare interface CompilationAssets {
  2198. [index: string]: Source;
  2199. }
  2200. declare interface CompilationHooksAsyncWebAssemblyModulesPlugin {
  2201. renderModuleContent: SyncWaterfallHook<
  2202. [Source, Module, WebAssemblyRenderContext]
  2203. >;
  2204. }
  2205. declare interface CompilationHooksCssModulesPlugin {
  2206. renderModulePackage: SyncWaterfallHook<
  2207. [Source, Module, ChunkRenderContextCssModulesPlugin]
  2208. >;
  2209. chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
  2210. }
  2211. declare interface CompilationHooksJavascriptModulesPlugin {
  2212. renderModuleContent: SyncWaterfallHook<
  2213. [Source, Module, ChunkRenderContextJavascriptModulesPlugin]
  2214. >;
  2215. renderModuleContainer: SyncWaterfallHook<
  2216. [Source, Module, ChunkRenderContextJavascriptModulesPlugin]
  2217. >;
  2218. renderModulePackage: SyncWaterfallHook<
  2219. [Source, Module, ChunkRenderContextJavascriptModulesPlugin]
  2220. >;
  2221. renderChunk: SyncWaterfallHook<
  2222. [Source, RenderContextJavascriptModulesPlugin]
  2223. >;
  2224. renderMain: SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin]>;
  2225. renderContent: SyncWaterfallHook<
  2226. [Source, RenderContextJavascriptModulesPlugin]
  2227. >;
  2228. render: SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin]>;
  2229. renderStartup: SyncWaterfallHook<[Source, Module, StartupRenderContext]>;
  2230. renderRequire: SyncWaterfallHook<[string, RenderBootstrapContext]>;
  2231. inlineInRuntimeBailout: SyncBailHook<
  2232. [Module, RenderBootstrapContext],
  2233. string | void
  2234. >;
  2235. embedInRuntimeBailout: SyncBailHook<
  2236. [Module, RenderContextJavascriptModulesPlugin],
  2237. string | void
  2238. >;
  2239. strictRuntimeBailout: SyncBailHook<
  2240. [RenderContextJavascriptModulesPlugin],
  2241. string | void
  2242. >;
  2243. chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
  2244. useSourceMap: SyncBailHook<
  2245. [Chunk, RenderContextJavascriptModulesPlugin],
  2246. boolean | void
  2247. >;
  2248. }
  2249. declare interface CompilationHooksModuleFederationPlugin {
  2250. addContainerEntryDependency: SyncHook<Dependency>;
  2251. addFederationRuntimeDependency: SyncHook<Dependency>;
  2252. }
  2253. declare interface CompilationHooksRealContentHashPlugin {
  2254. updateHash: SyncBailHook<[Buffer[], string], string | void>;
  2255. }
  2256. declare interface CompilationParams {
  2257. normalModuleFactory: NormalModuleFactory;
  2258. contextModuleFactory: ContextModuleFactory;
  2259. }
  2260. declare class Compiler {
  2261. constructor(context: string, options?: WebpackOptionsNormalized);
  2262. hooks: Readonly<{
  2263. initialize: SyncHook<[]>;
  2264. shouldEmit: SyncBailHook<[Compilation], boolean | void>;
  2265. done: AsyncSeriesHook<[Stats]>;
  2266. afterDone: SyncHook<[Stats]>;
  2267. additionalPass: AsyncSeriesHook<[]>;
  2268. beforeRun: AsyncSeriesHook<[Compiler]>;
  2269. run: AsyncSeriesHook<[Compiler]>;
  2270. emit: AsyncSeriesHook<[Compilation]>;
  2271. assetEmitted: AsyncSeriesHook<[string, AssetEmittedInfo]>;
  2272. afterEmit: AsyncSeriesHook<[Compilation]>;
  2273. thisCompilation: SyncHook<[Compilation, CompilationParams]>;
  2274. compilation: SyncHook<[Compilation, CompilationParams]>;
  2275. normalModuleFactory: SyncHook<[NormalModuleFactory]>;
  2276. contextModuleFactory: SyncHook<[ContextModuleFactory]>;
  2277. beforeCompile: AsyncSeriesHook<[CompilationParams]>;
  2278. compile: SyncHook<[CompilationParams]>;
  2279. make: AsyncParallelHook<[Compilation]>;
  2280. finishMake: AsyncParallelHook<[Compilation]>;
  2281. afterCompile: AsyncSeriesHook<[Compilation]>;
  2282. readRecords: AsyncSeriesHook<[]>;
  2283. emitRecords: AsyncSeriesHook<[]>;
  2284. watchRun: AsyncSeriesHook<[Compiler]>;
  2285. failed: SyncHook<[Error]>;
  2286. invalid: SyncHook<[null | string, number]>;
  2287. watchClose: SyncHook<[]>;
  2288. shutdown: AsyncSeriesHook<[]>;
  2289. infrastructureLog: SyncBailHook<
  2290. [string, string, undefined | any[]],
  2291. true | void
  2292. >;
  2293. environment: SyncHook<[]>;
  2294. afterEnvironment: SyncHook<[]>;
  2295. afterPlugins: SyncHook<[Compiler]>;
  2296. afterResolvers: SyncHook<[Compiler]>;
  2297. entryOption: SyncBailHook<[string, EntryNormalized], boolean | void>;
  2298. }>;
  2299. webpack: typeof exports;
  2300. name?: string;
  2301. parentCompilation?: Compilation;
  2302. root: Compiler;
  2303. outputPath: string;
  2304. watching?: Watching;
  2305. outputFileSystem: null | OutputFileSystem;
  2306. intermediateFileSystem: null | IntermediateFileSystem;
  2307. inputFileSystem: null | InputFileSystem;
  2308. watchFileSystem: null | WatchFileSystem;
  2309. recordsInputPath: null | string;
  2310. recordsOutputPath: null | string;
  2311. records: Record<string, any>;
  2312. managedPaths: Set<string | RegExp>;
  2313. unmanagedPaths: Set<string | RegExp>;
  2314. immutablePaths: Set<string | RegExp>;
  2315. modifiedFiles?: ReadonlySet<string>;
  2316. removedFiles?: ReadonlySet<string>;
  2317. fileTimestamps?: ReadonlyMap<string, null | FileSystemInfoEntry | "ignore">;
  2318. contextTimestamps?: ReadonlyMap<
  2319. string,
  2320. null | FileSystemInfoEntry | "ignore"
  2321. >;
  2322. fsStartTime?: number;
  2323. resolverFactory: ResolverFactory;
  2324. infrastructureLogger?: (
  2325. arg0: string,
  2326. arg1: LogTypeEnum,
  2327. arg2?: any[]
  2328. ) => void;
  2329. platform: Readonly<PlatformTargetProperties>;
  2330. options: WebpackOptionsNormalized;
  2331. context: string;
  2332. requestShortener: RequestShortener;
  2333. cache: Cache;
  2334. moduleMemCaches?: Map<Module, ModuleMemCachesItem>;
  2335. compilerPath: string;
  2336. running: boolean;
  2337. idle: boolean;
  2338. watchMode: boolean;
  2339. getCache(name: string): CacheFacade;
  2340. getInfrastructureLogger(name: string | (() => string)): WebpackLogger;
  2341. watch(watchOptions: WatchOptions, handler: RunCallback<Stats>): Watching;
  2342. run(callback: RunCallback<Stats>): void;
  2343. runAsChild(
  2344. callback: (
  2345. err: null | Error,
  2346. entries?: Chunk[],
  2347. compilation?: Compilation
  2348. ) => any
  2349. ): void;
  2350. purgeInputFileSystem(): void;
  2351. emitAssets(
  2352. compilation: Compilation,
  2353. callback: CallbackFunction_2<void>
  2354. ): void;
  2355. emitRecords(callback: CallbackFunction_2<void>): void;
  2356. readRecords(callback: CallbackFunction_2<void>): void;
  2357. createChildCompiler(
  2358. compilation: Compilation,
  2359. compilerName: string,
  2360. compilerIndex: number,
  2361. outputOptions?: Partial<OutputNormalized>,
  2362. plugins?: WebpackPluginInstance[]
  2363. ): Compiler;
  2364. isChild(): boolean;
  2365. createCompilation(params: CompilationParams): Compilation;
  2366. newCompilation(params: CompilationParams): Compilation;
  2367. createNormalModuleFactory(): NormalModuleFactory;
  2368. createContextModuleFactory(): ContextModuleFactory;
  2369. newCompilationParams(): {
  2370. normalModuleFactory: NormalModuleFactory;
  2371. contextModuleFactory: ContextModuleFactory;
  2372. };
  2373. compile(callback: RunCallback<Compilation>): void;
  2374. close(callback: RunCallback<void>): void;
  2375. }
  2376. declare class ConcatSource extends Source {
  2377. constructor(...args: (string | Source)[]);
  2378. getChildren(): Source[];
  2379. add(item: string | Source): void;
  2380. addAllSkipOptimizing(items: Source[]): void;
  2381. }
  2382. declare interface ConcatenatedModuleInfo {
  2383. type: "concatenated";
  2384. module: Module;
  2385. index: number;
  2386. ast?: Program;
  2387. internalSource?: Source;
  2388. source?: ReplaceSource;
  2389. chunkInitFragments?: InitFragment<ChunkRenderContextJavascriptModulesPlugin>[];
  2390. runtimeRequirements?: ReadonlySet<string>;
  2391. globalScope?: Scope;
  2392. moduleScope?: Scope;
  2393. internalNames: Map<string, string>;
  2394. exportMap?: Map<string, string>;
  2395. rawExportMap?: Map<string, string>;
  2396. namespaceExportSymbol?: string;
  2397. namespaceObjectName?: string;
  2398. interopNamespaceObjectUsed: boolean;
  2399. interopNamespaceObjectName?: string;
  2400. interopNamespaceObject2Used: boolean;
  2401. interopNamespaceObject2Name?: string;
  2402. interopDefaultAccessUsed: boolean;
  2403. interopDefaultAccessName?: string;
  2404. }
  2405. declare interface ConcatenationBailoutReasonContext {
  2406. /**
  2407. * the module graph
  2408. */
  2409. moduleGraph: ModuleGraph;
  2410. /**
  2411. * the chunk graph
  2412. */
  2413. chunkGraph: ChunkGraph;
  2414. }
  2415. declare class ConcatenationScope {
  2416. constructor(
  2417. modulesMap: ModuleInfo[] | Map<Module, ModuleInfo>,
  2418. currentModule: ConcatenatedModuleInfo
  2419. );
  2420. isModuleInScope(module: Module): boolean;
  2421. registerExport(exportName: string, symbol: string): void;
  2422. registerRawExport(exportName: string, expression: string): void;
  2423. registerNamespaceExport(symbol: string): void;
  2424. createModuleReference(
  2425. module: Module,
  2426. __1: Partial<ModuleReferenceOptions>
  2427. ): string;
  2428. static isModuleReference(name: string): boolean;
  2429. static matchModuleReference(
  2430. name: string
  2431. ): null | (ModuleReferenceOptions & { index: number });
  2432. static DEFAULT_EXPORT: string;
  2433. static NAMESPACE_OBJECT_EXPORT: string;
  2434. }
  2435. /**
  2436. * Options object as provided by the user.
  2437. */
  2438. declare interface Configuration {
  2439. /**
  2440. * Set the value of `require.amd` and `define.amd`. Or disable AMD support.
  2441. */
  2442. amd?: false | { [index: string]: any };
  2443. /**
  2444. * Report the first error as a hard error instead of tolerating it.
  2445. */
  2446. bail?: boolean;
  2447. /**
  2448. * Cache generated modules and chunks to improve performance for multiple incremental builds.
  2449. */
  2450. cache?: boolean | FileCacheOptions | MemoryCacheOptions;
  2451. /**
  2452. * The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.
  2453. */
  2454. context?: string;
  2455. /**
  2456. * References to other configurations to depend on.
  2457. */
  2458. dependencies?: string[];
  2459. /**
  2460. * A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
  2461. */
  2462. devtool?: string | false;
  2463. /**
  2464. * The entry point(s) of the compilation.
  2465. */
  2466. entry?:
  2467. | string
  2468. | (() => string | EntryObject | string[] | Promise<EntryStatic>)
  2469. | EntryObject
  2470. | string[];
  2471. /**
  2472. * Enables/Disables experiments (experimental features with relax SemVer compatibility).
  2473. */
  2474. experiments?: Experiments;
  2475. /**
  2476. * Extend configuration from another configuration (only works when using webpack-cli).
  2477. */
  2478. extends?: string | string[];
  2479. /**
  2480. * Specify dependencies that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`.
  2481. */
  2482. externals?:
  2483. | string
  2484. | RegExp
  2485. | ExternalItem[]
  2486. | (ExternalItemObjectKnown & ExternalItemObjectUnknown)
  2487. | ((
  2488. data: ExternalItemFunctionData,
  2489. callback: (
  2490. err?: null | Error,
  2491. result?: string | boolean | string[] | { [index: string]: any }
  2492. ) => void
  2493. ) => void)
  2494. | ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>);
  2495. /**
  2496. * Enable presets of externals for specific targets.
  2497. */
  2498. externalsPresets?: ExternalsPresets;
  2499. /**
  2500. * Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
  2501. */
  2502. externalsType?:
  2503. | "import"
  2504. | "var"
  2505. | "module"
  2506. | "assign"
  2507. | "this"
  2508. | "window"
  2509. | "self"
  2510. | "global"
  2511. | "commonjs"
  2512. | "commonjs2"
  2513. | "commonjs-module"
  2514. | "commonjs-static"
  2515. | "amd"
  2516. | "amd-require"
  2517. | "umd"
  2518. | "umd2"
  2519. | "jsonp"
  2520. | "system"
  2521. | "promise"
  2522. | "module-import"
  2523. | "script"
  2524. | "node-commonjs";
  2525. /**
  2526. * Ignore specific warnings.
  2527. */
  2528. ignoreWarnings?: (
  2529. | RegExp
  2530. | {
  2531. /**
  2532. * A RegExp to select the origin file for the warning.
  2533. */
  2534. file?: RegExp;
  2535. /**
  2536. * A RegExp to select the warning message.
  2537. */
  2538. message?: RegExp;
  2539. /**
  2540. * A RegExp to select the origin module for the warning.
  2541. */
  2542. module?: RegExp;
  2543. }
  2544. | ((warning: WebpackError, compilation: Compilation) => boolean)
  2545. )[];
  2546. /**
  2547. * Options for infrastructure level logging.
  2548. */
  2549. infrastructureLogging?: InfrastructureLogging;
  2550. /**
  2551. * Custom values available in the loader context.
  2552. */
  2553. loader?: Loader;
  2554. /**
  2555. * Enable production optimizations or development hints.
  2556. */
  2557. mode?: "none" | "development" | "production";
  2558. /**
  2559. * Options affecting the normal modules (`NormalModuleFactory`).
  2560. */
  2561. module?: ModuleOptions;
  2562. /**
  2563. * Name of the configuration. Used when loading multiple configurations.
  2564. */
  2565. name?: string;
  2566. /**
  2567. * Include polyfills or mocks for various node stuff.
  2568. */
  2569. node?: false | NodeOptions;
  2570. /**
  2571. * Enables/Disables integrated optimizations.
  2572. */
  2573. optimization?: Optimization;
  2574. /**
  2575. * Options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.
  2576. */
  2577. output?: Output;
  2578. /**
  2579. * The number of parallel processed modules in the compilation.
  2580. */
  2581. parallelism?: number;
  2582. /**
  2583. * Configuration for web performance recommendations.
  2584. */
  2585. performance?: false | PerformanceOptions;
  2586. /**
  2587. * Add additional plugins to the compiler.
  2588. */
  2589. plugins?: (
  2590. | undefined
  2591. | null
  2592. | false
  2593. | ""
  2594. | 0
  2595. | ((this: Compiler, compiler: Compiler) => void)
  2596. | WebpackPluginInstance
  2597. )[];
  2598. /**
  2599. * Capture timing information for each module.
  2600. */
  2601. profile?: boolean;
  2602. /**
  2603. * Store compiler state to a json file.
  2604. */
  2605. recordsInputPath?: string | false;
  2606. /**
  2607. * Load compiler state from a json file.
  2608. */
  2609. recordsOutputPath?: string | false;
  2610. /**
  2611. * Store/Load compiler state from/to a json file. This will result in persistent ids of modules and chunks. An absolute path is expected. `recordsPath` is used for `recordsInputPath` and `recordsOutputPath` if they left undefined.
  2612. */
  2613. recordsPath?: string | false;
  2614. /**
  2615. * Options for the resolver.
  2616. */
  2617. resolve?: ResolveOptions;
  2618. /**
  2619. * Options for the resolver when resolving loaders.
  2620. */
  2621. resolveLoader?: ResolveOptions;
  2622. /**
  2623. * Options affecting how file system snapshots are created and validated.
  2624. */
  2625. snapshot?: SnapshotOptionsWebpackOptions;
  2626. /**
  2627. * Stats options object or preset name.
  2628. */
  2629. stats?:
  2630. | boolean
  2631. | StatsOptions
  2632. | "none"
  2633. | "verbose"
  2634. | "summary"
  2635. | "errors-only"
  2636. | "errors-warnings"
  2637. | "minimal"
  2638. | "normal"
  2639. | "detailed";
  2640. /**
  2641. * Environment to build for. An array of environments to build for all of them when possible.
  2642. */
  2643. target?: string | false | string[];
  2644. /**
  2645. * Enter watch mode, which rebuilds on file change.
  2646. */
  2647. watch?: boolean;
  2648. /**
  2649. * Options for the watcher.
  2650. */
  2651. watchOptions?: WatchOptions;
  2652. }
  2653. type ConnectionState =
  2654. | boolean
  2655. | typeof TRANSITIVE_ONLY
  2656. | typeof CIRCULAR_CONNECTION;
  2657. declare class ConstDependency extends NullDependency {
  2658. constructor(
  2659. expression: string,
  2660. range: number | [number, number],
  2661. runtimeRequirements?: null | string[]
  2662. );
  2663. expression: string;
  2664. range: number | [number, number];
  2665. runtimeRequirements: null | Set<string>;
  2666. static Template: typeof ConstDependencyTemplate;
  2667. static NO_EXPORTS_REFERENCED: string[][];
  2668. static EXPORTS_OBJECT_REFERENCED: string[][];
  2669. static TRANSITIVE: typeof TRANSITIVE;
  2670. }
  2671. declare class ConstDependencyTemplate extends NullDependencyTemplate {
  2672. constructor();
  2673. }
  2674. declare interface Constructor {
  2675. new (...params: any[]): any;
  2676. }
  2677. declare class ConsumeSharedPlugin {
  2678. constructor(options: ConsumeSharedPluginOptions);
  2679. /**
  2680. * Apply the plugin
  2681. */
  2682. apply(compiler: Compiler): void;
  2683. }
  2684. /**
  2685. * Options for consuming shared modules.
  2686. */
  2687. declare interface ConsumeSharedPluginOptions {
  2688. /**
  2689. * Modules that should be consumed from share scope. When provided, property names are used to match requested modules in this compilation.
  2690. */
  2691. consumes: Consumes;
  2692. /**
  2693. * Share scope name used for all consumed modules (defaults to 'default').
  2694. */
  2695. shareScope?: string;
  2696. }
  2697. type Consumes = (string | ConsumesObject)[] | ConsumesObject;
  2698. /**
  2699. * Advanced configuration for modules that should be consumed from share scope.
  2700. */
  2701. declare interface ConsumesConfig {
  2702. /**
  2703. * Include the fallback module directly instead behind an async request. This allows to use fallback module in initial load too. All possible shared modules need to be eager too.
  2704. */
  2705. eager?: boolean;
  2706. /**
  2707. * Fallback module if no shared module is found in share scope. Defaults to the property name.
  2708. */
  2709. import?: string | false;
  2710. /**
  2711. * Package name to determine required version from description file. This is only needed when package name can't be automatically determined from request.
  2712. */
  2713. packageName?: string;
  2714. /**
  2715. * Version requirement from module in share scope.
  2716. */
  2717. requiredVersion?: string | false;
  2718. /**
  2719. * Module is looked up under this key from the share scope.
  2720. */
  2721. shareKey?: string;
  2722. /**
  2723. * Share scope name.
  2724. */
  2725. shareScope?: string;
  2726. /**
  2727. * Allow only a single version of the shared module in share scope (disabled by default).
  2728. */
  2729. singleton?: boolean;
  2730. /**
  2731. * Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).
  2732. */
  2733. strictVersion?: boolean;
  2734. }
  2735. /**
  2736. * Modules that should be consumed from share scope. Property names are used to match requested modules in this compilation. Relative requests are resolved, module requests are matched unresolved, absolute paths will match resolved requests. A trailing slash will match all requests with this prefix. In this case shareKey must also have a trailing slash.
  2737. */
  2738. declare interface ConsumesObject {
  2739. [index: string]: string | ConsumesConfig;
  2740. }
  2741. type ContainerOptionsFormat<T> = Item<T> | (string | Item<T>)[];
  2742. declare class ContainerPlugin {
  2743. constructor(options: ContainerPluginOptions);
  2744. /**
  2745. * Apply the plugin
  2746. */
  2747. apply(compiler: Compiler): void;
  2748. }
  2749. declare interface ContainerPluginOptions {
  2750. /**
  2751. * Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.
  2752. */
  2753. exposes: Exposes;
  2754. /**
  2755. * The filename for this container relative path inside the `output.path` directory.
  2756. */
  2757. filename?: string;
  2758. /**
  2759. * Options for library.
  2760. */
  2761. library?: LibraryOptions;
  2762. /**
  2763. * The name for this container.
  2764. */
  2765. name: string;
  2766. /**
  2767. * The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.
  2768. */
  2769. runtime?: string | false;
  2770. /**
  2771. * The name of the share scope which is shared with the host (defaults to 'default').
  2772. */
  2773. shareScope?: string;
  2774. }
  2775. declare class ContainerReferencePlugin {
  2776. constructor(options: ContainerReferencePluginOptions);
  2777. /**
  2778. * Apply the plugin
  2779. */
  2780. apply(compiler: Compiler): void;
  2781. }
  2782. declare interface ContainerReferencePluginOptions {
  2783. /**
  2784. * The external type of the remote containers.
  2785. */
  2786. remoteType: ExternalsType;
  2787. /**
  2788. * Container locations and request scopes from which modules should be resolved and loaded at runtime. When provided, property name is used as request scope, otherwise request scope is automatically inferred from container location.
  2789. */
  2790. remotes: Remotes;
  2791. /**
  2792. * The name of the share scope shared with all remotes (defaults to 'default').
  2793. */
  2794. shareScope?: string;
  2795. }
  2796. declare interface ContextAlternativeRequest {
  2797. context: string;
  2798. request: string;
  2799. }
  2800. declare abstract class ContextElementDependency extends ModuleDependency {
  2801. referencedExports?: null | string[][];
  2802. }
  2803. declare class ContextExclusionPlugin {
  2804. constructor(negativeMatcher: RegExp);
  2805. negativeMatcher: RegExp;
  2806. /**
  2807. * Apply the plugin
  2808. */
  2809. apply(compiler: Compiler): void;
  2810. }
  2811. declare interface ContextFileSystemInfoEntry {
  2812. safeTime: number;
  2813. timestampHash?: string;
  2814. resolved?: ResolvedContextFileSystemInfoEntry;
  2815. symlinks?: Set<string>;
  2816. }
  2817. declare interface ContextHash {
  2818. hash: string;
  2819. resolved?: string;
  2820. symlinks?: Set<string>;
  2821. }
  2822. type ContextMode =
  2823. | "weak"
  2824. | "eager"
  2825. | "lazy"
  2826. | "lazy-once"
  2827. | "sync"
  2828. | "async-weak";
  2829. declare abstract class ContextModuleFactory extends ModuleFactory {
  2830. hooks: Readonly<{
  2831. beforeResolve: AsyncSeriesWaterfallHook<[any]>;
  2832. afterResolve: AsyncSeriesWaterfallHook<[any]>;
  2833. contextModuleFiles: SyncWaterfallHook<[string[]]>;
  2834. alternatives: FakeHook<
  2835. Pick<
  2836. AsyncSeriesWaterfallHook<[ContextAlternativeRequest[]]>,
  2837. "name" | "tap" | "tapAsync" | "tapPromise"
  2838. >
  2839. >;
  2840. alternativeRequests: AsyncSeriesWaterfallHook<
  2841. [ContextAlternativeRequest[], ContextModuleOptions]
  2842. >;
  2843. }>;
  2844. resolverFactory: ResolverFactory;
  2845. resolveDependencies(
  2846. fs: InputFileSystem,
  2847. options: ContextModuleOptions,
  2848. callback: (
  2849. err: null | Error,
  2850. dependencies?: ContextElementDependency[]
  2851. ) => any
  2852. ): void;
  2853. }
  2854. declare interface ContextModuleOptions {
  2855. mode: ContextMode;
  2856. recursive: boolean;
  2857. regExp: RegExp;
  2858. namespaceObject?: boolean | "strict";
  2859. addon?: string;
  2860. chunkName?: null | string;
  2861. include?: null | RegExp;
  2862. exclude?: null | RegExp;
  2863. groupOptions?: RawChunkGroupOptions;
  2864. typePrefix?: string;
  2865. category?: string;
  2866. /**
  2867. * exports referenced from modules (won't be mangled)
  2868. */
  2869. referencedExports?: null | string[][];
  2870. layer?: string;
  2871. attributes?: ImportAttributes;
  2872. resource: string | false | string[];
  2873. resourceQuery?: string;
  2874. resourceFragment?: string;
  2875. resolveOptions: any;
  2876. }
  2877. declare class ContextReplacementPlugin {
  2878. constructor(
  2879. resourceRegExp: RegExp,
  2880. newContentResource?: any,
  2881. newContentRecursive?: any,
  2882. newContentRegExp?: RegExp
  2883. );
  2884. resourceRegExp: RegExp;
  2885. newContentCallback: any;
  2886. newContentResource: any;
  2887. newContentCreateContextMap: any;
  2888. newContentRecursive: any;
  2889. newContentRegExp?: RegExp;
  2890. /**
  2891. * Apply the plugin
  2892. */
  2893. apply(compiler: Compiler): void;
  2894. }
  2895. declare interface ContextTimestampAndHash {
  2896. safeTime: number;
  2897. timestampHash?: string;
  2898. hash: string;
  2899. resolved?: ResolvedContextTimestampAndHash;
  2900. symlinks?: Set<string>;
  2901. }
  2902. type CreateStatsOptionsContext = Record<string, any> &
  2903. KnownCreateStatsOptionsContext;
  2904. type CreateWriteStreamFSImplementation = FSImplementation & {
  2905. write: (...args: any[]) => any;
  2906. close?: (...args: any[]) => any;
  2907. };
  2908. /**
  2909. * Generator options for css/auto modules.
  2910. */
  2911. declare interface CssAutoGeneratorOptions {
  2912. /**
  2913. * Configure the generated JS modules that use the ES modules syntax.
  2914. */
  2915. esModule?: boolean;
  2916. /**
  2917. * Specifies the convention of exported names.
  2918. */
  2919. exportsConvention?:
  2920. | "as-is"
  2921. | "camel-case"
  2922. | "camel-case-only"
  2923. | "dashes"
  2924. | "dashes-only"
  2925. | ((name: string) => string);
  2926. /**
  2927. * Avoid generating and loading a stylesheet and only embed exports from css into output javascript files.
  2928. */
  2929. exportsOnly?: boolean;
  2930. /**
  2931. * Configure the generated local ident name.
  2932. */
  2933. localIdentName?: string;
  2934. }
  2935. /**
  2936. * Parser options for css/auto modules.
  2937. */
  2938. declare interface CssAutoParserOptions {
  2939. /**
  2940. * Enable/disable `@import` at-rules handling.
  2941. */
  2942. import?: boolean;
  2943. /**
  2944. * Use ES modules named export for css exports.
  2945. */
  2946. namedExports?: boolean;
  2947. /**
  2948. * Enable/disable `url()`/`image-set()`/`src()`/`image()` functions handling.
  2949. */
  2950. url?: boolean;
  2951. }
  2952. /**
  2953. * Generator options for css modules.
  2954. */
  2955. declare interface CssGeneratorOptions {
  2956. /**
  2957. * Configure the generated JS modules that use the ES modules syntax.
  2958. */
  2959. esModule?: boolean;
  2960. /**
  2961. * Avoid generating and loading a stylesheet and only embed exports from css into output javascript files.
  2962. */
  2963. exportsOnly?: boolean;
  2964. }
  2965. /**
  2966. * Generator options for css/global modules.
  2967. */
  2968. declare interface CssGlobalGeneratorOptions {
  2969. /**
  2970. * Configure the generated JS modules that use the ES modules syntax.
  2971. */
  2972. esModule?: boolean;
  2973. /**
  2974. * Specifies the convention of exported names.
  2975. */
  2976. exportsConvention?:
  2977. | "as-is"
  2978. | "camel-case"
  2979. | "camel-case-only"
  2980. | "dashes"
  2981. | "dashes-only"
  2982. | ((name: string) => string);
  2983. /**
  2984. * Avoid generating and loading a stylesheet and only embed exports from css into output javascript files.
  2985. */
  2986. exportsOnly?: boolean;
  2987. /**
  2988. * Configure the generated local ident name.
  2989. */
  2990. localIdentName?: string;
  2991. }
  2992. /**
  2993. * Parser options for css/global modules.
  2994. */
  2995. declare interface CssGlobalParserOptions {
  2996. /**
  2997. * Enable/disable `@import` at-rules handling.
  2998. */
  2999. import?: boolean;
  3000. /**
  3001. * Use ES modules named export for css exports.
  3002. */
  3003. namedExports?: boolean;
  3004. /**
  3005. * Enable/disable `url()`/`image-set()`/`src()`/`image()` functions handling.
  3006. */
  3007. url?: boolean;
  3008. }
  3009. declare interface CssImportDependencyMeta {
  3010. layer?: string;
  3011. supports?: string;
  3012. media?: string;
  3013. }
  3014. type CssLayer = undefined | string;
  3015. declare class CssLoadingRuntimeModule extends RuntimeModule {
  3016. constructor(runtimeRequirements: ReadonlySet<string>);
  3017. static getCompilationHooks(
  3018. compilation: Compilation
  3019. ): CssLoadingRuntimeModulePluginHooks;
  3020. /**
  3021. * Runtime modules without any dependencies to other runtime modules
  3022. */
  3023. static STAGE_NORMAL: number;
  3024. /**
  3025. * Runtime modules with simple dependencies on other runtime modules
  3026. */
  3027. static STAGE_BASIC: number;
  3028. /**
  3029. * Runtime modules which attach to handlers of other runtime modules
  3030. */
  3031. static STAGE_ATTACH: number;
  3032. /**
  3033. * Runtime modules which trigger actions on bootstrap
  3034. */
  3035. static STAGE_TRIGGER: number;
  3036. }
  3037. declare interface CssLoadingRuntimeModulePluginHooks {
  3038. createStylesheet: SyncWaterfallHook<[string, Chunk]>;
  3039. linkPreload: SyncWaterfallHook<[string, Chunk]>;
  3040. linkPrefetch: SyncWaterfallHook<[string, Chunk]>;
  3041. }
  3042. declare abstract class CssModule extends NormalModule {
  3043. cssLayer: CssLayer;
  3044. supports: Supports;
  3045. media: Media;
  3046. inheritance: [CssLayer, Supports, Media][];
  3047. }
  3048. /**
  3049. * Generator options for css/module modules.
  3050. */
  3051. declare interface CssModuleGeneratorOptions {
  3052. /**
  3053. * Configure the generated JS modules that use the ES modules syntax.
  3054. */
  3055. esModule?: boolean;
  3056. /**
  3057. * Specifies the convention of exported names.
  3058. */
  3059. exportsConvention?:
  3060. | "as-is"
  3061. | "camel-case"
  3062. | "camel-case-only"
  3063. | "dashes"
  3064. | "dashes-only"
  3065. | ((name: string) => string);
  3066. /**
  3067. * Avoid generating and loading a stylesheet and only embed exports from css into output javascript files.
  3068. */
  3069. exportsOnly?: boolean;
  3070. /**
  3071. * Configure the generated local ident name.
  3072. */
  3073. localIdentName?: string;
  3074. }
  3075. /**
  3076. * Parser options for css/module modules.
  3077. */
  3078. declare interface CssModuleParserOptions {
  3079. /**
  3080. * Enable/disable `@import` at-rules handling.
  3081. */
  3082. import?: boolean;
  3083. /**
  3084. * Use ES modules named export for css exports.
  3085. */
  3086. namedExports?: boolean;
  3087. /**
  3088. * Enable/disable `url()`/`image-set()`/`src()`/`image()` functions handling.
  3089. */
  3090. url?: boolean;
  3091. }
  3092. declare class CssModulesPlugin {
  3093. constructor();
  3094. /**
  3095. * Apply the plugin
  3096. */
  3097. apply(compiler: Compiler): void;
  3098. getModulesInOrder(
  3099. chunk: Chunk,
  3100. modules: Iterable<Module>,
  3101. compilation: Compilation
  3102. ): Module[];
  3103. getOrderedChunkCssModules(
  3104. chunk: Chunk,
  3105. chunkGraph: ChunkGraph,
  3106. compilation: Compilation
  3107. ): Module[];
  3108. renderModule(
  3109. module: CssModule,
  3110. renderContext: ChunkRenderContextCssModulesPlugin,
  3111. hooks: CompilationHooksCssModulesPlugin
  3112. ): Source;
  3113. renderChunk(
  3114. __0: RenderContextCssModulesPlugin,
  3115. hooks: CompilationHooksCssModulesPlugin
  3116. ): Source;
  3117. static getCompilationHooks(
  3118. compilation: Compilation
  3119. ): CompilationHooksCssModulesPlugin;
  3120. static getChunkFilenameTemplate(
  3121. chunk: Chunk,
  3122. outputOptions: OutputNormalized
  3123. ): TemplatePath;
  3124. static chunkHasCss(chunk: Chunk, chunkGraph: ChunkGraph): boolean;
  3125. }
  3126. /**
  3127. * Parser options for css modules.
  3128. */
  3129. declare interface CssParserOptions {
  3130. /**
  3131. * Enable/disable `@import` at-rules handling.
  3132. */
  3133. import?: boolean;
  3134. /**
  3135. * Use ES modules named export for css exports.
  3136. */
  3137. namedExports?: boolean;
  3138. /**
  3139. * Enable/disable `url()`/`image-set()`/`src()`/`image()` functions handling.
  3140. */
  3141. url?: boolean;
  3142. }
  3143. type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration;
  3144. declare class DefinePlugin {
  3145. /**
  3146. * Create a new define plugin
  3147. */
  3148. constructor(definitions: Record<string, CodeValue>);
  3149. definitions: Record<string, CodeValue>;
  3150. /**
  3151. * Apply the plugin
  3152. */
  3153. apply(compiler: Compiler): void;
  3154. static runtimeValue(
  3155. fn: (arg0: {
  3156. module: NormalModule;
  3157. key: string;
  3158. readonly version: ValueCacheVersion;
  3159. }) => CodeValuePrimitive,
  3160. options?: true | string[] | RuntimeValueOptions
  3161. ): RuntimeValue;
  3162. }
  3163. declare class DelegatedPlugin {
  3164. constructor(options: Options);
  3165. options: Options;
  3166. /**
  3167. * Apply the plugin
  3168. */
  3169. apply(compiler: Compiler): void;
  3170. }
  3171. declare interface DepConstructor {
  3172. new (...args: any[]): Dependency;
  3173. }
  3174. declare abstract class DependenciesBlock {
  3175. dependencies: Dependency[];
  3176. blocks: AsyncDependenciesBlock[];
  3177. parent?: DependenciesBlock;
  3178. getRootBlock(): DependenciesBlock;
  3179. /**
  3180. * Adds a DependencyBlock to DependencyBlock relationship.
  3181. * This is used for when a Module has a AsyncDependencyBlock tie (for code-splitting)
  3182. */
  3183. addBlock(block: AsyncDependenciesBlock): void;
  3184. addDependency(dependency: Dependency): void;
  3185. removeDependency(dependency: Dependency): void;
  3186. /**
  3187. * Removes all dependencies and blocks
  3188. */
  3189. clearDependenciesAndBlocks(): void;
  3190. updateHash(hash: Hash, context: UpdateHashContextDependency): void;
  3191. serialize(__0: ObjectSerializerContext): void;
  3192. deserialize(__0: ObjectDeserializerContext): void;
  3193. }
  3194. declare interface DependenciesBlockLike {
  3195. dependencies: Dependency[];
  3196. blocks: AsyncDependenciesBlock[];
  3197. }
  3198. declare class Dependency {
  3199. constructor();
  3200. weak: boolean;
  3201. optional: boolean;
  3202. get type(): string;
  3203. get category(): string;
  3204. loc: DependencyLocation;
  3205. setLoc(
  3206. startLine: number,
  3207. startColumn: number,
  3208. endLine: number,
  3209. endColumn: number
  3210. ): void;
  3211. getContext(): undefined | string;
  3212. getResourceIdentifier(): null | string;
  3213. couldAffectReferencingModule(): boolean | typeof TRANSITIVE;
  3214. /**
  3215. * Returns the referenced module and export
  3216. */
  3217. getReference(moduleGraph: ModuleGraph): never;
  3218. /**
  3219. * Returns list of exports referenced by this dependency
  3220. */
  3221. getReferencedExports(
  3222. moduleGraph: ModuleGraph,
  3223. runtime: RuntimeSpec
  3224. ): (string[] | ReferencedExport)[];
  3225. getCondition(
  3226. moduleGraph: ModuleGraph
  3227. ):
  3228. | null
  3229. | false
  3230. | ((arg0: ModuleGraphConnection, arg1: RuntimeSpec) => ConnectionState);
  3231. /**
  3232. * Returns the exported names
  3233. */
  3234. getExports(moduleGraph: ModuleGraph): undefined | ExportsSpec;
  3235. /**
  3236. * Returns warnings
  3237. */
  3238. getWarnings(moduleGraph: ModuleGraph): undefined | null | WebpackError[];
  3239. /**
  3240. * Returns errors
  3241. */
  3242. getErrors(moduleGraph: ModuleGraph): undefined | null | WebpackError[];
  3243. /**
  3244. * Update the hash
  3245. */
  3246. updateHash(hash: Hash, context: UpdateHashContextDependency): void;
  3247. /**
  3248. * implement this method to allow the occurrence order plugin to count correctly
  3249. */
  3250. getNumberOfIdOccurrences(): number;
  3251. getModuleEvaluationSideEffectsState(
  3252. moduleGraph: ModuleGraph
  3253. ): ConnectionState;
  3254. createIgnoredModule(context: string): null | Module;
  3255. serialize(__0: ObjectSerializerContext): void;
  3256. deserialize(__0: ObjectDeserializerContext): void;
  3257. module: any;
  3258. get disconnect(): any;
  3259. static NO_EXPORTS_REFERENCED: string[][];
  3260. static EXPORTS_OBJECT_REFERENCED: string[][];
  3261. static TRANSITIVE: typeof TRANSITIVE;
  3262. }
  3263. declare interface DependencyConstructor {
  3264. new (...args: any[]): Dependency;
  3265. }
  3266. type DependencyLocation = SyntheticDependencyLocation | RealDependencyLocation;
  3267. declare class DependencyTemplate {
  3268. constructor();
  3269. apply(
  3270. dependency: Dependency,
  3271. source: ReplaceSource,
  3272. templateContext: DependencyTemplateContext
  3273. ): void;
  3274. }
  3275. declare interface DependencyTemplateContext {
  3276. /**
  3277. * the runtime template
  3278. */
  3279. runtimeTemplate: RuntimeTemplate;
  3280. /**
  3281. * the dependency templates
  3282. */
  3283. dependencyTemplates: DependencyTemplates;
  3284. /**
  3285. * the module graph
  3286. */
  3287. moduleGraph: ModuleGraph;
  3288. /**
  3289. * the chunk graph
  3290. */
  3291. chunkGraph: ChunkGraph;
  3292. /**
  3293. * the requirements for runtime
  3294. */
  3295. runtimeRequirements: Set<string>;
  3296. /**
  3297. * current module
  3298. */
  3299. module: Module;
  3300. /**
  3301. * current runtimes, for which code is generated
  3302. */
  3303. runtime: RuntimeSpec;
  3304. /**
  3305. * mutable array of init fragments for the current module
  3306. */
  3307. initFragments: InitFragment<GenerateContext>[];
  3308. /**
  3309. * when in a concatenated module, information about other concatenated modules
  3310. */
  3311. concatenationScope?: ConcatenationScope;
  3312. /**
  3313. * the code generation results
  3314. */
  3315. codeGenerationResults: CodeGenerationResults;
  3316. /**
  3317. * chunkInitFragments
  3318. */
  3319. chunkInitFragments: InitFragment<GenerateContext>[];
  3320. }
  3321. declare abstract class DependencyTemplates {
  3322. get(dependency: DependencyConstructor): undefined | DependencyTemplate;
  3323. set(
  3324. dependency: DependencyConstructor,
  3325. dependencyTemplate: DependencyTemplate
  3326. ): void;
  3327. updateHash(part: string): void;
  3328. getHash(): string;
  3329. clone(): DependencyTemplates;
  3330. }
  3331. /**
  3332. * Helper function for joining two ranges into a single range. This is useful
  3333. * when working with AST nodes, as it allows you to combine the ranges of child nodes
  3334. * to create the range of the _parent node_.
  3335. */
  3336. declare interface DestructuringAssignmentProperty {
  3337. id: string;
  3338. range?: [number, number];
  3339. shorthand: string | boolean;
  3340. }
  3341. declare class DeterministicChunkIdsPlugin {
  3342. constructor(options?: DeterministicChunkIdsPluginOptions);
  3343. options: DeterministicChunkIdsPluginOptions;
  3344. /**
  3345. * Apply the plugin
  3346. */
  3347. apply(compiler: Compiler): void;
  3348. }
  3349. declare interface DeterministicChunkIdsPluginOptions {
  3350. /**
  3351. * context for ids
  3352. */
  3353. context?: string;
  3354. /**
  3355. * maximum length of ids
  3356. */
  3357. maxLength?: number;
  3358. }
  3359. declare class DeterministicModuleIdsPlugin {
  3360. constructor(options?: DeterministicModuleIdsPluginOptions);
  3361. options: DeterministicModuleIdsPluginOptions;
  3362. /**
  3363. * Apply the plugin
  3364. */
  3365. apply(compiler: Compiler): void;
  3366. }
  3367. declare interface DeterministicModuleIdsPluginOptions {
  3368. /**
  3369. * context relative to which module identifiers are computed
  3370. */
  3371. context?: string;
  3372. /**
  3373. * selector function for modules
  3374. */
  3375. test?: (arg0: Module) => boolean;
  3376. /**
  3377. * maximum id length in digits (used as starting point)
  3378. */
  3379. maxLength?: number;
  3380. /**
  3381. * hash salt for ids
  3382. */
  3383. salt?: number;
  3384. /**
  3385. * do not increase the maxLength to find an optimal id space size
  3386. */
  3387. fixedLength?: boolean;
  3388. /**
  3389. * throw an error when id conflicts occur (instead of rehashing)
  3390. */
  3391. failOnConflict?: boolean;
  3392. }
  3393. type DevtoolModuleFilenameTemplate = string | Function;
  3394. declare interface Dirent {
  3395. isFile: () => boolean;
  3396. isDirectory: () => boolean;
  3397. isBlockDevice: () => boolean;
  3398. isCharacterDevice: () => boolean;
  3399. isSymbolicLink: () => boolean;
  3400. isFIFO: () => boolean;
  3401. isSocket: () => boolean;
  3402. name: string;
  3403. path: string;
  3404. }
  3405. declare class DllPlugin {
  3406. constructor(options: DllPluginOptions);
  3407. options: {
  3408. entryOnly: boolean;
  3409. /**
  3410. * Context of requests in the manifest file (defaults to the webpack context).
  3411. */
  3412. context?: string;
  3413. /**
  3414. * If true, manifest json file (output) will be formatted.
  3415. */
  3416. format?: boolean;
  3417. /**
  3418. * Name of the exposed dll function (external name, use value of 'output.library').
  3419. */
  3420. name?: string;
  3421. /**
  3422. * Absolute path to the manifest json file (output).
  3423. */
  3424. path: string;
  3425. /**
  3426. * Type of the dll bundle (external type, use value of 'output.libraryTarget').
  3427. */
  3428. type?: string;
  3429. };
  3430. /**
  3431. * Apply the plugin
  3432. */
  3433. apply(compiler: Compiler): void;
  3434. }
  3435. declare interface DllPluginOptions {
  3436. /**
  3437. * Context of requests in the manifest file (defaults to the webpack context).
  3438. */
  3439. context?: string;
  3440. /**
  3441. * If true, only entry points will be exposed (default: true).
  3442. */
  3443. entryOnly?: boolean;
  3444. /**
  3445. * If true, manifest json file (output) will be formatted.
  3446. */
  3447. format?: boolean;
  3448. /**
  3449. * Name of the exposed dll function (external name, use value of 'output.library').
  3450. */
  3451. name?: string;
  3452. /**
  3453. * Absolute path to the manifest json file (output).
  3454. */
  3455. path: string;
  3456. /**
  3457. * Type of the dll bundle (external type, use value of 'output.libraryTarget').
  3458. */
  3459. type?: string;
  3460. }
  3461. declare class DllReferencePlugin {
  3462. constructor(options: DllReferencePluginOptions);
  3463. options: DllReferencePluginOptions;
  3464. /**
  3465. * Apply the plugin
  3466. */
  3467. apply(compiler: Compiler): void;
  3468. }
  3469. type DllReferencePluginOptions =
  3470. | {
  3471. /**
  3472. * Context of requests in the manifest (or content property) as absolute path.
  3473. */
  3474. context?: string;
  3475. /**
  3476. * Extensions used to resolve modules in the dll bundle (only used when using 'scope').
  3477. */
  3478. extensions?: string[];
  3479. /**
  3480. * An object containing content and name or a string to the absolute path of the JSON manifest to be loaded upon compilation.
  3481. */
  3482. manifest: string | DllReferencePluginOptionsManifest;
  3483. /**
  3484. * The name where the dll is exposed (external name, defaults to manifest.name).
  3485. */
  3486. name?: string;
  3487. /**
  3488. * Prefix which is used for accessing the content of the dll.
  3489. */
  3490. scope?: string;
  3491. /**
  3492. * How the dll is exposed (libraryTarget, defaults to manifest.type).
  3493. */
  3494. sourceType?:
  3495. | "var"
  3496. | "assign"
  3497. | "this"
  3498. | "window"
  3499. | "global"
  3500. | "commonjs"
  3501. | "commonjs2"
  3502. | "commonjs-module"
  3503. | "amd"
  3504. | "amd-require"
  3505. | "umd"
  3506. | "umd2"
  3507. | "jsonp"
  3508. | "system";
  3509. /**
  3510. * The way how the export of the dll bundle is used.
  3511. */
  3512. type?: "object" | "require";
  3513. }
  3514. | {
  3515. /**
  3516. * The mappings from request to module info.
  3517. */
  3518. content: DllReferencePluginOptionsContent;
  3519. /**
  3520. * Context of requests in the manifest (or content property) as absolute path.
  3521. */
  3522. context?: string;
  3523. /**
  3524. * Extensions used to resolve modules in the dll bundle (only used when using 'scope').
  3525. */
  3526. extensions?: string[];
  3527. /**
  3528. * The name where the dll is exposed (external name).
  3529. */
  3530. name: string;
  3531. /**
  3532. * Prefix which is used for accessing the content of the dll.
  3533. */
  3534. scope?: string;
  3535. /**
  3536. * How the dll is exposed (libraryTarget).
  3537. */
  3538. sourceType?:
  3539. | "var"
  3540. | "assign"
  3541. | "this"
  3542. | "window"
  3543. | "global"
  3544. | "commonjs"
  3545. | "commonjs2"
  3546. | "commonjs-module"
  3547. | "amd"
  3548. | "amd-require"
  3549. | "umd"
  3550. | "umd2"
  3551. | "jsonp"
  3552. | "system";
  3553. /**
  3554. * The way how the export of the dll bundle is used.
  3555. */
  3556. type?: "object" | "require";
  3557. };
  3558. /**
  3559. * The mappings from request to module info.
  3560. */
  3561. declare interface DllReferencePluginOptionsContent {
  3562. [index: string]: {
  3563. /**
  3564. * Meta information about the module.
  3565. */
  3566. buildMeta?: { [index: string]: any };
  3567. /**
  3568. * Information about the provided exports of the module.
  3569. */
  3570. exports?: true | string[];
  3571. /**
  3572. * Module ID.
  3573. */
  3574. id: string | number;
  3575. };
  3576. }
  3577. /**
  3578. * An object containing content, name and type.
  3579. */
  3580. declare interface DllReferencePluginOptionsManifest {
  3581. /**
  3582. * The mappings from request to module info.
  3583. */
  3584. content: DllReferencePluginOptionsContent;
  3585. /**
  3586. * The name where the dll is exposed (external name).
  3587. */
  3588. name?: string;
  3589. /**
  3590. * The type how the dll is exposed (external type).
  3591. */
  3592. type?:
  3593. | "var"
  3594. | "assign"
  3595. | "this"
  3596. | "window"
  3597. | "global"
  3598. | "commonjs"
  3599. | "commonjs2"
  3600. | "commonjs-module"
  3601. | "amd"
  3602. | "amd-require"
  3603. | "umd"
  3604. | "umd2"
  3605. | "jsonp"
  3606. | "system";
  3607. }
  3608. declare class DynamicEntryPlugin {
  3609. constructor(context: string, entry: () => Promise<EntryStaticNormalized>);
  3610. context: string;
  3611. entry: () => Promise<EntryStaticNormalized>;
  3612. /**
  3613. * Apply the plugin
  3614. */
  3615. apply(compiler: Compiler): void;
  3616. }
  3617. declare interface Effect {
  3618. type: string;
  3619. value: any;
  3620. }
  3621. declare interface EffectData {
  3622. [index: string]: any;
  3623. }
  3624. declare class ElectronTargetPlugin {
  3625. constructor(context?: "main" | "preload" | "renderer");
  3626. /**
  3627. * Apply the plugin
  3628. */
  3629. apply(compiler: Compiler): void;
  3630. }
  3631. /**
  3632. * No generator options are supported for this module type.
  3633. */
  3634. declare interface EmptyGeneratorOptions {}
  3635. /**
  3636. * No parser options are supported for this module type.
  3637. */
  3638. declare interface EmptyParserOptions {}
  3639. declare class EnableChunkLoadingPlugin {
  3640. constructor(type: string);
  3641. type: string;
  3642. /**
  3643. * Apply the plugin
  3644. */
  3645. apply(compiler: Compiler): void;
  3646. static setEnabled(compiler: Compiler, type: string): void;
  3647. static checkEnabled(compiler: Compiler, type: string): void;
  3648. }
  3649. declare class EnableLibraryPlugin {
  3650. constructor(type: string);
  3651. type: string;
  3652. /**
  3653. * Apply the plugin
  3654. */
  3655. apply(compiler: Compiler): void;
  3656. static setEnabled(compiler: Compiler, type: string): void;
  3657. static checkEnabled(compiler: Compiler, type: string): void;
  3658. }
  3659. declare class EnableWasmLoadingPlugin {
  3660. constructor(type: string);
  3661. type: string;
  3662. /**
  3663. * Apply the plugin
  3664. */
  3665. apply(compiler: Compiler): void;
  3666. static setEnabled(compiler: Compiler, type: string): void;
  3667. static checkEnabled(compiler: Compiler, type: string): void;
  3668. }
  3669. type EncodingOption =
  3670. | undefined
  3671. | null
  3672. | "ascii"
  3673. | "utf8"
  3674. | "utf-8"
  3675. | "utf16le"
  3676. | "utf-16le"
  3677. | "ucs2"
  3678. | "ucs-2"
  3679. | "latin1"
  3680. | "binary"
  3681. | "base64"
  3682. | "base64url"
  3683. | "hex"
  3684. | ObjectEncodingOptions;
  3685. type Entry =
  3686. | string
  3687. | (() => string | EntryObject | string[] | Promise<EntryStatic>)
  3688. | EntryObject
  3689. | string[];
  3690. declare interface EntryData {
  3691. /**
  3692. * dependencies of the entrypoint that should be evaluated at startup
  3693. */
  3694. dependencies: Dependency[];
  3695. /**
  3696. * dependencies of the entrypoint that should be included but not evaluated
  3697. */
  3698. includeDependencies: Dependency[];
  3699. /**
  3700. * options of the entrypoint
  3701. */
  3702. options: EntryOptions;
  3703. }
  3704. declare abstract class EntryDependency extends ModuleDependency {}
  3705. /**
  3706. * An object with entry point description.
  3707. */
  3708. declare interface EntryDescription {
  3709. /**
  3710. * Enable/disable creating async chunks that are loaded on demand.
  3711. */
  3712. asyncChunks?: boolean;
  3713. /**
  3714. * Base uri for this entry.
  3715. */
  3716. baseUri?: string;
  3717. /**
  3718. * The method of loading chunks (methods included by default are 'jsonp' (web), 'import' (ESM), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
  3719. */
  3720. chunkLoading?: string | false;
  3721. /**
  3722. * The entrypoints that the current entrypoint depend on. They must be loaded when this entrypoint is loaded.
  3723. */
  3724. dependOn?: string | string[];
  3725. /**
  3726. * Specifies the filename of the output file on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
  3727. */
  3728. filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
  3729. /**
  3730. * Module(s) that are loaded upon startup.
  3731. */
  3732. import: EntryItem;
  3733. /**
  3734. * Specifies the layer in which modules of this entrypoint are placed.
  3735. */
  3736. layer?: null | string;
  3737. /**
  3738. * Options for library.
  3739. */
  3740. library?: LibraryOptions;
  3741. /**
  3742. * The 'publicPath' specifies the public URL address of the output files when referenced in a browser.
  3743. */
  3744. publicPath?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
  3745. /**
  3746. * The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.
  3747. */
  3748. runtime?: string | false;
  3749. /**
  3750. * The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).
  3751. */
  3752. wasmLoading?: string | false;
  3753. }
  3754. /**
  3755. * An object with entry point description.
  3756. */
  3757. declare interface EntryDescriptionNormalized {
  3758. /**
  3759. * Enable/disable creating async chunks that are loaded on demand.
  3760. */
  3761. asyncChunks?: boolean;
  3762. /**
  3763. * Base uri for this entry.
  3764. */
  3765. baseUri?: string;
  3766. /**
  3767. * The method of loading chunks (methods included by default are 'jsonp' (web), 'import' (ESM), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
  3768. */
  3769. chunkLoading?: string | false;
  3770. /**
  3771. * The entrypoints that the current entrypoint depend on. They must be loaded when this entrypoint is loaded.
  3772. */
  3773. dependOn?: string[];
  3774. /**
  3775. * Specifies the filename of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
  3776. */
  3777. filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
  3778. /**
  3779. * Module(s) that are loaded upon startup. The last one is exported.
  3780. */
  3781. import?: string[];
  3782. /**
  3783. * Specifies the layer in which modules of this entrypoint are placed.
  3784. */
  3785. layer?: null | string;
  3786. /**
  3787. * Options for library.
  3788. */
  3789. library?: LibraryOptions;
  3790. /**
  3791. * The 'publicPath' specifies the public URL address of the output files when referenced in a browser.
  3792. */
  3793. publicPath?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
  3794. /**
  3795. * The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.
  3796. */
  3797. runtime?: string | false;
  3798. /**
  3799. * The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).
  3800. */
  3801. wasmLoading?: string | false;
  3802. }
  3803. type EntryItem = string | string[];
  3804. type EntryNormalized =
  3805. | (() => Promise<EntryStaticNormalized>)
  3806. | EntryStaticNormalized;
  3807. /**
  3808. * Multiple entry bundles are created. The key is the entry name. The value can be a string, an array or an entry description object.
  3809. */
  3810. declare interface EntryObject {
  3811. [index: string]: string | string[] | EntryDescription;
  3812. }
  3813. declare class EntryOptionPlugin {
  3814. constructor();
  3815. apply(compiler: Compiler): void;
  3816. static applyEntryOption(
  3817. compiler: Compiler,
  3818. context: string,
  3819. entry: EntryNormalized
  3820. ): void;
  3821. static entryDescriptionToOptions(
  3822. compiler: Compiler,
  3823. name: string,
  3824. desc: EntryDescriptionNormalized
  3825. ): EntryOptions;
  3826. }
  3827. type EntryOptions = { name?: string } & Omit<
  3828. EntryDescriptionNormalized,
  3829. "import"
  3830. >;
  3831. declare class EntryPlugin {
  3832. /**
  3833. * An entry plugin which will handle creation of the EntryDependency
  3834. */
  3835. constructor(context: string, entry: string, options?: string | EntryOptions);
  3836. context: string;
  3837. entry: string;
  3838. options: string | EntryOptions;
  3839. /**
  3840. * Apply the plugin
  3841. */
  3842. apply(compiler: Compiler): void;
  3843. static createDependency(
  3844. entry: string,
  3845. options: string | EntryOptions
  3846. ): EntryDependency;
  3847. }
  3848. type EntryStatic = string | EntryObject | string[];
  3849. /**
  3850. * Multiple entry bundles are created. The key is the entry name. The value is an entry description object.
  3851. */
  3852. declare interface EntryStaticNormalized {
  3853. [index: string]: EntryDescriptionNormalized;
  3854. }
  3855. declare abstract class Entrypoint extends ChunkGroup {
  3856. /**
  3857. * Sets the runtimeChunk for an entrypoint.
  3858. */
  3859. setRuntimeChunk(chunk: Chunk): void;
  3860. /**
  3861. * Fetches the chunk reference containing the webpack bootstrap code
  3862. */
  3863. getRuntimeChunk(): null | Chunk;
  3864. /**
  3865. * Sets the chunk with the entrypoint modules for an entrypoint.
  3866. */
  3867. setEntrypointChunk(chunk: Chunk): void;
  3868. /**
  3869. * Returns the chunk which contains the entrypoint modules
  3870. * (or at least the execution of them)
  3871. */
  3872. getEntrypointChunk(): Chunk;
  3873. }
  3874. /**
  3875. * The abilities of the environment where the webpack generated code should run.
  3876. */
  3877. declare interface Environment {
  3878. /**
  3879. * The environment supports arrow functions ('() => { ... }').
  3880. */
  3881. arrowFunction?: boolean;
  3882. /**
  3883. * The environment supports async function and await ('async function () { await ... }').
  3884. */
  3885. asyncFunction?: boolean;
  3886. /**
  3887. * The environment supports BigInt as literal (123n).
  3888. */
  3889. bigIntLiteral?: boolean;
  3890. /**
  3891. * The environment supports const and let for variable declarations.
  3892. */
  3893. const?: boolean;
  3894. /**
  3895. * The environment supports destructuring ('{ a, b } = obj').
  3896. */
  3897. destructuring?: boolean;
  3898. /**
  3899. * The environment supports 'document'.
  3900. */
  3901. document?: boolean;
  3902. /**
  3903. * The environment supports an async import() function to import EcmaScript modules.
  3904. */
  3905. dynamicImport?: boolean;
  3906. /**
  3907. * The environment supports an async import() is available when creating a worker.
  3908. */
  3909. dynamicImportInWorker?: boolean;
  3910. /**
  3911. * The environment supports 'for of' iteration ('for (const x of array) { ... }').
  3912. */
  3913. forOf?: boolean;
  3914. /**
  3915. * The environment supports 'globalThis'.
  3916. */
  3917. globalThis?: boolean;
  3918. /**
  3919. * The environment supports EcmaScript Module syntax to import EcmaScript modules (import ... from '...').
  3920. */
  3921. module?: boolean;
  3922. /**
  3923. * The environment supports `node:` prefix for Node.js core modules.
  3924. */
  3925. nodePrefixForCoreModules?: boolean;
  3926. /**
  3927. * The environment supports optional chaining ('obj?.a' or 'obj?.()').
  3928. */
  3929. optionalChaining?: boolean;
  3930. /**
  3931. * The environment supports template literals.
  3932. */
  3933. templateLiteral?: boolean;
  3934. }
  3935. declare class EnvironmentPlugin {
  3936. constructor(...keys: (string | string[] | Record<string, any>)[]);
  3937. keys: string[];
  3938. defaultValues: Record<string, any>;
  3939. /**
  3940. * Apply the plugin
  3941. */
  3942. apply(compiler: Compiler): void;
  3943. }
  3944. type ErrorWithDetail = Error & { details?: string };
  3945. declare interface Etag {
  3946. toString: () => string;
  3947. }
  3948. declare class EvalDevToolModulePlugin {
  3949. constructor(options?: EvalDevToolModulePluginOptions);
  3950. namespace: string;
  3951. sourceUrlComment: string;
  3952. moduleFilenameTemplate: DevtoolModuleFilenameTemplate;
  3953. /**
  3954. * Apply the plugin
  3955. */
  3956. apply(compiler: Compiler): void;
  3957. }
  3958. declare interface EvalDevToolModulePluginOptions {
  3959. /**
  3960. * namespace
  3961. */
  3962. namespace?: string;
  3963. /**
  3964. * source url comment
  3965. */
  3966. sourceUrlComment?: string;
  3967. /**
  3968. * module filename template
  3969. */
  3970. moduleFilenameTemplate?: string | Function;
  3971. }
  3972. declare class EvalSourceMapDevToolPlugin {
  3973. constructor(inputOptions: string | SourceMapDevToolPluginOptions);
  3974. sourceMapComment: string;
  3975. moduleFilenameTemplate: string | Function;
  3976. namespace: string;
  3977. options: SourceMapDevToolPluginOptions;
  3978. /**
  3979. * Apply the plugin
  3980. */
  3981. apply(compiler: Compiler): void;
  3982. }
  3983. declare interface ExecuteModuleArgument {
  3984. module: Module;
  3985. moduleObject?: ModuleObject;
  3986. preparedInfo: any;
  3987. codeGenerationResult: CodeGenerationResult;
  3988. }
  3989. declare interface ExecuteModuleContext {
  3990. assets: Map<string, { source: Source; info: AssetInfo }>;
  3991. chunk: Chunk;
  3992. chunkGraph: ChunkGraph;
  3993. __webpack_require__?: (arg0: string) => any;
  3994. }
  3995. declare interface ExecuteModuleOptions {
  3996. entryOptions?: EntryOptions;
  3997. }
  3998. declare interface ExecuteModuleResult {
  3999. exports: any;
  4000. cacheable: boolean;
  4001. assets: Map<string, { source: Source; info: AssetInfo }>;
  4002. fileDependencies: LazySet<string>;
  4003. contextDependencies: LazySet<string>;
  4004. missingDependencies: LazySet<string>;
  4005. buildDependencies: LazySet<string>;
  4006. }
  4007. type Experiments = ExperimentsCommon & ExperimentsExtra;
  4008. /**
  4009. * Enables/Disables experiments (experimental features with relax SemVer compatibility).
  4010. */
  4011. declare interface ExperimentsCommon {
  4012. /**
  4013. * Support WebAssembly as asynchronous EcmaScript Module.
  4014. */
  4015. asyncWebAssembly?: boolean;
  4016. /**
  4017. * Enable backward-compat layer with deprecation warnings for many webpack 4 APIs.
  4018. */
  4019. backCompat?: boolean;
  4020. /**
  4021. * Enable additional in memory caching of modules that are unchanged and reference only unchanged modules.
  4022. */
  4023. cacheUnaffected?: boolean;
  4024. /**
  4025. * Apply defaults of next major version.
  4026. */
  4027. futureDefaults?: boolean;
  4028. /**
  4029. * Enable module layers.
  4030. */
  4031. layers?: boolean;
  4032. /**
  4033. * Allow output javascript files as module source type.
  4034. */
  4035. outputModule?: boolean;
  4036. /**
  4037. * Support WebAssembly as synchronous EcmaScript Module (outdated).
  4038. */
  4039. syncWebAssembly?: boolean;
  4040. /**
  4041. * Allow using top-level-await in EcmaScript Modules.
  4042. */
  4043. topLevelAwait?: boolean;
  4044. }
  4045. /**
  4046. * Enables/Disables experiments (experimental features with relax SemVer compatibility).
  4047. */
  4048. declare interface ExperimentsExtra {
  4049. /**
  4050. * Build http(s): urls using a lockfile and resource content cache.
  4051. */
  4052. buildHttp?: HttpUriOptions | (string | RegExp | ((uri: string) => boolean))[];
  4053. /**
  4054. * Enable css support.
  4055. */
  4056. css?: boolean;
  4057. /**
  4058. * Compile entrypoints and import()s only when they are accessed.
  4059. */
  4060. lazyCompilation?: boolean | LazyCompilationOptions;
  4061. }
  4062. type ExperimentsNormalized = ExperimentsCommon & ExperimentsNormalizedExtra;
  4063. /**
  4064. * Enables/Disables experiments (experimental features with relax SemVer compatibility).
  4065. */
  4066. declare interface ExperimentsNormalizedExtra {
  4067. /**
  4068. * Build http(s): urls using a lockfile and resource content cache.
  4069. */
  4070. buildHttp?: HttpUriOptions;
  4071. /**
  4072. * Enable css support.
  4073. */
  4074. css?: boolean;
  4075. /**
  4076. * Compile entrypoints and import()s only when they are accessed.
  4077. */
  4078. lazyCompilation?: false | LazyCompilationOptions;
  4079. }
  4080. type ExportAllDeclarationJavascriptParser = ExportAllDeclarationImport & {
  4081. attributes?: ImportAttribute[];
  4082. };
  4083. declare abstract class ExportInfo {
  4084. name: string;
  4085. /**
  4086. * true: it is provided
  4087. * false: it is not provided
  4088. * null: only the runtime knows if it is provided
  4089. * undefined: it was not determined if it is provided
  4090. */
  4091. provided?: null | boolean;
  4092. /**
  4093. * is the export a terminal binding that should be checked for export star conflicts
  4094. */
  4095. terminalBinding: boolean;
  4096. /**
  4097. * true: it can be mangled
  4098. * false: is can not be mangled
  4099. * undefined: it was not determined if it can be mangled
  4100. */
  4101. canMangleProvide?: boolean;
  4102. /**
  4103. * true: it can be mangled
  4104. * false: is can not be mangled
  4105. * undefined: it was not determined if it can be mangled
  4106. */
  4107. canMangleUse?: boolean;
  4108. exportsInfoOwned: boolean;
  4109. exportsInfo?: ExportsInfo;
  4110. get canMangle(): boolean;
  4111. setUsedInUnknownWay(runtime: RuntimeSpec): boolean;
  4112. setUsedWithoutInfo(runtime: RuntimeSpec): boolean;
  4113. setHasUseInfo(): void;
  4114. setUsedConditionally(
  4115. condition: (arg0: UsageStateType) => boolean,
  4116. newValue: UsageStateType,
  4117. runtime: RuntimeSpec
  4118. ): boolean;
  4119. setUsed(newValue: UsageStateType, runtime: RuntimeSpec): boolean;
  4120. unsetTarget(key?: any): boolean;
  4121. setTarget(
  4122. key: any,
  4123. connection: ModuleGraphConnection,
  4124. exportName?: null | string[],
  4125. priority?: number
  4126. ): boolean;
  4127. getUsed(runtime: RuntimeSpec): UsageStateType;
  4128. /**
  4129. * get used name
  4130. */
  4131. getUsedName(
  4132. fallbackName: undefined | string,
  4133. runtime: RuntimeSpec
  4134. ): string | false;
  4135. hasUsedName(): boolean;
  4136. /**
  4137. * Sets the mangled name of this export
  4138. */
  4139. setUsedName(name: string): void;
  4140. getTerminalBinding(
  4141. moduleGraph: ModuleGraph,
  4142. resolveTargetFilter?: (arg0: TargetItem) => boolean
  4143. ): undefined | ExportsInfo | ExportInfo;
  4144. isReexport(): undefined | boolean;
  4145. findTarget(
  4146. moduleGraph: ModuleGraph,
  4147. validTargetModuleFilter: (arg0: Module) => boolean
  4148. ): undefined | null | false | TargetItemWithoutConnection;
  4149. getTarget(
  4150. moduleGraph: ModuleGraph,
  4151. resolveTargetFilter?: (arg0: TargetItem) => boolean
  4152. ): undefined | TargetItem;
  4153. /**
  4154. * Move the target forward as long resolveTargetFilter is fulfilled
  4155. */
  4156. moveTarget(
  4157. moduleGraph: ModuleGraph,
  4158. resolveTargetFilter: (arg0: TargetItem) => boolean,
  4159. updateOriginalConnection?: (arg0: TargetItem) => ModuleGraphConnection
  4160. ): undefined | TargetItem;
  4161. createNestedExportsInfo(): ExportsInfo;
  4162. getNestedExportsInfo(): undefined | ExportsInfo;
  4163. hasInfo(baseInfo: ExportInfo, runtime: RuntimeSpec): boolean;
  4164. updateHash(hash: Hash, runtime: RuntimeSpec): void;
  4165. getUsedInfo(): string;
  4166. getProvidedInfo():
  4167. | "no provided info"
  4168. | "maybe provided (runtime-defined)"
  4169. | "provided"
  4170. | "not provided";
  4171. getRenameInfo(): string;
  4172. }
  4173. type ExportNamedDeclarationJavascriptParser = ExportNamedDeclarationImport & {
  4174. attributes?: ImportAttribute[];
  4175. };
  4176. declare interface ExportSpec {
  4177. /**
  4178. * the name of the export
  4179. */
  4180. name: string;
  4181. /**
  4182. * can the export be renamed (defaults to true)
  4183. */
  4184. canMangle?: boolean;
  4185. /**
  4186. * is the export a terminal binding that should be checked for export star conflicts
  4187. */
  4188. terminalBinding?: boolean;
  4189. /**
  4190. * nested exports
  4191. */
  4192. exports?: (string | ExportSpec)[];
  4193. /**
  4194. * when reexported: from which module
  4195. */
  4196. from?: ModuleGraphConnection;
  4197. /**
  4198. * when reexported: from which export
  4199. */
  4200. export?: null | string[];
  4201. /**
  4202. * when reexported: with which priority
  4203. */
  4204. priority?: number;
  4205. /**
  4206. * export is not visible, because another export blends over it
  4207. */
  4208. hidden?: boolean;
  4209. }
  4210. type ExportedVariableInfo = string | VariableInfo | ScopeInfo;
  4211. declare abstract class ExportsInfo {
  4212. get ownedExports(): Iterable<ExportInfo>;
  4213. get orderedOwnedExports(): Iterable<ExportInfo>;
  4214. get exports(): Iterable<ExportInfo>;
  4215. get orderedExports(): Iterable<ExportInfo>;
  4216. get otherExportsInfo(): ExportInfo;
  4217. setRedirectNamedTo(exportsInfo?: ExportsInfo): boolean;
  4218. setHasProvideInfo(): void;
  4219. setHasUseInfo(): void;
  4220. getOwnExportInfo(name: string): ExportInfo;
  4221. getExportInfo(name: string): ExportInfo;
  4222. getReadOnlyExportInfo(name: string): ExportInfo;
  4223. getReadOnlyExportInfoRecursive(name: string[]): undefined | ExportInfo;
  4224. getNestedExportsInfo(name?: string[]): undefined | ExportsInfo;
  4225. setUnknownExportsProvided(
  4226. canMangle?: boolean,
  4227. excludeExports?: Set<string>,
  4228. targetKey?: any,
  4229. targetModule?: ModuleGraphConnection,
  4230. priority?: number
  4231. ): boolean;
  4232. setUsedInUnknownWay(runtime: RuntimeSpec): boolean;
  4233. setUsedWithoutInfo(runtime: RuntimeSpec): boolean;
  4234. setAllKnownExportsUsed(runtime: RuntimeSpec): boolean;
  4235. setUsedForSideEffectsOnly(runtime: RuntimeSpec): boolean;
  4236. isUsed(runtime: RuntimeSpec): boolean;
  4237. isModuleUsed(runtime: RuntimeSpec): boolean;
  4238. getUsedExports(runtime: RuntimeSpec): null | boolean | SortableSet<string>;
  4239. getProvidedExports(): null | true | string[];
  4240. getRelevantExports(runtime: RuntimeSpec): ExportInfo[];
  4241. isExportProvided(name: string | string[]): undefined | null | boolean;
  4242. getUsageKey(runtime: RuntimeSpec): string;
  4243. isEquallyUsed(runtimeA: RuntimeSpec, runtimeB: RuntimeSpec): boolean;
  4244. getUsed(name: string | string[], runtime: RuntimeSpec): UsageStateType;
  4245. getUsedName(name: string | string[], runtime: RuntimeSpec): UsedName;
  4246. updateHash(hash: Hash, runtime: RuntimeSpec): void;
  4247. getRestoreProvidedData(): RestoreProvidedData;
  4248. restoreProvided(__0: {
  4249. otherProvided: any;
  4250. otherCanMangleProvide: any;
  4251. otherTerminalBinding: any;
  4252. exports: any;
  4253. }): void;
  4254. }
  4255. declare interface ExportsSpec {
  4256. /**
  4257. * exported names, true for unknown exports or null for no exports
  4258. */
  4259. exports: null | true | (string | ExportSpec)[];
  4260. /**
  4261. * when exports = true, list of unaffected exports
  4262. */
  4263. excludeExports?: Set<string>;
  4264. /**
  4265. * list of maybe prior exposed, but now hidden exports
  4266. */
  4267. hideExports?: null | Set<string>;
  4268. /**
  4269. * when reexported: from which module
  4270. */
  4271. from?: ModuleGraphConnection;
  4272. /**
  4273. * when reexported: with which priority
  4274. */
  4275. priority?: number;
  4276. /**
  4277. * can the export be renamed (defaults to true)
  4278. */
  4279. canMangle?: boolean;
  4280. /**
  4281. * are the exports terminal bindings that should be checked for export star conflicts
  4282. */
  4283. terminalBinding?: boolean;
  4284. /**
  4285. * module on which the result depends on
  4286. */
  4287. dependencies?: Module[];
  4288. }
  4289. type Exposes = (string | ExposesObject)[] | ExposesObject;
  4290. /**
  4291. * Advanced configuration for modules that should be exposed by this container.
  4292. */
  4293. declare interface ExposesConfig {
  4294. /**
  4295. * Request to a module that should be exposed by this container.
  4296. */
  4297. import: string | string[];
  4298. /**
  4299. * Custom chunk name for the exposed module.
  4300. */
  4301. name?: string;
  4302. }
  4303. /**
  4304. * Modules that should be exposed by this container. Property names are used as public paths.
  4305. */
  4306. declare interface ExposesObject {
  4307. [index: string]: string | ExposesConfig | string[];
  4308. }
  4309. type Expression =
  4310. | ImportExpressionImport
  4311. | UnaryExpression
  4312. | ArrayExpression
  4313. | ArrowFunctionExpression
  4314. | AssignmentExpression
  4315. | AwaitExpression
  4316. | BinaryExpression
  4317. | SimpleCallExpression
  4318. | NewExpression
  4319. | ChainExpression
  4320. | ClassExpression
  4321. | ConditionalExpression
  4322. | FunctionExpression
  4323. | Identifier
  4324. | SimpleLiteral
  4325. | RegExpLiteral
  4326. | BigIntLiteral
  4327. | LogicalExpression
  4328. | MemberExpression
  4329. | MetaProperty
  4330. | ObjectExpression
  4331. | SequenceExpression
  4332. | TaggedTemplateExpression
  4333. | TemplateLiteral
  4334. | ThisExpression
  4335. | UpdateExpression
  4336. | YieldExpression;
  4337. declare interface ExpressionExpressionInfo {
  4338. type: "expression";
  4339. rootInfo: string | VariableInfo;
  4340. name: string;
  4341. getMembers: () => string[];
  4342. getMembersOptionals: () => boolean[];
  4343. getMemberRanges: () => [number, number][];
  4344. }
  4345. declare interface ExtensionAliasOption {
  4346. alias: string | string[];
  4347. extension: string;
  4348. }
  4349. declare interface ExtensionAliasOptions {
  4350. [index: string]: string | string[];
  4351. }
  4352. type ExternalItem =
  4353. | string
  4354. | RegExp
  4355. | (ExternalItemObjectKnown & ExternalItemObjectUnknown)
  4356. | ((
  4357. data: ExternalItemFunctionData,
  4358. callback: (
  4359. err?: null | Error,
  4360. result?: string | boolean | string[] | { [index: string]: any }
  4361. ) => void
  4362. ) => void)
  4363. | ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>);
  4364. /**
  4365. * Data object passed as argument when a function is set for 'externals'.
  4366. */
  4367. declare interface ExternalItemFunctionData {
  4368. /**
  4369. * The directory in which the request is placed.
  4370. */
  4371. context?: string;
  4372. /**
  4373. * Contextual information.
  4374. */
  4375. contextInfo?: ModuleFactoryCreateDataContextInfo;
  4376. /**
  4377. * The category of the referencing dependencies.
  4378. */
  4379. dependencyType?: string;
  4380. /**
  4381. * Get a resolve function with the current resolver options.
  4382. */
  4383. getResolve?: (
  4384. options?: ResolveOptions
  4385. ) =>
  4386. | ((
  4387. context: string,
  4388. request: string,
  4389. callback: (err?: Error, result?: string) => void
  4390. ) => void)
  4391. | ((context: string, request: string) => Promise<string>);
  4392. /**
  4393. * The request as written by the user in the require/import expression/statement.
  4394. */
  4395. request?: string;
  4396. }
  4397. /**
  4398. * If an dependency matches exactly a property of the object, the property value is used as dependency.
  4399. */
  4400. declare interface ExternalItemObjectKnown {
  4401. /**
  4402. * Specify externals depending on the layer.
  4403. */
  4404. byLayer?:
  4405. | { [index: string]: ExternalItem }
  4406. | ((layer: null | string) => ExternalItem);
  4407. }
  4408. /**
  4409. * If an dependency matches exactly a property of the object, the property value is used as dependency.
  4410. */
  4411. declare interface ExternalItemObjectUnknown {
  4412. [index: string]: ExternalItemValue;
  4413. }
  4414. type ExternalItemValue = string | boolean | string[] | { [index: string]: any };
  4415. declare class ExternalModule extends Module {
  4416. constructor(
  4417. request: string | string[] | RequestRecord,
  4418. type: string,
  4419. userRequest: string,
  4420. dependencyMeta?:
  4421. | ImportDependencyMeta
  4422. | CssImportDependencyMeta
  4423. | AssetDependencyMeta
  4424. );
  4425. request: string | string[] | Record<string, string | string[]>;
  4426. externalType: string;
  4427. userRequest: string;
  4428. dependencyMeta?:
  4429. | ImportDependencyMeta
  4430. | CssImportDependencyMeta
  4431. | AssetDependencyMeta;
  4432. /**
  4433. * restore unsafe cache data
  4434. */
  4435. restoreFromUnsafeCache(
  4436. unsafeCacheData: object,
  4437. normalModuleFactory: NormalModuleFactory
  4438. ): void;
  4439. }
  4440. declare interface ExternalModuleInfo {
  4441. type: "external";
  4442. module: Module;
  4443. runtimeCondition?: string | boolean | SortableSet<string>;
  4444. index: number;
  4445. name?: string;
  4446. interopNamespaceObjectUsed: boolean;
  4447. interopNamespaceObjectName?: string;
  4448. interopNamespaceObject2Used: boolean;
  4449. interopNamespaceObject2Name?: string;
  4450. interopDefaultAccessUsed: boolean;
  4451. interopDefaultAccessName?: string;
  4452. }
  4453. type Externals =
  4454. | string
  4455. | RegExp
  4456. | ExternalItem[]
  4457. | (ExternalItemObjectKnown & ExternalItemObjectUnknown)
  4458. | ((
  4459. data: ExternalItemFunctionData,
  4460. callback: (
  4461. err?: null | Error,
  4462. result?: string | boolean | string[] | { [index: string]: any }
  4463. ) => void
  4464. ) => void)
  4465. | ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>);
  4466. declare class ExternalsPlugin {
  4467. constructor(type: undefined | string, externals: Externals);
  4468. type?: string;
  4469. externals: Externals;
  4470. /**
  4471. * Apply the plugin
  4472. */
  4473. apply(compiler: Compiler): void;
  4474. }
  4475. /**
  4476. * Enable presets of externals for specific targets.
  4477. */
  4478. declare interface ExternalsPresets {
  4479. /**
  4480. * Treat common electron built-in modules in main and preload context like 'electron', 'ipc' or 'shell' as external and load them via require() when used.
  4481. */
  4482. electron?: boolean;
  4483. /**
  4484. * Treat electron built-in modules in the main context like 'app', 'ipc-main' or 'shell' as external and load them via require() when used.
  4485. */
  4486. electronMain?: boolean;
  4487. /**
  4488. * Treat electron built-in modules in the preload context like 'web-frame', 'ipc-renderer' or 'shell' as external and load them via require() when used.
  4489. */
  4490. electronPreload?: boolean;
  4491. /**
  4492. * Treat electron built-in modules in the renderer context like 'web-frame', 'ipc-renderer' or 'shell' as external and load them via require() when used.
  4493. */
  4494. electronRenderer?: boolean;
  4495. /**
  4496. * Treat node.js built-in modules like fs, path or vm as external and load them via require() when used.
  4497. */
  4498. node?: boolean;
  4499. /**
  4500. * Treat NW.js legacy nw.gui module as external and load it via require() when used.
  4501. */
  4502. nwjs?: boolean;
  4503. /**
  4504. * Treat references to 'http(s)://...' and 'std:...' as external and load them via import when used (Note that this changes execution order as externals are executed before any other code in the chunk).
  4505. */
  4506. web?: boolean;
  4507. /**
  4508. * Treat references to 'http(s)://...' and 'std:...' as external and load them via async import() when used (Note that this external type is an async module, which has various effects on the execution).
  4509. */
  4510. webAsync?: boolean;
  4511. }
  4512. type ExternalsType =
  4513. | "import"
  4514. | "var"
  4515. | "module"
  4516. | "assign"
  4517. | "this"
  4518. | "window"
  4519. | "self"
  4520. | "global"
  4521. | "commonjs"
  4522. | "commonjs2"
  4523. | "commonjs-module"
  4524. | "commonjs-static"
  4525. | "amd"
  4526. | "amd-require"
  4527. | "umd"
  4528. | "umd2"
  4529. | "jsonp"
  4530. | "system"
  4531. | "promise"
  4532. | "module-import"
  4533. | "script"
  4534. | "node-commonjs";
  4535. declare interface FSImplementation {
  4536. open?: (...args: any[]) => any;
  4537. close?: (...args: any[]) => any;
  4538. }
  4539. declare interface FactorizeModuleOptions {
  4540. currentProfile?: ModuleProfile;
  4541. factory: ModuleFactory;
  4542. dependencies: Dependency[];
  4543. /**
  4544. * return full ModuleFactoryResult instead of only module
  4545. */
  4546. factoryResult?: boolean;
  4547. originModule: null | Module;
  4548. contextInfo?: Partial<ModuleFactoryCreateDataContextInfo>;
  4549. context?: string;
  4550. }
  4551. declare interface FactoryMeta {
  4552. sideEffectFree?: boolean;
  4553. }
  4554. type FakeHook<T> = T & FakeHookMarker;
  4555. declare interface FakeHookMarker {}
  4556. declare interface FallbackCacheGroup {
  4557. chunksFilter: (chunk: Chunk) => undefined | boolean;
  4558. minSize: SplitChunksSizes;
  4559. maxAsyncSize: SplitChunksSizes;
  4560. maxInitialSize: SplitChunksSizes;
  4561. automaticNameDelimiter: string;
  4562. }
  4563. declare class FetchCompileAsyncWasmPlugin {
  4564. constructor();
  4565. /**
  4566. * Apply the plugin
  4567. */
  4568. apply(compiler: Compiler): void;
  4569. }
  4570. declare class FetchCompileWasmPlugin {
  4571. constructor(options?: FetchCompileWasmPluginOptions);
  4572. options: FetchCompileWasmPluginOptions;
  4573. /**
  4574. * Apply the plugin
  4575. */
  4576. apply(compiler: Compiler): void;
  4577. }
  4578. declare interface FetchCompileWasmPluginOptions {
  4579. /**
  4580. * mangle imports
  4581. */
  4582. mangleImports?: boolean;
  4583. }
  4584. /**
  4585. * Options object for persistent file-based caching.
  4586. */
  4587. declare interface FileCacheOptions {
  4588. /**
  4589. * Allows to collect unused memory allocated during deserialization. This requires copying data into smaller buffers and has a performance cost.
  4590. */
  4591. allowCollectingMemory?: boolean;
  4592. /**
  4593. * Dependencies the build depends on (in multiple categories, default categories: 'defaultWebpack').
  4594. */
  4595. buildDependencies?: { [index: string]: string[] };
  4596. /**
  4597. * Base directory for the cache (defaults to node_modules/.cache/webpack).
  4598. */
  4599. cacheDirectory?: string;
  4600. /**
  4601. * Locations for the cache (defaults to cacheDirectory / name).
  4602. */
  4603. cacheLocation?: string;
  4604. /**
  4605. * Compression type used for the cache files.
  4606. */
  4607. compression?: false | "gzip" | "brotli";
  4608. /**
  4609. * Algorithm used for generation the hash (see node.js crypto package).
  4610. */
  4611. hashAlgorithm?: string;
  4612. /**
  4613. * Time in ms after which idle period the cache storing should happen.
  4614. */
  4615. idleTimeout?: number;
  4616. /**
  4617. * Time in ms after which idle period the cache storing should happen when larger changes has been detected (cumulative build time > 2 x avg cache store time).
  4618. */
  4619. idleTimeoutAfterLargeChanges?: number;
  4620. /**
  4621. * Time in ms after which idle period the initial cache storing should happen.
  4622. */
  4623. idleTimeoutForInitialStore?: number;
  4624. /**
  4625. * List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.
  4626. */
  4627. immutablePaths?: (string | RegExp)[];
  4628. /**
  4629. * List of paths that are managed by a package manager and can be trusted to not be modified otherwise.
  4630. */
  4631. managedPaths?: (string | RegExp)[];
  4632. /**
  4633. * Time for which unused cache entries stay in the filesystem cache at minimum (in milliseconds).
  4634. */
  4635. maxAge?: number;
  4636. /**
  4637. * Number of generations unused cache entries stay in memory cache at minimum (0 = no memory cache used, 1 = may be removed after unused for a single compilation, ..., Infinity: kept forever). Cache entries will be deserialized from disk when removed from memory cache.
  4638. */
  4639. maxMemoryGenerations?: number;
  4640. /**
  4641. * Additionally cache computation of modules that are unchanged and reference only unchanged modules in memory.
  4642. */
  4643. memoryCacheUnaffected?: boolean;
  4644. /**
  4645. * Name for the cache. Different names will lead to different coexisting caches.
  4646. */
  4647. name?: string;
  4648. /**
  4649. * Track and log detailed timing information for individual cache items.
  4650. */
  4651. profile?: boolean;
  4652. /**
  4653. * Enable/disable readonly mode.
  4654. */
  4655. readonly?: boolean;
  4656. /**
  4657. * When to store data to the filesystem. (pack: Store data when compiler is idle in a single file).
  4658. */
  4659. store?: "pack";
  4660. /**
  4661. * Filesystem caching.
  4662. */
  4663. type: "filesystem";
  4664. /**
  4665. * Version of the cache data. Different versions won't allow to reuse the cache and override existing content. Update the version when config changed in a way which doesn't allow to reuse cache. This will invalidate the cache.
  4666. */
  4667. version?: string;
  4668. }
  4669. declare interface FileSystem {
  4670. readFile: ReadFileTypes;
  4671. readdir: ReaddirTypes;
  4672. readJson?: (
  4673. arg0: PathOrFileDescriptorTypes,
  4674. arg1: (
  4675. arg0: null | Error | NodeJS.ErrnoException,
  4676. arg1?: JsonObjectTypes
  4677. ) => void
  4678. ) => void;
  4679. readlink: ReadlinkTypes;
  4680. lstat?: LStatTypes;
  4681. stat: StatTypes;
  4682. realpath?: RealPathTypes;
  4683. }
  4684. declare abstract class FileSystemInfo {
  4685. fs: InputFileSystem;
  4686. logger?: WebpackLogger;
  4687. fileTimestampQueue: AsyncQueue<string, string, FileSystemInfoEntry>;
  4688. fileHashQueue: AsyncQueue<string, string, string>;
  4689. contextTimestampQueue: AsyncQueue<string, string, ContextFileSystemInfoEntry>;
  4690. contextHashQueue: AsyncQueue<string, string, ContextHash>;
  4691. contextTshQueue: AsyncQueue<string, string, ContextTimestampAndHash>;
  4692. managedItemQueue: AsyncQueue<string, string, string>;
  4693. managedItemDirectoryQueue: AsyncQueue<string, string, Set<string>>;
  4694. unmanagedPathsWithSlash: string[];
  4695. unmanagedPathsRegExps: RegExp[];
  4696. managedPaths: (string | RegExp)[];
  4697. managedPathsWithSlash: string[];
  4698. managedPathsRegExps: RegExp[];
  4699. immutablePaths: (string | RegExp)[];
  4700. immutablePathsWithSlash: string[];
  4701. immutablePathsRegExps: RegExp[];
  4702. logStatistics(): void;
  4703. clear(): void;
  4704. addFileTimestamps(
  4705. map: ReadonlyMap<string, null | FileSystemInfoEntry | "ignore">,
  4706. immutable?: boolean
  4707. ): void;
  4708. addContextTimestamps(
  4709. map: ReadonlyMap<string, null | FileSystemInfoEntry | "ignore">,
  4710. immutable?: boolean
  4711. ): void;
  4712. getFileTimestamp(
  4713. path: string,
  4714. callback: (
  4715. arg0?: null | WebpackError,
  4716. arg1?: null | FileSystemInfoEntry | "ignore"
  4717. ) => void
  4718. ): void;
  4719. getContextTimestamp(
  4720. path: string,
  4721. callback: (
  4722. arg0?: null | WebpackError,
  4723. arg1?: null | "ignore" | ResolvedContextFileSystemInfoEntry
  4724. ) => void
  4725. ): void;
  4726. getFileHash(
  4727. path: string,
  4728. callback: (arg0?: null | WebpackError, arg1?: null | string) => void
  4729. ): void;
  4730. getContextHash(
  4731. path: string,
  4732. callback: (arg0?: null | WebpackError, arg1?: string) => void
  4733. ): void;
  4734. getContextTsh(
  4735. path: string,
  4736. callback: (
  4737. arg0?: null | WebpackError,
  4738. arg1?: null | ResolvedContextTimestampAndHash
  4739. ) => void
  4740. ): void;
  4741. resolveBuildDependencies(
  4742. context: string,
  4743. deps: Iterable<string>,
  4744. callback: (
  4745. arg0?: null | Error,
  4746. arg1?: ResolveBuildDependenciesResult
  4747. ) => void
  4748. ): void;
  4749. checkResolveResultsValid(
  4750. resolveResults: Map<string, string | false>,
  4751. callback: (arg0?: null | Error, arg1?: boolean) => void
  4752. ): void;
  4753. createSnapshot(
  4754. startTime: undefined | null | number,
  4755. files: null | Iterable<string>,
  4756. directories: null | Iterable<string>,
  4757. missing: null | Iterable<string>,
  4758. options: undefined | null | SnapshotOptionsFileSystemInfo,
  4759. callback: (arg0: null | WebpackError, arg1: null | Snapshot) => void
  4760. ): void;
  4761. mergeSnapshots(snapshot1: Snapshot, snapshot2: Snapshot): Snapshot;
  4762. checkSnapshotValid(
  4763. snapshot: Snapshot,
  4764. callback: (arg0?: null | WebpackError, arg1?: boolean) => void
  4765. ): void;
  4766. getDeprecatedFileTimestamps(): Map<any, any>;
  4767. getDeprecatedContextTimestamps(): Map<any, any>;
  4768. }
  4769. declare interface FileSystemInfoEntry {
  4770. safeTime: number;
  4771. timestamp?: number;
  4772. }
  4773. type FilterItemTypes = string | RegExp | ((value: string) => boolean);
  4774. declare interface Flags {
  4775. [index: string]: Argument;
  4776. }
  4777. declare interface GenerateContext {
  4778. /**
  4779. * mapping from dependencies to templates
  4780. */
  4781. dependencyTemplates: DependencyTemplates;
  4782. /**
  4783. * the runtime template
  4784. */
  4785. runtimeTemplate: RuntimeTemplate;
  4786. /**
  4787. * the module graph
  4788. */
  4789. moduleGraph: ModuleGraph;
  4790. /**
  4791. * the chunk graph
  4792. */
  4793. chunkGraph: ChunkGraph;
  4794. /**
  4795. * the requirements for runtime
  4796. */
  4797. runtimeRequirements: Set<string>;
  4798. /**
  4799. * the runtime
  4800. */
  4801. runtime: RuntimeSpec;
  4802. /**
  4803. * when in concatenated module, information about other concatenated modules
  4804. */
  4805. concatenationScope?: ConcatenationScope;
  4806. /**
  4807. * code generation results of other modules (need to have a codeGenerationDependency to use that)
  4808. */
  4809. codeGenerationResults?: CodeGenerationResults;
  4810. /**
  4811. * which kind of code should be generated
  4812. */
  4813. type: string;
  4814. /**
  4815. * get access to the code generation data
  4816. */
  4817. getData?: () => Map<string, any>;
  4818. }
  4819. declare class Generator {
  4820. constructor();
  4821. getTypes(module: NormalModule): ReadonlySet<string>;
  4822. getSize(module: NormalModule, type?: string): number;
  4823. generate(module: NormalModule, __1: GenerateContext): null | Source;
  4824. getConcatenationBailoutReason(
  4825. module: NormalModule,
  4826. context: ConcatenationBailoutReasonContext
  4827. ): undefined | string;
  4828. updateHash(hash: Hash, __1: UpdateHashContextGenerator): void;
  4829. static byType(map: Record<string, Generator>): ByTypeGenerator;
  4830. }
  4831. declare interface GeneratorOptions {
  4832. [index: string]: any;
  4833. }
  4834. type GeneratorOptionsByModuleType = GeneratorOptionsByModuleTypeKnown &
  4835. GeneratorOptionsByModuleTypeUnknown;
  4836. /**
  4837. * Specify options for each generator.
  4838. */
  4839. declare interface GeneratorOptionsByModuleTypeKnown {
  4840. /**
  4841. * Generator options for asset modules.
  4842. */
  4843. asset?: AssetGeneratorOptions;
  4844. /**
  4845. * Generator options for asset/inline modules.
  4846. */
  4847. "asset/inline"?: AssetInlineGeneratorOptions;
  4848. /**
  4849. * Generator options for asset/resource modules.
  4850. */
  4851. "asset/resource"?: AssetResourceGeneratorOptions;
  4852. /**
  4853. * Generator options for css modules.
  4854. */
  4855. css?: CssGeneratorOptions;
  4856. /**
  4857. * Generator options for css/auto modules.
  4858. */
  4859. "css/auto"?: CssAutoGeneratorOptions;
  4860. /**
  4861. * Generator options for css/global modules.
  4862. */
  4863. "css/global"?: CssGlobalGeneratorOptions;
  4864. /**
  4865. * Generator options for css/module modules.
  4866. */
  4867. "css/module"?: CssModuleGeneratorOptions;
  4868. /**
  4869. * No generator options are supported for this module type.
  4870. */
  4871. javascript?: EmptyGeneratorOptions;
  4872. /**
  4873. * No generator options are supported for this module type.
  4874. */
  4875. "javascript/auto"?: EmptyGeneratorOptions;
  4876. /**
  4877. * No generator options are supported for this module type.
  4878. */
  4879. "javascript/dynamic"?: EmptyGeneratorOptions;
  4880. /**
  4881. * No generator options are supported for this module type.
  4882. */
  4883. "javascript/esm"?: EmptyGeneratorOptions;
  4884. }
  4885. /**
  4886. * Specify options for each generator.
  4887. */
  4888. declare interface GeneratorOptionsByModuleTypeUnknown {
  4889. [index: string]: { [index: string]: any };
  4890. }
  4891. declare class GetChunkFilenameRuntimeModule extends RuntimeModule {
  4892. constructor(
  4893. contentType: string,
  4894. name: string,
  4895. global: string,
  4896. getFilenameForChunk: (
  4897. arg0: Chunk
  4898. ) => string | false | ((arg0: PathData, arg1?: AssetInfo) => string),
  4899. allChunks: boolean
  4900. );
  4901. contentType: string;
  4902. global: string;
  4903. getFilenameForChunk: (
  4904. arg0: Chunk
  4905. ) => string | false | ((arg0: PathData, arg1?: AssetInfo) => string);
  4906. allChunks: boolean;
  4907. /**
  4908. * Runtime modules without any dependencies to other runtime modules
  4909. */
  4910. static STAGE_NORMAL: number;
  4911. /**
  4912. * Runtime modules with simple dependencies on other runtime modules
  4913. */
  4914. static STAGE_BASIC: number;
  4915. /**
  4916. * Runtime modules which attach to handlers of other runtime modules
  4917. */
  4918. static STAGE_ATTACH: number;
  4919. /**
  4920. * Runtime modules which trigger actions on bootstrap
  4921. */
  4922. static STAGE_TRIGGER: number;
  4923. }
  4924. declare interface GroupConfig {
  4925. getKeys: (arg0?: any) => undefined | string[];
  4926. createGroup: (arg0: string, arg1: any[], arg2: any[]) => object;
  4927. getOptions?: (arg0: string, arg1: any[]) => GroupOptions;
  4928. }
  4929. declare interface GroupOptions {
  4930. groupChildren?: boolean;
  4931. force?: boolean;
  4932. targetGroupCount?: number;
  4933. }
  4934. declare interface HMRJavascriptParserHooks {
  4935. hotAcceptCallback: SyncBailHook<
  4936. [
  4937. (
  4938. | ImportExpressionImport
  4939. | UnaryExpression
  4940. | ArrayExpression
  4941. | ArrowFunctionExpression
  4942. | AssignmentExpression
  4943. | AwaitExpression
  4944. | BinaryExpression
  4945. | SimpleCallExpression
  4946. | NewExpression
  4947. | ChainExpression
  4948. | ClassExpression
  4949. | ConditionalExpression
  4950. | FunctionExpression
  4951. | Identifier
  4952. | SimpleLiteral
  4953. | RegExpLiteral
  4954. | BigIntLiteral
  4955. | LogicalExpression
  4956. | MemberExpression
  4957. | MetaProperty
  4958. | ObjectExpression
  4959. | SequenceExpression
  4960. | TaggedTemplateExpression
  4961. | TemplateLiteral
  4962. | ThisExpression
  4963. | UpdateExpression
  4964. | YieldExpression
  4965. | SpreadElement
  4966. ),
  4967. string[]
  4968. ],
  4969. void
  4970. >;
  4971. hotAcceptWithoutCallback: SyncBailHook<[CallExpression, string[]], void>;
  4972. }
  4973. declare interface HandleModuleCreationOptions {
  4974. factory: ModuleFactory;
  4975. dependencies: Dependency[];
  4976. originModule: null | Module;
  4977. contextInfo?: Partial<ModuleFactoryCreateDataContextInfo>;
  4978. context?: string;
  4979. /**
  4980. * recurse into dependencies of the created module
  4981. */
  4982. recursive?: boolean;
  4983. /**
  4984. * connect the resolved module with the origin module
  4985. */
  4986. connectOrigin?: boolean;
  4987. /**
  4988. * check the cycle dependencies of the created module
  4989. */
  4990. checkCycle?: boolean;
  4991. }
  4992. declare class HarmonyImportDependency extends ModuleDependency {
  4993. constructor(
  4994. request: string,
  4995. sourceOrder: number,
  4996. attributes?: ImportAttributes
  4997. );
  4998. sourceOrder: number;
  4999. getImportVar(moduleGraph: ModuleGraph): string;
  5000. getImportStatement(
  5001. update: boolean,
  5002. __1: DependencyTemplateContext
  5003. ): [string, string];
  5004. getLinkingErrors(
  5005. moduleGraph: ModuleGraph,
  5006. ids: string[],
  5007. additionalMessage: string
  5008. ): undefined | WebpackError[];
  5009. static Template: typeof HarmonyImportDependencyTemplate;
  5010. static ExportPresenceModes: {
  5011. NONE: 0;
  5012. WARN: 1;
  5013. AUTO: 2;
  5014. ERROR: 3;
  5015. fromUserOption(str: string | false): 0 | 1 | 2 | 3;
  5016. };
  5017. static NO_EXPORTS_REFERENCED: string[][];
  5018. static EXPORTS_OBJECT_REFERENCED: string[][];
  5019. static TRANSITIVE: typeof TRANSITIVE;
  5020. }
  5021. declare class HarmonyImportDependencyTemplate extends DependencyTemplate {
  5022. constructor();
  5023. static getImportEmittedRuntime(
  5024. module: Module,
  5025. referencedModule: Module
  5026. ): undefined | string | boolean | SortableSet<string>;
  5027. }
  5028. declare class Hash {
  5029. constructor();
  5030. /**
  5031. * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
  5032. */
  5033. update(data: string | Buffer, inputEncoding?: string): Hash;
  5034. /**
  5035. * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
  5036. */
  5037. digest(encoding?: string): string | Buffer;
  5038. }
  5039. type HashFunction = string | typeof Hash;
  5040. declare interface HashableObject {
  5041. updateHash: (arg0: Hash) => void;
  5042. }
  5043. declare class HashedModuleIdsPlugin {
  5044. constructor(options?: HashedModuleIdsPluginOptions);
  5045. options: HashedModuleIdsPluginOptions;
  5046. /**
  5047. * Apply the plugin
  5048. */
  5049. apply(compiler: Compiler): void;
  5050. }
  5051. declare interface HashedModuleIdsPluginOptions {
  5052. /**
  5053. * The context directory for creating names.
  5054. */
  5055. context?: string;
  5056. /**
  5057. * The encoding to use when generating the hash, defaults to 'base64'. All encodings from Node.JS' hash.digest are supported.
  5058. */
  5059. hashDigest?: "latin1" | "base64" | "hex";
  5060. /**
  5061. * The prefix length of the hash digest to use, defaults to 4.
  5062. */
  5063. hashDigestLength?: number;
  5064. /**
  5065. * The hashing algorithm to use, defaults to 'md4'. All functions from Node.JS' crypto.createHash are supported.
  5066. */
  5067. hashFunction?: string | typeof Hash;
  5068. }
  5069. declare abstract class HelperRuntimeModule extends RuntimeModule {}
  5070. declare class HotModuleReplacementPlugin {
  5071. constructor(options?: object);
  5072. options: object;
  5073. /**
  5074. * Apply the plugin
  5075. */
  5076. apply(compiler: Compiler): void;
  5077. static getParserHooks(parser: JavascriptParser): HMRJavascriptParserHooks;
  5078. }
  5079. /**
  5080. * These properties are added by the HotModuleReplacementPlugin
  5081. */
  5082. declare interface HotModuleReplacementPluginLoaderContext {
  5083. hot?: boolean;
  5084. }
  5085. declare class HotUpdateChunk extends Chunk {
  5086. constructor();
  5087. }
  5088. /**
  5089. * Options for building http resources.
  5090. */
  5091. declare interface HttpUriOptions {
  5092. /**
  5093. * List of allowed URIs (resp. the beginning of them).
  5094. */
  5095. allowedUris: (string | RegExp | ((uri: string) => boolean))[];
  5096. /**
  5097. * Location where resource content is stored for lockfile entries. It's also possible to disable storing by passing false.
  5098. */
  5099. cacheLocation?: string | false;
  5100. /**
  5101. * When set, anything that would lead to a modification of the lockfile or any resource content, will result in an error.
  5102. */
  5103. frozen?: boolean;
  5104. /**
  5105. * Location of the lockfile.
  5106. */
  5107. lockfileLocation?: string;
  5108. /**
  5109. * Proxy configuration, which can be used to specify a proxy server to use for HTTP requests.
  5110. */
  5111. proxy?: string;
  5112. /**
  5113. * When set, resources of existing lockfile entries will be fetched and entries will be upgraded when resource content has changed.
  5114. */
  5115. upgrade?: boolean;
  5116. }
  5117. declare class HttpUriPlugin {
  5118. constructor(options: HttpUriOptions);
  5119. /**
  5120. * Apply the plugin
  5121. */
  5122. apply(compiler: Compiler): void;
  5123. }
  5124. type IBigIntStats = IStatsBase<bigint> & {
  5125. atimeNs: bigint;
  5126. mtimeNs: bigint;
  5127. ctimeNs: bigint;
  5128. birthtimeNs: bigint;
  5129. };
  5130. declare interface IStats {
  5131. isFile: () => boolean;
  5132. isDirectory: () => boolean;
  5133. isBlockDevice: () => boolean;
  5134. isCharacterDevice: () => boolean;
  5135. isSymbolicLink: () => boolean;
  5136. isFIFO: () => boolean;
  5137. isSocket: () => boolean;
  5138. dev: number;
  5139. ino: number;
  5140. mode: number;
  5141. nlink: number;
  5142. uid: number;
  5143. gid: number;
  5144. rdev: number;
  5145. size: number;
  5146. blksize: number;
  5147. blocks: number;
  5148. atimeMs: number;
  5149. mtimeMs: number;
  5150. ctimeMs: number;
  5151. birthtimeMs: number;
  5152. atime: Date;
  5153. mtime: Date;
  5154. ctime: Date;
  5155. birthtime: Date;
  5156. }
  5157. declare interface IStatsBase<T> {
  5158. isFile: () => boolean;
  5159. isDirectory: () => boolean;
  5160. isBlockDevice: () => boolean;
  5161. isCharacterDevice: () => boolean;
  5162. isSymbolicLink: () => boolean;
  5163. isFIFO: () => boolean;
  5164. isSocket: () => boolean;
  5165. dev: T;
  5166. ino: T;
  5167. mode: T;
  5168. nlink: T;
  5169. uid: T;
  5170. gid: T;
  5171. rdev: T;
  5172. size: T;
  5173. blksize: T;
  5174. blocks: T;
  5175. atimeMs: T;
  5176. mtimeMs: T;
  5177. ctimeMs: T;
  5178. birthtimeMs: T;
  5179. atime: Date;
  5180. mtime: Date;
  5181. ctime: Date;
  5182. birthtime: Date;
  5183. }
  5184. declare class IgnorePlugin {
  5185. constructor(options: IgnorePluginOptions);
  5186. options: IgnorePluginOptions;
  5187. /**
  5188. * Note that if "contextRegExp" is given, both the "resourceRegExp" and "contextRegExp" have to match.
  5189. */
  5190. checkIgnore(resolveData: ResolveData): undefined | false;
  5191. /**
  5192. * Apply the plugin
  5193. */
  5194. apply(compiler: Compiler): void;
  5195. }
  5196. type IgnorePluginOptions =
  5197. | {
  5198. /**
  5199. * A RegExp to test the context (directory) against.
  5200. */
  5201. contextRegExp?: RegExp;
  5202. /**
  5203. * A RegExp to test the request against.
  5204. */
  5205. resourceRegExp: RegExp;
  5206. }
  5207. | {
  5208. /**
  5209. * A filter function for resource and context.
  5210. */
  5211. checkResource: (resource: string, context: string) => boolean;
  5212. };
  5213. type ImportAttribute = BaseNode & {
  5214. type: "ImportAttribute";
  5215. key: Identifier | SimpleLiteral | RegExpLiteral | BigIntLiteral;
  5216. value: Literal;
  5217. };
  5218. type ImportAttributes = Record<string, string> & {};
  5219. type ImportDeclarationJavascriptParser = ImportDeclarationImport & {
  5220. attributes?: ImportAttribute[];
  5221. };
  5222. declare interface ImportDependencyMeta {
  5223. attributes?: ImportAttributes;
  5224. externalType?: "import" | "module";
  5225. }
  5226. type ImportExpressionJavascriptParser = ImportExpressionImport & {
  5227. options?:
  5228. | null
  5229. | ImportExpressionImport
  5230. | UnaryExpression
  5231. | ArrayExpression
  5232. | ArrowFunctionExpression
  5233. | AssignmentExpression
  5234. | AwaitExpression
  5235. | BinaryExpression
  5236. | SimpleCallExpression
  5237. | NewExpression
  5238. | ChainExpression
  5239. | ClassExpression
  5240. | ConditionalExpression
  5241. | FunctionExpression
  5242. | Identifier
  5243. | SimpleLiteral
  5244. | RegExpLiteral
  5245. | BigIntLiteral
  5246. | LogicalExpression
  5247. | MemberExpression
  5248. | MetaProperty
  5249. | ObjectExpression
  5250. | SequenceExpression
  5251. | TaggedTemplateExpression
  5252. | TemplateLiteral
  5253. | ThisExpression
  5254. | UpdateExpression
  5255. | YieldExpression;
  5256. };
  5257. declare interface ImportModuleOptions {
  5258. /**
  5259. * the target layer
  5260. */
  5261. layer?: string;
  5262. /**
  5263. * the target public path
  5264. */
  5265. publicPath?: string;
  5266. /**
  5267. * target base uri
  5268. */
  5269. baseUri?: string;
  5270. }
  5271. type ImportSource =
  5272. | undefined
  5273. | null
  5274. | string
  5275. | SimpleLiteral
  5276. | RegExpLiteral
  5277. | BigIntLiteral;
  5278. /**
  5279. * Options for infrastructure level logging.
  5280. */
  5281. declare interface InfrastructureLogging {
  5282. /**
  5283. * Only appends lines to the output. Avoids updating existing output e. g. for status messages. This option is only used when no custom console is provided.
  5284. */
  5285. appendOnly?: boolean;
  5286. /**
  5287. * Enables/Disables colorful output. This option is only used when no custom console is provided.
  5288. */
  5289. colors?: boolean;
  5290. /**
  5291. * Custom console used for logging.
  5292. */
  5293. console?: Console;
  5294. /**
  5295. * Enable debug logging for specific loggers.
  5296. */
  5297. debug?:
  5298. | string
  5299. | boolean
  5300. | RegExp
  5301. | FilterItemTypes[]
  5302. | ((value: string) => boolean);
  5303. /**
  5304. * Log level.
  5305. */
  5306. level?: "none" | "error" | "warn" | "info" | "log" | "verbose";
  5307. /**
  5308. * Stream used for logging output. Defaults to process.stderr. This option is only used when no custom console is provided.
  5309. */
  5310. stream?: NodeJS.WritableStream;
  5311. }
  5312. declare class InitFragment<GenerateContext> {
  5313. constructor(
  5314. content: undefined | string | Source,
  5315. stage: number,
  5316. position: number,
  5317. key?: string,
  5318. endContent?: string | Source
  5319. );
  5320. content?: string | Source;
  5321. stage: number;
  5322. position: number;
  5323. key?: string;
  5324. endContent?: string | Source;
  5325. getContent(context: GenerateContext): undefined | string | Source;
  5326. getEndContent(context: GenerateContext): undefined | string | Source;
  5327. serialize(context: ObjectSerializerContext): void;
  5328. deserialize(context: ObjectDeserializerContext): void;
  5329. merge: any;
  5330. static addToSource<Context, T>(
  5331. source: Source,
  5332. initFragments: InitFragment<T>[],
  5333. context: Context
  5334. ): Source;
  5335. static STAGE_CONSTANTS: number;
  5336. static STAGE_ASYNC_BOUNDARY: number;
  5337. static STAGE_HARMONY_EXPORTS: number;
  5338. static STAGE_HARMONY_IMPORTS: number;
  5339. static STAGE_PROVIDES: number;
  5340. static STAGE_ASYNC_DEPENDENCIES: number;
  5341. static STAGE_ASYNC_HARMONY_IMPORTS: number;
  5342. }
  5343. declare interface InputFileSystem {
  5344. readFile: ReadFileFs;
  5345. readFileSync?: ReadFileSync;
  5346. readlink: ReadlinkFs;
  5347. readlinkSync?: ReadlinkSync;
  5348. readdir: ReaddirFs;
  5349. readdirSync?: ReaddirSync;
  5350. stat: StatFs;
  5351. statSync?: StatSync;
  5352. lstat?: LStatFs;
  5353. lstatSync?: LStatSync;
  5354. realpath?: RealPathFs;
  5355. realpathSync?: RealPathSync;
  5356. readJson?: (
  5357. arg0: PathOrFileDescriptorFs,
  5358. arg1: (
  5359. arg0: null | Error | NodeJS.ErrnoException,
  5360. arg1?: JsonObjectFs
  5361. ) => void
  5362. ) => void;
  5363. readJsonSync?: (arg0: PathOrFileDescriptorFs) => JsonObjectFs;
  5364. purge?: (arg0?: string | string[] | Set<string>) => void;
  5365. join?: (arg0: string, arg1: string) => string;
  5366. relative?: (arg0: string, arg1: string) => string;
  5367. dirname?: (arg0: string) => string;
  5368. }
  5369. type IntermediateFileSystem = InputFileSystem &
  5370. OutputFileSystem &
  5371. IntermediateFileSystemExtras;
  5372. declare interface IntermediateFileSystemExtras {
  5373. mkdirSync: MkdirSync;
  5374. createWriteStream: (
  5375. arg0: PathLikeFs,
  5376. arg1?:
  5377. | "ascii"
  5378. | "utf8"
  5379. | "utf-8"
  5380. | "utf16le"
  5381. | "utf-16le"
  5382. | "ucs2"
  5383. | "ucs-2"
  5384. | "latin1"
  5385. | "binary"
  5386. | "base64"
  5387. | "base64url"
  5388. | "hex"
  5389. | WriteStreamOptions
  5390. ) => NodeJS.WritableStream;
  5391. open: Open;
  5392. read: Read<Buffer>;
  5393. close: (
  5394. arg0: number,
  5395. arg1: (arg0: null | NodeJS.ErrnoException) => void
  5396. ) => void;
  5397. rename: (
  5398. arg0: PathLikeFs,
  5399. arg1: PathLikeFs,
  5400. arg2: (arg0: null | NodeJS.ErrnoException) => void
  5401. ) => void;
  5402. }
  5403. type InternalCell<T> = T | typeof TOMBSTONE | typeof UNDEFINED_MARKER;
  5404. declare interface InterpolatedPathAndAssetInfo {
  5405. path: string;
  5406. info: AssetInfo;
  5407. }
  5408. declare interface Item<T> {
  5409. [index: string]: string | string[] | T;
  5410. }
  5411. declare abstract class ItemCacheFacade {
  5412. get<T>(callback: CallbackCacheCacheFacade<T>): void;
  5413. getPromise<T>(): Promise<T>;
  5414. store<T>(data: T, callback: CallbackCacheCacheFacade<void>): void;
  5415. storePromise<T>(data: T): Promise<void>;
  5416. provide<T>(
  5417. computer: (arg0: CallbackNormalErrorCache<T>) => void,
  5418. callback: CallbackNormalErrorCache<T>
  5419. ): void;
  5420. providePromise<T>(computer: () => T | Promise<T>): Promise<T>;
  5421. }
  5422. declare class JavascriptModulesPlugin {
  5423. constructor(options?: object);
  5424. options: object;
  5425. /**
  5426. * Apply the plugin
  5427. */
  5428. apply(compiler: Compiler): void;
  5429. renderModule(
  5430. module: Module,
  5431. renderContext: ChunkRenderContextJavascriptModulesPlugin,
  5432. hooks: CompilationHooksJavascriptModulesPlugin,
  5433. factory: boolean
  5434. ): null | Source;
  5435. renderChunk(
  5436. renderContext: RenderContextJavascriptModulesPlugin,
  5437. hooks: CompilationHooksJavascriptModulesPlugin
  5438. ): Source;
  5439. renderMain(
  5440. renderContext: MainRenderContext,
  5441. hooks: CompilationHooksJavascriptModulesPlugin,
  5442. compilation: Compilation
  5443. ): Source;
  5444. updateHashWithBootstrap(
  5445. hash: Hash,
  5446. renderContext: RenderBootstrapContext,
  5447. hooks: CompilationHooksJavascriptModulesPlugin
  5448. ): void;
  5449. renderBootstrap(
  5450. renderContext: RenderBootstrapContext,
  5451. hooks: CompilationHooksJavascriptModulesPlugin
  5452. ): Bootstrap;
  5453. renderRequire(
  5454. renderContext: RenderBootstrapContext,
  5455. hooks: CompilationHooksJavascriptModulesPlugin
  5456. ): string;
  5457. getRenamedInlineModule(
  5458. allModules: Module[],
  5459. renderContext: MainRenderContext,
  5460. inlinedModules: Set<Module>,
  5461. chunkRenderContext: ChunkRenderContextJavascriptModulesPlugin,
  5462. hooks: CompilationHooksJavascriptModulesPlugin,
  5463. allStrict: undefined | boolean,
  5464. hasChunkModules: boolean
  5465. ): false | Map<Module, Source>;
  5466. static getCompilationHooks(
  5467. compilation: Compilation
  5468. ): CompilationHooksJavascriptModulesPlugin;
  5469. static getChunkFilenameTemplate(
  5470. chunk: Chunk,
  5471. outputOptions: Output
  5472. ): TemplatePath;
  5473. static chunkHasJs: (chunk: Chunk, chunkGraph: ChunkGraph) => boolean;
  5474. }
  5475. declare class JavascriptParser extends Parser {
  5476. constructor(sourceType?: "module" | "auto" | "script");
  5477. hooks: Readonly<{
  5478. evaluateTypeof: HookMap<
  5479. SyncBailHook<
  5480. [UnaryExpression],
  5481. undefined | null | BasicEvaluatedExpression
  5482. >
  5483. >;
  5484. evaluate: HookMap<
  5485. SyncBailHook<
  5486. [
  5487. | ImportExpressionImport
  5488. | UnaryExpression
  5489. | ArrayExpression
  5490. | ArrowFunctionExpression
  5491. | AssignmentExpression
  5492. | AwaitExpression
  5493. | BinaryExpression
  5494. | SimpleCallExpression
  5495. | NewExpression
  5496. | ChainExpression
  5497. | ClassExpression
  5498. | ConditionalExpression
  5499. | FunctionExpression
  5500. | Identifier
  5501. | SimpleLiteral
  5502. | RegExpLiteral
  5503. | BigIntLiteral
  5504. | LogicalExpression
  5505. | MemberExpression
  5506. | MetaProperty
  5507. | ObjectExpression
  5508. | SequenceExpression
  5509. | TaggedTemplateExpression
  5510. | TemplateLiteral
  5511. | ThisExpression
  5512. | UpdateExpression
  5513. | YieldExpression
  5514. | SpreadElement
  5515. | PrivateIdentifier
  5516. ],
  5517. undefined | null | BasicEvaluatedExpression
  5518. >
  5519. >;
  5520. evaluateIdentifier: HookMap<
  5521. SyncBailHook<
  5522. [Identifier | MemberExpression | MetaProperty | ThisExpression],
  5523. undefined | null | BasicEvaluatedExpression
  5524. >
  5525. >;
  5526. evaluateDefinedIdentifier: HookMap<
  5527. SyncBailHook<
  5528. [Identifier | MemberExpression | ThisExpression],
  5529. undefined | null | BasicEvaluatedExpression
  5530. >
  5531. >;
  5532. evaluateNewExpression: HookMap<
  5533. SyncBailHook<[NewExpression], undefined | null | BasicEvaluatedExpression>
  5534. >;
  5535. evaluateCallExpression: HookMap<
  5536. SyncBailHook<
  5537. [CallExpression],
  5538. undefined | null | BasicEvaluatedExpression
  5539. >
  5540. >;
  5541. evaluateCallExpressionMember: HookMap<
  5542. SyncBailHook<
  5543. [CallExpression, BasicEvaluatedExpression],
  5544. undefined | null | BasicEvaluatedExpression
  5545. >
  5546. >;
  5547. isPure: HookMap<
  5548. SyncBailHook<
  5549. [
  5550. (
  5551. | ImportExpressionImport
  5552. | UnaryExpression
  5553. | ArrayExpression
  5554. | ArrowFunctionExpression
  5555. | AssignmentExpression
  5556. | AwaitExpression
  5557. | BinaryExpression
  5558. | SimpleCallExpression
  5559. | NewExpression
  5560. | ChainExpression
  5561. | ClassExpression
  5562. | ConditionalExpression
  5563. | FunctionExpression
  5564. | Identifier
  5565. | SimpleLiteral
  5566. | RegExpLiteral
  5567. | BigIntLiteral
  5568. | LogicalExpression
  5569. | MemberExpression
  5570. | MetaProperty
  5571. | ObjectExpression
  5572. | SequenceExpression
  5573. | TaggedTemplateExpression
  5574. | TemplateLiteral
  5575. | ThisExpression
  5576. | UpdateExpression
  5577. | YieldExpression
  5578. | PrivateIdentifier
  5579. | FunctionDeclaration
  5580. | VariableDeclaration
  5581. | ClassDeclaration
  5582. ),
  5583. number
  5584. ],
  5585. boolean | void
  5586. >
  5587. >;
  5588. preStatement: SyncBailHook<
  5589. [
  5590. | ImportDeclarationJavascriptParser
  5591. | ExportNamedDeclarationJavascriptParser
  5592. | ExportAllDeclarationJavascriptParser
  5593. | FunctionDeclaration
  5594. | VariableDeclaration
  5595. | ClassDeclaration
  5596. | ExpressionStatement
  5597. | BlockStatement
  5598. | StaticBlock
  5599. | EmptyStatement
  5600. | DebuggerStatement
  5601. | WithStatement
  5602. | ReturnStatement
  5603. | LabeledStatement
  5604. | BreakStatement
  5605. | ContinueStatement
  5606. | IfStatement
  5607. | SwitchStatement
  5608. | ThrowStatement
  5609. | TryStatement
  5610. | WhileStatement
  5611. | DoWhileStatement
  5612. | ForStatement
  5613. | ForInStatement
  5614. | ForOfStatement
  5615. | ExportDefaultDeclaration
  5616. ],
  5617. boolean | void
  5618. >;
  5619. blockPreStatement: SyncBailHook<
  5620. [
  5621. | ImportDeclarationJavascriptParser
  5622. | ExportNamedDeclarationJavascriptParser
  5623. | ExportAllDeclarationJavascriptParser
  5624. | FunctionDeclaration
  5625. | VariableDeclaration
  5626. | ClassDeclaration
  5627. | ExpressionStatement
  5628. | BlockStatement
  5629. | StaticBlock
  5630. | EmptyStatement
  5631. | DebuggerStatement
  5632. | WithStatement
  5633. | ReturnStatement
  5634. | LabeledStatement
  5635. | BreakStatement
  5636. | ContinueStatement
  5637. | IfStatement
  5638. | SwitchStatement
  5639. | ThrowStatement
  5640. | TryStatement
  5641. | WhileStatement
  5642. | DoWhileStatement
  5643. | ForStatement
  5644. | ForInStatement
  5645. | ForOfStatement
  5646. | ExportDefaultDeclaration
  5647. ],
  5648. boolean | void
  5649. >;
  5650. statement: SyncBailHook<
  5651. [
  5652. | ImportDeclarationJavascriptParser
  5653. | ExportNamedDeclarationJavascriptParser
  5654. | ExportAllDeclarationJavascriptParser
  5655. | FunctionDeclaration
  5656. | VariableDeclaration
  5657. | ClassDeclaration
  5658. | ExpressionStatement
  5659. | BlockStatement
  5660. | StaticBlock
  5661. | EmptyStatement
  5662. | DebuggerStatement
  5663. | WithStatement
  5664. | ReturnStatement
  5665. | LabeledStatement
  5666. | BreakStatement
  5667. | ContinueStatement
  5668. | IfStatement
  5669. | SwitchStatement
  5670. | ThrowStatement
  5671. | TryStatement
  5672. | WhileStatement
  5673. | DoWhileStatement
  5674. | ForStatement
  5675. | ForInStatement
  5676. | ForOfStatement
  5677. | ExportDefaultDeclaration
  5678. ],
  5679. boolean | void
  5680. >;
  5681. statementIf: SyncBailHook<[IfStatement], boolean | void>;
  5682. classExtendsExpression: SyncBailHook<
  5683. [Expression, ClassExpression | ClassDeclaration],
  5684. boolean | void
  5685. >;
  5686. classBodyElement: SyncBailHook<
  5687. [
  5688. StaticBlock | MethodDefinition | PropertyDefinition,
  5689. ClassExpression | ClassDeclaration
  5690. ],
  5691. boolean | void
  5692. >;
  5693. classBodyValue: SyncBailHook<
  5694. [
  5695. Expression,
  5696. MethodDefinition | PropertyDefinition,
  5697. ClassExpression | ClassDeclaration
  5698. ],
  5699. boolean | void
  5700. >;
  5701. label: HookMap<SyncBailHook<[LabeledStatement], boolean | void>>;
  5702. import: SyncBailHook<
  5703. [ImportDeclarationJavascriptParser, ImportSource],
  5704. boolean | void
  5705. >;
  5706. importSpecifier: SyncBailHook<
  5707. [ImportDeclarationJavascriptParser, ImportSource, null | string, string],
  5708. boolean | void
  5709. >;
  5710. export: SyncBailHook<
  5711. [ExportNamedDeclarationJavascriptParser | ExportDefaultDeclaration],
  5712. boolean | void
  5713. >;
  5714. exportImport: SyncBailHook<
  5715. [
  5716. (
  5717. | ExportNamedDeclarationJavascriptParser
  5718. | ExportAllDeclarationJavascriptParser
  5719. ),
  5720. ImportSource
  5721. ],
  5722. boolean | void
  5723. >;
  5724. exportDeclaration: SyncBailHook<
  5725. [
  5726. (
  5727. | ExportNamedDeclarationJavascriptParser
  5728. | ExportAllDeclarationJavascriptParser
  5729. | ExportDefaultDeclaration
  5730. ),
  5731. Declaration
  5732. ],
  5733. boolean | void
  5734. >;
  5735. exportExpression: SyncBailHook<
  5736. [ExportDefaultDeclaration, FunctionDeclaration | ClassDeclaration],
  5737. boolean | void
  5738. >;
  5739. exportSpecifier: SyncBailHook<
  5740. [
  5741. (
  5742. | ExportNamedDeclarationJavascriptParser
  5743. | ExportAllDeclarationJavascriptParser
  5744. | ExportDefaultDeclaration
  5745. ),
  5746. string,
  5747. string,
  5748. undefined | number
  5749. ],
  5750. boolean | void
  5751. >;
  5752. exportImportSpecifier: SyncBailHook<
  5753. [
  5754. (
  5755. | ExportNamedDeclarationJavascriptParser
  5756. | ExportAllDeclarationJavascriptParser
  5757. ),
  5758. ImportSource,
  5759. null | string,
  5760. null | string,
  5761. undefined | number
  5762. ],
  5763. boolean | void
  5764. >;
  5765. preDeclarator: SyncBailHook<
  5766. [VariableDeclarator, Statement],
  5767. boolean | void
  5768. >;
  5769. declarator: SyncBailHook<[VariableDeclarator, Statement], boolean | void>;
  5770. varDeclaration: HookMap<SyncBailHook<[Declaration], boolean | void>>;
  5771. varDeclarationLet: HookMap<SyncBailHook<[Declaration], boolean | void>>;
  5772. varDeclarationConst: HookMap<SyncBailHook<[Declaration], boolean | void>>;
  5773. varDeclarationVar: HookMap<SyncBailHook<[Declaration], boolean | void>>;
  5774. pattern: HookMap<SyncBailHook<[Identifier], boolean | void>>;
  5775. canRename: HookMap<SyncBailHook<[Expression], boolean | void>>;
  5776. rename: HookMap<SyncBailHook<[Expression], boolean | void>>;
  5777. assign: HookMap<SyncBailHook<[AssignmentExpression], boolean | void>>;
  5778. assignMemberChain: HookMap<
  5779. SyncBailHook<[AssignmentExpression, string[]], boolean | void>
  5780. >;
  5781. typeof: HookMap<SyncBailHook<[Expression], boolean | void>>;
  5782. importCall: SyncBailHook<
  5783. [ImportExpressionJavascriptParser],
  5784. boolean | void
  5785. >;
  5786. topLevelAwait: SyncBailHook<
  5787. [
  5788. | ImportExpressionImport
  5789. | UnaryExpression
  5790. | ArrayExpression
  5791. | ArrowFunctionExpression
  5792. | AssignmentExpression
  5793. | AwaitExpression
  5794. | BinaryExpression
  5795. | SimpleCallExpression
  5796. | NewExpression
  5797. | ChainExpression
  5798. | ClassExpression
  5799. | ConditionalExpression
  5800. | FunctionExpression
  5801. | Identifier
  5802. | SimpleLiteral
  5803. | RegExpLiteral
  5804. | BigIntLiteral
  5805. | LogicalExpression
  5806. | MemberExpression
  5807. | MetaProperty
  5808. | ObjectExpression
  5809. | SequenceExpression
  5810. | TaggedTemplateExpression
  5811. | TemplateLiteral
  5812. | ThisExpression
  5813. | UpdateExpression
  5814. | YieldExpression
  5815. | ForOfStatement
  5816. ],
  5817. boolean | void
  5818. >;
  5819. call: HookMap<SyncBailHook<[CallExpression], boolean | void>>;
  5820. callMemberChain: HookMap<
  5821. SyncBailHook<
  5822. [CallExpression, string[], boolean[], [number, number][]],
  5823. boolean | void
  5824. >
  5825. >;
  5826. memberChainOfCallMemberChain: HookMap<
  5827. SyncBailHook<
  5828. [Expression, string[], CallExpression, string[], [number, number][]],
  5829. boolean | void
  5830. >
  5831. >;
  5832. callMemberChainOfCallMemberChain: HookMap<
  5833. SyncBailHook<
  5834. [
  5835. CallExpression,
  5836. string[],
  5837. CallExpression,
  5838. string[],
  5839. [number, number][]
  5840. ],
  5841. boolean | void
  5842. >
  5843. >;
  5844. optionalChaining: SyncBailHook<[ChainExpression], boolean | void>;
  5845. new: HookMap<SyncBailHook<[NewExpression], boolean | void>>;
  5846. binaryExpression: SyncBailHook<[BinaryExpression], boolean | void>;
  5847. expression: HookMap<SyncBailHook<[Expression], boolean | void>>;
  5848. expressionMemberChain: HookMap<
  5849. SyncBailHook<
  5850. [MemberExpression, string[], boolean[], [number, number][]],
  5851. boolean | void
  5852. >
  5853. >;
  5854. unhandledExpressionMemberChain: HookMap<
  5855. SyncBailHook<[MemberExpression, string[]], boolean | void>
  5856. >;
  5857. expressionConditionalOperator: SyncBailHook<
  5858. [ConditionalExpression],
  5859. boolean | void
  5860. >;
  5861. expressionLogicalOperator: SyncBailHook<
  5862. [LogicalExpression],
  5863. boolean | void
  5864. >;
  5865. program: SyncBailHook<[Program, Comment[]], boolean | void>;
  5866. finish: SyncBailHook<[Program, Comment[]], boolean | void>;
  5867. }>;
  5868. sourceType: "module" | "auto" | "script";
  5869. scope: ScopeInfo;
  5870. state: ParserState;
  5871. comments?: Comment[];
  5872. semicolons?: Set<number>;
  5873. statementPath?: StatementPathItem[];
  5874. prevStatement?:
  5875. | ImportDeclarationJavascriptParser
  5876. | ExportNamedDeclarationJavascriptParser
  5877. | ExportAllDeclarationJavascriptParser
  5878. | ImportExpressionImport
  5879. | UnaryExpression
  5880. | ArrayExpression
  5881. | ArrowFunctionExpression
  5882. | AssignmentExpression
  5883. | AwaitExpression
  5884. | BinaryExpression
  5885. | SimpleCallExpression
  5886. | NewExpression
  5887. | ChainExpression
  5888. | ClassExpression
  5889. | ConditionalExpression
  5890. | FunctionExpression
  5891. | Identifier
  5892. | SimpleLiteral
  5893. | RegExpLiteral
  5894. | BigIntLiteral
  5895. | LogicalExpression
  5896. | MemberExpression
  5897. | MetaProperty
  5898. | ObjectExpression
  5899. | SequenceExpression
  5900. | TaggedTemplateExpression
  5901. | TemplateLiteral
  5902. | ThisExpression
  5903. | UpdateExpression
  5904. | YieldExpression
  5905. | FunctionDeclaration
  5906. | VariableDeclaration
  5907. | ClassDeclaration
  5908. | ExpressionStatement
  5909. | BlockStatement
  5910. | StaticBlock
  5911. | EmptyStatement
  5912. | DebuggerStatement
  5913. | WithStatement
  5914. | ReturnStatement
  5915. | LabeledStatement
  5916. | BreakStatement
  5917. | ContinueStatement
  5918. | IfStatement
  5919. | SwitchStatement
  5920. | ThrowStatement
  5921. | TryStatement
  5922. | WhileStatement
  5923. | DoWhileStatement
  5924. | ForStatement
  5925. | ForInStatement
  5926. | ForOfStatement
  5927. | ExportDefaultDeclaration;
  5928. destructuringAssignmentProperties?: WeakMap<
  5929. Expression,
  5930. Set<DestructuringAssignmentProperty>
  5931. >;
  5932. currentTagData: any;
  5933. magicCommentContext: Context;
  5934. destructuringAssignmentPropertiesFor(
  5935. node: Expression
  5936. ): undefined | Set<DestructuringAssignmentProperty>;
  5937. getRenameIdentifier(
  5938. expr:
  5939. | ImportExpressionImport
  5940. | UnaryExpression
  5941. | ArrayExpression
  5942. | ArrowFunctionExpression
  5943. | AssignmentExpression
  5944. | AwaitExpression
  5945. | BinaryExpression
  5946. | SimpleCallExpression
  5947. | NewExpression
  5948. | ChainExpression
  5949. | ClassExpression
  5950. | ConditionalExpression
  5951. | FunctionExpression
  5952. | Identifier
  5953. | SimpleLiteral
  5954. | RegExpLiteral
  5955. | BigIntLiteral
  5956. | LogicalExpression
  5957. | MemberExpression
  5958. | MetaProperty
  5959. | ObjectExpression
  5960. | SequenceExpression
  5961. | TaggedTemplateExpression
  5962. | TemplateLiteral
  5963. | ThisExpression
  5964. | UpdateExpression
  5965. | YieldExpression
  5966. | SpreadElement
  5967. ): undefined | string | VariableInfoInterface;
  5968. walkClass(classy: ClassExpression | ClassDeclaration): void;
  5969. /**
  5970. * Pre walking iterates the scope for variable declarations
  5971. */
  5972. preWalkStatements(
  5973. statements: (
  5974. | ImportDeclarationJavascriptParser
  5975. | ExportNamedDeclarationJavascriptParser
  5976. | ExportAllDeclarationJavascriptParser
  5977. | FunctionDeclaration
  5978. | VariableDeclaration
  5979. | ClassDeclaration
  5980. | ExpressionStatement
  5981. | BlockStatement
  5982. | StaticBlock
  5983. | EmptyStatement
  5984. | DebuggerStatement
  5985. | WithStatement
  5986. | ReturnStatement
  5987. | LabeledStatement
  5988. | BreakStatement
  5989. | ContinueStatement
  5990. | IfStatement
  5991. | SwitchStatement
  5992. | ThrowStatement
  5993. | TryStatement
  5994. | WhileStatement
  5995. | DoWhileStatement
  5996. | ForStatement
  5997. | ForInStatement
  5998. | ForOfStatement
  5999. | ExportDefaultDeclaration
  6000. )[]
  6001. ): void;
  6002. /**
  6003. * Block pre walking iterates the scope for block variable declarations
  6004. */
  6005. blockPreWalkStatements(
  6006. statements: (
  6007. | ImportDeclarationJavascriptParser
  6008. | ExportNamedDeclarationJavascriptParser
  6009. | ExportAllDeclarationJavascriptParser
  6010. | FunctionDeclaration
  6011. | VariableDeclaration
  6012. | ClassDeclaration
  6013. | ExpressionStatement
  6014. | BlockStatement
  6015. | StaticBlock
  6016. | EmptyStatement
  6017. | DebuggerStatement
  6018. | WithStatement
  6019. | ReturnStatement
  6020. | LabeledStatement
  6021. | BreakStatement
  6022. | ContinueStatement
  6023. | IfStatement
  6024. | SwitchStatement
  6025. | ThrowStatement
  6026. | TryStatement
  6027. | WhileStatement
  6028. | DoWhileStatement
  6029. | ForStatement
  6030. | ForInStatement
  6031. | ForOfStatement
  6032. | ExportDefaultDeclaration
  6033. )[]
  6034. ): void;
  6035. /**
  6036. * Walking iterates the statements and expressions and processes them
  6037. */
  6038. walkStatements(
  6039. statements: (
  6040. | ImportDeclarationJavascriptParser
  6041. | ExportNamedDeclarationJavascriptParser
  6042. | ExportAllDeclarationJavascriptParser
  6043. | FunctionDeclaration
  6044. | VariableDeclaration
  6045. | ClassDeclaration
  6046. | ExpressionStatement
  6047. | BlockStatement
  6048. | StaticBlock
  6049. | EmptyStatement
  6050. | DebuggerStatement
  6051. | WithStatement
  6052. | ReturnStatement
  6053. | LabeledStatement
  6054. | BreakStatement
  6055. | ContinueStatement
  6056. | IfStatement
  6057. | SwitchStatement
  6058. | ThrowStatement
  6059. | TryStatement
  6060. | WhileStatement
  6061. | DoWhileStatement
  6062. | ForStatement
  6063. | ForInStatement
  6064. | ForOfStatement
  6065. | ExportDefaultDeclaration
  6066. )[]
  6067. ): void;
  6068. /**
  6069. * Walking iterates the statements and expressions and processes them
  6070. */
  6071. preWalkStatement(
  6072. statement:
  6073. | ImportDeclarationJavascriptParser
  6074. | ExportNamedDeclarationJavascriptParser
  6075. | ExportAllDeclarationJavascriptParser
  6076. | FunctionDeclaration
  6077. | VariableDeclaration
  6078. | ClassDeclaration
  6079. | ExpressionStatement
  6080. | BlockStatement
  6081. | StaticBlock
  6082. | EmptyStatement
  6083. | DebuggerStatement
  6084. | WithStatement
  6085. | ReturnStatement
  6086. | LabeledStatement
  6087. | BreakStatement
  6088. | ContinueStatement
  6089. | IfStatement
  6090. | SwitchStatement
  6091. | ThrowStatement
  6092. | TryStatement
  6093. | WhileStatement
  6094. | DoWhileStatement
  6095. | ForStatement
  6096. | ForInStatement
  6097. | ForOfStatement
  6098. | ExportDefaultDeclaration
  6099. ): void;
  6100. blockPreWalkStatement(
  6101. statement:
  6102. | ImportDeclarationJavascriptParser
  6103. | ExportNamedDeclarationJavascriptParser
  6104. | ExportAllDeclarationJavascriptParser
  6105. | FunctionDeclaration
  6106. | VariableDeclaration
  6107. | ClassDeclaration
  6108. | ExpressionStatement
  6109. | BlockStatement
  6110. | StaticBlock
  6111. | EmptyStatement
  6112. | DebuggerStatement
  6113. | WithStatement
  6114. | ReturnStatement
  6115. | LabeledStatement
  6116. | BreakStatement
  6117. | ContinueStatement
  6118. | IfStatement
  6119. | SwitchStatement
  6120. | ThrowStatement
  6121. | TryStatement
  6122. | WhileStatement
  6123. | DoWhileStatement
  6124. | ForStatement
  6125. | ForInStatement
  6126. | ForOfStatement
  6127. | ExportDefaultDeclaration
  6128. ): void;
  6129. walkStatement(
  6130. statement:
  6131. | ImportDeclarationJavascriptParser
  6132. | ExportNamedDeclarationJavascriptParser
  6133. | ExportAllDeclarationJavascriptParser
  6134. | FunctionDeclaration
  6135. | VariableDeclaration
  6136. | ClassDeclaration
  6137. | ExpressionStatement
  6138. | BlockStatement
  6139. | StaticBlock
  6140. | EmptyStatement
  6141. | DebuggerStatement
  6142. | WithStatement
  6143. | ReturnStatement
  6144. | LabeledStatement
  6145. | BreakStatement
  6146. | ContinueStatement
  6147. | IfStatement
  6148. | SwitchStatement
  6149. | ThrowStatement
  6150. | TryStatement
  6151. | WhileStatement
  6152. | DoWhileStatement
  6153. | ForStatement
  6154. | ForInStatement
  6155. | ForOfStatement
  6156. | ExportDefaultDeclaration
  6157. ): void;
  6158. /**
  6159. * Walks a statements that is nested within a parent statement
  6160. * and can potentially be a non-block statement.
  6161. * This enforces the nested statement to never be in ASI position.
  6162. */
  6163. walkNestedStatement(statement: Statement): void;
  6164. preWalkBlockStatement(statement: BlockStatement): void;
  6165. walkBlockStatement(statement: BlockStatement): void;
  6166. walkExpressionStatement(statement: ExpressionStatement): void;
  6167. preWalkIfStatement(statement: IfStatement): void;
  6168. walkIfStatement(statement: IfStatement): void;
  6169. preWalkLabeledStatement(statement: LabeledStatement): void;
  6170. walkLabeledStatement(statement: LabeledStatement): void;
  6171. preWalkWithStatement(statement: WithStatement): void;
  6172. walkWithStatement(statement: WithStatement): void;
  6173. preWalkSwitchStatement(statement: SwitchStatement): void;
  6174. walkSwitchStatement(statement: SwitchStatement): void;
  6175. walkTerminatingStatement(statement: ReturnStatement | ThrowStatement): void;
  6176. walkReturnStatement(statement: ReturnStatement): void;
  6177. walkThrowStatement(statement: ThrowStatement): void;
  6178. preWalkTryStatement(statement: TryStatement): void;
  6179. walkTryStatement(statement: TryStatement): void;
  6180. preWalkWhileStatement(statement: WhileStatement): void;
  6181. walkWhileStatement(statement: WhileStatement): void;
  6182. preWalkDoWhileStatement(statement: DoWhileStatement): void;
  6183. walkDoWhileStatement(statement: DoWhileStatement): void;
  6184. preWalkForStatement(statement: ForStatement): void;
  6185. walkForStatement(statement: ForStatement): void;
  6186. preWalkForInStatement(statement: ForInStatement): void;
  6187. walkForInStatement(statement: ForInStatement): void;
  6188. preWalkForOfStatement(statement: ForOfStatement): void;
  6189. walkForOfStatement(statement: ForOfStatement): void;
  6190. preWalkFunctionDeclaration(statement: FunctionDeclaration): void;
  6191. walkFunctionDeclaration(statement: FunctionDeclaration): void;
  6192. blockPreWalkExpressionStatement(statement: ExpressionStatement): void;
  6193. preWalkAssignmentExpression(expression: AssignmentExpression): void;
  6194. blockPreWalkImportDeclaration(
  6195. statement: ImportDeclarationJavascriptParser
  6196. ): void;
  6197. enterDeclaration(
  6198. declaration: Declaration,
  6199. onIdent: (arg0: string, arg1: Identifier) => void
  6200. ): void;
  6201. blockPreWalkExportNamedDeclaration(
  6202. statement: ExportNamedDeclarationJavascriptParser
  6203. ): void;
  6204. walkExportNamedDeclaration(
  6205. statement: ExportNamedDeclarationJavascriptParser
  6206. ): void;
  6207. blockPreWalkExportDefaultDeclaration(statement?: any): void;
  6208. walkExportDefaultDeclaration(statement: ExportDefaultDeclaration): void;
  6209. blockPreWalkExportAllDeclaration(
  6210. statement: ExportAllDeclarationJavascriptParser
  6211. ): void;
  6212. preWalkVariableDeclaration(statement: VariableDeclaration): void;
  6213. blockPreWalkVariableDeclaration(statement: VariableDeclaration): void;
  6214. preWalkVariableDeclarator(declarator: VariableDeclarator): void;
  6215. walkVariableDeclaration(statement: VariableDeclaration): void;
  6216. blockPreWalkClassDeclaration(statement: ClassDeclaration): void;
  6217. walkClassDeclaration(statement: ClassDeclaration): void;
  6218. preWalkSwitchCases(switchCases: SwitchCase[]): void;
  6219. walkSwitchCases(switchCases: SwitchCase[]): void;
  6220. preWalkCatchClause(catchClause: CatchClause): void;
  6221. walkCatchClause(catchClause: CatchClause): void;
  6222. walkPattern(pattern: Pattern): void;
  6223. walkAssignmentPattern(pattern: AssignmentPattern): void;
  6224. walkObjectPattern(pattern: ObjectPattern): void;
  6225. walkArrayPattern(pattern: ArrayPattern): void;
  6226. walkRestElement(pattern: RestElement): void;
  6227. walkExpressions(
  6228. expressions: (
  6229. | null
  6230. | ImportExpressionImport
  6231. | UnaryExpression
  6232. | ArrayExpression
  6233. | ArrowFunctionExpression
  6234. | AssignmentExpression
  6235. | AwaitExpression
  6236. | BinaryExpression
  6237. | SimpleCallExpression
  6238. | NewExpression
  6239. | ChainExpression
  6240. | ClassExpression
  6241. | ConditionalExpression
  6242. | FunctionExpression
  6243. | Identifier
  6244. | SimpleLiteral
  6245. | RegExpLiteral
  6246. | BigIntLiteral
  6247. | LogicalExpression
  6248. | MemberExpression
  6249. | MetaProperty
  6250. | ObjectExpression
  6251. | SequenceExpression
  6252. | TaggedTemplateExpression
  6253. | TemplateLiteral
  6254. | ThisExpression
  6255. | UpdateExpression
  6256. | YieldExpression
  6257. | SpreadElement
  6258. )[]
  6259. ): void;
  6260. walkExpression(expression?: any): void;
  6261. walkAwaitExpression(expression: AwaitExpression): void;
  6262. walkArrayExpression(expression: ArrayExpression): void;
  6263. walkSpreadElement(expression: SpreadElement): void;
  6264. walkObjectExpression(expression: ObjectExpression): void;
  6265. walkProperty(prop: SpreadElement | Property): void;
  6266. walkFunctionExpression(expression: FunctionExpression): void;
  6267. walkArrowFunctionExpression(expression: ArrowFunctionExpression): void;
  6268. walkSequenceExpression(expression: SequenceExpression): void;
  6269. walkUpdateExpression(expression: UpdateExpression): void;
  6270. walkUnaryExpression(expression: UnaryExpression): void;
  6271. walkLeftRightExpression(
  6272. expression: BinaryExpression | LogicalExpression
  6273. ): void;
  6274. walkBinaryExpression(expression: BinaryExpression): void;
  6275. walkLogicalExpression(expression: LogicalExpression): void;
  6276. walkAssignmentExpression(expression: AssignmentExpression): void;
  6277. walkConditionalExpression(expression: ConditionalExpression): void;
  6278. walkNewExpression(expression: NewExpression): void;
  6279. walkYieldExpression(expression: YieldExpression): void;
  6280. walkTemplateLiteral(expression: TemplateLiteral): void;
  6281. walkTaggedTemplateExpression(expression: TaggedTemplateExpression): void;
  6282. walkClassExpression(expression: ClassExpression): void;
  6283. walkChainExpression(expression: ChainExpression): void;
  6284. walkImportExpression(expression: ImportExpressionJavascriptParser): void;
  6285. walkCallExpression(expression: CallExpression): void;
  6286. walkMemberExpression(expression: MemberExpression): void;
  6287. walkMemberExpressionWithExpressionName(
  6288. expression: any,
  6289. name: string,
  6290. rootInfo: string | VariableInfo,
  6291. members: string[],
  6292. onUnhandled?: any
  6293. ): void;
  6294. walkThisExpression(expression: ThisExpression): void;
  6295. walkIdentifier(expression: Identifier): void;
  6296. walkMetaProperty(metaProperty: MetaProperty): void;
  6297. callHooksForExpression<T, R>(
  6298. hookMap: HookMap<SyncBailHook<T, R>>,
  6299. expr:
  6300. | ImportExpressionImport
  6301. | UnaryExpression
  6302. | ArrayExpression
  6303. | ArrowFunctionExpression
  6304. | AssignmentExpression
  6305. | AwaitExpression
  6306. | BinaryExpression
  6307. | SimpleCallExpression
  6308. | NewExpression
  6309. | ChainExpression
  6310. | ClassExpression
  6311. | ConditionalExpression
  6312. | FunctionExpression
  6313. | Identifier
  6314. | SimpleLiteral
  6315. | RegExpLiteral
  6316. | BigIntLiteral
  6317. | LogicalExpression
  6318. | MemberExpression
  6319. | MetaProperty
  6320. | ObjectExpression
  6321. | SequenceExpression
  6322. | TaggedTemplateExpression
  6323. | TemplateLiteral
  6324. | ThisExpression
  6325. | UpdateExpression
  6326. | YieldExpression
  6327. | Super,
  6328. ...args: AsArray<T>
  6329. ): undefined | R;
  6330. callHooksForExpressionWithFallback<T, R>(
  6331. hookMap: HookMap<SyncBailHook<T, R>>,
  6332. expr:
  6333. | ImportExpressionImport
  6334. | UnaryExpression
  6335. | ArrayExpression
  6336. | ArrowFunctionExpression
  6337. | AssignmentExpression
  6338. | AwaitExpression
  6339. | BinaryExpression
  6340. | SimpleCallExpression
  6341. | NewExpression
  6342. | ChainExpression
  6343. | ClassExpression
  6344. | ConditionalExpression
  6345. | FunctionExpression
  6346. | Identifier
  6347. | SimpleLiteral
  6348. | RegExpLiteral
  6349. | BigIntLiteral
  6350. | LogicalExpression
  6351. | MemberExpression
  6352. | MetaProperty
  6353. | ObjectExpression
  6354. | SequenceExpression
  6355. | TaggedTemplateExpression
  6356. | TemplateLiteral
  6357. | ThisExpression
  6358. | UpdateExpression
  6359. | YieldExpression
  6360. | Super,
  6361. fallback:
  6362. | undefined
  6363. | ((
  6364. arg0: string,
  6365. arg1: string | VariableInfo | ScopeInfo,
  6366. arg2: () => string[]
  6367. ) => any),
  6368. defined: undefined | ((arg0: string) => any),
  6369. ...args: AsArray<T>
  6370. ): undefined | R;
  6371. callHooksForName<T, R>(
  6372. hookMap: HookMap<SyncBailHook<T, R>>,
  6373. name: string,
  6374. ...args: AsArray<T>
  6375. ): undefined | R;
  6376. callHooksForInfo<T, R>(
  6377. hookMap: HookMap<SyncBailHook<T, R>>,
  6378. info: ExportedVariableInfo,
  6379. ...args: AsArray<T>
  6380. ): undefined | R;
  6381. callHooksForInfoWithFallback<T, R>(
  6382. hookMap: HookMap<SyncBailHook<T, R>>,
  6383. info: ExportedVariableInfo,
  6384. fallback: undefined | ((arg0: string) => any),
  6385. defined: undefined | ((arg0?: string) => any),
  6386. ...args: AsArray<T>
  6387. ): undefined | R;
  6388. callHooksForNameWithFallback<T, R>(
  6389. hookMap: HookMap<SyncBailHook<T, R>>,
  6390. name: string,
  6391. fallback: undefined | ((arg0: string) => any),
  6392. defined: undefined | (() => any),
  6393. ...args: AsArray<T>
  6394. ): undefined | R;
  6395. inScope(params: any, fn: () => void): void;
  6396. inClassScope(hasThis: boolean, params: Identifier[], fn: () => void): void;
  6397. inFunctionScope(
  6398. hasThis: boolean,
  6399. params: (
  6400. | string
  6401. | Identifier
  6402. | MemberExpression
  6403. | ObjectPattern
  6404. | ArrayPattern
  6405. | RestElement
  6406. | AssignmentPattern
  6407. )[],
  6408. fn: () => void
  6409. ): void;
  6410. inBlockScope(fn: () => void): void;
  6411. detectMode(
  6412. statements: (
  6413. | ImportDeclarationJavascriptParser
  6414. | ExportNamedDeclarationJavascriptParser
  6415. | ExportAllDeclarationJavascriptParser
  6416. | FunctionDeclaration
  6417. | VariableDeclaration
  6418. | ClassDeclaration
  6419. | ExpressionStatement
  6420. | BlockStatement
  6421. | StaticBlock
  6422. | EmptyStatement
  6423. | DebuggerStatement
  6424. | WithStatement
  6425. | ReturnStatement
  6426. | LabeledStatement
  6427. | BreakStatement
  6428. | ContinueStatement
  6429. | IfStatement
  6430. | SwitchStatement
  6431. | ThrowStatement
  6432. | TryStatement
  6433. | WhileStatement
  6434. | DoWhileStatement
  6435. | ForStatement
  6436. | ForInStatement
  6437. | ForOfStatement
  6438. | ExportDefaultDeclaration
  6439. | Directive
  6440. )[]
  6441. ): void;
  6442. enterPatterns(
  6443. patterns: (
  6444. | string
  6445. | Identifier
  6446. | MemberExpression
  6447. | ObjectPattern
  6448. | ArrayPattern
  6449. | RestElement
  6450. | AssignmentPattern
  6451. | Property
  6452. )[],
  6453. onIdent: (arg0: string) => void
  6454. ): void;
  6455. enterPattern(
  6456. pattern:
  6457. | Identifier
  6458. | MemberExpression
  6459. | ObjectPattern
  6460. | ArrayPattern
  6461. | RestElement
  6462. | AssignmentPattern
  6463. | Property,
  6464. onIdent: (arg0: string, arg1: Identifier) => void
  6465. ): void;
  6466. enterIdentifier(
  6467. pattern: Identifier,
  6468. onIdent: (arg0: string, arg1: Identifier) => void
  6469. ): void;
  6470. enterObjectPattern(
  6471. pattern: ObjectPattern,
  6472. onIdent: (arg0: string, arg1: Identifier) => void
  6473. ): void;
  6474. enterArrayPattern(
  6475. pattern: ArrayPattern,
  6476. onIdent: (arg0: string, arg1: Identifier) => void
  6477. ): void;
  6478. enterRestElement(
  6479. pattern: RestElement,
  6480. onIdent: (arg0: string, arg1: Identifier) => void
  6481. ): void;
  6482. enterAssignmentPattern(
  6483. pattern: AssignmentPattern,
  6484. onIdent: (arg0: string, arg1: Identifier) => void
  6485. ): void;
  6486. evaluateExpression(
  6487. expression:
  6488. | ImportExpressionImport
  6489. | UnaryExpression
  6490. | ArrayExpression
  6491. | ArrowFunctionExpression
  6492. | AssignmentExpression
  6493. | AwaitExpression
  6494. | BinaryExpression
  6495. | SimpleCallExpression
  6496. | NewExpression
  6497. | ChainExpression
  6498. | ClassExpression
  6499. | ConditionalExpression
  6500. | FunctionExpression
  6501. | Identifier
  6502. | SimpleLiteral
  6503. | RegExpLiteral
  6504. | BigIntLiteral
  6505. | LogicalExpression
  6506. | MemberExpression
  6507. | MetaProperty
  6508. | ObjectExpression
  6509. | SequenceExpression
  6510. | TaggedTemplateExpression
  6511. | TemplateLiteral
  6512. | ThisExpression
  6513. | UpdateExpression
  6514. | YieldExpression
  6515. | SpreadElement
  6516. | PrivateIdentifier
  6517. ): BasicEvaluatedExpression;
  6518. parseString(expression: Expression): string;
  6519. parseCalculatedString(expression: Expression): {
  6520. range?: [number, number];
  6521. value: string;
  6522. code: boolean;
  6523. conditional: any;
  6524. };
  6525. evaluate(source: string): BasicEvaluatedExpression;
  6526. isPure(
  6527. expr:
  6528. | undefined
  6529. | null
  6530. | ImportExpressionImport
  6531. | UnaryExpression
  6532. | ArrayExpression
  6533. | ArrowFunctionExpression
  6534. | AssignmentExpression
  6535. | AwaitExpression
  6536. | BinaryExpression
  6537. | SimpleCallExpression
  6538. | NewExpression
  6539. | ChainExpression
  6540. | ClassExpression
  6541. | ConditionalExpression
  6542. | FunctionExpression
  6543. | Identifier
  6544. | SimpleLiteral
  6545. | RegExpLiteral
  6546. | BigIntLiteral
  6547. | LogicalExpression
  6548. | MemberExpression
  6549. | MetaProperty
  6550. | ObjectExpression
  6551. | SequenceExpression
  6552. | TaggedTemplateExpression
  6553. | TemplateLiteral
  6554. | ThisExpression
  6555. | UpdateExpression
  6556. | YieldExpression
  6557. | PrivateIdentifier
  6558. | FunctionDeclaration
  6559. | VariableDeclaration
  6560. | ClassDeclaration,
  6561. commentsStartPos: number
  6562. ): boolean;
  6563. getComments(range: [number, number]): Comment[];
  6564. isAsiPosition(pos: number): boolean;
  6565. setAsiPosition(pos: number): void;
  6566. unsetAsiPosition(pos: number): void;
  6567. isStatementLevelExpression(expr: Expression): boolean;
  6568. getTagData(name: string, tag: symbol): any;
  6569. tagVariable(name: string, tag: symbol, data?: any): void;
  6570. defineVariable(name: string): void;
  6571. undefineVariable(name: string): void;
  6572. isVariableDefined(name: string): boolean;
  6573. getVariableInfo(name: string): ExportedVariableInfo;
  6574. setVariable(name: string, variableInfo: ExportedVariableInfo): void;
  6575. evaluatedVariable(tagInfo: TagInfo): VariableInfo;
  6576. parseCommentOptions(range: [number, number]): {
  6577. options: null | Record<string, any>;
  6578. errors: null | (Error & { comment: Comment })[];
  6579. };
  6580. extractMemberExpressionChain(
  6581. expression:
  6582. | ImportExpressionImport
  6583. | UnaryExpression
  6584. | ArrayExpression
  6585. | ArrowFunctionExpression
  6586. | AssignmentExpression
  6587. | AwaitExpression
  6588. | BinaryExpression
  6589. | SimpleCallExpression
  6590. | NewExpression
  6591. | ChainExpression
  6592. | ClassExpression
  6593. | ConditionalExpression
  6594. | FunctionExpression
  6595. | Identifier
  6596. | SimpleLiteral
  6597. | RegExpLiteral
  6598. | BigIntLiteral
  6599. | LogicalExpression
  6600. | MemberExpression
  6601. | MetaProperty
  6602. | ObjectExpression
  6603. | SequenceExpression
  6604. | TaggedTemplateExpression
  6605. | TemplateLiteral
  6606. | ThisExpression
  6607. | UpdateExpression
  6608. | YieldExpression
  6609. | Super
  6610. ): {
  6611. members: string[];
  6612. object:
  6613. | ImportExpressionImport
  6614. | UnaryExpression
  6615. | ArrayExpression
  6616. | ArrowFunctionExpression
  6617. | AssignmentExpression
  6618. | AwaitExpression
  6619. | BinaryExpression
  6620. | SimpleCallExpression
  6621. | NewExpression
  6622. | ChainExpression
  6623. | ClassExpression
  6624. | ConditionalExpression
  6625. | FunctionExpression
  6626. | Identifier
  6627. | SimpleLiteral
  6628. | RegExpLiteral
  6629. | BigIntLiteral
  6630. | LogicalExpression
  6631. | MemberExpression
  6632. | MetaProperty
  6633. | ObjectExpression
  6634. | SequenceExpression
  6635. | TaggedTemplateExpression
  6636. | TemplateLiteral
  6637. | ThisExpression
  6638. | UpdateExpression
  6639. | YieldExpression
  6640. | Super;
  6641. membersOptionals: boolean[];
  6642. memberRanges: [number, number][];
  6643. };
  6644. getFreeInfoFromVariable(
  6645. varName: string
  6646. ): undefined | { name: string; info: string | VariableInfo };
  6647. getMemberExpressionInfo(
  6648. expression:
  6649. | ImportExpressionImport
  6650. | UnaryExpression
  6651. | ArrayExpression
  6652. | ArrowFunctionExpression
  6653. | AssignmentExpression
  6654. | AwaitExpression
  6655. | BinaryExpression
  6656. | SimpleCallExpression
  6657. | NewExpression
  6658. | ChainExpression
  6659. | ClassExpression
  6660. | ConditionalExpression
  6661. | FunctionExpression
  6662. | Identifier
  6663. | SimpleLiteral
  6664. | RegExpLiteral
  6665. | BigIntLiteral
  6666. | LogicalExpression
  6667. | MemberExpression
  6668. | MetaProperty
  6669. | ObjectExpression
  6670. | SequenceExpression
  6671. | TaggedTemplateExpression
  6672. | TemplateLiteral
  6673. | ThisExpression
  6674. | UpdateExpression
  6675. | YieldExpression
  6676. | Super,
  6677. allowedTypes: number
  6678. ): undefined | CallExpressionInfo | ExpressionExpressionInfo;
  6679. getNameForExpression(
  6680. expression: MemberExpression
  6681. ):
  6682. | undefined
  6683. | {
  6684. name: string;
  6685. rootInfo: ExportedVariableInfo;
  6686. getMembers: () => string[];
  6687. };
  6688. static ALLOWED_MEMBER_TYPES_ALL: 3;
  6689. static ALLOWED_MEMBER_TYPES_EXPRESSION: 2;
  6690. static ALLOWED_MEMBER_TYPES_CALL_EXPRESSION: 1;
  6691. static getImportAttributes: (
  6692. node:
  6693. | ImportDeclarationJavascriptParser
  6694. | ExportNamedDeclarationJavascriptParser
  6695. | ExportAllDeclarationJavascriptParser
  6696. | ImportExpressionJavascriptParser
  6697. ) => undefined | ImportAttributes;
  6698. static VariableInfo: typeof VariableInfo;
  6699. }
  6700. /**
  6701. * Parser options for javascript modules.
  6702. */
  6703. declare interface JavascriptParserOptions {
  6704. [index: string]: any;
  6705. /**
  6706. * Set the value of `require.amd` and `define.amd`. Or disable AMD support.
  6707. */
  6708. amd?: false | { [index: string]: any };
  6709. /**
  6710. * Enable/disable special handling for browserify bundles.
  6711. */
  6712. browserify?: boolean;
  6713. /**
  6714. * Enable/disable parsing of CommonJs syntax.
  6715. */
  6716. commonjs?: boolean;
  6717. /**
  6718. * Enable/disable parsing of magic comments in CommonJs syntax.
  6719. */
  6720. commonjsMagicComments?: boolean;
  6721. /**
  6722. * Enable/disable parsing "import { createRequire } from "module"" and evaluating createRequire().
  6723. */
  6724. createRequire?: string | boolean;
  6725. /**
  6726. * Specifies global fetchPriority for dynamic import.
  6727. */
  6728. dynamicImportFetchPriority?: false | "auto" | "low" | "high";
  6729. /**
  6730. * Specifies global mode for dynamic import.
  6731. */
  6732. dynamicImportMode?: "weak" | "eager" | "lazy" | "lazy-once";
  6733. /**
  6734. * Specifies global prefetch for dynamic import.
  6735. */
  6736. dynamicImportPrefetch?: number | boolean;
  6737. /**
  6738. * Specifies global preload for dynamic import.
  6739. */
  6740. dynamicImportPreload?: number | boolean;
  6741. /**
  6742. * Specifies the behavior of invalid export names in "import ... from ..." and "export ... from ...".
  6743. */
  6744. exportsPresence?: false | "auto" | "error" | "warn";
  6745. /**
  6746. * Enable warnings for full dynamic dependencies.
  6747. */
  6748. exprContextCritical?: boolean;
  6749. /**
  6750. * Enable recursive directory lookup for full dynamic dependencies.
  6751. */
  6752. exprContextRecursive?: boolean;
  6753. /**
  6754. * Sets the default regular expression for full dynamic dependencies.
  6755. */
  6756. exprContextRegExp?: boolean | RegExp;
  6757. /**
  6758. * Set the default request for full dynamic dependencies.
  6759. */
  6760. exprContextRequest?: string;
  6761. /**
  6762. * Enable/disable parsing of EcmaScript Modules syntax.
  6763. */
  6764. harmony?: boolean;
  6765. /**
  6766. * Enable/disable parsing of import() syntax.
  6767. */
  6768. import?: boolean;
  6769. /**
  6770. * Specifies the behavior of invalid export names in "import ... from ...".
  6771. */
  6772. importExportsPresence?: false | "auto" | "error" | "warn";
  6773. /**
  6774. * Enable/disable evaluating import.meta.
  6775. */
  6776. importMeta?: boolean;
  6777. /**
  6778. * Enable/disable evaluating import.meta.webpackContext.
  6779. */
  6780. importMetaContext?: boolean;
  6781. /**
  6782. * Include polyfills or mocks for various node stuff.
  6783. */
  6784. node?: false | NodeOptions;
  6785. /**
  6786. * Override the module to strict or non-strict. This may affect the behavior of the module (some behaviors differ between strict and non-strict), so please configure this option carefully.
  6787. */
  6788. overrideStrict?: "strict" | "non-strict";
  6789. /**
  6790. * Specifies the behavior of invalid export names in "export ... from ...". This might be useful to disable during the migration from "export ... from ..." to "export type ... from ..." when reexporting types in TypeScript.
  6791. */
  6792. reexportExportsPresence?: false | "auto" | "error" | "warn";
  6793. /**
  6794. * Enable/disable parsing of require.context syntax.
  6795. */
  6796. requireContext?: boolean;
  6797. /**
  6798. * Enable/disable parsing of require.ensure syntax.
  6799. */
  6800. requireEnsure?: boolean;
  6801. /**
  6802. * Enable/disable parsing of require.include syntax.
  6803. */
  6804. requireInclude?: boolean;
  6805. /**
  6806. * Enable/disable parsing of require.js special syntax like require.config, requirejs.config, require.version and requirejs.onError.
  6807. */
  6808. requireJs?: boolean;
  6809. /**
  6810. * Deprecated in favor of "exportsPresence". Emit errors instead of warnings when imported names don't exist in imported module.
  6811. */
  6812. strictExportPresence?: boolean;
  6813. /**
  6814. * Handle the this context correctly according to the spec for namespace objects.
  6815. */
  6816. strictThisContextOnImports?: boolean;
  6817. /**
  6818. * Enable/disable parsing of System.js special syntax like System.import, System.get, System.set and System.register.
  6819. */
  6820. system?: boolean;
  6821. /**
  6822. * Enable warnings when using the require function in a not statically analyse-able way.
  6823. */
  6824. unknownContextCritical?: boolean;
  6825. /**
  6826. * Enable recursive directory lookup when using the require function in a not statically analyse-able way.
  6827. */
  6828. unknownContextRecursive?: boolean;
  6829. /**
  6830. * Sets the regular expression when using the require function in a not statically analyse-able way.
  6831. */
  6832. unknownContextRegExp?: boolean | RegExp;
  6833. /**
  6834. * Sets the request when using the require function in a not statically analyse-able way.
  6835. */
  6836. unknownContextRequest?: string;
  6837. /**
  6838. * Enable/disable parsing of new URL() syntax.
  6839. */
  6840. url?: boolean | "relative";
  6841. /**
  6842. * Disable or configure parsing of WebWorker syntax like new Worker() or navigator.serviceWorker.register().
  6843. */
  6844. worker?: boolean | string[];
  6845. /**
  6846. * Enable warnings for partial dynamic dependencies.
  6847. */
  6848. wrappedContextCritical?: boolean;
  6849. /**
  6850. * Enable recursive directory lookup for partial dynamic dependencies.
  6851. */
  6852. wrappedContextRecursive?: boolean;
  6853. /**
  6854. * Set the inner regular expression for partial dynamic dependencies.
  6855. */
  6856. wrappedContextRegExp?: RegExp;
  6857. }
  6858. type JsonObjectFs = { [index: string]: JsonValueFs } & {
  6859. [index: string]:
  6860. | undefined
  6861. | null
  6862. | string
  6863. | number
  6864. | boolean
  6865. | JsonObjectFs
  6866. | JsonValueFs[];
  6867. };
  6868. type JsonObjectTypes = { [index: string]: JsonValueTypes } & {
  6869. [index: string]:
  6870. | undefined
  6871. | null
  6872. | string
  6873. | number
  6874. | boolean
  6875. | JsonObjectTypes
  6876. | JsonValueTypes[];
  6877. };
  6878. type JsonValueFs =
  6879. | null
  6880. | string
  6881. | number
  6882. | boolean
  6883. | JsonObjectFs
  6884. | JsonValueFs[];
  6885. type JsonValueTypes =
  6886. | null
  6887. | string
  6888. | number
  6889. | boolean
  6890. | JsonObjectTypes
  6891. | JsonValueTypes[];
  6892. declare class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
  6893. constructor(runtimeRequirements: ReadonlySet<string>);
  6894. static getCompilationHooks(
  6895. compilation: Compilation
  6896. ): JsonpCompilationPluginHooks;
  6897. /**
  6898. * Runtime modules without any dependencies to other runtime modules
  6899. */
  6900. static STAGE_NORMAL: number;
  6901. /**
  6902. * Runtime modules with simple dependencies on other runtime modules
  6903. */
  6904. static STAGE_BASIC: number;
  6905. /**
  6906. * Runtime modules which attach to handlers of other runtime modules
  6907. */
  6908. static STAGE_ATTACH: number;
  6909. /**
  6910. * Runtime modules which trigger actions on bootstrap
  6911. */
  6912. static STAGE_TRIGGER: number;
  6913. }
  6914. declare interface JsonpCompilationPluginHooks {
  6915. linkPreload: SyncWaterfallHook<[string, Chunk]>;
  6916. linkPrefetch: SyncWaterfallHook<[string, Chunk]>;
  6917. }
  6918. declare class JsonpTemplatePlugin {
  6919. constructor();
  6920. /**
  6921. * Apply the plugin
  6922. */
  6923. apply(compiler: Compiler): void;
  6924. static getCompilationHooks(
  6925. compilation: Compilation
  6926. ): JsonpCompilationPluginHooks;
  6927. }
  6928. declare interface KnownAssetInfo {
  6929. /**
  6930. * true, if the asset can be long term cached forever (contains a hash)
  6931. */
  6932. immutable?: boolean;
  6933. /**
  6934. * whether the asset is minimized
  6935. */
  6936. minimized?: boolean;
  6937. /**
  6938. * the value(s) of the full hash used for this asset
  6939. */
  6940. fullhash?: string | string[];
  6941. /**
  6942. * the value(s) of the chunk hash used for this asset
  6943. */
  6944. chunkhash?: string | string[];
  6945. /**
  6946. * the value(s) of the module hash used for this asset
  6947. */
  6948. modulehash?: string | string[];
  6949. /**
  6950. * the value(s) of the content hash used for this asset
  6951. */
  6952. contenthash?: string | string[];
  6953. /**
  6954. * when asset was created from a source file (potentially transformed), the original filename relative to compilation context
  6955. */
  6956. sourceFilename?: string;
  6957. /**
  6958. * size in bytes, only set after asset has been emitted
  6959. */
  6960. size?: number;
  6961. /**
  6962. * true, when asset is only used for development and doesn't count towards user-facing assets
  6963. */
  6964. development?: boolean;
  6965. /**
  6966. * true, when asset ships data for updating an existing application (HMR)
  6967. */
  6968. hotModuleReplacement?: boolean;
  6969. /**
  6970. * true, when asset is javascript and an ESM
  6971. */
  6972. javascriptModule?: boolean;
  6973. /**
  6974. * object of pointers to other assets, keyed by type of relation (only points from parent to child)
  6975. */
  6976. related?: Record<string, string | string[]>;
  6977. }
  6978. declare interface KnownBuildInfo {
  6979. cacheable?: boolean;
  6980. parsed?: boolean;
  6981. fileDependencies?: LazySet<string>;
  6982. contextDependencies?: LazySet<string>;
  6983. missingDependencies?: LazySet<string>;
  6984. buildDependencies?: LazySet<string>;
  6985. valueDependencies?: Map<string, string | Set<string>>;
  6986. hash?: any;
  6987. assets?: Record<string, Source>;
  6988. assetsInfo?: Map<string, undefined | AssetInfo>;
  6989. snapshot?: null | Snapshot;
  6990. }
  6991. declare interface KnownBuildMeta {
  6992. moduleArgument?: string;
  6993. exportsArgument?: string;
  6994. strict?: boolean;
  6995. moduleConcatenationBailout?: string;
  6996. exportsType?: "namespace" | "dynamic" | "default" | "flagged";
  6997. defaultObject?: false | "redirect" | "redirect-warn";
  6998. strictHarmonyModule?: boolean;
  6999. async?: boolean;
  7000. sideEffectFree?: boolean;
  7001. exportsFinalName?: Record<string, string>;
  7002. }
  7003. declare interface KnownCreateStatsOptionsContext {
  7004. forToString?: boolean;
  7005. }
  7006. declare interface KnownHooks {
  7007. resolveStep: SyncHook<
  7008. [
  7009. AsyncSeriesBailHook<
  7010. [ResolveRequest, ResolveContext],
  7011. null | ResolveRequest
  7012. >,
  7013. ResolveRequest
  7014. ]
  7015. >;
  7016. noResolve: SyncHook<[ResolveRequest, Error]>;
  7017. resolve: AsyncSeriesBailHook<
  7018. [ResolveRequest, ResolveContext],
  7019. null | ResolveRequest
  7020. >;
  7021. result: AsyncSeriesHook<[ResolveRequest, ResolveContext]>;
  7022. }
  7023. declare interface KnownNormalizedStatsOptions {
  7024. context: string;
  7025. requestShortener: RequestShortener;
  7026. chunksSort: string;
  7027. modulesSort: string;
  7028. chunkModulesSort: string;
  7029. nestedModulesSort: string;
  7030. assetsSort: string;
  7031. ids: boolean;
  7032. cachedAssets: boolean;
  7033. groupAssetsByEmitStatus: boolean;
  7034. groupAssetsByPath: boolean;
  7035. groupAssetsByExtension: boolean;
  7036. assetsSpace: number;
  7037. excludeAssets: ((value: string, asset: StatsAsset) => boolean)[];
  7038. excludeModules: ((
  7039. name: string,
  7040. module: StatsModule,
  7041. type: "module" | "chunk" | "root-of-chunk" | "nested"
  7042. ) => boolean)[];
  7043. warningsFilter: ((warning: StatsError, textValue: string) => boolean)[];
  7044. cachedModules: boolean;
  7045. orphanModules: boolean;
  7046. dependentModules: boolean;
  7047. runtimeModules: boolean;
  7048. groupModulesByCacheStatus: boolean;
  7049. groupModulesByLayer: boolean;
  7050. groupModulesByAttributes: boolean;
  7051. groupModulesByPath: boolean;
  7052. groupModulesByExtension: boolean;
  7053. groupModulesByType: boolean;
  7054. entrypoints: boolean | "auto";
  7055. chunkGroups: boolean;
  7056. chunkGroupAuxiliary: boolean;
  7057. chunkGroupChildren: boolean;
  7058. chunkGroupMaxAssets: number;
  7059. modulesSpace: number;
  7060. chunkModulesSpace: number;
  7061. nestedModulesSpace: number;
  7062. logging: false | "none" | "error" | "warn" | "info" | "log" | "verbose";
  7063. loggingDebug: ((value: string) => boolean)[];
  7064. loggingTrace: boolean;
  7065. }
  7066. declare interface KnownStatsAsset {
  7067. type: string;
  7068. name: string;
  7069. info: AssetInfo;
  7070. size: number;
  7071. emitted: boolean;
  7072. comparedForEmit: boolean;
  7073. cached: boolean;
  7074. related?: StatsAsset[];
  7075. chunkNames?: (string | number)[];
  7076. chunkIdHints?: (string | number)[];
  7077. chunks?: (string | number)[];
  7078. auxiliaryChunkNames?: (string | number)[];
  7079. auxiliaryChunks?: (string | number)[];
  7080. auxiliaryChunkIdHints?: (string | number)[];
  7081. filteredRelated?: number;
  7082. isOverSizeLimit?: boolean;
  7083. }
  7084. declare interface KnownStatsChunk {
  7085. rendered: boolean;
  7086. initial: boolean;
  7087. entry: boolean;
  7088. recorded: boolean;
  7089. reason?: string;
  7090. size: number;
  7091. sizes: Record<string, number>;
  7092. names: string[];
  7093. idHints: string[];
  7094. runtime?: string[];
  7095. files: string[];
  7096. auxiliaryFiles: string[];
  7097. hash: string;
  7098. childrenByOrder: Record<string, (string | number)[]>;
  7099. id?: string | number;
  7100. siblings?: (string | number)[];
  7101. parents?: (string | number)[];
  7102. children?: (string | number)[];
  7103. modules?: StatsModule[];
  7104. filteredModules?: number;
  7105. origins?: StatsChunkOrigin[];
  7106. }
  7107. declare interface KnownStatsChunkGroup {
  7108. name?: null | string;
  7109. chunks?: (string | number)[];
  7110. assets?: { name: string; size?: number }[];
  7111. filteredAssets?: number;
  7112. assetsSize?: number;
  7113. auxiliaryAssets?: { name: string; size?: number }[];
  7114. filteredAuxiliaryAssets?: number;
  7115. auxiliaryAssetsSize?: number;
  7116. children?: { [index: string]: StatsChunkGroup[] };
  7117. childAssets?: { [index: string]: string[] };
  7118. isOverSizeLimit?: boolean;
  7119. }
  7120. declare interface KnownStatsChunkOrigin {
  7121. module: string;
  7122. moduleIdentifier: string;
  7123. moduleName: string;
  7124. loc: string;
  7125. request: string;
  7126. moduleId?: string | number;
  7127. }
  7128. declare interface KnownStatsCompilation {
  7129. env?: any;
  7130. name?: string;
  7131. hash?: string;
  7132. version?: string;
  7133. time?: number;
  7134. builtAt?: number;
  7135. needAdditionalPass?: boolean;
  7136. publicPath?: string;
  7137. outputPath?: string;
  7138. assetsByChunkName?: Record<string, string[]>;
  7139. assets?: StatsAsset[];
  7140. filteredAssets?: number;
  7141. chunks?: StatsChunk[];
  7142. modules?: StatsModule[];
  7143. filteredModules?: number;
  7144. entrypoints?: Record<string, StatsChunkGroup>;
  7145. namedChunkGroups?: Record<string, StatsChunkGroup>;
  7146. errors?: StatsError[];
  7147. errorsCount?: number;
  7148. warnings?: StatsError[];
  7149. warningsCount?: number;
  7150. children?: StatsCompilation[];
  7151. logging?: Record<string, StatsLogging>;
  7152. }
  7153. declare interface KnownStatsError {
  7154. message: string;
  7155. chunkName?: string;
  7156. chunkEntry?: boolean;
  7157. chunkInitial?: boolean;
  7158. file?: string;
  7159. moduleIdentifier?: string;
  7160. moduleName?: string;
  7161. loc?: string;
  7162. chunkId?: string | number;
  7163. moduleId?: string | number;
  7164. moduleTrace?: StatsModuleTraceItem[];
  7165. details?: any;
  7166. stack?: string;
  7167. }
  7168. declare interface KnownStatsFactoryContext {
  7169. type: string;
  7170. makePathsRelative: (arg0: string) => string;
  7171. compilation: Compilation;
  7172. rootModules: Set<Module>;
  7173. compilationFileToChunks: Map<string, Chunk[]>;
  7174. compilationAuxiliaryFileToChunks: Map<string, Chunk[]>;
  7175. runtime: RuntimeSpec;
  7176. cachedGetErrors: (arg0: Compilation) => WebpackError[];
  7177. cachedGetWarnings: (arg0: Compilation) => WebpackError[];
  7178. }
  7179. declare interface KnownStatsLogging {
  7180. entries: StatsLoggingEntry[];
  7181. filteredEntries: number;
  7182. debug: boolean;
  7183. }
  7184. declare interface KnownStatsLoggingEntry {
  7185. type: string;
  7186. message?: string;
  7187. trace?: string[];
  7188. children?: StatsLoggingEntry[];
  7189. args?: any[];
  7190. time?: number;
  7191. }
  7192. declare interface KnownStatsModule {
  7193. type?: string;
  7194. moduleType?: string;
  7195. layer?: null | string;
  7196. identifier?: string;
  7197. name?: string;
  7198. nameForCondition?: null | string;
  7199. index?: number;
  7200. preOrderIndex?: number;
  7201. index2?: number;
  7202. postOrderIndex?: number;
  7203. size?: number;
  7204. sizes?: { [index: string]: number };
  7205. cacheable?: boolean;
  7206. built?: boolean;
  7207. codeGenerated?: boolean;
  7208. buildTimeExecuted?: boolean;
  7209. cached?: boolean;
  7210. optional?: boolean;
  7211. orphan?: boolean;
  7212. id?: string | number;
  7213. issuerId?: null | string | number;
  7214. chunks?: (string | number)[];
  7215. assets?: (string | number)[];
  7216. dependent?: boolean;
  7217. issuer?: null | string;
  7218. issuerName?: null | string;
  7219. issuerPath?: StatsModuleIssuer[];
  7220. failed?: boolean;
  7221. errors?: number;
  7222. warnings?: number;
  7223. profile?: StatsProfile;
  7224. reasons?: StatsModuleReason[];
  7225. usedExports?: null | boolean | string[];
  7226. providedExports?: null | string[];
  7227. optimizationBailout?: string[];
  7228. depth?: null | number;
  7229. modules?: StatsModule[];
  7230. filteredModules?: number;
  7231. source?: string | Buffer;
  7232. }
  7233. declare interface KnownStatsModuleIssuer {
  7234. identifier: string;
  7235. name: string;
  7236. id?: string | number;
  7237. profile: StatsProfile;
  7238. }
  7239. declare interface KnownStatsModuleReason {
  7240. moduleIdentifier: null | string;
  7241. module: null | string;
  7242. moduleName: null | string;
  7243. resolvedModuleIdentifier: null | string;
  7244. resolvedModule: null | string;
  7245. type: null | string;
  7246. active: boolean;
  7247. explanation: null | string;
  7248. userRequest: null | string;
  7249. loc?: null | string;
  7250. moduleId?: null | string | number;
  7251. resolvedModuleId?: null | string | number;
  7252. }
  7253. declare interface KnownStatsModuleTraceDependency {
  7254. loc?: string;
  7255. }
  7256. declare interface KnownStatsModuleTraceItem {
  7257. originIdentifier?: string;
  7258. originName?: string;
  7259. moduleIdentifier?: string;
  7260. moduleName?: string;
  7261. dependencies?: StatsModuleTraceDependency[];
  7262. originId?: string | number;
  7263. moduleId?: string | number;
  7264. }
  7265. declare interface KnownStatsPrinterColorFn {
  7266. bold?: (str: string) => string;
  7267. yellow?: (str: string) => string;
  7268. red?: (str: string) => string;
  7269. green?: (str: string) => string;
  7270. magenta?: (str: string) => string;
  7271. cyan?: (str: string) => string;
  7272. }
  7273. declare interface KnownStatsPrinterContext {
  7274. type?: string;
  7275. compilation?: StatsCompilation;
  7276. chunkGroup?: StatsChunkGroup;
  7277. chunkGroupKind?: string;
  7278. asset?: StatsAsset;
  7279. module?: StatsModule;
  7280. chunk?: StatsChunk;
  7281. moduleReason?: StatsModuleReason;
  7282. moduleIssuer?: StatsModuleIssuer;
  7283. error?: StatsError;
  7284. profile?: StatsProfile;
  7285. logging?: StatsLogging;
  7286. moduleTraceItem?: StatsModuleTraceItem;
  7287. moduleTraceDependency?: StatsModuleTraceDependency;
  7288. }
  7289. declare interface KnownStatsPrinterFormaters {
  7290. formatFilename?: (file: string, oversize?: boolean) => string;
  7291. formatModuleId?: (id: string) => string;
  7292. formatChunkId?: (
  7293. id: string,
  7294. direction?: "parent" | "child" | "sibling"
  7295. ) => string;
  7296. formatSize?: (size: number) => string;
  7297. formatLayer?: (size: string) => string;
  7298. formatDateTime?: (dateTime: number) => string;
  7299. formatFlag?: (flag: string) => string;
  7300. formatTime?: (time: number, boldQuantity?: boolean) => string;
  7301. formatError?: (message: string) => string;
  7302. }
  7303. declare interface KnownStatsProfile {
  7304. total: number;
  7305. resolving: number;
  7306. restoring: number;
  7307. building: number;
  7308. integration: number;
  7309. storing: number;
  7310. additionalResolving: number;
  7311. additionalIntegration: number;
  7312. factory: number;
  7313. dependencies: number;
  7314. }
  7315. declare interface LStatFs {
  7316. (
  7317. path: PathLikeFs,
  7318. callback: (arg0: null | NodeJS.ErrnoException, arg1?: IStats) => void
  7319. ): void;
  7320. (
  7321. path: PathLikeFs,
  7322. options: undefined | (StatOptions & { bigint?: false }),
  7323. callback: (arg0: null | NodeJS.ErrnoException, arg1?: IStats) => void
  7324. ): void;
  7325. (
  7326. path: PathLikeFs,
  7327. options: StatOptions & { bigint: true },
  7328. callback: (arg0: null | NodeJS.ErrnoException, arg1?: IBigIntStats) => void
  7329. ): void;
  7330. (
  7331. path: PathLikeFs,
  7332. options: undefined | StatOptions,
  7333. callback: (
  7334. arg0: null | NodeJS.ErrnoException,
  7335. arg1?: IStats | IBigIntStats
  7336. ) => void
  7337. ): void;
  7338. }
  7339. declare interface LStatSync {
  7340. (path: PathLikeFs, options?: undefined): IStats;
  7341. (
  7342. path: PathLikeFs,
  7343. options?: StatSyncOptions & { bigint?: false; throwIfNoEntry: false }
  7344. ): undefined | IStats;
  7345. (
  7346. path: PathLikeFs,
  7347. options: StatSyncOptions & { bigint: true; throwIfNoEntry: false }
  7348. ): undefined | IBigIntStats;
  7349. (path: PathLikeFs, options?: StatSyncOptions & { bigint?: false }): IStats;
  7350. (path: PathLikeFs, options: StatSyncOptions & { bigint: true }): IBigIntStats;
  7351. (
  7352. path: PathLikeFs,
  7353. options: StatSyncOptions & { bigint: boolean; throwIfNoEntry?: false }
  7354. ): IStats | IBigIntStats;
  7355. (
  7356. path: PathLikeFs,
  7357. options?: StatSyncOptions
  7358. ): undefined | IStats | IBigIntStats;
  7359. }
  7360. declare interface LStatTypes {
  7361. (
  7362. path: PathLikeTypes,
  7363. callback: (arg0: null | NodeJS.ErrnoException, arg1?: IStats) => void
  7364. ): void;
  7365. (
  7366. path: PathLikeTypes,
  7367. options: undefined | (StatOptions & { bigint?: false }),
  7368. callback: (arg0: null | NodeJS.ErrnoException, arg1?: IStats) => void
  7369. ): void;
  7370. (
  7371. path: PathLikeTypes,
  7372. options: StatOptions & { bigint: true },
  7373. callback: (arg0: null | NodeJS.ErrnoException, arg1?: IBigIntStats) => void
  7374. ): void;
  7375. (
  7376. path: PathLikeTypes,
  7377. options: undefined | StatOptions,
  7378. callback: (
  7379. arg0: null | NodeJS.ErrnoException,
  7380. arg1?: IStats | IBigIntStats
  7381. ) => void
  7382. ): void;
  7383. }
  7384. /**
  7385. * Options for the default backend.
  7386. */
  7387. declare interface LazyCompilationDefaultBackendOptions {
  7388. /**
  7389. * A custom client.
  7390. */
  7391. client?: string;
  7392. /**
  7393. * Specifies where to listen to from the server.
  7394. */
  7395. listen?: number | ListenOptions | ((server: Server) => void);
  7396. /**
  7397. * Specifies the protocol the client should use to connect to the server.
  7398. */
  7399. protocol?: "http" | "https";
  7400. /**
  7401. * Specifies how to create the server handling the EventSource requests.
  7402. */
  7403. server?:
  7404. | ServerOptionsImport<typeof IncomingMessage>
  7405. | ServerOptionsHttps<typeof IncomingMessage, typeof ServerResponse>
  7406. | (() => Server);
  7407. }
  7408. /**
  7409. * Options for compiling entrypoints and import()s only when they are accessed.
  7410. */
  7411. declare interface LazyCompilationOptions {
  7412. /**
  7413. * Specifies the backend that should be used for handling client keep alive.
  7414. */
  7415. backend?:
  7416. | ((
  7417. compiler: Compiler,
  7418. callback: (err: null | Error, api?: BackendApi) => void
  7419. ) => void)
  7420. | ((compiler: Compiler) => Promise<BackendApi>)
  7421. | LazyCompilationDefaultBackendOptions;
  7422. /**
  7423. * Enable/disable lazy compilation for entries.
  7424. */
  7425. entries?: boolean;
  7426. /**
  7427. * Enable/disable lazy compilation for import() modules.
  7428. */
  7429. imports?: boolean;
  7430. /**
  7431. * Specify which entrypoints or import()ed modules should be lazily compiled. This is matched with the imported module and not the entrypoint name.
  7432. */
  7433. test?: string | RegExp | ((module: Module) => boolean);
  7434. }
  7435. declare class LazySet<T> {
  7436. constructor(iterable?: Iterable<T>);
  7437. get size(): number;
  7438. add(item: T): LazySet<T>;
  7439. addAll(iterable: LazySet<T> | Iterable<T>): LazySet<T>;
  7440. clear(): void;
  7441. delete(value: T): boolean;
  7442. entries(): IterableIterator<[T, T]>;
  7443. forEach(
  7444. callbackFn: (arg0: T, arg1: T, arg2: Set<T>) => void,
  7445. thisArg?: any
  7446. ): void;
  7447. has(item: T): boolean;
  7448. keys(): IterableIterator<T>;
  7449. values(): IterableIterator<T>;
  7450. serialize(__0: ObjectSerializerContext): void;
  7451. [Symbol.iterator](): IterableIterator<T>;
  7452. static deserialize<T>(__0: ObjectDeserializerContext): LazySet<T>;
  7453. }
  7454. declare interface LibIdentOptions {
  7455. /**
  7456. * absolute context path to which lib ident is relative to
  7457. */
  7458. context: string;
  7459. /**
  7460. * object for caching
  7461. */
  7462. associatedObjectForCache?: object;
  7463. }
  7464. declare class LibManifestPlugin {
  7465. constructor(options: LibManifestPluginOptions);
  7466. options: LibManifestPluginOptions;
  7467. /**
  7468. * Apply the plugin
  7469. */
  7470. apply(compiler: Compiler): void;
  7471. }
  7472. declare interface LibManifestPluginOptions {
  7473. /**
  7474. * Context of requests in the manifest file (defaults to the webpack context).
  7475. */
  7476. context?: string;
  7477. /**
  7478. * If true, only entry points will be exposed (default: true).
  7479. */
  7480. entryOnly?: boolean;
  7481. /**
  7482. * If true, manifest json file (output) will be formatted.
  7483. */
  7484. format?: boolean;
  7485. /**
  7486. * Name of the exposed dll function (external name, use value of 'output.library').
  7487. */
  7488. name?: string;
  7489. /**
  7490. * Absolute path to the manifest json file (output).
  7491. */
  7492. path: string;
  7493. /**
  7494. * Type of the dll bundle (external type, use value of 'output.libraryTarget').
  7495. */
  7496. type?: string;
  7497. }
  7498. declare interface LibraryContext<T> {
  7499. compilation: Compilation;
  7500. chunkGraph: ChunkGraph;
  7501. options: T;
  7502. }
  7503. /**
  7504. * Set explicit comments for `commonjs`, `commonjs2`, `amd`, and `root`.
  7505. */
  7506. declare interface LibraryCustomUmdCommentObject {
  7507. /**
  7508. * Set comment for `amd` section in UMD.
  7509. */
  7510. amd?: string;
  7511. /**
  7512. * Set comment for `commonjs` (exports) section in UMD.
  7513. */
  7514. commonjs?: string;
  7515. /**
  7516. * Set comment for `commonjs2` (module.exports) section in UMD.
  7517. */
  7518. commonjs2?: string;
  7519. /**
  7520. * Set comment for `root` (global variable) section in UMD.
  7521. */
  7522. root?: string;
  7523. }
  7524. /**
  7525. * Description object for all UMD variants of the library name.
  7526. */
  7527. declare interface LibraryCustomUmdObject {
  7528. /**
  7529. * Name of the exposed AMD library in the UMD.
  7530. */
  7531. amd?: string;
  7532. /**
  7533. * Name of the exposed commonjs export in the UMD.
  7534. */
  7535. commonjs?: string;
  7536. /**
  7537. * Name of the property exposed globally by a UMD library.
  7538. */
  7539. root?: string | string[];
  7540. }
  7541. type LibraryExport = string | string[];
  7542. type LibraryName = string | string[] | LibraryCustomUmdObject;
  7543. /**
  7544. * Options for library.
  7545. */
  7546. declare interface LibraryOptions {
  7547. /**
  7548. * Add a container for define/require functions in the AMD module.
  7549. */
  7550. amdContainer?: string;
  7551. /**
  7552. * Add a comment in the UMD wrapper.
  7553. */
  7554. auxiliaryComment?: string | LibraryCustomUmdCommentObject;
  7555. /**
  7556. * Specify which export should be exposed as library.
  7557. */
  7558. export?: string | string[];
  7559. /**
  7560. * The name of the library (some types allow unnamed libraries too).
  7561. */
  7562. name?: string | string[] | LibraryCustomUmdObject;
  7563. /**
  7564. * Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'commonjs-static', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).
  7565. */
  7566. type: string;
  7567. /**
  7568. * If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.
  7569. */
  7570. umdNamedDefine?: boolean;
  7571. }
  7572. declare class LibraryTemplatePlugin {
  7573. constructor(
  7574. name: LibraryName,
  7575. target: string,
  7576. umdNamedDefine: boolean,
  7577. auxiliaryComment: AuxiliaryComment,
  7578. exportProperty: LibraryExport
  7579. );
  7580. library: {
  7581. type: string;
  7582. name: LibraryName;
  7583. umdNamedDefine: boolean;
  7584. auxiliaryComment: AuxiliaryComment;
  7585. export: LibraryExport;
  7586. };
  7587. /**
  7588. * Apply the plugin
  7589. */
  7590. apply(compiler: Compiler): void;
  7591. }
  7592. declare class LimitChunkCountPlugin {
  7593. constructor(options?: LimitChunkCountPluginOptions);
  7594. options: LimitChunkCountPluginOptions;
  7595. apply(compiler: Compiler): void;
  7596. }
  7597. declare interface LimitChunkCountPluginOptions {
  7598. /**
  7599. * Constant overhead for a chunk.
  7600. */
  7601. chunkOverhead?: number;
  7602. /**
  7603. * Multiplicator for initial chunks.
  7604. */
  7605. entryChunkMultiplicator?: number;
  7606. /**
  7607. * Limit the maximum number of chunks using a value greater greater than or equal to 1.
  7608. */
  7609. maxChunks: number;
  7610. }
  7611. type Literal = SimpleLiteral | RegExpLiteral | BigIntLiteral;
  7612. declare interface LoadScriptCompilationHooks {
  7613. createScript: SyncWaterfallHook<[string, Chunk]>;
  7614. }
  7615. declare class LoadScriptRuntimeModule extends HelperRuntimeModule {
  7616. constructor(withCreateScriptUrl?: boolean, withFetchPriority?: boolean);
  7617. static getCompilationHooks(
  7618. compilation: Compilation
  7619. ): LoadScriptCompilationHooks;
  7620. /**
  7621. * Runtime modules without any dependencies to other runtime modules
  7622. */
  7623. static STAGE_NORMAL: number;
  7624. /**
  7625. * Runtime modules with simple dependencies on other runtime modules
  7626. */
  7627. static STAGE_BASIC: number;
  7628. /**
  7629. * Runtime modules which attach to handlers of other runtime modules
  7630. */
  7631. static STAGE_ATTACH: number;
  7632. /**
  7633. * Runtime modules which trigger actions on bootstrap
  7634. */
  7635. static STAGE_TRIGGER: number;
  7636. }
  7637. /**
  7638. * Custom values available in the loader context.
  7639. */
  7640. declare interface Loader {
  7641. [index: string]: any;
  7642. }
  7643. type LoaderContextDeclarationsIndex<OptionsType> =
  7644. NormalModuleLoaderContext<OptionsType> &
  7645. LoaderRunnerLoaderContext<OptionsType> &
  7646. LoaderPluginLoaderContext &
  7647. HotModuleReplacementPluginLoaderContext;
  7648. type LoaderContextNormalModule<T> = NormalModuleLoaderContext<T> &
  7649. LoaderRunnerLoaderContext<T> &
  7650. LoaderPluginLoaderContext &
  7651. HotModuleReplacementPluginLoaderContext;
  7652. type LoaderDefinition<
  7653. OptionsType = {},
  7654. ContextAdditions = {}
  7655. > = LoaderDefinitionFunction<OptionsType, ContextAdditions> & {
  7656. raw?: false;
  7657. pitch?: PitchLoaderDefinitionFunction<OptionsType, ContextAdditions>;
  7658. };
  7659. declare interface LoaderDefinitionFunction<
  7660. OptionsType = {},
  7661. ContextAdditions = {}
  7662. > {
  7663. (
  7664. this: NormalModuleLoaderContext<OptionsType> &
  7665. LoaderRunnerLoaderContext<OptionsType> &
  7666. LoaderPluginLoaderContext &
  7667. HotModuleReplacementPluginLoaderContext &
  7668. ContextAdditions,
  7669. content: string,
  7670. sourceMap?: string | SourceMap,
  7671. additionalData?: AdditionalData
  7672. ): string | void | Buffer | Promise<string | Buffer>;
  7673. }
  7674. declare interface LoaderItem {
  7675. loader: string;
  7676. options: any;
  7677. ident: null | string;
  7678. type: null | string;
  7679. }
  7680. declare interface LoaderModule<OptionsType = {}, ContextAdditions = {}> {
  7681. default?:
  7682. | RawLoaderDefinitionFunction<OptionsType, ContextAdditions>
  7683. | LoaderDefinitionFunction<OptionsType, ContextAdditions>;
  7684. raw?: false;
  7685. pitch?: PitchLoaderDefinitionFunction<OptionsType, ContextAdditions>;
  7686. }
  7687. declare class LoaderOptionsPlugin {
  7688. constructor(options?: LoaderOptionsPluginOptions & MatchObject);
  7689. options: LoaderOptionsPluginOptions & MatchObject;
  7690. /**
  7691. * Apply the plugin
  7692. */
  7693. apply(compiler: Compiler): void;
  7694. }
  7695. declare interface LoaderOptionsPluginOptions {
  7696. [index: string]: any;
  7697. /**
  7698. * Whether loaders should be in debug mode or not. debug will be removed as of webpack 3.
  7699. */
  7700. debug?: boolean;
  7701. /**
  7702. * Where loaders can be switched to minimize mode.
  7703. */
  7704. minimize?: boolean;
  7705. /**
  7706. * A configuration object that can be used to configure older loaders.
  7707. */
  7708. options?: {
  7709. [index: string]: any;
  7710. /**
  7711. * The context that can be used to configure older loaders.
  7712. */
  7713. context?: string;
  7714. };
  7715. }
  7716. /**
  7717. * These properties are added by the LoaderPlugin
  7718. */
  7719. declare interface LoaderPluginLoaderContext {
  7720. /**
  7721. * Resolves the given request to a module, applies all configured loaders and calls
  7722. * back with the generated source, the sourceMap and the module instance (usually an
  7723. * instance of NormalModule). Use this function if you need to know the source code
  7724. * of another module to generate the result.
  7725. */
  7726. loadModule(
  7727. request: string,
  7728. callback: (
  7729. err: null | Error,
  7730. source?: string | Buffer,
  7731. sourceMap?: null | object,
  7732. module?: Module
  7733. ) => void
  7734. ): void;
  7735. importModule(
  7736. request: string,
  7737. options: undefined | ImportModuleOptions,
  7738. callback: (err?: null | Error, exports?: any) => any
  7739. ): void;
  7740. importModule(request: string, options?: ImportModuleOptions): Promise<any>;
  7741. }
  7742. /**
  7743. * The properties are added by https://github.com/webpack/loader-runner
  7744. */
  7745. declare interface LoaderRunnerLoaderContext<OptionsType> {
  7746. /**
  7747. * Add a directory as dependency of the loader result.
  7748. */
  7749. addContextDependency(context: string): void;
  7750. /**
  7751. * Adds a file as dependency of the loader result in order to make them watchable.
  7752. * For example, html-loader uses this technique as it finds src and src-set attributes.
  7753. * Then, it sets the url's for those attributes as dependencies of the html file that is parsed.
  7754. */
  7755. addDependency(file: string): void;
  7756. addMissingDependency(context: string): void;
  7757. /**
  7758. * Make this loader async.
  7759. */
  7760. async(): (
  7761. err?: null | Error,
  7762. content?: string | Buffer,
  7763. sourceMap?: string | SourceMap,
  7764. additionalData?: AdditionalData
  7765. ) => void;
  7766. /**
  7767. * Make this loader result cacheable. By default it's cacheable.
  7768. * A cacheable loader must have a deterministic result, when inputs and dependencies haven't changed.
  7769. * This means the loader shouldn't have other dependencies than specified with this.addDependency.
  7770. * Most loaders are deterministic and cacheable.
  7771. */
  7772. cacheable(flag?: boolean): void;
  7773. callback: (
  7774. err?: null | Error,
  7775. content?: string | Buffer,
  7776. sourceMap?: string | SourceMap,
  7777. additionalData?: AdditionalData
  7778. ) => void;
  7779. /**
  7780. * Remove all dependencies of the loader result. Even initial dependencies and these of other loaders.
  7781. */
  7782. clearDependencies(): void;
  7783. /**
  7784. * The directory of the module. Can be used as context for resolving other stuff.
  7785. * eg '/workspaces/ts-loader/examples/vanilla/src'
  7786. */
  7787. context: string;
  7788. readonly currentRequest: string;
  7789. readonly data: any;
  7790. /**
  7791. * alias of addDependency
  7792. * Adds a file as dependency of the loader result in order to make them watchable.
  7793. * For example, html-loader uses this technique as it finds src and src-set attributes.
  7794. * Then, it sets the url's for those attributes as dependencies of the html file that is parsed.
  7795. */
  7796. dependency(file: string): void;
  7797. getContextDependencies(): string[];
  7798. getDependencies(): string[];
  7799. getMissingDependencies(): string[];
  7800. /**
  7801. * The index in the loaders array of the current loader.
  7802. * In the example: in loader1: 0, in loader2: 1
  7803. */
  7804. loaderIndex: number;
  7805. readonly previousRequest: string;
  7806. readonly query: string | OptionsType;
  7807. readonly remainingRequest: string;
  7808. readonly request: string;
  7809. /**
  7810. * An array of all the loaders. It is writeable in the pitch phase.
  7811. * loaders = [{request: string, path: string, query: string, module: function}]
  7812. * In the example:
  7813. * [
  7814. * { request: "/abc/loader1.js?xyz",
  7815. * path: "/abc/loader1.js",
  7816. * query: "?xyz",
  7817. * module: [Function]
  7818. * },
  7819. * { request: "/abc/node_modules/loader2/index.js",
  7820. * path: "/abc/node_modules/loader2/index.js",
  7821. * query: "",
  7822. * module: [Function]
  7823. * }
  7824. * ]
  7825. */
  7826. loaders: {
  7827. request: string;
  7828. path: string;
  7829. query: string;
  7830. fragment: string;
  7831. options?: string | object;
  7832. ident: string;
  7833. normal?: Function;
  7834. pitch?: Function;
  7835. raw?: boolean;
  7836. data?: object;
  7837. pitchExecuted: boolean;
  7838. normalExecuted: boolean;
  7839. type?: "module" | "commonjs";
  7840. }[];
  7841. /**
  7842. * The resource path.
  7843. * In the example: "/abc/resource.js"
  7844. */
  7845. resourcePath: string;
  7846. /**
  7847. * The resource query string.
  7848. * Example: "?query"
  7849. */
  7850. resourceQuery: string;
  7851. /**
  7852. * The resource fragment.
  7853. * Example: "#frag"
  7854. */
  7855. resourceFragment: string;
  7856. /**
  7857. * The resource inclusive query and fragment.
  7858. * Example: "/abc/resource.js?query#frag"
  7859. */
  7860. resource: string;
  7861. /**
  7862. * Target of compilation.
  7863. * Example: "web"
  7864. */
  7865. target: string;
  7866. /**
  7867. * Tell what kind of ES-features may be used in the generated runtime-code.
  7868. * Example: { arrowFunction: true }
  7869. */
  7870. environment: Environment;
  7871. }
  7872. declare class LoaderTargetPlugin {
  7873. constructor(target: string);
  7874. target: string;
  7875. /**
  7876. * Apply the plugin
  7877. */
  7878. apply(compiler: Compiler): void;
  7879. }
  7880. declare interface LogEntry {
  7881. type: string;
  7882. args?: any[];
  7883. time: number;
  7884. trace?: string[];
  7885. }
  7886. type LogTypeEnum =
  7887. | "error"
  7888. | "warn"
  7889. | "info"
  7890. | "log"
  7891. | "debug"
  7892. | "profile"
  7893. | "trace"
  7894. | "group"
  7895. | "groupCollapsed"
  7896. | "groupEnd"
  7897. | "profileEnd"
  7898. | "time"
  7899. | "clear"
  7900. | "status";
  7901. declare const MEASURE_END_OPERATION: unique symbol;
  7902. declare const MEASURE_START_OPERATION: unique symbol;
  7903. declare interface MainRenderContext {
  7904. /**
  7905. * the chunk
  7906. */
  7907. chunk: Chunk;
  7908. /**
  7909. * the dependency templates
  7910. */
  7911. dependencyTemplates: DependencyTemplates;
  7912. /**
  7913. * the runtime template
  7914. */
  7915. runtimeTemplate: RuntimeTemplate;
  7916. /**
  7917. * the module graph
  7918. */
  7919. moduleGraph: ModuleGraph;
  7920. /**
  7921. * the chunk graph
  7922. */
  7923. chunkGraph: ChunkGraph;
  7924. /**
  7925. * results of code generation
  7926. */
  7927. codeGenerationResults: CodeGenerationResults;
  7928. /**
  7929. * hash to be used for render call
  7930. */
  7931. hash: string;
  7932. /**
  7933. * rendering in strict context
  7934. */
  7935. strictMode?: boolean;
  7936. }
  7937. declare abstract class MainTemplate {
  7938. hooks: Readonly<{
  7939. renderManifest: {
  7940. tap: <AdditionalOptions>(
  7941. options:
  7942. | string
  7943. | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
  7944. fn: (
  7945. arg0: RenderManifestEntry[],
  7946. arg1: RenderManifestOptions
  7947. ) => RenderManifestEntry[]
  7948. ) => void;
  7949. };
  7950. modules: { tap: () => never };
  7951. moduleObj: { tap: () => never };
  7952. require: {
  7953. tap: <AdditionalOptions>(
  7954. options:
  7955. | string
  7956. | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
  7957. fn: (arg0: string, arg1: RenderBootstrapContext) => string
  7958. ) => void;
  7959. };
  7960. beforeStartup: { tap: () => never };
  7961. startup: { tap: () => never };
  7962. afterStartup: { tap: () => never };
  7963. render: {
  7964. tap: <AdditionalOptions>(
  7965. options:
  7966. | string
  7967. | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
  7968. fn: (
  7969. arg0: Source,
  7970. arg1: Chunk,
  7971. arg2: undefined | string,
  7972. arg3: ModuleTemplate,
  7973. arg4: DependencyTemplates
  7974. ) => Source
  7975. ) => void;
  7976. };
  7977. renderWithEntry: {
  7978. tap: <AdditionalOptions>(
  7979. options:
  7980. | string
  7981. | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
  7982. fn: (arg0: Source, arg1: Chunk, arg2?: string) => Source
  7983. ) => void;
  7984. };
  7985. assetPath: {
  7986. tap: <AdditionalOptions>(
  7987. options:
  7988. | string
  7989. | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
  7990. fn: (arg0: string, arg1: object, arg2?: AssetInfo) => string
  7991. ) => void;
  7992. call: (filename: TemplatePath, options: PathData) => string;
  7993. };
  7994. hash: {
  7995. tap: <AdditionalOptions>(
  7996. options:
  7997. | string
  7998. | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
  7999. fn: (arg0: Hash) => void
  8000. ) => void;
  8001. };
  8002. hashForChunk: {
  8003. tap: <AdditionalOptions>(
  8004. options:
  8005. | string
  8006. | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
  8007. fn: (arg0: Hash, arg1: Chunk) => void
  8008. ) => void;
  8009. };
  8010. globalHashPaths: { tap: () => void };
  8011. globalHash: { tap: () => void };
  8012. hotBootstrap: { tap: () => never };
  8013. bootstrap: SyncWaterfallHook<
  8014. [string, Chunk, string, ModuleTemplate, DependencyTemplates]
  8015. >;
  8016. localVars: SyncWaterfallHook<[string, Chunk, string]>;
  8017. requireExtensions: SyncWaterfallHook<[string, Chunk, string]>;
  8018. requireEnsure: SyncWaterfallHook<[string, Chunk, string, string]>;
  8019. get jsonpScript(): SyncWaterfallHook<[string, Chunk]>;
  8020. get linkPrefetch(): SyncWaterfallHook<[string, Chunk]>;
  8021. get linkPreload(): SyncWaterfallHook<[string, Chunk]>;
  8022. }>;
  8023. renderCurrentHashCode: (hash: string, length?: number) => string;
  8024. getPublicPath: (options: PathData) => string;
  8025. getAssetPath: (path: TemplatePath, options: PathData) => string;
  8026. getAssetPathWithInfo: (
  8027. path: TemplatePath,
  8028. options: PathData
  8029. ) => InterpolatedPathAndAssetInfo;
  8030. get requireFn(): "__webpack_require__";
  8031. get outputOptions(): Output;
  8032. }
  8033. declare interface MakeDirectoryOptions {
  8034. recursive?: boolean;
  8035. mode?: string | number;
  8036. }
  8037. declare interface MapOptions {
  8038. columns?: boolean;
  8039. module?: boolean;
  8040. }
  8041. declare interface MatchObject {
  8042. test?: string | RegExp | (string | RegExp)[];
  8043. include?: string | RegExp | (string | RegExp)[];
  8044. exclude?: string | RegExp | (string | RegExp)[];
  8045. }
  8046. type Matcher = string | RegExp | (string | RegExp)[];
  8047. type Media = undefined | string;
  8048. /**
  8049. * Options object for in-memory caching.
  8050. */
  8051. declare interface MemoryCacheOptions {
  8052. /**
  8053. * Additionally cache computation of modules that are unchanged and reference only unchanged modules.
  8054. */
  8055. cacheUnaffected?: boolean;
  8056. /**
  8057. * Number of generations unused cache entries stay in memory cache at minimum (1 = may be removed after unused for a single compilation, ..., Infinity: kept forever).
  8058. */
  8059. maxGenerations?: number;
  8060. /**
  8061. * In memory caching.
  8062. */
  8063. type: "memory";
  8064. }
  8065. declare class MemoryCachePlugin {
  8066. constructor();
  8067. /**
  8068. * Apply the plugin
  8069. */
  8070. apply(compiler: Compiler): void;
  8071. }
  8072. declare class MergeDuplicateChunksPlugin {
  8073. constructor(options?: MergeDuplicateChunksPluginOptions);
  8074. options: MergeDuplicateChunksPluginOptions;
  8075. apply(compiler: Compiler): void;
  8076. }
  8077. declare interface MergeDuplicateChunksPluginOptions {
  8078. /**
  8079. * Specifies the stage for merging duplicate chunks.
  8080. */
  8081. stage?: number;
  8082. }
  8083. declare class MinChunkSizePlugin {
  8084. constructor(options: MinChunkSizePluginOptions);
  8085. options: MinChunkSizePluginOptions;
  8086. /**
  8087. * Apply the plugin
  8088. */
  8089. apply(compiler: Compiler): void;
  8090. }
  8091. declare interface MinChunkSizePluginOptions {
  8092. /**
  8093. * Constant overhead for a chunk.
  8094. */
  8095. chunkOverhead?: number;
  8096. /**
  8097. * Multiplicator for initial chunks.
  8098. */
  8099. entryChunkMultiplicator?: number;
  8100. /**
  8101. * Minimum number of characters.
  8102. */
  8103. minChunkSize: number;
  8104. }
  8105. declare interface Mkdir {
  8106. (
  8107. file: PathLikeFs,
  8108. options: MakeDirectoryOptions & { recursive: true },
  8109. callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
  8110. ): void;
  8111. (
  8112. file: PathLikeFs,
  8113. options:
  8114. | undefined
  8115. | null
  8116. | string
  8117. | number
  8118. | (MakeDirectoryOptions & { recursive?: false }),
  8119. callback: (arg0: null | NodeJS.ErrnoException) => void
  8120. ): void;
  8121. (
  8122. file: PathLikeFs,
  8123. options: undefined | null | string | number | MakeDirectoryOptions,
  8124. callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
  8125. ): void;
  8126. (
  8127. file: PathLikeFs,
  8128. callback: (arg0: null | NodeJS.ErrnoException) => void
  8129. ): void;
  8130. }
  8131. declare interface MkdirSync {
  8132. (
  8133. path: PathLikeFs,
  8134. options: MakeDirectoryOptions & { recursive: true }
  8135. ): undefined | string;
  8136. (
  8137. path: PathLikeFs,
  8138. options?:
  8139. | null
  8140. | string
  8141. | number
  8142. | (MakeDirectoryOptions & { recursive?: false })
  8143. ): void;
  8144. (
  8145. path: PathLikeFs,
  8146. options?: null | string | number | MakeDirectoryOptions
  8147. ): undefined | string;
  8148. }
  8149. declare class Module extends DependenciesBlock {
  8150. constructor(type: string, context?: null | string, layer?: null | string);
  8151. type: string;
  8152. context: null | string;
  8153. layer: null | string;
  8154. needId: boolean;
  8155. debugId: number;
  8156. resolveOptions?: ResolveOptions;
  8157. factoryMeta?: FactoryMeta;
  8158. useSourceMap: boolean;
  8159. useSimpleSourceMap: boolean;
  8160. hot: boolean;
  8161. buildMeta?: BuildMeta;
  8162. buildInfo?: BuildInfo;
  8163. presentationalDependencies?: Dependency[];
  8164. codeGenerationDependencies?: Dependency[];
  8165. id: null | string | number;
  8166. get hash(): string;
  8167. get renderedHash(): string;
  8168. profile?: ModuleProfile;
  8169. index: null | number;
  8170. index2: null | number;
  8171. depth: null | number;
  8172. issuer?: null | Module;
  8173. get usedExports(): null | boolean | SortableSet<string>;
  8174. get optimizationBailout(): (
  8175. | string
  8176. | ((requestShortener: RequestShortener) => string)
  8177. )[];
  8178. get optional(): boolean;
  8179. addChunk(chunk: Chunk): boolean;
  8180. removeChunk(chunk: Chunk): void;
  8181. isInChunk(chunk: Chunk): boolean;
  8182. isEntryModule(): boolean;
  8183. getChunks(): Chunk[];
  8184. getNumberOfChunks(): number;
  8185. get chunksIterable(): Iterable<Chunk>;
  8186. isProvided(exportName: string): null | boolean;
  8187. get exportsArgument(): string;
  8188. get moduleArgument(): string;
  8189. getExportsType(
  8190. moduleGraph: ModuleGraph,
  8191. strict?: boolean
  8192. ): "namespace" | "default-only" | "default-with-named" | "dynamic";
  8193. addPresentationalDependency(presentationalDependency: Dependency): void;
  8194. addCodeGenerationDependency(codeGenerationDependency: Dependency): void;
  8195. addWarning(warning: WebpackError): void;
  8196. getWarnings(): undefined | Iterable<WebpackError>;
  8197. getNumberOfWarnings(): number;
  8198. addError(error: WebpackError): void;
  8199. getErrors(): undefined | Iterable<WebpackError>;
  8200. getNumberOfErrors(): number;
  8201. /**
  8202. * removes all warnings and errors
  8203. */
  8204. clearWarningsAndErrors(): void;
  8205. isOptional(moduleGraph: ModuleGraph): boolean;
  8206. isAccessibleInChunk(
  8207. chunkGraph: ChunkGraph,
  8208. chunk: Chunk,
  8209. ignoreChunk?: Chunk
  8210. ): boolean;
  8211. isAccessibleInChunkGroup(
  8212. chunkGraph: ChunkGraph,
  8213. chunkGroup: ChunkGroup,
  8214. ignoreChunk?: Chunk
  8215. ): boolean;
  8216. hasReasonForChunk(
  8217. chunk: Chunk,
  8218. moduleGraph: ModuleGraph,
  8219. chunkGraph: ChunkGraph
  8220. ): boolean;
  8221. hasReasons(moduleGraph: ModuleGraph, runtime: RuntimeSpec): boolean;
  8222. needBuild(
  8223. context: NeedBuildContext,
  8224. callback: (arg0?: null | WebpackError, arg1?: boolean) => void
  8225. ): void;
  8226. needRebuild(
  8227. fileTimestamps: Map<string, null | number>,
  8228. contextTimestamps: Map<string, null | number>
  8229. ): boolean;
  8230. invalidateBuild(): void;
  8231. identifier(): string;
  8232. readableIdentifier(requestShortener: RequestShortener): string;
  8233. build(
  8234. options: WebpackOptionsNormalized,
  8235. compilation: Compilation,
  8236. resolver: ResolverWithOptions,
  8237. fs: InputFileSystem,
  8238. callback: (arg0?: WebpackError) => void
  8239. ): void;
  8240. getSourceTypes(): ReadonlySet<string>;
  8241. source(
  8242. dependencyTemplates: DependencyTemplates,
  8243. runtimeTemplate: RuntimeTemplate,
  8244. type?: string
  8245. ): Source;
  8246. size(type?: string): number;
  8247. libIdent(options: LibIdentOptions): null | string;
  8248. nameForCondition(): null | string;
  8249. getConcatenationBailoutReason(
  8250. context: ConcatenationBailoutReasonContext
  8251. ): undefined | string;
  8252. getSideEffectsConnectionState(moduleGraph: ModuleGraph): ConnectionState;
  8253. codeGeneration(context: CodeGenerationContext): CodeGenerationResult;
  8254. chunkCondition(chunk: Chunk, compilation: Compilation): boolean;
  8255. hasChunkCondition(): boolean;
  8256. /**
  8257. * Assuming this module is in the cache. Update the (cached) module with
  8258. * the fresh module from the factory. Usually updates internal references
  8259. * and properties.
  8260. */
  8261. updateCacheModule(module: Module): void;
  8262. /**
  8263. * Module should be unsafe cached. Get data that's needed for that.
  8264. * This data will be passed to restoreFromUnsafeCache later.
  8265. */
  8266. getUnsafeCacheData(): UnsafeCacheData;
  8267. /**
  8268. * Assuming this module is in the cache. Remove internal references to allow freeing some memory.
  8269. */
  8270. cleanupForCache(): void;
  8271. originalSource(): null | Source;
  8272. addCacheDependencies(
  8273. fileDependencies: LazySet<string>,
  8274. contextDependencies: LazySet<string>,
  8275. missingDependencies: LazySet<string>,
  8276. buildDependencies: LazySet<string>
  8277. ): void;
  8278. get hasEqualsChunks(): any;
  8279. get isUsed(): any;
  8280. get errors(): any;
  8281. get warnings(): any;
  8282. used: any;
  8283. }
  8284. declare class ModuleChunkLoadingRuntimeModule extends RuntimeModule {
  8285. constructor(runtimeRequirements: ReadonlySet<string>);
  8286. static getCompilationHooks(
  8287. compilation: Compilation
  8288. ): JsonpCompilationPluginHooks;
  8289. /**
  8290. * Runtime modules without any dependencies to other runtime modules
  8291. */
  8292. static STAGE_NORMAL: number;
  8293. /**
  8294. * Runtime modules with simple dependencies on other runtime modules
  8295. */
  8296. static STAGE_BASIC: number;
  8297. /**
  8298. * Runtime modules which attach to handlers of other runtime modules
  8299. */
  8300. static STAGE_ATTACH: number;
  8301. /**
  8302. * Runtime modules which trigger actions on bootstrap
  8303. */
  8304. static STAGE_TRIGGER: number;
  8305. }
  8306. declare class ModuleConcatenationPlugin {
  8307. constructor();
  8308. /**
  8309. * Apply the plugin
  8310. */
  8311. apply(compiler: Compiler): void;
  8312. }
  8313. declare class ModuleDependency extends Dependency {
  8314. constructor(request: string);
  8315. request: string;
  8316. userRequest: string;
  8317. range: any;
  8318. assertions?: ImportAttributes;
  8319. static Template: typeof DependencyTemplate;
  8320. static NO_EXPORTS_REFERENCED: string[][];
  8321. static EXPORTS_OBJECT_REFERENCED: string[][];
  8322. static TRANSITIVE: typeof TRANSITIVE;
  8323. }
  8324. declare abstract class ModuleFactory {
  8325. create(
  8326. data: ModuleFactoryCreateData,
  8327. callback: (arg0?: null | Error, arg1?: ModuleFactoryResult) => void
  8328. ): void;
  8329. }
  8330. declare interface ModuleFactoryCreateData {
  8331. contextInfo: ModuleFactoryCreateDataContextInfo;
  8332. resolveOptions?: ResolveOptions;
  8333. context: string;
  8334. dependencies: Dependency[];
  8335. }
  8336. declare interface ModuleFactoryCreateDataContextInfo {
  8337. issuer: string;
  8338. issuerLayer?: null | string;
  8339. compiler: string;
  8340. }
  8341. declare interface ModuleFactoryResult {
  8342. /**
  8343. * the created module or unset if no module was created
  8344. */
  8345. module?: Module;
  8346. fileDependencies?: Set<string>;
  8347. contextDependencies?: Set<string>;
  8348. missingDependencies?: Set<string>;
  8349. /**
  8350. * allow to use the unsafe cache
  8351. */
  8352. cacheable?: boolean;
  8353. }
  8354. declare class ModuleFederationPlugin {
  8355. constructor(options: ModuleFederationPluginOptions);
  8356. /**
  8357. * Apply the plugin
  8358. */
  8359. apply(compiler: Compiler): void;
  8360. /**
  8361. * Get the compilation hooks associated with this plugin.
  8362. */
  8363. static getCompilationHooks(
  8364. compilation: Compilation
  8365. ): CompilationHooksModuleFederationPlugin;
  8366. }
  8367. declare interface ModuleFederationPluginOptions {
  8368. /**
  8369. * Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.
  8370. */
  8371. exposes?: (string | ExposesObject)[] | ExposesObject;
  8372. /**
  8373. * The filename of the container as relative path inside the `output.path` directory.
  8374. */
  8375. filename?: string;
  8376. /**
  8377. * Options for library.
  8378. */
  8379. library?: LibraryOptions;
  8380. /**
  8381. * The name of the container.
  8382. */
  8383. name?: string;
  8384. /**
  8385. * The external type of the remote containers.
  8386. */
  8387. remoteType?:
  8388. | "import"
  8389. | "var"
  8390. | "module"
  8391. | "assign"
  8392. | "this"
  8393. | "window"
  8394. | "self"
  8395. | "global"
  8396. | "commonjs"
  8397. | "commonjs2"
  8398. | "commonjs-module"
  8399. | "commonjs-static"
  8400. | "amd"
  8401. | "amd-require"
  8402. | "umd"
  8403. | "umd2"
  8404. | "jsonp"
  8405. | "system"
  8406. | "promise"
  8407. | "module-import"
  8408. | "script"
  8409. | "node-commonjs";
  8410. /**
  8411. * Container locations and request scopes from which modules should be resolved and loaded at runtime. When provided, property name is used as request scope, otherwise request scope is automatically inferred from container location.
  8412. */
  8413. remotes?: (string | RemotesObject)[] | RemotesObject;
  8414. /**
  8415. * The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.
  8416. */
  8417. runtime?: string | false;
  8418. /**
  8419. * Share scope name used for all shared modules (defaults to 'default').
  8420. */
  8421. shareScope?: string;
  8422. /**
  8423. * Modules that should be shared in the share scope. When provided, property names are used to match requested modules in this compilation.
  8424. */
  8425. shared?: (string | SharedObject)[] | SharedObject;
  8426. }
  8427. type ModuleFilterItemTypes =
  8428. | string
  8429. | RegExp
  8430. | ((
  8431. name: string,
  8432. module: StatsModule,
  8433. type: "module" | "chunk" | "root-of-chunk" | "nested"
  8434. ) => boolean);
  8435. declare class ModuleGraph {
  8436. constructor();
  8437. setParents(
  8438. dependency: Dependency,
  8439. block: DependenciesBlock,
  8440. module: Module,
  8441. indexInBlock?: number
  8442. ): void;
  8443. getParentModule(dependency: Dependency): undefined | Module;
  8444. getParentBlock(dependency: Dependency): undefined | DependenciesBlock;
  8445. getParentBlockIndex(dependency: Dependency): number;
  8446. setResolvedModule(
  8447. originModule: null | Module,
  8448. dependency: Dependency,
  8449. module: Module
  8450. ): void;
  8451. updateModule(dependency: Dependency, module: Module): void;
  8452. removeConnection(dependency: Dependency): void;
  8453. addExplanation(dependency: Dependency, explanation: string): void;
  8454. cloneModuleAttributes(sourceModule: Module, targetModule: Module): void;
  8455. removeModuleAttributes(module: Module): void;
  8456. removeAllModuleAttributes(): void;
  8457. moveModuleConnections(
  8458. oldModule: Module,
  8459. newModule: Module,
  8460. filterConnection: (arg0: ModuleGraphConnection) => boolean
  8461. ): void;
  8462. copyOutgoingModuleConnections(
  8463. oldModule: Module,
  8464. newModule: Module,
  8465. filterConnection: (arg0: ModuleGraphConnection) => boolean
  8466. ): void;
  8467. addExtraReason(module: Module, explanation: string): void;
  8468. getResolvedModule(dependency: Dependency): null | Module;
  8469. getConnection(dependency: Dependency): undefined | ModuleGraphConnection;
  8470. getModule(dependency: Dependency): null | Module;
  8471. getOrigin(dependency: Dependency): null | Module;
  8472. getResolvedOrigin(dependency: Dependency): null | Module;
  8473. getIncomingConnections(module: Module): Iterable<ModuleGraphConnection>;
  8474. getOutgoingConnections(module: Module): Iterable<ModuleGraphConnection>;
  8475. getIncomingConnectionsByOriginModule(
  8476. module: Module
  8477. ): Map<undefined | null | Module, ReadonlyArray<ModuleGraphConnection>>;
  8478. getOutgoingConnectionsByModule(
  8479. module: Module
  8480. ): undefined | Map<undefined | Module, ReadonlyArray<ModuleGraphConnection>>;
  8481. getProfile(module: Module): undefined | ModuleProfile;
  8482. setProfile(module: Module, profile?: ModuleProfile): void;
  8483. getIssuer(module: Module): undefined | null | Module;
  8484. setIssuer(module: Module, issuer: null | Module): void;
  8485. setIssuerIfUnset(module: Module, issuer: null | Module): void;
  8486. getOptimizationBailout(
  8487. module: Module
  8488. ): (string | ((requestShortener: RequestShortener) => string))[];
  8489. getProvidedExports(module: Module): null | true | string[];
  8490. isExportProvided(
  8491. module: Module,
  8492. exportName: string | string[]
  8493. ): null | boolean;
  8494. getExportsInfo(module: Module): ExportsInfo;
  8495. getExportInfo(module: Module, exportName: string): ExportInfo;
  8496. getReadOnlyExportInfo(module: Module, exportName: string): ExportInfo;
  8497. getUsedExports(
  8498. module: Module,
  8499. runtime: RuntimeSpec
  8500. ): null | boolean | SortableSet<string>;
  8501. getPreOrderIndex(module: Module): null | number;
  8502. getPostOrderIndex(module: Module): null | number;
  8503. setPreOrderIndex(module: Module, index: number): void;
  8504. setPreOrderIndexIfUnset(module: Module, index: number): boolean;
  8505. setPostOrderIndex(module: Module, index: number): void;
  8506. setPostOrderIndexIfUnset(module: Module, index: number): boolean;
  8507. getDepth(module: Module): null | number;
  8508. setDepth(module: Module, depth: number): void;
  8509. setDepthIfLower(module: Module, depth: number): boolean;
  8510. isAsync(module: Module): boolean;
  8511. setAsync(module: Module): void;
  8512. getMeta(thing?: any): object;
  8513. getMetaIfExisting(thing?: any): undefined | object;
  8514. freeze(cacheStage?: string): void;
  8515. unfreeze(): void;
  8516. cached<T extends any[], V>(
  8517. fn: (moduleGraph: ModuleGraph, ...args: T) => V,
  8518. ...args: T
  8519. ): V;
  8520. setModuleMemCaches(
  8521. moduleMemCaches: Map<Module, WeakTupleMap<any, any>>
  8522. ): void;
  8523. dependencyCacheProvide(dependency: Dependency, ...args: any[]): any;
  8524. static getModuleGraphForModule(
  8525. module: Module,
  8526. deprecateMessage: string,
  8527. deprecationCode: string
  8528. ): ModuleGraph;
  8529. static setModuleGraphForModule(
  8530. module: Module,
  8531. moduleGraph: ModuleGraph
  8532. ): void;
  8533. static clearModuleGraphForModule(module: Module): void;
  8534. static ModuleGraphConnection: typeof ModuleGraphConnection;
  8535. }
  8536. declare class ModuleGraphConnection {
  8537. constructor(
  8538. originModule: null | Module,
  8539. dependency: null | Dependency,
  8540. module: Module,
  8541. explanation?: string,
  8542. weak?: boolean,
  8543. condition?:
  8544. | null
  8545. | false
  8546. | ((arg0: ModuleGraphConnection, arg1: RuntimeSpec) => ConnectionState)
  8547. );
  8548. originModule: null | Module;
  8549. resolvedOriginModule: null | Module;
  8550. dependency: null | Dependency;
  8551. resolvedModule: Module;
  8552. module: Module;
  8553. weak: boolean;
  8554. conditional: boolean;
  8555. condition?: (
  8556. arg0: ModuleGraphConnection,
  8557. arg1: RuntimeSpec
  8558. ) => ConnectionState;
  8559. explanations?: Set<string>;
  8560. clone(): ModuleGraphConnection;
  8561. addCondition(
  8562. condition: (
  8563. arg0: ModuleGraphConnection,
  8564. arg1: RuntimeSpec
  8565. ) => ConnectionState
  8566. ): void;
  8567. addExplanation(explanation: string): void;
  8568. get explanation(): string;
  8569. isActive(runtime: RuntimeSpec): boolean;
  8570. isTargetActive(runtime: RuntimeSpec): boolean;
  8571. getActiveState(runtime: RuntimeSpec): ConnectionState;
  8572. setActive(value: boolean): void;
  8573. active: void;
  8574. static addConnectionStates: (
  8575. a: ConnectionState,
  8576. b: ConnectionState
  8577. ) => ConnectionState;
  8578. static TRANSITIVE_ONLY: typeof TRANSITIVE_ONLY;
  8579. static CIRCULAR_CONNECTION: typeof CIRCULAR_CONNECTION;
  8580. }
  8581. type ModuleId = string | number;
  8582. type ModuleInfo = ConcatenatedModuleInfo | ExternalModuleInfo;
  8583. declare interface ModuleMemCachesItem {
  8584. buildInfo: BuildInfo;
  8585. references?: WeakMap<Dependency, Module>;
  8586. memCache: WeakTupleMap<any, any>;
  8587. }
  8588. declare interface ModuleObject {
  8589. id: string;
  8590. exports: any;
  8591. loaded: boolean;
  8592. }
  8593. /**
  8594. * Options affecting the normal modules (`NormalModuleFactory`).
  8595. */
  8596. declare interface ModuleOptions {
  8597. /**
  8598. * An array of rules applied by default for modules.
  8599. */
  8600. defaultRules?: (undefined | null | false | "" | 0 | RuleSetRule | "...")[];
  8601. /**
  8602. * Enable warnings for full dynamic dependencies.
  8603. */
  8604. exprContextCritical?: boolean;
  8605. /**
  8606. * Enable recursive directory lookup for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRecursive'.
  8607. */
  8608. exprContextRecursive?: boolean;
  8609. /**
  8610. * Sets the default regular expression for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRegExp'.
  8611. */
  8612. exprContextRegExp?: boolean | RegExp;
  8613. /**
  8614. * Set the default request for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRequest'.
  8615. */
  8616. exprContextRequest?: string;
  8617. /**
  8618. * Specify options for each generator.
  8619. */
  8620. generator?: GeneratorOptionsByModuleType;
  8621. /**
  8622. * Don't parse files matching. It's matched against the full resolved request.
  8623. */
  8624. noParse?: string | Function | RegExp | (string | Function | RegExp)[];
  8625. /**
  8626. * Specify options for each parser.
  8627. */
  8628. parser?: ParserOptionsByModuleType;
  8629. /**
  8630. * An array of rules applied for modules.
  8631. */
  8632. rules?: (undefined | null | false | "" | 0 | RuleSetRule | "...")[];
  8633. /**
  8634. * Emit errors instead of warnings when imported names don't exist in imported module. Deprecated: This option has moved to 'module.parser.javascript.strictExportPresence'.
  8635. */
  8636. strictExportPresence?: boolean;
  8637. /**
  8638. * Handle the this context correctly according to the spec for namespace objects. Deprecated: This option has moved to 'module.parser.javascript.strictThisContextOnImports'.
  8639. */
  8640. strictThisContextOnImports?: boolean;
  8641. /**
  8642. * Enable warnings when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextCritical'.
  8643. */
  8644. unknownContextCritical?: boolean;
  8645. /**
  8646. * Enable recursive directory lookup when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRecursive'.
  8647. */
  8648. unknownContextRecursive?: boolean;
  8649. /**
  8650. * Sets the regular expression when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRegExp'.
  8651. */
  8652. unknownContextRegExp?: boolean | RegExp;
  8653. /**
  8654. * Sets the request when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRequest'.
  8655. */
  8656. unknownContextRequest?: string;
  8657. /**
  8658. * Cache the resolving of module requests.
  8659. */
  8660. unsafeCache?: boolean | Function;
  8661. /**
  8662. * Enable warnings for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextCritical'.
  8663. */
  8664. wrappedContextCritical?: boolean;
  8665. /**
  8666. * Enable recursive directory lookup for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRecursive'.
  8667. */
  8668. wrappedContextRecursive?: boolean;
  8669. /**
  8670. * Set the inner regular expression for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRegExp'.
  8671. */
  8672. wrappedContextRegExp?: RegExp;
  8673. }
  8674. /**
  8675. * Options affecting the normal modules (`NormalModuleFactory`).
  8676. */
  8677. declare interface ModuleOptionsNormalized {
  8678. /**
  8679. * An array of rules applied by default for modules.
  8680. */
  8681. defaultRules: (undefined | null | false | "" | 0 | RuleSetRule | "...")[];
  8682. /**
  8683. * Specify options for each generator.
  8684. */
  8685. generator: GeneratorOptionsByModuleType;
  8686. /**
  8687. * Don't parse files matching. It's matched against the full resolved request.
  8688. */
  8689. noParse?: string | Function | RegExp | (string | Function | RegExp)[];
  8690. /**
  8691. * Specify options for each parser.
  8692. */
  8693. parser: ParserOptionsByModuleType;
  8694. /**
  8695. * An array of rules applied for modules.
  8696. */
  8697. rules: (undefined | null | false | "" | 0 | RuleSetRule | "...")[];
  8698. /**
  8699. * Cache the resolving of module requests.
  8700. */
  8701. unsafeCache?: boolean | Function;
  8702. }
  8703. declare interface ModulePathData {
  8704. id: string | number;
  8705. hash: string;
  8706. hashWithLength?: (arg0: number) => string;
  8707. }
  8708. declare abstract class ModuleProfile {
  8709. startTime: number;
  8710. factoryStartTime: number;
  8711. factoryEndTime: number;
  8712. factory: number;
  8713. factoryParallelismFactor: number;
  8714. restoringStartTime: number;
  8715. restoringEndTime: number;
  8716. restoring: number;
  8717. restoringParallelismFactor: number;
  8718. integrationStartTime: number;
  8719. integrationEndTime: number;
  8720. integration: number;
  8721. integrationParallelismFactor: number;
  8722. buildingStartTime: number;
  8723. buildingEndTime: number;
  8724. building: number;
  8725. buildingParallelismFactor: number;
  8726. storingStartTime: number;
  8727. storingEndTime: number;
  8728. storing: number;
  8729. storingParallelismFactor: number;
  8730. additionalFactoryTimes?: { start: number; end: number }[];
  8731. additionalFactories: number;
  8732. additionalFactoriesParallelismFactor: number;
  8733. additionalIntegration: number;
  8734. markFactoryStart(): void;
  8735. markFactoryEnd(): void;
  8736. markRestoringStart(): void;
  8737. markRestoringEnd(): void;
  8738. markIntegrationStart(): void;
  8739. markIntegrationEnd(): void;
  8740. markBuildingStart(): void;
  8741. markBuildingEnd(): void;
  8742. markStoringStart(): void;
  8743. markStoringEnd(): void;
  8744. /**
  8745. * Merge this profile into another one
  8746. */
  8747. mergeInto(realProfile: ModuleProfile): void;
  8748. }
  8749. declare interface ModuleReferenceOptions {
  8750. /**
  8751. * the properties/exports of the module
  8752. */
  8753. ids: string[];
  8754. /**
  8755. * true, when this referenced export is called
  8756. */
  8757. call: boolean;
  8758. /**
  8759. * true, when this referenced export is directly imported (not via property access)
  8760. */
  8761. directImport: boolean;
  8762. /**
  8763. * if the position is ASI safe or unknown
  8764. */
  8765. asiSafe?: boolean;
  8766. }
  8767. declare interface ModuleResult {
  8768. client: string;
  8769. data: string;
  8770. active: boolean;
  8771. }
  8772. declare interface ModuleSettings {
  8773. /**
  8774. * Specifies the layer in which the module should be placed in.
  8775. */
  8776. layer?: string;
  8777. /**
  8778. * Module type to use for the module.
  8779. */
  8780. type?: string;
  8781. /**
  8782. * Options for the resolver.
  8783. */
  8784. resolve?: ResolveOptions;
  8785. /**
  8786. * Options for parsing.
  8787. */
  8788. parser?: { [index: string]: any };
  8789. /**
  8790. * The options for the module generator.
  8791. */
  8792. generator?: { [index: string]: any };
  8793. /**
  8794. * Flags a module as with or without side effects.
  8795. */
  8796. sideEffects?: boolean;
  8797. }
  8798. declare abstract class ModuleTemplate {
  8799. type: string;
  8800. hooks: Readonly<{
  8801. content: {
  8802. tap: <AdditionalOptions>(
  8803. options:
  8804. | string
  8805. | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
  8806. fn: (
  8807. arg0: Source,
  8808. arg1: Module,
  8809. arg2: ChunkRenderContextJavascriptModulesPlugin,
  8810. arg3: DependencyTemplates
  8811. ) => Source
  8812. ) => void;
  8813. };
  8814. module: {
  8815. tap: <AdditionalOptions>(
  8816. options:
  8817. | string
  8818. | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
  8819. fn: (
  8820. arg0: Source,
  8821. arg1: Module,
  8822. arg2: ChunkRenderContextJavascriptModulesPlugin,
  8823. arg3: DependencyTemplates
  8824. ) => Source
  8825. ) => void;
  8826. };
  8827. render: {
  8828. tap: <AdditionalOptions>(
  8829. options:
  8830. | string
  8831. | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
  8832. fn: (
  8833. arg0: Source,
  8834. arg1: Module,
  8835. arg2: ChunkRenderContextJavascriptModulesPlugin,
  8836. arg3: DependencyTemplates
  8837. ) => Source
  8838. ) => void;
  8839. };
  8840. package: {
  8841. tap: <AdditionalOptions>(
  8842. options:
  8843. | string
  8844. | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
  8845. fn: (
  8846. arg0: Source,
  8847. arg1: Module,
  8848. arg2: ChunkRenderContextJavascriptModulesPlugin,
  8849. arg3: DependencyTemplates
  8850. ) => Source
  8851. ) => void;
  8852. };
  8853. hash: {
  8854. tap: <AdditionalOptions>(
  8855. options:
  8856. | string
  8857. | (TapOptions & { name: string } & IfSet<AdditionalOptions>),
  8858. fn: (arg0: Hash) => void
  8859. ) => void;
  8860. };
  8861. }>;
  8862. get runtimeTemplate(): RuntimeTemplate;
  8863. }
  8864. declare interface ModuleTemplates {
  8865. javascript: ModuleTemplate;
  8866. }
  8867. declare class MultiCompiler {
  8868. constructor(
  8869. compilers: Compiler[] | Record<string, Compiler>,
  8870. options: MultiCompilerOptions
  8871. );
  8872. hooks: Readonly<{
  8873. done: SyncHook<[MultiStats]>;
  8874. invalid: MultiHook<SyncHook<[null | string, number]>>;
  8875. run: MultiHook<AsyncSeriesHook<[Compiler]>>;
  8876. watchClose: SyncHook<[]>;
  8877. watchRun: MultiHook<AsyncSeriesHook<[Compiler]>>;
  8878. infrastructureLog: MultiHook<SyncBailHook<[string, string, any[]], true>>;
  8879. }>;
  8880. compilers: Compiler[];
  8881. dependencies: WeakMap<Compiler, string[]>;
  8882. running: boolean;
  8883. get options(): WebpackOptionsNormalized[] & MultiCompilerOptions;
  8884. get outputPath(): string;
  8885. inputFileSystem: InputFileSystem;
  8886. outputFileSystem: OutputFileSystem;
  8887. watchFileSystem: WatchFileSystem;
  8888. intermediateFileSystem: IntermediateFileSystem;
  8889. getInfrastructureLogger(name: string | (() => string)): WebpackLogger;
  8890. setDependencies(compiler: Compiler, dependencies: string[]): void;
  8891. validateDependencies(callback: CallbackFunction_1<MultiStats>): boolean;
  8892. runWithDependencies(
  8893. compilers: Compiler[],
  8894. fn: (compiler: Compiler, callback: CallbackFunction_1<MultiStats>) => any,
  8895. callback: CallbackFunction_1<MultiStats>
  8896. ): void;
  8897. watch(
  8898. watchOptions: WatchOptions | WatchOptions[],
  8899. handler: CallbackFunction_1<MultiStats>
  8900. ): MultiWatching;
  8901. run(callback: CallbackFunction_1<MultiStats>): void;
  8902. purgeInputFileSystem(): void;
  8903. close(callback: CallbackFunction_1<void>): void;
  8904. }
  8905. declare interface MultiCompilerOptions {
  8906. /**
  8907. * how many Compilers are allows to run at the same time in parallel
  8908. */
  8909. parallelism?: number;
  8910. }
  8911. declare abstract class MultiStats {
  8912. stats: Stats[];
  8913. get hash(): string;
  8914. hasErrors(): boolean;
  8915. hasWarnings(): boolean;
  8916. toJson(options?: string | boolean | StatsOptions): StatsCompilation;
  8917. toString(options?: string | boolean | StatsOptions): string;
  8918. }
  8919. declare abstract class MultiWatching {
  8920. watchings: Watching[];
  8921. compiler: MultiCompiler;
  8922. invalidate(callback?: CallbackFunction_2<void>): void;
  8923. suspend(): void;
  8924. resume(): void;
  8925. close(callback: CallbackFunction_2<void>): void;
  8926. }
  8927. declare class NamedChunkIdsPlugin {
  8928. constructor(options?: NamedChunkIdsPluginOptions);
  8929. delimiter: string;
  8930. context?: string;
  8931. /**
  8932. * Apply the plugin
  8933. */
  8934. apply(compiler: Compiler): void;
  8935. }
  8936. declare interface NamedChunkIdsPluginOptions {
  8937. /**
  8938. * context
  8939. */
  8940. context?: string;
  8941. /**
  8942. * delimiter
  8943. */
  8944. delimiter?: string;
  8945. }
  8946. declare class NamedModuleIdsPlugin {
  8947. constructor(options?: NamedModuleIdsPluginOptions);
  8948. options: NamedModuleIdsPluginOptions;
  8949. /**
  8950. * Apply the plugin
  8951. */
  8952. apply(compiler: Compiler): void;
  8953. }
  8954. declare interface NamedModuleIdsPluginOptions {
  8955. /**
  8956. * context
  8957. */
  8958. context?: string;
  8959. }
  8960. declare class NaturalModuleIdsPlugin {
  8961. constructor();
  8962. /**
  8963. * Apply the plugin
  8964. */
  8965. apply(compiler: Compiler): void;
  8966. }
  8967. declare interface NeedBuildContext {
  8968. compilation: Compilation;
  8969. fileSystemInfo: FileSystemInfo;
  8970. valueCacheVersions: Map<string, string | Set<string>>;
  8971. }
  8972. declare class NoEmitOnErrorsPlugin {
  8973. constructor();
  8974. /**
  8975. * Apply the plugin
  8976. */
  8977. apply(compiler: Compiler): void;
  8978. }
  8979. type Node = false | NodeOptions;
  8980. declare class NodeEnvironmentPlugin {
  8981. constructor(options: {
  8982. /**
  8983. * infrastructure logging options
  8984. */
  8985. infrastructureLogging: InfrastructureLogging;
  8986. });
  8987. options: {
  8988. /**
  8989. * infrastructure logging options
  8990. */
  8991. infrastructureLogging: InfrastructureLogging;
  8992. };
  8993. /**
  8994. * Apply the plugin
  8995. */
  8996. apply(compiler: Compiler): void;
  8997. }
  8998. /**
  8999. * Options object for node compatibility features.
  9000. */
  9001. declare interface NodeOptions {
  9002. /**
  9003. * Include a polyfill for the '__dirname' variable.
  9004. */
  9005. __dirname?: boolean | "warn-mock" | "mock" | "node-module" | "eval-only";
  9006. /**
  9007. * Include a polyfill for the '__filename' variable.
  9008. */
  9009. __filename?: boolean | "warn-mock" | "mock" | "node-module" | "eval-only";
  9010. /**
  9011. * Include a polyfill for the 'global' variable.
  9012. */
  9013. global?: boolean | "warn";
  9014. }
  9015. declare class NodeSourcePlugin {
  9016. constructor();
  9017. /**
  9018. * Apply the plugin
  9019. */
  9020. apply(compiler: Compiler): void;
  9021. }
  9022. declare class NodeTargetPlugin {
  9023. constructor();
  9024. /**
  9025. * Apply the plugin
  9026. */
  9027. apply(compiler: Compiler): void;
  9028. }
  9029. declare class NodeTemplatePlugin {
  9030. constructor(options?: NodeTemplatePluginOptions);
  9031. /**
  9032. * Apply the plugin
  9033. */
  9034. apply(compiler: Compiler): void;
  9035. }
  9036. declare interface NodeTemplatePluginOptions {
  9037. /**
  9038. * enable async chunk loading
  9039. */
  9040. asyncChunkLoading?: boolean;
  9041. }
  9042. declare class NormalModule extends Module {
  9043. constructor(__0: NormalModuleCreateData);
  9044. request: string;
  9045. userRequest: string;
  9046. rawRequest: string;
  9047. binary: boolean;
  9048. parser?: Parser;
  9049. parserOptions?: ParserOptions;
  9050. generator?: Generator;
  9051. generatorOptions?: GeneratorOptions;
  9052. resource: string;
  9053. resourceResolveData?: Record<string, any>;
  9054. matchResource?: string;
  9055. loaders: LoaderItem[];
  9056. error: null | WebpackError;
  9057. /**
  9058. * restore unsafe cache data
  9059. */
  9060. restoreFromUnsafeCache(
  9061. unsafeCacheData: NormalModuleUnsafeCacheData,
  9062. normalModuleFactory: NormalModuleFactory
  9063. ): void;
  9064. createSourceForAsset(
  9065. context: string,
  9066. name: string,
  9067. content: string | Buffer,
  9068. sourceMap?: string | SourceMap,
  9069. associatedObjectForCache?: object
  9070. ): Source;
  9071. getCurrentLoader(loaderContext?: any, index?: number): null | LoaderItem;
  9072. createSource(
  9073. context: string,
  9074. content: string | Buffer,
  9075. sourceMap?: null | string | SourceMapSource,
  9076. associatedObjectForCache?: object
  9077. ): Source;
  9078. markModuleAsErrored(error: WebpackError): void;
  9079. applyNoParseRule(rule: any, content: string): boolean;
  9080. shouldPreventParsing(noParseRule: any, request: string): boolean;
  9081. static getCompilationHooks(
  9082. compilation: Compilation
  9083. ): NormalModuleCompilationHooks;
  9084. static deserialize(context: ObjectDeserializerContext): any;
  9085. }
  9086. declare interface NormalModuleCompilationHooks {
  9087. loader: SyncHook<[LoaderContextNormalModule<any>, NormalModule]>;
  9088. beforeLoaders: SyncHook<
  9089. [LoaderItem[], NormalModule, LoaderContextNormalModule<any>]
  9090. >;
  9091. beforeParse: SyncHook<[NormalModule]>;
  9092. beforeSnapshot: SyncHook<[NormalModule]>;
  9093. readResourceForScheme: HookMap<
  9094. FakeHook<
  9095. AsyncSeriesBailHook<[string, NormalModule], null | string | Buffer>
  9096. >
  9097. >;
  9098. readResource: HookMap<
  9099. AsyncSeriesBailHook<
  9100. [LoaderContextNormalModule<any>],
  9101. null | string | Buffer
  9102. >
  9103. >;
  9104. needBuild: AsyncSeriesBailHook<[NormalModule, NeedBuildContext], boolean>;
  9105. }
  9106. declare interface NormalModuleCreateData {
  9107. /**
  9108. * an optional layer in which the module is
  9109. */
  9110. layer?: string;
  9111. /**
  9112. * module type. When deserializing, this is set to an empty string "".
  9113. */
  9114. type: "" | "javascript/auto" | "javascript/dynamic" | "javascript/esm";
  9115. /**
  9116. * request string
  9117. */
  9118. request: string;
  9119. /**
  9120. * request intended by user (without loaders from config)
  9121. */
  9122. userRequest: string;
  9123. /**
  9124. * request without resolving
  9125. */
  9126. rawRequest: string;
  9127. /**
  9128. * list of loaders
  9129. */
  9130. loaders: LoaderItem[];
  9131. /**
  9132. * path + query of the real resource
  9133. */
  9134. resource: string;
  9135. /**
  9136. * resource resolve data
  9137. */
  9138. resourceResolveData?: Record<string, any>;
  9139. /**
  9140. * context directory for resolving
  9141. */
  9142. context: string;
  9143. /**
  9144. * path + query of the matched resource (virtual)
  9145. */
  9146. matchResource?: string;
  9147. /**
  9148. * the parser used
  9149. */
  9150. parser: Parser;
  9151. /**
  9152. * the options of the parser used
  9153. */
  9154. parserOptions?: ParserOptions;
  9155. /**
  9156. * the generator used
  9157. */
  9158. generator: Generator;
  9159. /**
  9160. * the options of the generator used
  9161. */
  9162. generatorOptions?: GeneratorOptions;
  9163. /**
  9164. * options used for resolving requests from this module
  9165. */
  9166. resolveOptions?: ResolveOptions;
  9167. }
  9168. declare abstract class NormalModuleFactory extends ModuleFactory {
  9169. hooks: Readonly<{
  9170. resolve: AsyncSeriesBailHook<[ResolveData], false | void | Module>;
  9171. resolveForScheme: HookMap<
  9172. AsyncSeriesBailHook<[ResourceDataWithData, ResolveData], true | void>
  9173. >;
  9174. resolveInScheme: HookMap<
  9175. AsyncSeriesBailHook<[ResourceDataWithData, ResolveData], true | void>
  9176. >;
  9177. factorize: AsyncSeriesBailHook<[ResolveData], undefined | Module>;
  9178. beforeResolve: AsyncSeriesBailHook<[ResolveData], false | void>;
  9179. afterResolve: AsyncSeriesBailHook<[ResolveData], false | void>;
  9180. createModule: AsyncSeriesBailHook<
  9181. [
  9182. Partial<NormalModuleCreateData & { settings: ModuleSettings }>,
  9183. ResolveData
  9184. ],
  9185. void | Module
  9186. >;
  9187. module: SyncWaterfallHook<
  9188. [
  9189. Module,
  9190. Partial<NormalModuleCreateData & { settings: ModuleSettings }>,
  9191. ResolveData
  9192. ]
  9193. >;
  9194. createParser: HookMap<SyncBailHook<[ParserOptions], void | Parser>>;
  9195. parser: HookMap<SyncBailHook<[any, ParserOptions], void>>;
  9196. createGenerator: HookMap<
  9197. SyncBailHook<[GeneratorOptions], void | Generator>
  9198. >;
  9199. generator: HookMap<SyncBailHook<[any, GeneratorOptions], void>>;
  9200. createModuleClass: HookMap<SyncBailHook<[any, ResolveData], void | Module>>;
  9201. }>;
  9202. resolverFactory: ResolverFactory;
  9203. ruleSet: RuleSet;
  9204. context: string;
  9205. fs: InputFileSystem;
  9206. parserCache: Map<string, WeakMap<object, Parser>>;
  9207. generatorCache: Map<string, WeakMap<object, Generator>>;
  9208. cleanupForCache(): void;
  9209. resolveResource(
  9210. contextInfo: ModuleFactoryCreateDataContextInfo,
  9211. context: string,
  9212. unresolvedResource: string,
  9213. resolver: ResolverWithOptions,
  9214. resolveContext: ResolveContext,
  9215. callback: (
  9216. err: null | Error,
  9217. res?: string | false,
  9218. req?: ResolveRequest
  9219. ) => void
  9220. ): void;
  9221. resolveRequestArray(
  9222. contextInfo: ModuleFactoryCreateDataContextInfo,
  9223. context: string,
  9224. array: LoaderItem[],
  9225. resolver: ResolverWithOptions,
  9226. resolveContext: ResolveContext,
  9227. callback: CallbackNormalModuleFactory<LoaderItem[]>
  9228. ): void;
  9229. getParser(type: string, parserOptions?: ParserOptions): Parser;
  9230. createParser(type: string, parserOptions?: ParserOptions): Parser;
  9231. getGenerator(type: string, generatorOptions?: GeneratorOptions): Generator;
  9232. createGenerator(type: string, generatorOptions?: GeneratorOptions): Generator;
  9233. getResolver(
  9234. type: string,
  9235. resolveOptions?: ResolveOptionsWithDependencyType
  9236. ): ResolverWithOptions;
  9237. }
  9238. /**
  9239. * These properties are added by the NormalModule
  9240. */
  9241. declare interface NormalModuleLoaderContext<OptionsType> {
  9242. version: number;
  9243. getOptions(): OptionsType;
  9244. getOptions(schema: Parameters<typeof validateFunction>[0]): OptionsType;
  9245. emitWarning(warning: Error): void;
  9246. emitError(error: Error): void;
  9247. getLogger(name?: string): WebpackLogger;
  9248. resolve(
  9249. context: string,
  9250. request: string,
  9251. callback: (
  9252. err: null | ErrorWithDetail,
  9253. res?: string | false,
  9254. req?: ResolveRequest
  9255. ) => void
  9256. ): any;
  9257. getResolve(options?: ResolveOptionsWithDependencyType): {
  9258. (
  9259. context: string,
  9260. request: string,
  9261. callback: (
  9262. err: null | ErrorWithDetail,
  9263. res?: string | false,
  9264. req?: ResolveRequest
  9265. ) => void
  9266. ): void;
  9267. (context: string, request: string): Promise<string>;
  9268. };
  9269. emitFile(
  9270. name: string,
  9271. content: string | Buffer,
  9272. sourceMap?: string,
  9273. assetInfo?: AssetInfo
  9274. ): void;
  9275. addBuildDependency(dep: string): void;
  9276. utils: {
  9277. absolutify: (context: string, request: string) => string;
  9278. contextify: (context: string, request: string) => string;
  9279. createHash: (algorithm?: string | typeof Hash) => Hash;
  9280. };
  9281. rootContext: string;
  9282. fs: InputFileSystem;
  9283. sourceMap?: boolean;
  9284. mode: "none" | "development" | "production";
  9285. webpack?: boolean;
  9286. hashFunction: HashFunction;
  9287. hashDigest: string;
  9288. hashDigestLength: number;
  9289. hashSalt: string;
  9290. _module?: NormalModule;
  9291. _compilation?: Compilation;
  9292. _compiler?: Compiler;
  9293. }
  9294. declare class NormalModuleReplacementPlugin {
  9295. /**
  9296. * Create an instance of the plugin
  9297. */
  9298. constructor(
  9299. resourceRegExp: RegExp,
  9300. newResource: string | ((arg0: ResolveData) => void)
  9301. );
  9302. resourceRegExp: RegExp;
  9303. newResource: string | ((arg0: ResolveData) => void);
  9304. /**
  9305. * Apply the plugin
  9306. */
  9307. apply(compiler: Compiler): void;
  9308. }
  9309. type NormalModuleUnsafeCacheData = UnsafeCacheData & {
  9310. parser?: Parser;
  9311. parserOptions?: ParserOptions;
  9312. generator?: Generator;
  9313. generatorOptions?: GeneratorOptions;
  9314. };
  9315. type NormalizedStatsOptions = KnownNormalizedStatsOptions &
  9316. Omit<
  9317. StatsOptions,
  9318. | "context"
  9319. | "chunkGroups"
  9320. | "requestShortener"
  9321. | "chunksSort"
  9322. | "modulesSort"
  9323. | "chunkModulesSort"
  9324. | "nestedModulesSort"
  9325. | "assetsSort"
  9326. | "ids"
  9327. | "cachedAssets"
  9328. | "groupAssetsByEmitStatus"
  9329. | "groupAssetsByPath"
  9330. | "groupAssetsByExtension"
  9331. | "assetsSpace"
  9332. | "excludeAssets"
  9333. | "excludeModules"
  9334. | "warningsFilter"
  9335. | "cachedModules"
  9336. | "orphanModules"
  9337. | "dependentModules"
  9338. | "runtimeModules"
  9339. | "groupModulesByCacheStatus"
  9340. | "groupModulesByLayer"
  9341. | "groupModulesByAttributes"
  9342. | "groupModulesByPath"
  9343. | "groupModulesByExtension"
  9344. | "groupModulesByType"
  9345. | "entrypoints"
  9346. | "chunkGroupAuxiliary"
  9347. | "chunkGroupChildren"
  9348. | "chunkGroupMaxAssets"
  9349. | "modulesSpace"
  9350. | "chunkModulesSpace"
  9351. | "nestedModulesSpace"
  9352. | "logging"
  9353. | "loggingDebug"
  9354. | "loggingTrace"
  9355. | "_env"
  9356. > &
  9357. Record<string, any>;
  9358. declare class NullDependency extends Dependency {
  9359. constructor();
  9360. static Template: typeof NullDependencyTemplate;
  9361. static NO_EXPORTS_REFERENCED: string[][];
  9362. static EXPORTS_OBJECT_REFERENCED: string[][];
  9363. static TRANSITIVE: typeof TRANSITIVE;
  9364. }
  9365. declare class NullDependencyTemplate extends DependencyTemplate {
  9366. constructor();
  9367. }
  9368. declare interface ObjectDeserializerContext {
  9369. read: () => any;
  9370. setCircularReference: (arg0?: any) => void;
  9371. }
  9372. declare interface ObjectEncodingOptions {
  9373. encoding?:
  9374. | null
  9375. | "ascii"
  9376. | "utf8"
  9377. | "utf-8"
  9378. | "utf16le"
  9379. | "utf-16le"
  9380. | "ucs2"
  9381. | "ucs-2"
  9382. | "latin1"
  9383. | "binary"
  9384. | "base64"
  9385. | "base64url"
  9386. | "hex";
  9387. }
  9388. declare interface ObjectForExtract {
  9389. [index: string]: any;
  9390. }
  9391. declare interface ObjectSerializer {
  9392. serialize: (arg0: any, arg1: ObjectSerializerContext) => void;
  9393. deserialize: (arg0: ObjectDeserializerContext) => any;
  9394. }
  9395. declare interface ObjectSerializerContext {
  9396. write: (arg0?: any) => void;
  9397. writeLazy?: (arg0?: any) => void;
  9398. writeSeparate?: (arg0: any, arg1?: object) => () => any;
  9399. setCircularReference: (arg0?: any) => void;
  9400. }
  9401. declare class OccurrenceChunkIdsPlugin {
  9402. constructor(options?: OccurrenceChunkIdsPluginOptions);
  9403. options: OccurrenceChunkIdsPluginOptions;
  9404. /**
  9405. * Apply the plugin
  9406. */
  9407. apply(compiler: Compiler): void;
  9408. }
  9409. declare interface OccurrenceChunkIdsPluginOptions {
  9410. /**
  9411. * Prioritise initial size over total size.
  9412. */
  9413. prioritiseInitial?: boolean;
  9414. }
  9415. declare class OccurrenceModuleIdsPlugin {
  9416. constructor(options?: OccurrenceModuleIdsPluginOptions);
  9417. options: OccurrenceModuleIdsPluginOptions;
  9418. /**
  9419. * Apply the plugin
  9420. */
  9421. apply(compiler: Compiler): void;
  9422. }
  9423. declare interface OccurrenceModuleIdsPluginOptions {
  9424. /**
  9425. * Prioritise initial size over total size.
  9426. */
  9427. prioritiseInitial?: boolean;
  9428. }
  9429. declare interface Open {
  9430. (
  9431. file: PathLikeFs,
  9432. flags: undefined | string | number,
  9433. mode: undefined | null | string | number,
  9434. callback: (arg0: null | NodeJS.ErrnoException, arg1?: number) => void
  9435. ): void;
  9436. (
  9437. file: PathLikeFs,
  9438. flags: undefined | string | number,
  9439. callback: (arg0: null | NodeJS.ErrnoException, arg1?: number) => void
  9440. ): void;
  9441. (
  9442. file: PathLikeFs,
  9443. callback: (arg0: null | NodeJS.ErrnoException, arg1?: number) => void
  9444. ): void;
  9445. }
  9446. /**
  9447. * Enables/Disables integrated optimizations.
  9448. */
  9449. declare interface Optimization {
  9450. /**
  9451. * Avoid wrapping the entry module in an IIFE.
  9452. */
  9453. avoidEntryIife?: boolean;
  9454. /**
  9455. * Check for incompatible wasm types when importing/exporting from/to ESM.
  9456. */
  9457. checkWasmTypes?: boolean;
  9458. /**
  9459. * Define the algorithm to choose chunk ids (named: readable ids for better debugging, deterministic: numeric hash ids for better long term caching, size: numeric ids focused on minimal initial download size, total-size: numeric ids focused on minimal total download size, false: no algorithm used, as custom one can be provided via plugin).
  9460. */
  9461. chunkIds?:
  9462. | false
  9463. | "natural"
  9464. | "named"
  9465. | "deterministic"
  9466. | "size"
  9467. | "total-size";
  9468. /**
  9469. * Concatenate modules when possible to generate less modules, more efficient code and enable more optimizations by the minimizer.
  9470. */
  9471. concatenateModules?: boolean;
  9472. /**
  9473. * Emit assets even when errors occur. Critical errors are emitted into the generated code and will cause errors at runtime.
  9474. */
  9475. emitOnErrors?: boolean;
  9476. /**
  9477. * Also flag chunks as loaded which contain a subset of the modules.
  9478. */
  9479. flagIncludedChunks?: boolean;
  9480. /**
  9481. * Creates a module-internal dependency graph for top level symbols, exports and imports, to improve unused exports detection.
  9482. */
  9483. innerGraph?: boolean;
  9484. /**
  9485. * Rename exports when possible to generate shorter code (depends on optimization.usedExports and optimization.providedExports, true/"deterministic": generate short deterministic names optimized for caching, "size": generate the shortest possible names).
  9486. */
  9487. mangleExports?: boolean | "deterministic" | "size";
  9488. /**
  9489. * Reduce size of WASM by changing imports to shorter strings.
  9490. */
  9491. mangleWasmImports?: boolean;
  9492. /**
  9493. * Merge chunks which contain the same modules.
  9494. */
  9495. mergeDuplicateChunks?: boolean;
  9496. /**
  9497. * Enable minimizing the output. Uses optimization.minimizer.
  9498. */
  9499. minimize?: boolean;
  9500. /**
  9501. * Minimizer(s) to use for minimizing the output.
  9502. */
  9503. minimizer?: (
  9504. | undefined
  9505. | null
  9506. | false
  9507. | ""
  9508. | 0
  9509. | ((this: Compiler, compiler: Compiler) => void)
  9510. | WebpackPluginInstance
  9511. | "..."
  9512. )[];
  9513. /**
  9514. * Define the algorithm to choose module ids (natural: numeric ids in order of usage, named: readable ids for better debugging, hashed: (deprecated) short hashes as ids for better long term caching, deterministic: numeric hash ids for better long term caching, size: numeric ids focused on minimal initial download size, false: no algorithm used, as custom one can be provided via plugin).
  9515. */
  9516. moduleIds?: false | "natural" | "named" | "deterministic" | "size" | "hashed";
  9517. /**
  9518. * Avoid emitting assets when errors occur (deprecated: use 'emitOnErrors' instead).
  9519. */
  9520. noEmitOnErrors?: boolean;
  9521. /**
  9522. * Set process.env.NODE_ENV to a specific value.
  9523. */
  9524. nodeEnv?: string | false;
  9525. /**
  9526. * Generate records with relative paths to be able to move the context folder.
  9527. */
  9528. portableRecords?: boolean;
  9529. /**
  9530. * Figure out which exports are provided by modules to generate more efficient code.
  9531. */
  9532. providedExports?: boolean;
  9533. /**
  9534. * Use real [contenthash] based on final content of the assets.
  9535. */
  9536. realContentHash?: boolean;
  9537. /**
  9538. * Removes modules from chunks when these modules are already included in all parents.
  9539. */
  9540. removeAvailableModules?: boolean;
  9541. /**
  9542. * Remove chunks which are empty.
  9543. */
  9544. removeEmptyChunks?: boolean;
  9545. /**
  9546. * Create an additional chunk which contains only the webpack runtime and chunk hash maps.
  9547. */
  9548. runtimeChunk?:
  9549. | boolean
  9550. | "single"
  9551. | "multiple"
  9552. | {
  9553. /**
  9554. * The name or name factory for the runtime chunks.
  9555. */
  9556. name?: string | Function;
  9557. };
  9558. /**
  9559. * Skip over modules which contain no side effects when exports are not used (false: disabled, 'flag': only use manually placed side effects flag, true: also analyse source code for side effects).
  9560. */
  9561. sideEffects?: boolean | "flag";
  9562. /**
  9563. * Optimize duplication and caching by splitting chunks by shared modules and cache group.
  9564. */
  9565. splitChunks?: false | OptimizationSplitChunksOptions;
  9566. /**
  9567. * Figure out which exports are used by modules to mangle export names, omit unused exports and generate more efficient code (true: analyse used exports for each runtime, "global": analyse exports globally for all runtimes combined).
  9568. */
  9569. usedExports?: boolean | "global";
  9570. }
  9571. /**
  9572. * Options object for describing behavior of a cache group selecting modules that should be cached together.
  9573. */
  9574. declare interface OptimizationSplitChunksCacheGroup {
  9575. /**
  9576. * Sets the name delimiter for created chunks.
  9577. */
  9578. automaticNameDelimiter?: string;
  9579. /**
  9580. * Select chunks for determining cache group content (defaults to "initial", "initial" and "all" requires adding these chunks to the HTML).
  9581. */
  9582. chunks?: RegExp | "all" | "initial" | "async" | ((chunk: Chunk) => boolean);
  9583. /**
  9584. * Ignore minimum size, minimum chunks and maximum requests and always create chunks for this cache group.
  9585. */
  9586. enforce?: boolean;
  9587. /**
  9588. * Size threshold at which splitting is enforced and other restrictions (minRemainingSize, maxAsyncRequests, maxInitialRequests) are ignored.
  9589. */
  9590. enforceSizeThreshold?: number | { [index: string]: number };
  9591. /**
  9592. * Sets the template for the filename for created chunks.
  9593. */
  9594. filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
  9595. /**
  9596. * Sets the hint for chunk id.
  9597. */
  9598. idHint?: string;
  9599. /**
  9600. * Assign modules to a cache group by module layer.
  9601. */
  9602. layer?: string | Function | RegExp;
  9603. /**
  9604. * Maximum number of requests which are accepted for on-demand loading.
  9605. */
  9606. maxAsyncRequests?: number;
  9607. /**
  9608. * Maximal size hint for the on-demand chunks.
  9609. */
  9610. maxAsyncSize?: number | { [index: string]: number };
  9611. /**
  9612. * Maximum number of initial chunks which are accepted for an entry point.
  9613. */
  9614. maxInitialRequests?: number;
  9615. /**
  9616. * Maximal size hint for the initial chunks.
  9617. */
  9618. maxInitialSize?: number | { [index: string]: number };
  9619. /**
  9620. * Maximal size hint for the created chunks.
  9621. */
  9622. maxSize?: number | { [index: string]: number };
  9623. /**
  9624. * Minimum number of times a module has to be duplicated until it's considered for splitting.
  9625. */
  9626. minChunks?: number;
  9627. /**
  9628. * Minimal size for the chunks the stay after moving the modules to a new chunk.
  9629. */
  9630. minRemainingSize?: number | { [index: string]: number };
  9631. /**
  9632. * Minimal size for the created chunk.
  9633. */
  9634. minSize?: number | { [index: string]: number };
  9635. /**
  9636. * Minimum size reduction due to the created chunk.
  9637. */
  9638. minSizeReduction?: number | { [index: string]: number };
  9639. /**
  9640. * Give chunks for this cache group a name (chunks with equal name are merged).
  9641. */
  9642. name?: string | false | Function;
  9643. /**
  9644. * Priority of this cache group.
  9645. */
  9646. priority?: number;
  9647. /**
  9648. * Try to reuse existing chunk (with name) when it has matching modules.
  9649. */
  9650. reuseExistingChunk?: boolean;
  9651. /**
  9652. * Assign modules to a cache group by module name.
  9653. */
  9654. test?: string | Function | RegExp;
  9655. /**
  9656. * Assign modules to a cache group by module type.
  9657. */
  9658. type?: string | Function | RegExp;
  9659. /**
  9660. * Compare used exports when checking common modules. Modules will only be put in the same chunk when exports are equal.
  9661. */
  9662. usedExports?: boolean;
  9663. }
  9664. /**
  9665. * Options object for splitting chunks into smaller chunks.
  9666. */
  9667. declare interface OptimizationSplitChunksOptions {
  9668. /**
  9669. * Sets the name delimiter for created chunks.
  9670. */
  9671. automaticNameDelimiter?: string;
  9672. /**
  9673. * Assign modules to a cache group (modules from different cache groups are tried to keep in separate chunks, default categories: 'default', 'defaultVendors').
  9674. */
  9675. cacheGroups?: {
  9676. [index: string]:
  9677. | string
  9678. | false
  9679. | Function
  9680. | RegExp
  9681. | OptimizationSplitChunksCacheGroup;
  9682. };
  9683. /**
  9684. * Select chunks for determining shared modules (defaults to "async", "initial" and "all" requires adding these chunks to the HTML).
  9685. */
  9686. chunks?: RegExp | "all" | "initial" | "async" | ((chunk: Chunk) => boolean);
  9687. /**
  9688. * Sets the size types which are used when a number is used for sizes.
  9689. */
  9690. defaultSizeTypes?: string[];
  9691. /**
  9692. * Size threshold at which splitting is enforced and other restrictions (minRemainingSize, maxAsyncRequests, maxInitialRequests) are ignored.
  9693. */
  9694. enforceSizeThreshold?: number | { [index: string]: number };
  9695. /**
  9696. * Options for modules not selected by any other cache group.
  9697. */
  9698. fallbackCacheGroup?: {
  9699. /**
  9700. * Sets the name delimiter for created chunks.
  9701. */
  9702. automaticNameDelimiter?: string;
  9703. /**
  9704. * Select chunks for determining shared modules (defaults to "async", "initial" and "all" requires adding these chunks to the HTML).
  9705. */
  9706. chunks?: RegExp | "all" | "initial" | "async" | ((chunk: Chunk) => boolean);
  9707. /**
  9708. * Maximal size hint for the on-demand chunks.
  9709. */
  9710. maxAsyncSize?: number | { [index: string]: number };
  9711. /**
  9712. * Maximal size hint for the initial chunks.
  9713. */
  9714. maxInitialSize?: number | { [index: string]: number };
  9715. /**
  9716. * Maximal size hint for the created chunks.
  9717. */
  9718. maxSize?: number | { [index: string]: number };
  9719. /**
  9720. * Minimal size for the created chunk.
  9721. */
  9722. minSize?: number | { [index: string]: number };
  9723. /**
  9724. * Minimum size reduction due to the created chunk.
  9725. */
  9726. minSizeReduction?: number | { [index: string]: number };
  9727. };
  9728. /**
  9729. * Sets the template for the filename for created chunks.
  9730. */
  9731. filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
  9732. /**
  9733. * Prevents exposing path info when creating names for parts splitted by maxSize.
  9734. */
  9735. hidePathInfo?: boolean;
  9736. /**
  9737. * Maximum number of requests which are accepted for on-demand loading.
  9738. */
  9739. maxAsyncRequests?: number;
  9740. /**
  9741. * Maximal size hint for the on-demand chunks.
  9742. */
  9743. maxAsyncSize?: number | { [index: string]: number };
  9744. /**
  9745. * Maximum number of initial chunks which are accepted for an entry point.
  9746. */
  9747. maxInitialRequests?: number;
  9748. /**
  9749. * Maximal size hint for the initial chunks.
  9750. */
  9751. maxInitialSize?: number | { [index: string]: number };
  9752. /**
  9753. * Maximal size hint for the created chunks.
  9754. */
  9755. maxSize?: number | { [index: string]: number };
  9756. /**
  9757. * Minimum number of times a module has to be duplicated until it's considered for splitting.
  9758. */
  9759. minChunks?: number;
  9760. /**
  9761. * Minimal size for the chunks the stay after moving the modules to a new chunk.
  9762. */
  9763. minRemainingSize?: number | { [index: string]: number };
  9764. /**
  9765. * Minimal size for the created chunks.
  9766. */
  9767. minSize?: number | { [index: string]: number };
  9768. /**
  9769. * Minimum size reduction due to the created chunk.
  9770. */
  9771. minSizeReduction?: number | { [index: string]: number };
  9772. /**
  9773. * Give chunks created a name (chunks with equal name are merged).
  9774. */
  9775. name?: string | false | Function;
  9776. /**
  9777. * Compare used exports when checking common modules. Modules will only be put in the same chunk when exports are equal.
  9778. */
  9779. usedExports?: boolean;
  9780. }
  9781. declare interface Options {
  9782. /**
  9783. * source
  9784. */
  9785. source: string;
  9786. /**
  9787. * absolute context path to which lib ident is relative to
  9788. */
  9789. context: string;
  9790. /**
  9791. * content
  9792. */
  9793. content: DllReferencePluginOptionsContent;
  9794. /**
  9795. * type
  9796. */
  9797. type?: "object" | "require";
  9798. /**
  9799. * extensions
  9800. */
  9801. extensions?: string[];
  9802. /**
  9803. * scope
  9804. */
  9805. scope?: string;
  9806. /**
  9807. * object for caching
  9808. */
  9809. associatedObjectForCache?: object;
  9810. }
  9811. declare abstract class OptionsApply {
  9812. process(
  9813. options: WebpackOptionsNormalized,
  9814. compiler: Compiler
  9815. ): WebpackOptionsNormalized;
  9816. }
  9817. declare interface OriginRecord {
  9818. module: null | Module;
  9819. loc: DependencyLocation;
  9820. request: string;
  9821. }
  9822. declare class OriginalSource extends Source {
  9823. constructor(source: string | Buffer, name: string);
  9824. getName(): string;
  9825. }
  9826. /**
  9827. * Options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.
  9828. */
  9829. declare interface Output {
  9830. /**
  9831. * Add a container for define/require functions in the AMD module.
  9832. */
  9833. amdContainer?: string;
  9834. /**
  9835. * The filename of asset modules as relative path inside the 'output.path' directory.
  9836. */
  9837. assetModuleFilename?:
  9838. | string
  9839. | ((pathData: PathData, assetInfo?: AssetInfo) => string);
  9840. /**
  9841. * Enable/disable creating async chunks that are loaded on demand.
  9842. */
  9843. asyncChunks?: boolean;
  9844. /**
  9845. * Add a comment in the UMD wrapper.
  9846. */
  9847. auxiliaryComment?: string | LibraryCustomUmdCommentObject;
  9848. /**
  9849. * Add charset attribute for script tag.
  9850. */
  9851. charset?: boolean;
  9852. /**
  9853. * Specifies the filename template of output files of non-initial chunks on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
  9854. */
  9855. chunkFilename?:
  9856. | string
  9857. | ((pathData: PathData, assetInfo?: AssetInfo) => string);
  9858. /**
  9859. * The format of chunks (formats included by default are 'array-push' (web/WebWorker), 'commonjs' (node.js), 'module' (ESM), but others might be added by plugins).
  9860. */
  9861. chunkFormat?: string | false;
  9862. /**
  9863. * Number of milliseconds before chunk request expires.
  9864. */
  9865. chunkLoadTimeout?: number;
  9866. /**
  9867. * The method of loading chunks (methods included by default are 'jsonp' (web), 'import' (ESM), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
  9868. */
  9869. chunkLoading?: string | false;
  9870. /**
  9871. * The global variable used by webpack for loading of chunks.
  9872. */
  9873. chunkLoadingGlobal?: string;
  9874. /**
  9875. * Clean the output directory before emit.
  9876. */
  9877. clean?: boolean | CleanOptions;
  9878. /**
  9879. * Check if to be emitted file already exists and have the same content before writing to output filesystem.
  9880. */
  9881. compareBeforeEmit?: boolean;
  9882. /**
  9883. * This option enables cross-origin loading of chunks.
  9884. */
  9885. crossOriginLoading?: false | "anonymous" | "use-credentials";
  9886. /**
  9887. * Specifies the filename template of non-initial output css files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
  9888. */
  9889. cssChunkFilename?:
  9890. | string
  9891. | ((pathData: PathData, assetInfo?: AssetInfo) => string);
  9892. /**
  9893. * Specifies the filename template of output css files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
  9894. */
  9895. cssFilename?:
  9896. | string
  9897. | ((pathData: PathData, assetInfo?: AssetInfo) => string);
  9898. /**
  9899. * Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
  9900. */
  9901. devtoolFallbackModuleFilenameTemplate?: string | Function;
  9902. /**
  9903. * Filename template string of function for the sources array in a generated SourceMap.
  9904. */
  9905. devtoolModuleFilenameTemplate?: string | Function;
  9906. /**
  9907. * Module namespace to use when interpolating filename template string for the sources array in a generated SourceMap. Defaults to `output.library` if not set. It's useful for avoiding runtime collisions in sourcemaps from multiple webpack projects built as libraries.
  9908. */
  9909. devtoolNamespace?: string;
  9910. /**
  9911. * List of chunk loading types enabled for use by entry points.
  9912. */
  9913. enabledChunkLoadingTypes?: string[];
  9914. /**
  9915. * List of library types enabled for use by entry points.
  9916. */
  9917. enabledLibraryTypes?: string[];
  9918. /**
  9919. * List of wasm loading types enabled for use by entry points.
  9920. */
  9921. enabledWasmLoadingTypes?: string[];
  9922. /**
  9923. * The abilities of the environment where the webpack generated code should run.
  9924. */
  9925. environment?: Environment;
  9926. /**
  9927. * Specifies the filename of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
  9928. */
  9929. filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
  9930. /**
  9931. * An expression which is used to address the global object/scope in runtime code.
  9932. */
  9933. globalObject?: string;
  9934. /**
  9935. * Digest type used for the hash.
  9936. */
  9937. hashDigest?: string;
  9938. /**
  9939. * Number of chars which are used for the hash.
  9940. */
  9941. hashDigestLength?: number;
  9942. /**
  9943. * Algorithm used for generation the hash (see node.js crypto package).
  9944. */
  9945. hashFunction?: string | typeof Hash;
  9946. /**
  9947. * Any string which is added to the hash to salt it.
  9948. */
  9949. hashSalt?: string;
  9950. /**
  9951. * The filename of the Hot Update Chunks. They are inside the output.path directory.
  9952. */
  9953. hotUpdateChunkFilename?: string;
  9954. /**
  9955. * The global variable used by webpack for loading of hot update chunks.
  9956. */
  9957. hotUpdateGlobal?: string;
  9958. /**
  9959. * The filename of the Hot Update Main File. It is inside the 'output.path' directory.
  9960. */
  9961. hotUpdateMainFilename?: string;
  9962. /**
  9963. * Ignore warnings in the browser.
  9964. */
  9965. ignoreBrowserWarnings?: boolean;
  9966. /**
  9967. * Wrap javascript code into IIFE's to avoid leaking into global scope.
  9968. */
  9969. iife?: boolean;
  9970. /**
  9971. * The name of the native import() function (can be exchanged for a polyfill).
  9972. */
  9973. importFunctionName?: string;
  9974. /**
  9975. * The name of the native import.meta object (can be exchanged for a polyfill).
  9976. */
  9977. importMetaName?: string;
  9978. /**
  9979. * Make the output files a library, exporting the exports of the entry point.
  9980. */
  9981. library?: string | string[] | LibraryOptions | LibraryCustomUmdObject;
  9982. /**
  9983. * Specify which export should be exposed as library.
  9984. */
  9985. libraryExport?: string | string[];
  9986. /**
  9987. * Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'commonjs-static', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).
  9988. */
  9989. libraryTarget?: string;
  9990. /**
  9991. * Output javascript files as module source type.
  9992. */
  9993. module?: boolean;
  9994. /**
  9995. * The output directory as **absolute path** (required).
  9996. */
  9997. path?: string;
  9998. /**
  9999. * Include comments with information about the modules.
  10000. */
  10001. pathinfo?: boolean | "verbose";
  10002. /**
  10003. * The 'publicPath' specifies the public URL address of the output files when referenced in a browser.
  10004. */
  10005. publicPath?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
  10006. /**
  10007. * This option enables loading async chunks via a custom script type, such as script type="module".
  10008. */
  10009. scriptType?: false | "module" | "text/javascript";
  10010. /**
  10011. * The filename of the SourceMaps for the JavaScript files. They are inside the 'output.path' directory.
  10012. */
  10013. sourceMapFilename?: string;
  10014. /**
  10015. * Prefixes every line of the source in the bundle with this string.
  10016. */
  10017. sourcePrefix?: string;
  10018. /**
  10019. * Handles error in module loading correctly at a performance cost. This will handle module error compatible with the EcmaScript Modules spec.
  10020. */
  10021. strictModuleErrorHandling?: boolean;
  10022. /**
  10023. * Handles exceptions in module loading correctly at a performance cost (Deprecated). This will handle module error compatible with the Node.js CommonJS way.
  10024. */
  10025. strictModuleExceptionHandling?: boolean;
  10026. /**
  10027. * Use a Trusted Types policy to create urls for chunks. 'output.uniqueName' is used a default policy name. Passing a string sets a custom policy name.
  10028. */
  10029. trustedTypes?: string | true | TrustedTypes;
  10030. /**
  10031. * If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.
  10032. */
  10033. umdNamedDefine?: boolean;
  10034. /**
  10035. * A unique name of the webpack build to avoid multiple webpack runtimes to conflict when using globals.
  10036. */
  10037. uniqueName?: string;
  10038. /**
  10039. * The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).
  10040. */
  10041. wasmLoading?: string | false;
  10042. /**
  10043. * The filename of WebAssembly modules as relative path inside the 'output.path' directory.
  10044. */
  10045. webassemblyModuleFilename?: string;
  10046. /**
  10047. * The method of loading chunks (methods included by default are 'jsonp' (web), 'import' (ESM), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
  10048. */
  10049. workerChunkLoading?: string | false;
  10050. /**
  10051. * Worker public path. Much like the public path, this sets the location where the worker script file is intended to be found. If not set, webpack will use the publicPath. Don't set this option unless your worker scripts are located at a different path from your other script files.
  10052. */
  10053. workerPublicPath?: string;
  10054. /**
  10055. * The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).
  10056. */
  10057. workerWasmLoading?: string | false;
  10058. }
  10059. declare interface OutputFileSystem {
  10060. writeFile: WriteFile;
  10061. mkdir: Mkdir;
  10062. readdir?: ReaddirFs;
  10063. rmdir?: Rmdir;
  10064. unlink?: (
  10065. arg0: PathLikeFs,
  10066. arg1: (arg0: null | NodeJS.ErrnoException) => void
  10067. ) => void;
  10068. stat: StatFs;
  10069. lstat?: LStatFs;
  10070. readFile: ReadFileFs;
  10071. join?: (arg0: string, arg1: string) => string;
  10072. relative?: (arg0: string, arg1: string) => string;
  10073. dirname?: (arg0: string) => string;
  10074. }
  10075. /**
  10076. * Normalized options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.
  10077. */
  10078. declare interface OutputNormalized {
  10079. /**
  10080. * The filename of asset modules as relative path inside the 'output.path' directory.
  10081. */
  10082. assetModuleFilename?:
  10083. | string
  10084. | ((pathData: PathData, assetInfo?: AssetInfo) => string);
  10085. /**
  10086. * Enable/disable creating async chunks that are loaded on demand.
  10087. */
  10088. asyncChunks?: boolean;
  10089. /**
  10090. * Add charset attribute for script tag.
  10091. */
  10092. charset?: boolean;
  10093. /**
  10094. * Specifies the filename template of output files of non-initial chunks on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
  10095. */
  10096. chunkFilename?:
  10097. | string
  10098. | ((pathData: PathData, assetInfo?: AssetInfo) => string);
  10099. /**
  10100. * The format of chunks (formats included by default are 'array-push' (web/WebWorker), 'commonjs' (node.js), 'module' (ESM), but others might be added by plugins).
  10101. */
  10102. chunkFormat?: string | false;
  10103. /**
  10104. * Number of milliseconds before chunk request expires.
  10105. */
  10106. chunkLoadTimeout?: number;
  10107. /**
  10108. * The method of loading chunks (methods included by default are 'jsonp' (web), 'import' (ESM), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
  10109. */
  10110. chunkLoading?: string | false;
  10111. /**
  10112. * The global variable used by webpack for loading of chunks.
  10113. */
  10114. chunkLoadingGlobal?: string;
  10115. /**
  10116. * Clean the output directory before emit.
  10117. */
  10118. clean?: boolean | CleanOptions;
  10119. /**
  10120. * Check if to be emitted file already exists and have the same content before writing to output filesystem.
  10121. */
  10122. compareBeforeEmit?: boolean;
  10123. /**
  10124. * This option enables cross-origin loading of chunks.
  10125. */
  10126. crossOriginLoading?: false | "anonymous" | "use-credentials";
  10127. /**
  10128. * Specifies the filename template of non-initial output css files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
  10129. */
  10130. cssChunkFilename?:
  10131. | string
  10132. | ((pathData: PathData, assetInfo?: AssetInfo) => string);
  10133. /**
  10134. * Specifies the filename template of output css files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
  10135. */
  10136. cssFilename?:
  10137. | string
  10138. | ((pathData: PathData, assetInfo?: AssetInfo) => string);
  10139. /**
  10140. * Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
  10141. */
  10142. devtoolFallbackModuleFilenameTemplate?: string | Function;
  10143. /**
  10144. * Filename template string of function for the sources array in a generated SourceMap.
  10145. */
  10146. devtoolModuleFilenameTemplate?: string | Function;
  10147. /**
  10148. * Module namespace to use when interpolating filename template string for the sources array in a generated SourceMap. Defaults to `output.library` if not set. It's useful for avoiding runtime collisions in sourcemaps from multiple webpack projects built as libraries.
  10149. */
  10150. devtoolNamespace?: string;
  10151. /**
  10152. * List of chunk loading types enabled for use by entry points.
  10153. */
  10154. enabledChunkLoadingTypes: string[];
  10155. /**
  10156. * List of library types enabled for use by entry points.
  10157. */
  10158. enabledLibraryTypes: string[];
  10159. /**
  10160. * List of wasm loading types enabled for use by entry points.
  10161. */
  10162. enabledWasmLoadingTypes: string[];
  10163. /**
  10164. * The abilities of the environment where the webpack generated code should run.
  10165. */
  10166. environment: Environment;
  10167. /**
  10168. * Specifies the filename of output files on disk. You must **not** specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.
  10169. */
  10170. filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
  10171. /**
  10172. * An expression which is used to address the global object/scope in runtime code.
  10173. */
  10174. globalObject?: string;
  10175. /**
  10176. * Digest type used for the hash.
  10177. */
  10178. hashDigest?: string;
  10179. /**
  10180. * Number of chars which are used for the hash.
  10181. */
  10182. hashDigestLength?: number;
  10183. /**
  10184. * Algorithm used for generation the hash (see node.js crypto package).
  10185. */
  10186. hashFunction?: string | typeof Hash;
  10187. /**
  10188. * Any string which is added to the hash to salt it.
  10189. */
  10190. hashSalt?: string;
  10191. /**
  10192. * The filename of the Hot Update Chunks. They are inside the output.path directory.
  10193. */
  10194. hotUpdateChunkFilename?: string;
  10195. /**
  10196. * The global variable used by webpack for loading of hot update chunks.
  10197. */
  10198. hotUpdateGlobal?: string;
  10199. /**
  10200. * The filename of the Hot Update Main File. It is inside the 'output.path' directory.
  10201. */
  10202. hotUpdateMainFilename?: string;
  10203. /**
  10204. * Ignore warnings in the browser.
  10205. */
  10206. ignoreBrowserWarnings?: boolean;
  10207. /**
  10208. * Wrap javascript code into IIFE's to avoid leaking into global scope.
  10209. */
  10210. iife?: boolean;
  10211. /**
  10212. * The name of the native import() function (can be exchanged for a polyfill).
  10213. */
  10214. importFunctionName?: string;
  10215. /**
  10216. * The name of the native import.meta object (can be exchanged for a polyfill).
  10217. */
  10218. importMetaName?: string;
  10219. /**
  10220. * Options for library.
  10221. */
  10222. library?: LibraryOptions;
  10223. /**
  10224. * Output javascript files as module source type.
  10225. */
  10226. module?: boolean;
  10227. /**
  10228. * The output directory as **absolute path** (required).
  10229. */
  10230. path?: string;
  10231. /**
  10232. * Include comments with information about the modules.
  10233. */
  10234. pathinfo?: boolean | "verbose";
  10235. /**
  10236. * The 'publicPath' specifies the public URL address of the output files when referenced in a browser.
  10237. */
  10238. publicPath?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
  10239. /**
  10240. * This option enables loading async chunks via a custom script type, such as script type="module".
  10241. */
  10242. scriptType?: false | "module" | "text/javascript";
  10243. /**
  10244. * The filename of the SourceMaps for the JavaScript files. They are inside the 'output.path' directory.
  10245. */
  10246. sourceMapFilename?: string;
  10247. /**
  10248. * Prefixes every line of the source in the bundle with this string.
  10249. */
  10250. sourcePrefix?: string;
  10251. /**
  10252. * Handles error in module loading correctly at a performance cost. This will handle module error compatible with the EcmaScript Modules spec.
  10253. */
  10254. strictModuleErrorHandling?: boolean;
  10255. /**
  10256. * Handles exceptions in module loading correctly at a performance cost (Deprecated). This will handle module error compatible with the Node.js CommonJS way.
  10257. */
  10258. strictModuleExceptionHandling?: boolean;
  10259. /**
  10260. * Use a Trusted Types policy to create urls for chunks.
  10261. */
  10262. trustedTypes?: TrustedTypes;
  10263. /**
  10264. * A unique name of the webpack build to avoid multiple webpack runtimes to conflict when using globals.
  10265. */
  10266. uniqueName?: string;
  10267. /**
  10268. * The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).
  10269. */
  10270. wasmLoading?: string | false;
  10271. /**
  10272. * The filename of WebAssembly modules as relative path inside the 'output.path' directory.
  10273. */
  10274. webassemblyModuleFilename?: string;
  10275. /**
  10276. * The method of loading chunks (methods included by default are 'jsonp' (web), 'import' (ESM), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).
  10277. */
  10278. workerChunkLoading?: string | false;
  10279. /**
  10280. * Worker public path. Much like the public path, this sets the location where the worker script file is intended to be found. If not set, webpack will use the publicPath. Don't set this option unless your worker scripts are located at a different path from your other script files.
  10281. */
  10282. workerPublicPath?: string;
  10283. /**
  10284. * The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).
  10285. */
  10286. workerWasmLoading?: string | false;
  10287. }
  10288. declare interface ParameterizedComparator<TArg, T> {
  10289. (arg0: TArg): Comparator<T>;
  10290. }
  10291. declare interface ParsedIdentifier {
  10292. request: string;
  10293. query: string;
  10294. fragment: string;
  10295. directory: boolean;
  10296. module: boolean;
  10297. file: boolean;
  10298. internal: boolean;
  10299. }
  10300. declare class Parser {
  10301. constructor();
  10302. parse(
  10303. source: string | Buffer | PreparsedAst,
  10304. state: ParserState
  10305. ): ParserState;
  10306. }
  10307. declare interface ParserOptions {
  10308. [index: string]: any;
  10309. }
  10310. type ParserOptionsByModuleType = ParserOptionsByModuleTypeKnown &
  10311. ParserOptionsByModuleTypeUnknown;
  10312. /**
  10313. * Specify options for each parser.
  10314. */
  10315. declare interface ParserOptionsByModuleTypeKnown {
  10316. /**
  10317. * Parser options for asset modules.
  10318. */
  10319. asset?: AssetParserOptions;
  10320. /**
  10321. * No parser options are supported for this module type.
  10322. */
  10323. "asset/inline"?: EmptyParserOptions;
  10324. /**
  10325. * No parser options are supported for this module type.
  10326. */
  10327. "asset/resource"?: EmptyParserOptions;
  10328. /**
  10329. * No parser options are supported for this module type.
  10330. */
  10331. "asset/source"?: EmptyParserOptions;
  10332. /**
  10333. * Parser options for css modules.
  10334. */
  10335. css?: CssParserOptions;
  10336. /**
  10337. * Parser options for css/auto modules.
  10338. */
  10339. "css/auto"?: CssAutoParserOptions;
  10340. /**
  10341. * Parser options for css/global modules.
  10342. */
  10343. "css/global"?: CssGlobalParserOptions;
  10344. /**
  10345. * Parser options for css/module modules.
  10346. */
  10347. "css/module"?: CssModuleParserOptions;
  10348. /**
  10349. * Parser options for javascript modules.
  10350. */
  10351. javascript?: JavascriptParserOptions;
  10352. /**
  10353. * Parser options for javascript modules.
  10354. */
  10355. "javascript/auto"?: JavascriptParserOptions;
  10356. /**
  10357. * Parser options for javascript modules.
  10358. */
  10359. "javascript/dynamic"?: JavascriptParserOptions;
  10360. /**
  10361. * Parser options for javascript modules.
  10362. */
  10363. "javascript/esm"?: JavascriptParserOptions;
  10364. }
  10365. /**
  10366. * Specify options for each parser.
  10367. */
  10368. declare interface ParserOptionsByModuleTypeUnknown {
  10369. [index: string]: { [index: string]: any };
  10370. }
  10371. type ParserState = Record<string, any> & ParserStateBase;
  10372. declare interface ParserStateBase {
  10373. source: string | Buffer;
  10374. current: NormalModule;
  10375. module: NormalModule;
  10376. compilation: Compilation;
  10377. options: { [index: string]: any };
  10378. }
  10379. declare interface PathData {
  10380. chunkGraph?: ChunkGraph;
  10381. hash?: string;
  10382. hashWithLength?: (arg0: number) => string;
  10383. chunk?: Chunk | ChunkPathData;
  10384. module?: Module | ModulePathData;
  10385. runtime?: RuntimeSpec;
  10386. filename?: string;
  10387. basename?: string;
  10388. query?: string;
  10389. contentHashType?: string;
  10390. contentHash?: string;
  10391. contentHashWithLength?: (arg0: number) => string;
  10392. noChunkHash?: boolean;
  10393. url?: string;
  10394. }
  10395. type PathLikeFs = string | Buffer | URL;
  10396. type PathLikeTypes = string | Buffer | URL_url;
  10397. type PathOrFileDescriptorFs = string | number | Buffer | URL;
  10398. type PathOrFileDescriptorTypes = string | number | Buffer | URL_url;
  10399. type Pattern =
  10400. | Identifier
  10401. | MemberExpression
  10402. | ObjectPattern
  10403. | ArrayPattern
  10404. | RestElement
  10405. | AssignmentPattern;
  10406. /**
  10407. * Configuration object for web performance recommendations.
  10408. */
  10409. declare interface PerformanceOptions {
  10410. /**
  10411. * Filter function to select assets that are checked.
  10412. */
  10413. assetFilter?: Function;
  10414. /**
  10415. * Sets the format of the hints: warnings, errors or nothing at all.
  10416. */
  10417. hints?: false | "error" | "warning";
  10418. /**
  10419. * File size limit (in bytes) when exceeded, that webpack will provide performance hints.
  10420. */
  10421. maxAssetSize?: number;
  10422. /**
  10423. * Total size of an entry point (in bytes).
  10424. */
  10425. maxEntrypointSize?: number;
  10426. }
  10427. declare interface PitchLoaderDefinitionFunction<
  10428. OptionsType = {},
  10429. ContextAdditions = {}
  10430. > {
  10431. (
  10432. this: NormalModuleLoaderContext<OptionsType> &
  10433. LoaderRunnerLoaderContext<OptionsType> &
  10434. LoaderPluginLoaderContext &
  10435. HotModuleReplacementPluginLoaderContext &
  10436. ContextAdditions,
  10437. remainingRequest: string,
  10438. previousRequest: string,
  10439. data: object
  10440. ): string | void | Buffer | Promise<string | Buffer>;
  10441. }
  10442. declare class PlatformPlugin {
  10443. constructor(platform: Partial<PlatformTargetProperties>);
  10444. platform: Partial<PlatformTargetProperties>;
  10445. /**
  10446. * Apply the plugin
  10447. */
  10448. apply(compiler: Compiler): void;
  10449. }
  10450. declare interface PlatformTargetProperties {
  10451. /**
  10452. * web platform, importing of http(s) and std: is available
  10453. */
  10454. web: null | boolean;
  10455. /**
  10456. * browser platform, running in a normal web browser
  10457. */
  10458. browser: null | boolean;
  10459. /**
  10460. * (Web)Worker platform, running in a web/shared/service worker
  10461. */
  10462. webworker: null | boolean;
  10463. /**
  10464. * node platform, require of node built-in modules is available
  10465. */
  10466. node: null | boolean;
  10467. /**
  10468. * nwjs platform, require of legacy nw.gui is available
  10469. */
  10470. nwjs: null | boolean;
  10471. /**
  10472. * electron platform, require of some electron built-in modules is available
  10473. */
  10474. electron: null | boolean;
  10475. }
  10476. type Plugin =
  10477. | undefined
  10478. | null
  10479. | false
  10480. | ""
  10481. | 0
  10482. | { apply: (arg0: Resolver) => void }
  10483. | ((this: Resolver, arg1: Resolver) => void);
  10484. declare interface PnpApi {
  10485. resolveToUnqualified: (
  10486. arg0: string,
  10487. arg1: string,
  10488. arg2: object
  10489. ) => null | string;
  10490. }
  10491. declare class PrefetchPlugin {
  10492. constructor(context: string, request?: string);
  10493. context: null | string;
  10494. request: string;
  10495. /**
  10496. * Apply the plugin
  10497. */
  10498. apply(compiler: Compiler): void;
  10499. }
  10500. declare class PrefixSource extends Source {
  10501. constructor(prefix: string, source: string | Source);
  10502. original(): Source;
  10503. getPrefix(): string;
  10504. }
  10505. declare interface PreparsedAst {
  10506. [index: string]: any;
  10507. }
  10508. declare interface PrintedElement {
  10509. element: string;
  10510. content: string;
  10511. }
  10512. declare interface Problem {
  10513. type: ProblemType;
  10514. path: string;
  10515. argument: string;
  10516. value?: any;
  10517. index?: number;
  10518. expected?: string;
  10519. }
  10520. type ProblemType =
  10521. | "unknown-argument"
  10522. | "unexpected-non-array-in-path"
  10523. | "unexpected-non-object-in-path"
  10524. | "multiple-values-unexpected"
  10525. | "invalid-value";
  10526. declare interface ProcessAssetsAdditionalOptions {
  10527. additionalAssets?: true | Function;
  10528. }
  10529. declare class Profiler {
  10530. constructor(inspector?: any);
  10531. session: any;
  10532. inspector: any;
  10533. hasSession(): boolean;
  10534. startProfiling(): Promise<void> | Promise<[any, any, any]>;
  10535. sendCommand(method: string, params?: object): Promise<any>;
  10536. destroy(): Promise<void>;
  10537. stopProfiling(): Promise<{ profile: any }>;
  10538. }
  10539. declare class ProfilingPlugin {
  10540. constructor(options?: ProfilingPluginOptions);
  10541. outputPath: string;
  10542. /**
  10543. * Apply the plugin
  10544. */
  10545. apply(compiler: Compiler): void;
  10546. static Profiler: typeof Profiler;
  10547. }
  10548. declare interface ProfilingPluginOptions {
  10549. /**
  10550. * Path to the output file e.g. `path.resolve(__dirname, 'profiling/events.json')`. Defaults to `events.json`.
  10551. */
  10552. outputPath?: string;
  10553. }
  10554. declare class ProgressPlugin {
  10555. constructor(options?: ProgressPluginArgument);
  10556. profile?: null | boolean;
  10557. handler?: (percentage: number, msg: string, ...args: string[]) => void;
  10558. modulesCount?: number;
  10559. dependenciesCount?: number;
  10560. showEntries?: boolean;
  10561. showModules?: boolean;
  10562. showDependencies?: boolean;
  10563. showActiveModules?: boolean;
  10564. percentBy?: null | "entries" | "modules" | "dependencies";
  10565. apply(compiler: Compiler | MultiCompiler): void;
  10566. static getReporter(
  10567. compiler: Compiler
  10568. ): undefined | ((p: number, ...args: string[]) => void);
  10569. static defaultOptions: {
  10570. profile: boolean;
  10571. modulesCount: number;
  10572. dependenciesCount: number;
  10573. modules: boolean;
  10574. dependencies: boolean;
  10575. activeModules: boolean;
  10576. entries: boolean;
  10577. };
  10578. static createDefaultHandler: (
  10579. profile: undefined | null | boolean,
  10580. logger: WebpackLogger
  10581. ) => (percentage: number, msg: string, ...args: string[]) => void;
  10582. }
  10583. type ProgressPluginArgument =
  10584. | ProgressPluginOptions
  10585. | ((percentage: number, msg: string, ...args: string[]) => void);
  10586. /**
  10587. * Options object for the ProgressPlugin.
  10588. */
  10589. declare interface ProgressPluginOptions {
  10590. /**
  10591. * Show active modules count and one active module in progress message.
  10592. */
  10593. activeModules?: boolean;
  10594. /**
  10595. * Show dependencies count in progress message.
  10596. */
  10597. dependencies?: boolean;
  10598. /**
  10599. * Minimum dependencies count to start with. For better progress calculation. Default: 10000.
  10600. */
  10601. dependenciesCount?: number;
  10602. /**
  10603. * Show entries count in progress message.
  10604. */
  10605. entries?: boolean;
  10606. /**
  10607. * Function that executes for every progress step.
  10608. */
  10609. handler?: (percentage: number, msg: string, ...args: string[]) => void;
  10610. /**
  10611. * Show modules count in progress message.
  10612. */
  10613. modules?: boolean;
  10614. /**
  10615. * Minimum modules count to start with. For better progress calculation. Default: 5000.
  10616. */
  10617. modulesCount?: number;
  10618. /**
  10619. * Collect percent algorithm. By default it calculates by a median from modules, entries and dependencies percent.
  10620. */
  10621. percentBy?: null | "entries" | "modules" | "dependencies";
  10622. /**
  10623. * Collect profile data for progress steps. Default: false.
  10624. */
  10625. profile?: null | boolean;
  10626. }
  10627. declare class ProvidePlugin {
  10628. constructor(definitions: Record<string, string | string[]>);
  10629. definitions: Record<string, string | string[]>;
  10630. /**
  10631. * Apply the plugin
  10632. */
  10633. apply(compiler: Compiler): void;
  10634. }
  10635. declare class ProvideSharedPlugin {
  10636. constructor(options: ProvideSharedPluginOptions);
  10637. /**
  10638. * Apply the plugin
  10639. */
  10640. apply(compiler: Compiler): void;
  10641. }
  10642. declare interface ProvideSharedPluginOptions {
  10643. /**
  10644. * Modules that should be provided as shared modules to the share scope. When provided, property name is used to match modules, otherwise this is automatically inferred from share key.
  10645. */
  10646. provides: Provides;
  10647. /**
  10648. * Share scope name used for all provided modules (defaults to 'default').
  10649. */
  10650. shareScope?: string;
  10651. }
  10652. type Provides = (string | ProvidesObject)[] | ProvidesObject;
  10653. /**
  10654. * Advanced configuration for modules that should be provided as shared modules to the share scope.
  10655. */
  10656. declare interface ProvidesConfig {
  10657. /**
  10658. * Include the provided module directly instead behind an async request. This allows to use this shared module in initial load too. All possible shared modules need to be eager too.
  10659. */
  10660. eager?: boolean;
  10661. /**
  10662. * Key in the share scope under which the shared modules should be stored.
  10663. */
  10664. shareKey?: string;
  10665. /**
  10666. * Share scope name.
  10667. */
  10668. shareScope?: string;
  10669. /**
  10670. * Version of the provided module. Will replace lower matching versions, but not higher.
  10671. */
  10672. version?: string | false;
  10673. }
  10674. /**
  10675. * Modules that should be provided as shared modules to the share scope. Property names are used as share keys.
  10676. */
  10677. declare interface ProvidesObject {
  10678. [index: string]: string | ProvidesConfig;
  10679. }
  10680. declare interface RawChunkGroupOptions {
  10681. preloadOrder?: number;
  10682. prefetchOrder?: number;
  10683. fetchPriority?: "auto" | "low" | "high";
  10684. }
  10685. type RawLoaderDefinition<
  10686. OptionsType = {},
  10687. ContextAdditions = {}
  10688. > = RawLoaderDefinitionFunction<OptionsType, ContextAdditions> & {
  10689. raw: true;
  10690. pitch?: PitchLoaderDefinitionFunction<OptionsType, ContextAdditions>;
  10691. };
  10692. declare interface RawLoaderDefinitionFunction<
  10693. OptionsType = {},
  10694. ContextAdditions = {}
  10695. > {
  10696. (
  10697. this: NormalModuleLoaderContext<OptionsType> &
  10698. LoaderRunnerLoaderContext<OptionsType> &
  10699. LoaderPluginLoaderContext &
  10700. HotModuleReplacementPluginLoaderContext &
  10701. ContextAdditions,
  10702. content: Buffer,
  10703. sourceMap?: string | SourceMap,
  10704. additionalData?: AdditionalData
  10705. ): string | void | Buffer | Promise<string | Buffer>;
  10706. }
  10707. declare class RawSource extends Source {
  10708. constructor(source: string | Buffer, convertToString?: boolean);
  10709. isBuffer(): boolean;
  10710. }
  10711. declare interface RawSourceMap {
  10712. version: number;
  10713. sources: string[];
  10714. names: string[];
  10715. sourceRoot?: string;
  10716. sourcesContent?: string[];
  10717. mappings: string;
  10718. file: string;
  10719. }
  10720. declare interface Read<TBuffer extends ArrayBufferView = Buffer> {
  10721. (
  10722. fd: number,
  10723. buffer: TBuffer,
  10724. offset: number,
  10725. length: number,
  10726. position: null | number | bigint,
  10727. callback: (
  10728. err: null | NodeJS.ErrnoException,
  10729. bytesRead: number,
  10730. buffer: TBuffer
  10731. ) => void
  10732. ): void;
  10733. (
  10734. fd: number,
  10735. options: ReadAsyncOptions<TBuffer>,
  10736. callback: (
  10737. err: null | NodeJS.ErrnoException,
  10738. bytesRead: number,
  10739. buffer: TBuffer
  10740. ) => void
  10741. ): void;
  10742. (
  10743. fd: number,
  10744. callback: (
  10745. err: null | NodeJS.ErrnoException,
  10746. bytesRead: number,
  10747. buffer: ArrayBufferView
  10748. ) => void
  10749. ): void;
  10750. }
  10751. declare interface ReadAsyncOptions<TBuffer extends ArrayBufferView> {
  10752. offset?: number;
  10753. length?: number;
  10754. position?: null | number | bigint;
  10755. buffer?: TBuffer;
  10756. }
  10757. declare class ReadFileCompileAsyncWasmPlugin {
  10758. constructor(__0?: ReadFileCompileAsyncWasmPluginOptions);
  10759. /**
  10760. * Apply the plugin
  10761. */
  10762. apply(compiler: Compiler): void;
  10763. }
  10764. declare interface ReadFileCompileAsyncWasmPluginOptions {
  10765. /**
  10766. * use import?
  10767. */
  10768. import?: boolean;
  10769. }
  10770. declare class ReadFileCompileWasmPlugin {
  10771. constructor(options?: ReadFileCompileWasmPluginOptions);
  10772. options: ReadFileCompileWasmPluginOptions;
  10773. /**
  10774. * Apply the plugin
  10775. */
  10776. apply(compiler: Compiler): void;
  10777. }
  10778. declare interface ReadFileCompileWasmPluginOptions {
  10779. /**
  10780. * mangle imports
  10781. */
  10782. mangleImports?: boolean;
  10783. /**
  10784. * use import?
  10785. */
  10786. import?: boolean;
  10787. }
  10788. declare interface ReadFileFs {
  10789. (
  10790. path: PathOrFileDescriptorFs,
  10791. options:
  10792. | undefined
  10793. | null
  10794. | ({ encoding?: null; flag?: string } & Abortable),
  10795. callback: (arg0: null | NodeJS.ErrnoException, arg1?: Buffer) => void
  10796. ): void;
  10797. (
  10798. path: PathOrFileDescriptorFs,
  10799. options:
  10800. | "ascii"
  10801. | "utf8"
  10802. | "utf-8"
  10803. | "utf16le"
  10804. | "utf-16le"
  10805. | "ucs2"
  10806. | "ucs-2"
  10807. | "latin1"
  10808. | "binary"
  10809. | ({ encoding: BufferEncoding; flag?: string } & Abortable)
  10810. | "base64"
  10811. | "base64url"
  10812. | "hex",
  10813. callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
  10814. ): void;
  10815. (
  10816. path: PathOrFileDescriptorFs,
  10817. options:
  10818. | undefined
  10819. | null
  10820. | "ascii"
  10821. | "utf8"
  10822. | "utf-8"
  10823. | "utf16le"
  10824. | "utf-16le"
  10825. | "ucs2"
  10826. | "ucs-2"
  10827. | "latin1"
  10828. | "binary"
  10829. | "base64"
  10830. | "base64url"
  10831. | "hex"
  10832. | (ObjectEncodingOptions & { flag?: string } & Abortable),
  10833. callback: (
  10834. arg0: null | NodeJS.ErrnoException,
  10835. arg1?: string | Buffer
  10836. ) => void
  10837. ): void;
  10838. (
  10839. path: PathOrFileDescriptorFs,
  10840. callback: (arg0: null | NodeJS.ErrnoException, arg1?: Buffer) => void
  10841. ): void;
  10842. }
  10843. declare interface ReadFileSync {
  10844. (
  10845. path: PathOrFileDescriptorFs,
  10846. options?: null | { encoding?: null; flag?: string }
  10847. ): Buffer;
  10848. (
  10849. path: PathOrFileDescriptorFs,
  10850. options:
  10851. | "ascii"
  10852. | "utf8"
  10853. | "utf-8"
  10854. | "utf16le"
  10855. | "utf-16le"
  10856. | "ucs2"
  10857. | "ucs-2"
  10858. | "latin1"
  10859. | "binary"
  10860. | "base64"
  10861. | "base64url"
  10862. | "hex"
  10863. | { encoding: BufferEncoding; flag?: string }
  10864. ): string;
  10865. (
  10866. path: PathOrFileDescriptorFs,
  10867. options?:
  10868. | null
  10869. | "ascii"
  10870. | "utf8"
  10871. | "utf-8"
  10872. | "utf16le"
  10873. | "utf-16le"
  10874. | "ucs2"
  10875. | "ucs-2"
  10876. | "latin1"
  10877. | "binary"
  10878. | "base64"
  10879. | "base64url"
  10880. | "hex"
  10881. | (ObjectEncodingOptions & { flag?: string })
  10882. ): string | Buffer;
  10883. }
  10884. declare interface ReadFileTypes {
  10885. (
  10886. path: PathOrFileDescriptorTypes,
  10887. options:
  10888. | undefined
  10889. | null
  10890. | ({ encoding?: null; flag?: string } & Abortable),
  10891. callback: (arg0: null | NodeJS.ErrnoException, arg1?: Buffer) => void
  10892. ): void;
  10893. (
  10894. path: PathOrFileDescriptorTypes,
  10895. options:
  10896. | "ascii"
  10897. | "utf8"
  10898. | "utf-8"
  10899. | "utf16le"
  10900. | "utf-16le"
  10901. | "ucs2"
  10902. | "ucs-2"
  10903. | "latin1"
  10904. | "binary"
  10905. | "base64"
  10906. | "base64url"
  10907. | "hex"
  10908. | ({ encoding: BufferEncoding; flag?: string } & Abortable),
  10909. callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
  10910. ): void;
  10911. (
  10912. path: PathOrFileDescriptorTypes,
  10913. options:
  10914. | undefined
  10915. | null
  10916. | "ascii"
  10917. | "utf8"
  10918. | "utf-8"
  10919. | "utf16le"
  10920. | "utf-16le"
  10921. | "ucs2"
  10922. | "ucs-2"
  10923. | "latin1"
  10924. | "binary"
  10925. | "base64"
  10926. | "base64url"
  10927. | "hex"
  10928. | (ObjectEncodingOptions & { flag?: string } & Abortable),
  10929. callback: (
  10930. arg0: null | NodeJS.ErrnoException,
  10931. arg1?: string | Buffer
  10932. ) => void
  10933. ): void;
  10934. (
  10935. path: PathOrFileDescriptorTypes,
  10936. callback: (arg0: null | NodeJS.ErrnoException, arg1?: Buffer) => void
  10937. ): void;
  10938. }
  10939. declare interface ReaddirFs {
  10940. (
  10941. path: PathLikeFs,
  10942. options:
  10943. | undefined
  10944. | null
  10945. | "ascii"
  10946. | "utf8"
  10947. | "utf-8"
  10948. | "utf16le"
  10949. | "utf-16le"
  10950. | "ucs2"
  10951. | "ucs-2"
  10952. | "latin1"
  10953. | "binary"
  10954. | "base64"
  10955. | "base64url"
  10956. | "hex"
  10957. | {
  10958. encoding:
  10959. | null
  10960. | "ascii"
  10961. | "utf8"
  10962. | "utf-8"
  10963. | "utf16le"
  10964. | "utf-16le"
  10965. | "ucs2"
  10966. | "ucs-2"
  10967. | "latin1"
  10968. | "binary"
  10969. | "base64"
  10970. | "base64url"
  10971. | "hex";
  10972. withFileTypes?: false;
  10973. recursive?: boolean;
  10974. },
  10975. callback: (arg0: null | NodeJS.ErrnoException, arg1?: string[]) => void
  10976. ): void;
  10977. (
  10978. path: PathLikeFs,
  10979. options:
  10980. | "buffer"
  10981. | { encoding: "buffer"; withFileTypes?: false; recursive?: boolean },
  10982. callback: (arg0: null | NodeJS.ErrnoException, arg1?: Buffer[]) => void
  10983. ): void;
  10984. (
  10985. path: PathLikeFs,
  10986. callback: (arg0: null | NodeJS.ErrnoException, arg1?: string[]) => void
  10987. ): void;
  10988. (
  10989. path: PathLikeFs,
  10990. options:
  10991. | undefined
  10992. | null
  10993. | "ascii"
  10994. | "utf8"
  10995. | "utf-8"
  10996. | "utf16le"
  10997. | "utf-16le"
  10998. | "ucs2"
  10999. | "ucs-2"
  11000. | "latin1"
  11001. | "binary"
  11002. | "base64"
  11003. | "base64url"
  11004. | "hex"
  11005. | (ObjectEncodingOptions & {
  11006. withFileTypes?: false;
  11007. recursive?: boolean;
  11008. }),
  11009. callback: (
  11010. arg0: null | NodeJS.ErrnoException,
  11011. arg1?: string[] | Buffer[]
  11012. ) => void
  11013. ): void;
  11014. (
  11015. path: PathLikeFs,
  11016. options: ObjectEncodingOptions & {
  11017. withFileTypes: true;
  11018. recursive?: boolean;
  11019. },
  11020. callback: (arg0: null | NodeJS.ErrnoException, arg1?: Dirent[]) => void
  11021. ): void;
  11022. }
  11023. declare interface ReaddirSync {
  11024. (
  11025. path: PathLikeFs,
  11026. options?:
  11027. | null
  11028. | "ascii"
  11029. | "utf8"
  11030. | "utf-8"
  11031. | "utf16le"
  11032. | "utf-16le"
  11033. | "ucs2"
  11034. | "ucs-2"
  11035. | "latin1"
  11036. | "binary"
  11037. | "base64"
  11038. | "base64url"
  11039. | "hex"
  11040. | {
  11041. encoding:
  11042. | null
  11043. | "ascii"
  11044. | "utf8"
  11045. | "utf-8"
  11046. | "utf16le"
  11047. | "utf-16le"
  11048. | "ucs2"
  11049. | "ucs-2"
  11050. | "latin1"
  11051. | "binary"
  11052. | "base64"
  11053. | "base64url"
  11054. | "hex";
  11055. withFileTypes?: false;
  11056. recursive?: boolean;
  11057. }
  11058. ): string[];
  11059. (
  11060. path: PathLikeFs,
  11061. options:
  11062. | "buffer"
  11063. | { encoding: "buffer"; withFileTypes?: false; recursive?: boolean }
  11064. ): Buffer[];
  11065. (
  11066. path: PathLikeFs,
  11067. options?:
  11068. | null
  11069. | "ascii"
  11070. | "utf8"
  11071. | "utf-8"
  11072. | "utf16le"
  11073. | "utf-16le"
  11074. | "ucs2"
  11075. | "ucs-2"
  11076. | "latin1"
  11077. | "binary"
  11078. | "base64"
  11079. | "base64url"
  11080. | "hex"
  11081. | (ObjectEncodingOptions & { withFileTypes?: false; recursive?: boolean })
  11082. ): string[] | Buffer[];
  11083. (
  11084. path: PathLikeFs,
  11085. options: ObjectEncodingOptions & {
  11086. withFileTypes: true;
  11087. recursive?: boolean;
  11088. }
  11089. ): Dirent[];
  11090. }
  11091. declare interface ReaddirTypes {
  11092. (
  11093. path: PathLikeTypes,
  11094. options:
  11095. | undefined
  11096. | null
  11097. | "ascii"
  11098. | "utf8"
  11099. | "utf-8"
  11100. | "utf16le"
  11101. | "utf-16le"
  11102. | "ucs2"
  11103. | "ucs-2"
  11104. | "latin1"
  11105. | "binary"
  11106. | "base64"
  11107. | "base64url"
  11108. | "hex"
  11109. | {
  11110. encoding:
  11111. | null
  11112. | "ascii"
  11113. | "utf8"
  11114. | "utf-8"
  11115. | "utf16le"
  11116. | "utf-16le"
  11117. | "ucs2"
  11118. | "ucs-2"
  11119. | "latin1"
  11120. | "binary"
  11121. | "base64"
  11122. | "base64url"
  11123. | "hex";
  11124. withFileTypes?: false;
  11125. recursive?: boolean;
  11126. },
  11127. callback: (arg0: null | NodeJS.ErrnoException, arg1?: string[]) => void
  11128. ): void;
  11129. (
  11130. path: PathLikeTypes,
  11131. options:
  11132. | "buffer"
  11133. | { encoding: "buffer"; withFileTypes?: false; recursive?: boolean },
  11134. callback: (arg0: null | NodeJS.ErrnoException, arg1?: Buffer[]) => void
  11135. ): void;
  11136. (
  11137. path: PathLikeTypes,
  11138. callback: (arg0: null | NodeJS.ErrnoException, arg1?: string[]) => void
  11139. ): void;
  11140. (
  11141. path: PathLikeTypes,
  11142. options:
  11143. | undefined
  11144. | null
  11145. | "ascii"
  11146. | "utf8"
  11147. | "utf-8"
  11148. | "utf16le"
  11149. | "utf-16le"
  11150. | "ucs2"
  11151. | "ucs-2"
  11152. | "latin1"
  11153. | "binary"
  11154. | "base64"
  11155. | "base64url"
  11156. | "hex"
  11157. | (ObjectEncodingOptions & {
  11158. withFileTypes?: false;
  11159. recursive?: boolean;
  11160. }),
  11161. callback: (
  11162. arg0: null | NodeJS.ErrnoException,
  11163. arg1?: string[] | Buffer[]
  11164. ) => void
  11165. ): void;
  11166. (
  11167. path: PathLikeTypes,
  11168. options: ObjectEncodingOptions & {
  11169. withFileTypes: true;
  11170. recursive?: boolean;
  11171. },
  11172. callback: (arg0: null | NodeJS.ErrnoException, arg1?: Dirent[]) => void
  11173. ): void;
  11174. }
  11175. declare interface ReadlinkFs {
  11176. (
  11177. path: PathLikeFs,
  11178. options: EncodingOption,
  11179. callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
  11180. ): void;
  11181. (
  11182. path: PathLikeFs,
  11183. options: BufferEncodingOption,
  11184. callback: (arg0: null | NodeJS.ErrnoException, arg1?: Buffer) => void
  11185. ): void;
  11186. (
  11187. path: PathLikeFs,
  11188. options: EncodingOption,
  11189. callback: (
  11190. arg0: null | NodeJS.ErrnoException,
  11191. arg1?: string | Buffer
  11192. ) => void
  11193. ): void;
  11194. (
  11195. path: PathLikeFs,
  11196. callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
  11197. ): void;
  11198. }
  11199. declare interface ReadlinkSync {
  11200. (path: PathLikeFs, options?: EncodingOption): string;
  11201. (path: PathLikeFs, options: BufferEncodingOption): Buffer;
  11202. (path: PathLikeFs, options?: EncodingOption): string | Buffer;
  11203. }
  11204. declare interface ReadlinkTypes {
  11205. (
  11206. path: PathLikeTypes,
  11207. options: EncodingOption,
  11208. callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
  11209. ): void;
  11210. (
  11211. path: PathLikeTypes,
  11212. options: BufferEncodingOption,
  11213. callback: (arg0: null | NodeJS.ErrnoException, arg1?: Buffer) => void
  11214. ): void;
  11215. (
  11216. path: PathLikeTypes,
  11217. options: EncodingOption,
  11218. callback: (
  11219. arg0: null | NodeJS.ErrnoException,
  11220. arg1?: string | Buffer
  11221. ) => void
  11222. ): void;
  11223. (
  11224. path: PathLikeTypes,
  11225. callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
  11226. ): void;
  11227. }
  11228. declare class RealContentHashPlugin {
  11229. constructor(__0: {
  11230. /**
  11231. * the hash function to use
  11232. */
  11233. hashFunction: string | typeof Hash;
  11234. /**
  11235. * the hash digest to use
  11236. */
  11237. hashDigest: string;
  11238. });
  11239. /**
  11240. * Apply the plugin
  11241. */
  11242. apply(compiler: Compiler): void;
  11243. static getCompilationHooks(
  11244. compilation: Compilation
  11245. ): CompilationHooksRealContentHashPlugin;
  11246. }
  11247. declare interface RealDependencyLocation {
  11248. start: SourcePosition;
  11249. end?: SourcePosition;
  11250. index?: number;
  11251. }
  11252. declare interface RealPathFs {
  11253. (
  11254. path: PathLikeFs,
  11255. options: EncodingOption,
  11256. callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
  11257. ): void;
  11258. (
  11259. path: PathLikeFs,
  11260. options: BufferEncodingOption,
  11261. callback: (arg0: null | NodeJS.ErrnoException, arg1?: Buffer) => void
  11262. ): void;
  11263. (
  11264. path: PathLikeFs,
  11265. options: EncodingOption,
  11266. callback: (
  11267. arg0: null | NodeJS.ErrnoException,
  11268. arg1?: string | Buffer
  11269. ) => void
  11270. ): void;
  11271. (
  11272. path: PathLikeFs,
  11273. callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
  11274. ): void;
  11275. }
  11276. declare interface RealPathSync {
  11277. (path: PathLikeFs, options?: EncodingOption): string;
  11278. (path: PathLikeFs, options: BufferEncodingOption): Buffer;
  11279. (path: PathLikeFs, options?: EncodingOption): string | Buffer;
  11280. }
  11281. declare interface RealPathTypes {
  11282. (
  11283. path: PathLikeTypes,
  11284. options: EncodingOption,
  11285. callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
  11286. ): void;
  11287. (
  11288. path: PathLikeTypes,
  11289. options: BufferEncodingOption,
  11290. callback: (arg0: null | NodeJS.ErrnoException, arg1?: Buffer) => void
  11291. ): void;
  11292. (
  11293. path: PathLikeTypes,
  11294. options: EncodingOption,
  11295. callback: (
  11296. arg0: null | NodeJS.ErrnoException,
  11297. arg1?: string | Buffer
  11298. ) => void
  11299. ): void;
  11300. (
  11301. path: PathLikeTypes,
  11302. callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
  11303. ): void;
  11304. }
  11305. type RecursiveArrayOrRecord<T> =
  11306. | { [index: string]: RecursiveArrayOrRecord<T> }
  11307. | RecursiveArrayOrRecord<T>[]
  11308. | T;
  11309. declare interface ReferencedExport {
  11310. /**
  11311. * name of the referenced export
  11312. */
  11313. name: string[];
  11314. /**
  11315. * when false, referenced export can not be mangled, defaults to true
  11316. */
  11317. canMangle?: boolean;
  11318. }
  11319. type Remotes = (string | RemotesObject)[] | RemotesObject;
  11320. /**
  11321. * Advanced configuration for container locations from which modules should be resolved and loaded at runtime.
  11322. */
  11323. declare interface RemotesConfig {
  11324. /**
  11325. * Container locations from which modules should be resolved and loaded at runtime.
  11326. */
  11327. external: string | string[];
  11328. /**
  11329. * The name of the share scope shared with this remote.
  11330. */
  11331. shareScope?: string;
  11332. }
  11333. /**
  11334. * Container locations from which modules should be resolved and loaded at runtime. Property names are used as request scopes.
  11335. */
  11336. declare interface RemotesObject {
  11337. [index: string]: string | RemotesConfig | string[];
  11338. }
  11339. declare interface RenderBootstrapContext {
  11340. /**
  11341. * the chunk
  11342. */
  11343. chunk: Chunk;
  11344. /**
  11345. * results of code generation
  11346. */
  11347. codeGenerationResults: CodeGenerationResults;
  11348. /**
  11349. * the runtime template
  11350. */
  11351. runtimeTemplate: RuntimeTemplate;
  11352. /**
  11353. * the module graph
  11354. */
  11355. moduleGraph: ModuleGraph;
  11356. /**
  11357. * the chunk graph
  11358. */
  11359. chunkGraph: ChunkGraph;
  11360. /**
  11361. * hash to be used for render call
  11362. */
  11363. hash: string;
  11364. }
  11365. declare interface RenderContextCssModulesPlugin {
  11366. /**
  11367. * the chunk
  11368. */
  11369. chunk: Chunk;
  11370. /**
  11371. * the chunk graph
  11372. */
  11373. chunkGraph: ChunkGraph;
  11374. /**
  11375. * results of code generation
  11376. */
  11377. codeGenerationResults: CodeGenerationResults;
  11378. /**
  11379. * the runtime template
  11380. */
  11381. runtimeTemplate: RuntimeTemplate;
  11382. /**
  11383. * the unique name
  11384. */
  11385. uniqueName: string;
  11386. /**
  11387. * undo path to css file
  11388. */
  11389. undoPath: string;
  11390. /**
  11391. * modules
  11392. */
  11393. modules: CssModule[];
  11394. }
  11395. declare interface RenderContextJavascriptModulesPlugin {
  11396. /**
  11397. * the chunk
  11398. */
  11399. chunk: Chunk;
  11400. /**
  11401. * the dependency templates
  11402. */
  11403. dependencyTemplates: DependencyTemplates;
  11404. /**
  11405. * the runtime template
  11406. */
  11407. runtimeTemplate: RuntimeTemplate;
  11408. /**
  11409. * the module graph
  11410. */
  11411. moduleGraph: ModuleGraph;
  11412. /**
  11413. * the chunk graph
  11414. */
  11415. chunkGraph: ChunkGraph;
  11416. /**
  11417. * results of code generation
  11418. */
  11419. codeGenerationResults: CodeGenerationResults;
  11420. /**
  11421. * rendering in strict context
  11422. */
  11423. strictMode?: boolean;
  11424. }
  11425. type RenderManifestEntry =
  11426. | RenderManifestEntryTemplated
  11427. | RenderManifestEntryStatic;
  11428. declare interface RenderManifestEntryStatic {
  11429. render: () => Source;
  11430. filename: string;
  11431. info: AssetInfo;
  11432. identifier: string;
  11433. hash?: string;
  11434. auxiliary?: boolean;
  11435. }
  11436. declare interface RenderManifestEntryTemplated {
  11437. render: () => Source;
  11438. filenameTemplate: TemplatePath;
  11439. pathOptions?: PathData;
  11440. info?: AssetInfo;
  11441. identifier: string;
  11442. hash?: string;
  11443. auxiliary?: boolean;
  11444. }
  11445. declare interface RenderManifestOptions {
  11446. /**
  11447. * the chunk used to render
  11448. */
  11449. chunk: Chunk;
  11450. hash: string;
  11451. fullHash: string;
  11452. outputOptions: Output;
  11453. codeGenerationResults: CodeGenerationResults;
  11454. moduleTemplates: { javascript: ModuleTemplate };
  11455. dependencyTemplates: DependencyTemplates;
  11456. runtimeTemplate: RuntimeTemplate;
  11457. moduleGraph: ModuleGraph;
  11458. chunkGraph: ChunkGraph;
  11459. }
  11460. declare class ReplaceSource extends Source {
  11461. constructor(source: Source, name?: string);
  11462. replace(start: number, end: number, newValue: string, name?: string): void;
  11463. insert(pos: number, newValue: string, name?: string): void;
  11464. getName(): string;
  11465. original(): string;
  11466. getReplacements(): {
  11467. start: number;
  11468. end: number;
  11469. content: string;
  11470. insertIndex: number;
  11471. name: string;
  11472. }[];
  11473. }
  11474. declare interface RequestRecord {
  11475. [index: string]: string | string[];
  11476. }
  11477. declare abstract class RequestShortener {
  11478. contextify: (arg0: string) => string;
  11479. shorten(request?: null | string): undefined | null | string;
  11480. }
  11481. declare interface ResolveBuildDependenciesResult {
  11482. /**
  11483. * list of files
  11484. */
  11485. files: Set<string>;
  11486. /**
  11487. * list of directories
  11488. */
  11489. directories: Set<string>;
  11490. /**
  11491. * list of missing entries
  11492. */
  11493. missing: Set<string>;
  11494. /**
  11495. * stored resolve results
  11496. */
  11497. resolveResults: Map<string, undefined | string | false>;
  11498. /**
  11499. * dependencies of the resolving
  11500. */
  11501. resolveDependencies: {
  11502. /**
  11503. * list of files
  11504. */
  11505. files: Set<string>;
  11506. /**
  11507. * list of directories
  11508. */
  11509. directories: Set<string>;
  11510. /**
  11511. * list of missing entries
  11512. */
  11513. missing: Set<string>;
  11514. };
  11515. }
  11516. declare interface ResolveContext {
  11517. contextDependencies?: WriteOnlySet<string>;
  11518. /**
  11519. * files that was found on file system
  11520. */
  11521. fileDependencies?: WriteOnlySet<string>;
  11522. /**
  11523. * dependencies that was not found on file system
  11524. */
  11525. missingDependencies?: WriteOnlySet<string>;
  11526. /**
  11527. * set of hooks' calls. For instance, `resolve → parsedResolve → describedResolve`,
  11528. */
  11529. stack?: Set<string>;
  11530. /**
  11531. * log function
  11532. */
  11533. log?: (arg0: string) => void;
  11534. /**
  11535. * yield result, if provided plugins can return several results
  11536. */
  11537. yield?: (arg0: ResolveRequest) => void;
  11538. }
  11539. declare interface ResolveData {
  11540. contextInfo: ModuleFactoryCreateDataContextInfo;
  11541. resolveOptions?: ResolveOptions;
  11542. context: string;
  11543. request: string;
  11544. assertions?: Record<string, any>;
  11545. dependencies: ModuleDependency[];
  11546. dependencyType: string;
  11547. createData: Partial<NormalModuleCreateData & { settings: ModuleSettings }>;
  11548. fileDependencies: LazySet<string>;
  11549. missingDependencies: LazySet<string>;
  11550. contextDependencies: LazySet<string>;
  11551. ignoredModule?: Module;
  11552. /**
  11553. * allow to use the unsafe cache
  11554. */
  11555. cacheable: boolean;
  11556. }
  11557. /**
  11558. * Options object for resolving requests.
  11559. */
  11560. declare interface ResolveOptions {
  11561. /**
  11562. * Redirect module requests.
  11563. */
  11564. alias?:
  11565. | {
  11566. /**
  11567. * New request.
  11568. */
  11569. alias: string | false | string[];
  11570. /**
  11571. * Request to be redirected.
  11572. */
  11573. name: string;
  11574. /**
  11575. * Redirect only exact matching request.
  11576. */
  11577. onlyModule?: boolean;
  11578. }[]
  11579. | { [index: string]: string | false | string[] };
  11580. /**
  11581. * Fields in the description file (usually package.json) which are used to redirect requests inside the module.
  11582. */
  11583. aliasFields?: (string | string[])[];
  11584. /**
  11585. * Extra resolve options per dependency category. Typical categories are "commonjs", "amd", "esm".
  11586. */
  11587. byDependency?: { [index: string]: ResolveOptions };
  11588. /**
  11589. * Enable caching of successfully resolved requests (cache entries are revalidated).
  11590. */
  11591. cache?: boolean;
  11592. /**
  11593. * Predicate function to decide which requests should be cached.
  11594. */
  11595. cachePredicate?: (request: ResolveRequest) => boolean;
  11596. /**
  11597. * Include the context information in the cache identifier when caching.
  11598. */
  11599. cacheWithContext?: boolean;
  11600. /**
  11601. * Condition names for exports field entry point.
  11602. */
  11603. conditionNames?: string[];
  11604. /**
  11605. * Filenames used to find a description file (like a package.json).
  11606. */
  11607. descriptionFiles?: string[];
  11608. /**
  11609. * Enforce the resolver to use one of the extensions from the extensions option (User must specify requests without extension).
  11610. */
  11611. enforceExtension?: boolean;
  11612. /**
  11613. * Field names from the description file (usually package.json) which are used to provide entry points of a package.
  11614. */
  11615. exportsFields?: string[];
  11616. /**
  11617. * An object which maps extension to extension aliases.
  11618. */
  11619. extensionAlias?: { [index: string]: string | string[] };
  11620. /**
  11621. * Extensions added to the request when trying to find the file.
  11622. */
  11623. extensions?: string[];
  11624. /**
  11625. * Redirect module requests when normal resolving fails.
  11626. */
  11627. fallback?:
  11628. | {
  11629. /**
  11630. * New request.
  11631. */
  11632. alias: string | false | string[];
  11633. /**
  11634. * Request to be redirected.
  11635. */
  11636. name: string;
  11637. /**
  11638. * Redirect only exact matching request.
  11639. */
  11640. onlyModule?: boolean;
  11641. }[]
  11642. | { [index: string]: string | false | string[] };
  11643. /**
  11644. * Filesystem for the resolver.
  11645. */
  11646. fileSystem?: InputFileSystem;
  11647. /**
  11648. * Treats the request specified by the user as fully specified, meaning no extensions are added and the mainFiles in directories are not resolved (This doesn't affect requests from mainFields, aliasFields or aliases).
  11649. */
  11650. fullySpecified?: boolean;
  11651. /**
  11652. * Field names from the description file (usually package.json) which are used to provide internal request of a package (requests starting with # are considered as internal).
  11653. */
  11654. importsFields?: string[];
  11655. /**
  11656. * Field names from the description file (package.json) which are used to find the default entry point.
  11657. */
  11658. mainFields?: (string | string[])[];
  11659. /**
  11660. * Filenames used to find the default entry point if there is no description file or main field.
  11661. */
  11662. mainFiles?: string[];
  11663. /**
  11664. * Folder names or directory paths where to find modules.
  11665. */
  11666. modules?: string[];
  11667. /**
  11668. * Plugins for the resolver.
  11669. */
  11670. plugins?: (
  11671. | undefined
  11672. | null
  11673. | false
  11674. | ""
  11675. | 0
  11676. | {
  11677. [index: string]: any;
  11678. /**
  11679. * The run point of the plugin, required method.
  11680. */
  11681. apply: (arg0: Resolver) => void;
  11682. }
  11683. | ((this: Resolver, arg1: Resolver) => void)
  11684. | "..."
  11685. )[];
  11686. /**
  11687. * Prefer to resolve server-relative URLs (starting with '/') as absolute paths before falling back to resolve in 'resolve.roots'.
  11688. */
  11689. preferAbsolute?: boolean;
  11690. /**
  11691. * Prefer to resolve module requests as relative request and fallback to resolving as module.
  11692. */
  11693. preferRelative?: boolean;
  11694. /**
  11695. * Custom resolver.
  11696. */
  11697. resolver?: Resolver;
  11698. /**
  11699. * A list of resolve restrictions. Resolve results must fulfill all of these restrictions to resolve successfully. Other resolve paths are taken when restrictions are not met.
  11700. */
  11701. restrictions?: (string | RegExp)[];
  11702. /**
  11703. * A list of directories in which requests that are server-relative URLs (starting with '/') are resolved.
  11704. */
  11705. roots?: string[];
  11706. /**
  11707. * Enable resolving symlinks to the original location.
  11708. */
  11709. symlinks?: boolean;
  11710. /**
  11711. * Enable caching of successfully resolved requests (cache entries are not revalidated).
  11712. */
  11713. unsafeCache?: boolean | { [index: string]: any };
  11714. /**
  11715. * Use synchronous filesystem calls for the resolver.
  11716. */
  11717. useSyncFileSystemCalls?: boolean;
  11718. }
  11719. declare interface ResolveOptionsResolverFactoryObject1 {
  11720. alias: AliasOption[];
  11721. fallback: AliasOption[];
  11722. aliasFields: Set<string | string[]>;
  11723. extensionAlias: ExtensionAliasOption[];
  11724. cachePredicate: (arg0: ResolveRequest) => boolean;
  11725. cacheWithContext: boolean;
  11726. /**
  11727. * A list of exports field condition names.
  11728. */
  11729. conditionNames: Set<string>;
  11730. descriptionFiles: string[];
  11731. enforceExtension: boolean;
  11732. exportsFields: Set<string | string[]>;
  11733. importsFields: Set<string | string[]>;
  11734. extensions: Set<string>;
  11735. fileSystem: FileSystem;
  11736. unsafeCache: false | object;
  11737. symlinks: boolean;
  11738. resolver?: Resolver;
  11739. modules: (string | string[])[];
  11740. mainFields: { name: string[]; forceRelative: boolean }[];
  11741. mainFiles: Set<string>;
  11742. plugins: Plugin[];
  11743. pnpApi: null | PnpApi;
  11744. roots: Set<string>;
  11745. fullySpecified: boolean;
  11746. resolveToContext: boolean;
  11747. restrictions: Set<string | RegExp>;
  11748. preferRelative: boolean;
  11749. preferAbsolute: boolean;
  11750. }
  11751. declare interface ResolveOptionsResolverFactoryObject2 {
  11752. /**
  11753. * A list of module alias configurations or an object which maps key to value
  11754. */
  11755. alias?: AliasOption[] | AliasOptions;
  11756. /**
  11757. * A list of module alias configurations or an object which maps key to value, applied only after modules option
  11758. */
  11759. fallback?: AliasOption[] | AliasOptions;
  11760. /**
  11761. * An object which maps extension to extension aliases
  11762. */
  11763. extensionAlias?: ExtensionAliasOptions;
  11764. /**
  11765. * A list of alias fields in description files
  11766. */
  11767. aliasFields?: (string | string[])[];
  11768. /**
  11769. * A function which decides whether a request should be cached or not. An object is passed with at least `path` and `request` properties.
  11770. */
  11771. cachePredicate?: (arg0: ResolveRequest) => boolean;
  11772. /**
  11773. * Whether or not the unsafeCache should include request context as part of the cache key.
  11774. */
  11775. cacheWithContext?: boolean;
  11776. /**
  11777. * A list of description files to read from
  11778. */
  11779. descriptionFiles?: string[];
  11780. /**
  11781. * A list of exports field condition names.
  11782. */
  11783. conditionNames?: string[];
  11784. /**
  11785. * Enforce that a extension from extensions must be used
  11786. */
  11787. enforceExtension?: boolean;
  11788. /**
  11789. * A list of exports fields in description files
  11790. */
  11791. exportsFields?: (string | string[])[];
  11792. /**
  11793. * A list of imports fields in description files
  11794. */
  11795. importsFields?: (string | string[])[];
  11796. /**
  11797. * A list of extensions which should be tried for files
  11798. */
  11799. extensions?: string[];
  11800. /**
  11801. * The file system which should be used
  11802. */
  11803. fileSystem: FileSystem;
  11804. /**
  11805. * Use this cache object to unsafely cache the successful requests
  11806. */
  11807. unsafeCache?: boolean | object;
  11808. /**
  11809. * Resolve symlinks to their symlinked location
  11810. */
  11811. symlinks?: boolean;
  11812. /**
  11813. * A prepared Resolver to which the plugins are attached
  11814. */
  11815. resolver?: Resolver;
  11816. /**
  11817. * A list of directories to resolve modules from, can be absolute path or folder name
  11818. */
  11819. modules?: string | string[];
  11820. /**
  11821. * A list of main fields in description files
  11822. */
  11823. mainFields?: (
  11824. | string
  11825. | string[]
  11826. | { name: string | string[]; forceRelative: boolean }
  11827. )[];
  11828. /**
  11829. * A list of main files in directories
  11830. */
  11831. mainFiles?: string[];
  11832. /**
  11833. * A list of additional resolve plugins which should be applied
  11834. */
  11835. plugins?: Plugin[];
  11836. /**
  11837. * A PnP API that should be used - null is "never", undefined is "auto"
  11838. */
  11839. pnpApi?: null | PnpApi;
  11840. /**
  11841. * A list of root paths
  11842. */
  11843. roots?: string[];
  11844. /**
  11845. * The request is already fully specified and no extensions or directories are resolved for it
  11846. */
  11847. fullySpecified?: boolean;
  11848. /**
  11849. * Resolve to a context instead of a file
  11850. */
  11851. resolveToContext?: boolean;
  11852. /**
  11853. * A list of resolve restrictions
  11854. */
  11855. restrictions?: (string | RegExp)[];
  11856. /**
  11857. * Use only the sync constraints of the file system calls
  11858. */
  11859. useSyncFileSystemCalls?: boolean;
  11860. /**
  11861. * Prefer to resolve module requests as relative requests before falling back to modules
  11862. */
  11863. preferRelative?: boolean;
  11864. /**
  11865. * Prefer to resolve server-relative urls as absolute paths before falling back to resolve in roots
  11866. */
  11867. preferAbsolute?: boolean;
  11868. }
  11869. type ResolveOptionsWithDependencyType = ResolveOptions & {
  11870. dependencyType?: string;
  11871. resolveToContext?: boolean;
  11872. };
  11873. type ResolvePluginInstance =
  11874. | {
  11875. [index: string]: any;
  11876. /**
  11877. * The run point of the plugin, required method.
  11878. */
  11879. apply: (arg0: Resolver) => void;
  11880. }
  11881. | ((this: Resolver, arg1: Resolver) => void);
  11882. type ResolveRequest = BaseResolveRequest & Partial<ParsedIdentifier>;
  11883. declare interface ResolvedContextFileSystemInfoEntry {
  11884. safeTime: number;
  11885. timestampHash?: string;
  11886. }
  11887. declare interface ResolvedContextTimestampAndHash {
  11888. safeTime: number;
  11889. timestampHash?: string;
  11890. hash: string;
  11891. }
  11892. declare interface ResolvedOptions {
  11893. /**
  11894. * - platform target properties
  11895. */
  11896. platform: false | PlatformTargetProperties;
  11897. }
  11898. declare abstract class Resolver {
  11899. fileSystem: FileSystem;
  11900. options: ResolveOptionsResolverFactoryObject1;
  11901. hooks: KnownHooks;
  11902. ensureHook(
  11903. name:
  11904. | string
  11905. | AsyncSeriesBailHook<
  11906. [ResolveRequest, ResolveContext],
  11907. null | ResolveRequest
  11908. >
  11909. ): AsyncSeriesBailHook<
  11910. [ResolveRequest, ResolveContext],
  11911. null | ResolveRequest
  11912. >;
  11913. getHook(
  11914. name:
  11915. | string
  11916. | AsyncSeriesBailHook<
  11917. [ResolveRequest, ResolveContext],
  11918. null | ResolveRequest
  11919. >
  11920. ): AsyncSeriesBailHook<
  11921. [ResolveRequest, ResolveContext],
  11922. null | ResolveRequest
  11923. >;
  11924. resolveSync(context: object, path: string, request: string): string | false;
  11925. resolve(
  11926. context: object,
  11927. path: string,
  11928. request: string,
  11929. resolveContext: ResolveContext,
  11930. callback: (
  11931. err: null | ErrorWithDetail,
  11932. res?: string | false,
  11933. req?: ResolveRequest
  11934. ) => void
  11935. ): void;
  11936. doResolve(
  11937. hook: AsyncSeriesBailHook<
  11938. [ResolveRequest, ResolveContext],
  11939. null | ResolveRequest
  11940. >,
  11941. request: ResolveRequest,
  11942. message: null | string,
  11943. resolveContext: ResolveContext,
  11944. callback: (err?: null | Error, result?: ResolveRequest) => void
  11945. ): void;
  11946. parse(identifier: string): ParsedIdentifier;
  11947. isModule(path: string): boolean;
  11948. isPrivate(path: string): boolean;
  11949. isDirectory(path: string): boolean;
  11950. join(path: string, request: string): string;
  11951. normalize(path: string): string;
  11952. }
  11953. declare interface ResolverCache {
  11954. direct: WeakMap<object, ResolverWithOptions>;
  11955. stringified: Map<string, ResolverWithOptions>;
  11956. }
  11957. declare abstract class ResolverFactory {
  11958. hooks: Readonly<{
  11959. resolveOptions: HookMap<
  11960. SyncWaterfallHook<[ResolveOptionsWithDependencyType]>
  11961. >;
  11962. resolver: HookMap<
  11963. SyncHook<
  11964. [
  11965. Resolver,
  11966. ResolveOptionsResolverFactoryObject2,
  11967. ResolveOptionsWithDependencyType
  11968. ]
  11969. >
  11970. >;
  11971. }>;
  11972. cache: Map<string, ResolverCache>;
  11973. get(
  11974. type: string,
  11975. resolveOptions?: ResolveOptionsWithDependencyType
  11976. ): ResolverWithOptions;
  11977. }
  11978. type ResolverWithOptions = Resolver & WithOptions;
  11979. declare interface ResourceDataWithData {
  11980. resource: string;
  11981. path?: string;
  11982. query?: string;
  11983. fragment?: string;
  11984. context?: string;
  11985. data: Record<string, any>;
  11986. }
  11987. declare abstract class RestoreProvidedData {
  11988. exports: any;
  11989. otherProvided: any;
  11990. otherCanMangleProvide: any;
  11991. otherTerminalBinding: any;
  11992. serialize(__0: ObjectSerializerContext): void;
  11993. }
  11994. declare interface RmDirOptions {
  11995. maxRetries?: number;
  11996. recursive?: boolean;
  11997. retryDelay?: number;
  11998. }
  11999. declare interface Rmdir {
  12000. (
  12001. file: PathLikeFs,
  12002. callback: (arg0: null | NodeJS.ErrnoException) => void
  12003. ): void;
  12004. (
  12005. file: PathLikeFs,
  12006. options: RmDirOptions,
  12007. callback: (arg0: null | NodeJS.ErrnoException) => void
  12008. ): void;
  12009. }
  12010. type Rule = string | RegExp;
  12011. declare interface RuleSet {
  12012. /**
  12013. * map of references in the rule set (may grow over time)
  12014. */
  12015. references: Map<string, any>;
  12016. /**
  12017. * execute the rule set
  12018. */
  12019. exec: (arg0: EffectData) => Effect[];
  12020. }
  12021. type RuleSetCondition =
  12022. | string
  12023. | RegExp
  12024. | ((value: string) => boolean)
  12025. | RuleSetLogicalConditions
  12026. | RuleSetCondition[];
  12027. type RuleSetConditionAbsolute =
  12028. | string
  12029. | RegExp
  12030. | ((value: string) => boolean)
  12031. | RuleSetLogicalConditionsAbsolute
  12032. | RuleSetConditionAbsolute[];
  12033. type RuleSetConditionOrConditions =
  12034. | string
  12035. | RegExp
  12036. | ((value: string) => boolean)
  12037. | RuleSetLogicalConditions
  12038. | RuleSetCondition[];
  12039. /**
  12040. * Logic operators used in a condition matcher.
  12041. */
  12042. declare interface RuleSetLogicalConditions {
  12043. /**
  12044. * Logical AND.
  12045. */
  12046. and?: RuleSetCondition[];
  12047. /**
  12048. * Logical NOT.
  12049. */
  12050. not?:
  12051. | string
  12052. | RegExp
  12053. | ((value: string) => boolean)
  12054. | RuleSetLogicalConditions
  12055. | RuleSetCondition[];
  12056. /**
  12057. * Logical OR.
  12058. */
  12059. or?: RuleSetCondition[];
  12060. }
  12061. /**
  12062. * Logic operators used in a condition matcher.
  12063. */
  12064. declare interface RuleSetLogicalConditionsAbsolute {
  12065. /**
  12066. * Logical AND.
  12067. */
  12068. and?: RuleSetConditionAbsolute[];
  12069. /**
  12070. * Logical NOT.
  12071. */
  12072. not?:
  12073. | string
  12074. | RegExp
  12075. | ((value: string) => boolean)
  12076. | RuleSetLogicalConditionsAbsolute
  12077. | RuleSetConditionAbsolute[];
  12078. /**
  12079. * Logical OR.
  12080. */
  12081. or?: RuleSetConditionAbsolute[];
  12082. }
  12083. /**
  12084. * A rule description with conditions and effects for modules.
  12085. */
  12086. declare interface RuleSetRule {
  12087. /**
  12088. * Match on import assertions of the dependency.
  12089. */
  12090. assert?: { [index: string]: RuleSetConditionOrConditions };
  12091. /**
  12092. * Match the child compiler name.
  12093. */
  12094. compiler?:
  12095. | string
  12096. | RegExp
  12097. | ((value: string) => boolean)
  12098. | RuleSetLogicalConditions
  12099. | RuleSetCondition[];
  12100. /**
  12101. * Match dependency type.
  12102. */
  12103. dependency?:
  12104. | string
  12105. | RegExp
  12106. | ((value: string) => boolean)
  12107. | RuleSetLogicalConditions
  12108. | RuleSetCondition[];
  12109. /**
  12110. * Match values of properties in the description file (usually package.json).
  12111. */
  12112. descriptionData?: { [index: string]: RuleSetConditionOrConditions };
  12113. /**
  12114. * Enforce this rule as pre or post step.
  12115. */
  12116. enforce?: "pre" | "post";
  12117. /**
  12118. * Shortcut for resource.exclude.
  12119. */
  12120. exclude?:
  12121. | string
  12122. | RegExp
  12123. | ((value: string) => boolean)
  12124. | RuleSetLogicalConditionsAbsolute
  12125. | RuleSetConditionAbsolute[];
  12126. /**
  12127. * The options for the module generator.
  12128. */
  12129. generator?: { [index: string]: any };
  12130. /**
  12131. * Shortcut for resource.include.
  12132. */
  12133. include?:
  12134. | string
  12135. | RegExp
  12136. | ((value: string) => boolean)
  12137. | RuleSetLogicalConditionsAbsolute
  12138. | RuleSetConditionAbsolute[];
  12139. /**
  12140. * Match the issuer of the module (The module pointing to this module).
  12141. */
  12142. issuer?:
  12143. | string
  12144. | RegExp
  12145. | ((value: string) => boolean)
  12146. | RuleSetLogicalConditionsAbsolute
  12147. | RuleSetConditionAbsolute[];
  12148. /**
  12149. * Match layer of the issuer of this module (The module pointing to this module).
  12150. */
  12151. issuerLayer?:
  12152. | string
  12153. | RegExp
  12154. | ((value: string) => boolean)
  12155. | RuleSetLogicalConditions
  12156. | RuleSetCondition[];
  12157. /**
  12158. * Specifies the layer in which the module should be placed in.
  12159. */
  12160. layer?: string;
  12161. /**
  12162. * Shortcut for use.loader.
  12163. */
  12164. loader?: string;
  12165. /**
  12166. * Match module mimetype when load from Data URI.
  12167. */
  12168. mimetype?:
  12169. | string
  12170. | RegExp
  12171. | ((value: string) => boolean)
  12172. | RuleSetLogicalConditions
  12173. | RuleSetCondition[];
  12174. /**
  12175. * Only execute the first matching rule in this array.
  12176. */
  12177. oneOf?: (undefined | null | false | "" | 0 | RuleSetRule)[];
  12178. /**
  12179. * Shortcut for use.options.
  12180. */
  12181. options?: string | { [index: string]: any };
  12182. /**
  12183. * Options for parsing.
  12184. */
  12185. parser?: { [index: string]: any };
  12186. /**
  12187. * Match the real resource path of the module.
  12188. */
  12189. realResource?:
  12190. | string
  12191. | RegExp
  12192. | ((value: string) => boolean)
  12193. | RuleSetLogicalConditionsAbsolute
  12194. | RuleSetConditionAbsolute[];
  12195. /**
  12196. * Options for the resolver.
  12197. */
  12198. resolve?: ResolveOptions;
  12199. /**
  12200. * Match the resource path of the module.
  12201. */
  12202. resource?:
  12203. | string
  12204. | RegExp
  12205. | ((value: string) => boolean)
  12206. | RuleSetLogicalConditionsAbsolute
  12207. | RuleSetConditionAbsolute[];
  12208. /**
  12209. * Match the resource fragment of the module.
  12210. */
  12211. resourceFragment?:
  12212. | string
  12213. | RegExp
  12214. | ((value: string) => boolean)
  12215. | RuleSetLogicalConditions
  12216. | RuleSetCondition[];
  12217. /**
  12218. * Match the resource query of the module.
  12219. */
  12220. resourceQuery?:
  12221. | string
  12222. | RegExp
  12223. | ((value: string) => boolean)
  12224. | RuleSetLogicalConditions
  12225. | RuleSetCondition[];
  12226. /**
  12227. * Match and execute these rules when this rule is matched.
  12228. */
  12229. rules?: (undefined | null | false | "" | 0 | RuleSetRule)[];
  12230. /**
  12231. * Match module scheme.
  12232. */
  12233. scheme?:
  12234. | string
  12235. | RegExp
  12236. | ((value: string) => boolean)
  12237. | RuleSetLogicalConditions
  12238. | RuleSetCondition[];
  12239. /**
  12240. * Flags a module as with or without side effects.
  12241. */
  12242. sideEffects?: boolean;
  12243. /**
  12244. * Shortcut for resource.test.
  12245. */
  12246. test?:
  12247. | string
  12248. | RegExp
  12249. | ((value: string) => boolean)
  12250. | RuleSetLogicalConditionsAbsolute
  12251. | RuleSetConditionAbsolute[];
  12252. /**
  12253. * Module type to use for the module.
  12254. */
  12255. type?: string;
  12256. /**
  12257. * Modifiers applied to the module when rule is matched.
  12258. */
  12259. use?:
  12260. | string
  12261. | (
  12262. | undefined
  12263. | null
  12264. | string
  12265. | false
  12266. | 0
  12267. | {
  12268. /**
  12269. * Unique loader options identifier.
  12270. */
  12271. ident?: string;
  12272. /**
  12273. * Loader name.
  12274. */
  12275. loader?: string;
  12276. /**
  12277. * Loader options.
  12278. */
  12279. options?: string | { [index: string]: any };
  12280. }
  12281. | ((data: object) =>
  12282. | string
  12283. | {
  12284. /**
  12285. * Unique loader options identifier.
  12286. */
  12287. ident?: string;
  12288. /**
  12289. * Loader name.
  12290. */
  12291. loader?: string;
  12292. /**
  12293. * Loader options.
  12294. */
  12295. options?: string | { [index: string]: any };
  12296. }
  12297. | __TypeWebpackOptions
  12298. | __Type_2[])
  12299. )[]
  12300. | ((data: {
  12301. resource: string;
  12302. realResource: string;
  12303. resourceQuery: string;
  12304. issuer: string;
  12305. compiler: string;
  12306. }) => __Type_2[])
  12307. | {
  12308. /**
  12309. * Unique loader options identifier.
  12310. */
  12311. ident?: string;
  12312. /**
  12313. * Loader name.
  12314. */
  12315. loader?: string;
  12316. /**
  12317. * Loader options.
  12318. */
  12319. options?: string | { [index: string]: any };
  12320. }
  12321. | __TypeWebpackOptions;
  12322. /**
  12323. * Match on import attributes of the dependency.
  12324. */
  12325. with?: { [index: string]: RuleSetConditionOrConditions };
  12326. }
  12327. type RuleSetUse =
  12328. | string
  12329. | (
  12330. | undefined
  12331. | null
  12332. | string
  12333. | false
  12334. | 0
  12335. | {
  12336. /**
  12337. * Unique loader options identifier.
  12338. */
  12339. ident?: string;
  12340. /**
  12341. * Loader name.
  12342. */
  12343. loader?: string;
  12344. /**
  12345. * Loader options.
  12346. */
  12347. options?: string | { [index: string]: any };
  12348. }
  12349. | ((data: object) =>
  12350. | string
  12351. | {
  12352. /**
  12353. * Unique loader options identifier.
  12354. */
  12355. ident?: string;
  12356. /**
  12357. * Loader name.
  12358. */
  12359. loader?: string;
  12360. /**
  12361. * Loader options.
  12362. */
  12363. options?: string | { [index: string]: any };
  12364. }
  12365. | __TypeWebpackOptions
  12366. | __Type_2[])
  12367. )[]
  12368. | ((data: {
  12369. resource: string;
  12370. realResource: string;
  12371. resourceQuery: string;
  12372. issuer: string;
  12373. compiler: string;
  12374. }) => __Type_2[])
  12375. | {
  12376. /**
  12377. * Unique loader options identifier.
  12378. */
  12379. ident?: string;
  12380. /**
  12381. * Loader name.
  12382. */
  12383. loader?: string;
  12384. /**
  12385. * Loader options.
  12386. */
  12387. options?: string | { [index: string]: any };
  12388. }
  12389. | __TypeWebpackOptions;
  12390. type RuleSetUseItem =
  12391. | string
  12392. | {
  12393. /**
  12394. * Unique loader options identifier.
  12395. */
  12396. ident?: string;
  12397. /**
  12398. * Loader name.
  12399. */
  12400. loader?: string;
  12401. /**
  12402. * Loader options.
  12403. */
  12404. options?: string | { [index: string]: any };
  12405. }
  12406. | __TypeWebpackOptions;
  12407. declare interface RunCallback<T> {
  12408. (err: null | Error, result?: T): any;
  12409. }
  12410. declare class RuntimeChunkPlugin {
  12411. constructor(options: { name?: (entrypoint: { name: string }) => string });
  12412. options: {
  12413. name:
  12414. | ((entrypoint: { name: string }) => string)
  12415. | ((entrypoint: Entrypoint) => string);
  12416. };
  12417. /**
  12418. * Apply the plugin
  12419. */
  12420. apply(compiler: Compiler): void;
  12421. }
  12422. type RuntimeCondition = undefined | string | boolean | SortableSet<string>;
  12423. declare class RuntimeModule extends Module {
  12424. constructor(name: string, stage?: number);
  12425. name: string;
  12426. stage: number;
  12427. compilation?: Compilation;
  12428. chunk?: Chunk;
  12429. chunkGraph?: ChunkGraph;
  12430. fullHash: boolean;
  12431. dependentHash: boolean;
  12432. attach(compilation: Compilation, chunk: Chunk, chunkGraph?: ChunkGraph): void;
  12433. generate(): null | string;
  12434. getGeneratedCode(): null | string;
  12435. shouldIsolate(): boolean;
  12436. /**
  12437. * Runtime modules without any dependencies to other runtime modules
  12438. */
  12439. static STAGE_NORMAL: number;
  12440. /**
  12441. * Runtime modules with simple dependencies on other runtime modules
  12442. */
  12443. static STAGE_BASIC: number;
  12444. /**
  12445. * Runtime modules which attach to handlers of other runtime modules
  12446. */
  12447. static STAGE_ATTACH: number;
  12448. /**
  12449. * Runtime modules which trigger actions on bootstrap
  12450. */
  12451. static STAGE_TRIGGER: number;
  12452. }
  12453. declare interface RuntimeRequirementsContext {
  12454. /**
  12455. * the chunk graph
  12456. */
  12457. chunkGraph: ChunkGraph;
  12458. /**
  12459. * the code generation results
  12460. */
  12461. codeGenerationResults: CodeGenerationResults;
  12462. }
  12463. type RuntimeSpec = undefined | string | SortableSet<string>;
  12464. declare class RuntimeSpecMap<T> {
  12465. constructor(clone?: RuntimeSpecMap<T>);
  12466. get(runtime: RuntimeSpec): undefined | T;
  12467. has(runtime: RuntimeSpec): boolean;
  12468. set(runtime: RuntimeSpec, value: T): void;
  12469. provide(runtime: RuntimeSpec, computer: () => any): any;
  12470. delete(runtime: RuntimeSpec): void;
  12471. update(runtime: RuntimeSpec, fn: (arg0?: T) => T): void;
  12472. keys(): RuntimeSpec[];
  12473. values(): IterableIterator<T>;
  12474. get size(): number;
  12475. }
  12476. declare class RuntimeSpecSet {
  12477. constructor(iterable?: Iterable<RuntimeSpec>);
  12478. add(runtime: RuntimeSpec): void;
  12479. has(runtime: RuntimeSpec): boolean;
  12480. get size(): number;
  12481. [Symbol.iterator](): IterableIterator<RuntimeSpec>;
  12482. }
  12483. declare abstract class RuntimeTemplate {
  12484. compilation: Compilation;
  12485. outputOptions: OutputNormalized;
  12486. requestShortener: RequestShortener;
  12487. globalObject: string;
  12488. contentHashReplacement: string;
  12489. isIIFE(): undefined | boolean;
  12490. isModule(): undefined | boolean;
  12491. isNeutralPlatform(): boolean;
  12492. supportsConst(): undefined | boolean;
  12493. supportsArrowFunction(): undefined | boolean;
  12494. supportsAsyncFunction(): undefined | boolean;
  12495. supportsOptionalChaining(): undefined | boolean;
  12496. supportsForOf(): undefined | boolean;
  12497. supportsDestructuring(): undefined | boolean;
  12498. supportsBigIntLiteral(): undefined | boolean;
  12499. supportsDynamicImport(): undefined | boolean;
  12500. supportsEcmaScriptModuleSyntax(): undefined | boolean;
  12501. supportTemplateLiteral(): undefined | boolean;
  12502. supportNodePrefixForCoreModules(): undefined | boolean;
  12503. returningFunction(returnValue: string, args?: string): string;
  12504. basicFunction(args: string, body: string | string[]): string;
  12505. concatenation(...args: (string | { expr: string })[]): string;
  12506. expressionFunction(expression: string, args?: string): string;
  12507. emptyFunction(): string;
  12508. destructureArray(items: string[], value: string): string;
  12509. destructureObject(items: string[], value: string): string;
  12510. iife(args: string, body: string): string;
  12511. forEach(variable: string, array: string, body: string | string[]): string;
  12512. /**
  12513. * Add a comment
  12514. */
  12515. comment(__0: {
  12516. /**
  12517. * request string used originally
  12518. */
  12519. request?: string;
  12520. /**
  12521. * name of the chunk referenced
  12522. */
  12523. chunkName?: null | string;
  12524. /**
  12525. * reason information of the chunk
  12526. */
  12527. chunkReason?: string;
  12528. /**
  12529. * additional message
  12530. */
  12531. message?: string;
  12532. /**
  12533. * name of the export
  12534. */
  12535. exportName?: string;
  12536. }): string;
  12537. throwMissingModuleErrorBlock(__0: {
  12538. /**
  12539. * request string used originally
  12540. */
  12541. request?: string;
  12542. }): string;
  12543. throwMissingModuleErrorFunction(__0: {
  12544. /**
  12545. * request string used originally
  12546. */
  12547. request?: string;
  12548. }): string;
  12549. missingModule(__0: {
  12550. /**
  12551. * request string used originally
  12552. */
  12553. request?: string;
  12554. }): string;
  12555. missingModuleStatement(__0: {
  12556. /**
  12557. * request string used originally
  12558. */
  12559. request?: string;
  12560. }): string;
  12561. missingModulePromise(__0: {
  12562. /**
  12563. * request string used originally
  12564. */
  12565. request?: string;
  12566. }): string;
  12567. weakError(__0: {
  12568. /**
  12569. * the chunk graph
  12570. */
  12571. chunkGraph: ChunkGraph;
  12572. /**
  12573. * the module
  12574. */
  12575. module: Module;
  12576. /**
  12577. * the request that should be printed as comment
  12578. */
  12579. request?: string;
  12580. /**
  12581. * expression to use as id expression
  12582. */
  12583. idExpr?: string;
  12584. /**
  12585. * which kind of code should be returned
  12586. */
  12587. type: "promise" | "expression" | "statements";
  12588. }): string;
  12589. moduleId(__0: {
  12590. /**
  12591. * the module
  12592. */
  12593. module: Module;
  12594. /**
  12595. * the chunk graph
  12596. */
  12597. chunkGraph: ChunkGraph;
  12598. /**
  12599. * the request that should be printed as comment
  12600. */
  12601. request?: string;
  12602. /**
  12603. * if the dependency is weak (will create a nice error message)
  12604. */
  12605. weak?: boolean;
  12606. }): string;
  12607. moduleRaw(__0: {
  12608. /**
  12609. * the module
  12610. */
  12611. module: null | Module;
  12612. /**
  12613. * the chunk graph
  12614. */
  12615. chunkGraph: ChunkGraph;
  12616. /**
  12617. * the request that should be printed as comment
  12618. */
  12619. request?: string;
  12620. /**
  12621. * if the dependency is weak (will create a nice error message)
  12622. */
  12623. weak?: boolean;
  12624. /**
  12625. * if set, will be filled with runtime requirements
  12626. */
  12627. runtimeRequirements: Set<string>;
  12628. }): string;
  12629. moduleExports(__0: {
  12630. /**
  12631. * the module
  12632. */
  12633. module: null | Module;
  12634. /**
  12635. * the chunk graph
  12636. */
  12637. chunkGraph: ChunkGraph;
  12638. /**
  12639. * the request that should be printed as comment
  12640. */
  12641. request: string;
  12642. /**
  12643. * if the dependency is weak (will create a nice error message)
  12644. */
  12645. weak?: boolean;
  12646. /**
  12647. * if set, will be filled with runtime requirements
  12648. */
  12649. runtimeRequirements: Set<string>;
  12650. }): string;
  12651. moduleNamespace(__0: {
  12652. /**
  12653. * the module
  12654. */
  12655. module: Module;
  12656. /**
  12657. * the chunk graph
  12658. */
  12659. chunkGraph: ChunkGraph;
  12660. /**
  12661. * the request that should be printed as comment
  12662. */
  12663. request: string;
  12664. /**
  12665. * if the current module is in strict esm mode
  12666. */
  12667. strict?: boolean;
  12668. /**
  12669. * if the dependency is weak (will create a nice error message)
  12670. */
  12671. weak?: boolean;
  12672. /**
  12673. * if set, will be filled with runtime requirements
  12674. */
  12675. runtimeRequirements: Set<string>;
  12676. }): string;
  12677. moduleNamespacePromise(__0: {
  12678. /**
  12679. * the chunk graph
  12680. */
  12681. chunkGraph: ChunkGraph;
  12682. /**
  12683. * the current dependencies block
  12684. */
  12685. block?: AsyncDependenciesBlock;
  12686. /**
  12687. * the module
  12688. */
  12689. module: Module;
  12690. /**
  12691. * the request that should be printed as comment
  12692. */
  12693. request: string;
  12694. /**
  12695. * a message for the comment
  12696. */
  12697. message: string;
  12698. /**
  12699. * if the current module is in strict esm mode
  12700. */
  12701. strict?: boolean;
  12702. /**
  12703. * if the dependency is weak (will create a nice error message)
  12704. */
  12705. weak?: boolean;
  12706. /**
  12707. * if set, will be filled with runtime requirements
  12708. */
  12709. runtimeRequirements: Set<string>;
  12710. }): string;
  12711. runtimeConditionExpression(__0: {
  12712. /**
  12713. * the chunk graph
  12714. */
  12715. chunkGraph: ChunkGraph;
  12716. /**
  12717. * runtime for which this code will be generated
  12718. */
  12719. runtime?: RuntimeSpec;
  12720. /**
  12721. * only execute the statement in some runtimes
  12722. */
  12723. runtimeCondition?: string | boolean | SortableSet<string>;
  12724. /**
  12725. * if set, will be filled with runtime requirements
  12726. */
  12727. runtimeRequirements: Set<string>;
  12728. }): string;
  12729. importStatement(__0: {
  12730. /**
  12731. * whether a new variable should be created or the existing one updated
  12732. */
  12733. update?: boolean;
  12734. /**
  12735. * the module
  12736. */
  12737. module: Module;
  12738. /**
  12739. * the chunk graph
  12740. */
  12741. chunkGraph: ChunkGraph;
  12742. /**
  12743. * the request that should be printed as comment
  12744. */
  12745. request: string;
  12746. /**
  12747. * name of the import variable
  12748. */
  12749. importVar: string;
  12750. /**
  12751. * module in which the statement is emitted
  12752. */
  12753. originModule: Module;
  12754. /**
  12755. * true, if this is a weak dependency
  12756. */
  12757. weak?: boolean;
  12758. /**
  12759. * if set, will be filled with runtime requirements
  12760. */
  12761. runtimeRequirements: Set<string>;
  12762. }): [string, string];
  12763. exportFromImport(__0: {
  12764. /**
  12765. * the module graph
  12766. */
  12767. moduleGraph: ModuleGraph;
  12768. /**
  12769. * the module
  12770. */
  12771. module: Module;
  12772. /**
  12773. * the request
  12774. */
  12775. request: string;
  12776. /**
  12777. * the export name
  12778. */
  12779. exportName: string | string[];
  12780. /**
  12781. * the origin module
  12782. */
  12783. originModule: Module;
  12784. /**
  12785. * true, if location is safe for ASI, a bracket can be emitted
  12786. */
  12787. asiSafe?: boolean;
  12788. /**
  12789. * true, if expression will be called
  12790. */
  12791. isCall: boolean;
  12792. /**
  12793. * when false, call context will not be preserved
  12794. */
  12795. callContext: null | boolean;
  12796. /**
  12797. * when true and accessing the default exports, interop code will be generated
  12798. */
  12799. defaultInterop: boolean;
  12800. /**
  12801. * the identifier name of the import variable
  12802. */
  12803. importVar: string;
  12804. /**
  12805. * init fragments will be added here
  12806. */
  12807. initFragments: InitFragment<any>[];
  12808. /**
  12809. * runtime for which this code will be generated
  12810. */
  12811. runtime: RuntimeSpec;
  12812. /**
  12813. * if set, will be filled with runtime requirements
  12814. */
  12815. runtimeRequirements: Set<string>;
  12816. }): string;
  12817. blockPromise(__0: {
  12818. /**
  12819. * the async block
  12820. */
  12821. block?: AsyncDependenciesBlock;
  12822. /**
  12823. * the message
  12824. */
  12825. message: string;
  12826. /**
  12827. * the chunk graph
  12828. */
  12829. chunkGraph: ChunkGraph;
  12830. /**
  12831. * if set, will be filled with runtime requirements
  12832. */
  12833. runtimeRequirements: Set<string>;
  12834. }): string;
  12835. asyncModuleFactory(__0: {
  12836. /**
  12837. * the async block
  12838. */
  12839. block: AsyncDependenciesBlock;
  12840. /**
  12841. * the chunk graph
  12842. */
  12843. chunkGraph: ChunkGraph;
  12844. /**
  12845. * if set, will be filled with runtime requirements
  12846. */
  12847. runtimeRequirements: Set<string>;
  12848. /**
  12849. * request string used originally
  12850. */
  12851. request?: string;
  12852. }): string;
  12853. syncModuleFactory(__0: {
  12854. /**
  12855. * the dependency
  12856. */
  12857. dependency: Dependency;
  12858. /**
  12859. * the chunk graph
  12860. */
  12861. chunkGraph: ChunkGraph;
  12862. /**
  12863. * if set, will be filled with runtime requirements
  12864. */
  12865. runtimeRequirements: Set<string>;
  12866. /**
  12867. * request string used originally
  12868. */
  12869. request?: string;
  12870. }): string;
  12871. defineEsModuleFlagStatement(__0: {
  12872. /**
  12873. * the name of the exports object
  12874. */
  12875. exportsArgument: string;
  12876. /**
  12877. * if set, will be filled with runtime requirements
  12878. */
  12879. runtimeRequirements: Set<string>;
  12880. }): string;
  12881. }
  12882. declare abstract class RuntimeValue {
  12883. fn: (arg0: {
  12884. module: NormalModule;
  12885. key: string;
  12886. readonly version: ValueCacheVersion;
  12887. }) => CodeValuePrimitive;
  12888. options: true | RuntimeValueOptions;
  12889. get fileDependencies(): true | string[];
  12890. exec(
  12891. parser: JavascriptParser,
  12892. valueCacheVersions: Map<string, string | Set<string>>,
  12893. key: string
  12894. ): CodeValuePrimitive;
  12895. getCacheVersion(): undefined | string;
  12896. }
  12897. declare interface RuntimeValueOptions {
  12898. fileDependencies?: string[];
  12899. contextDependencies?: string[];
  12900. missingDependencies?: string[];
  12901. buildDependencies?: string[];
  12902. version?: string | (() => string);
  12903. }
  12904. /**
  12905. * Helper function for joining two ranges into a single range. This is useful
  12906. * when working with AST nodes, as it allows you to combine the ranges of child nodes
  12907. * to create the range of the _parent node_.
  12908. */
  12909. declare interface ScopeInfo {
  12910. definitions: StackedMap<string, VariableInfo | ScopeInfo>;
  12911. topLevelScope: boolean | "arrow";
  12912. inShorthand: string | boolean;
  12913. inTaggedTemplateTag: boolean;
  12914. inTry: boolean;
  12915. isStrict: boolean;
  12916. isAsmJs: boolean;
  12917. }
  12918. declare interface Selector<A, B> {
  12919. (input: A): undefined | null | B;
  12920. }
  12921. declare abstract class Serializer {
  12922. serializeMiddlewares: SerializerMiddleware<any, any>[];
  12923. deserializeMiddlewares: SerializerMiddleware<any, any>[];
  12924. context: any;
  12925. serialize(obj?: any, context?: any): Promise<any>;
  12926. deserialize(value?: any, context?: any): Promise<any>;
  12927. }
  12928. declare abstract class SerializerMiddleware<DeserializedType, SerializedType> {
  12929. serialize(
  12930. data: DeserializedType,
  12931. context: object
  12932. ): SerializedType | Promise<SerializedType>;
  12933. deserialize(
  12934. data: SerializedType,
  12935. context: object
  12936. ): DeserializedType | Promise<DeserializedType>;
  12937. }
  12938. type ServerOptionsHttps<
  12939. Request extends typeof IncomingMessage = typeof IncomingMessage,
  12940. Response extends typeof ServerResponse = typeof ServerResponse
  12941. > = SecureContextOptions & TlsOptions & ServerOptionsImport<Request, Response>;
  12942. declare class SharePlugin {
  12943. constructor(options: SharePluginOptions);
  12944. /**
  12945. * Apply the plugin
  12946. */
  12947. apply(compiler: Compiler): void;
  12948. }
  12949. /**
  12950. * Options for shared modules.
  12951. */
  12952. declare interface SharePluginOptions {
  12953. /**
  12954. * Share scope name used for all shared modules (defaults to 'default').
  12955. */
  12956. shareScope?: string;
  12957. /**
  12958. * Modules that should be shared in the share scope. When provided, property names are used to match requested modules in this compilation.
  12959. */
  12960. shared: Shared;
  12961. }
  12962. type Shared = (string | SharedObject)[] | SharedObject;
  12963. /**
  12964. * Advanced configuration for modules that should be shared in the share scope.
  12965. */
  12966. declare interface SharedConfig {
  12967. /**
  12968. * Include the provided and fallback module directly instead behind an async request. This allows to use this shared module in initial load too. All possible shared modules need to be eager too.
  12969. */
  12970. eager?: boolean;
  12971. /**
  12972. * Provided module that should be provided to share scope. Also acts as fallback module if no shared module is found in share scope or version isn't valid. Defaults to the property name.
  12973. */
  12974. import?: string | false;
  12975. /**
  12976. * Package name to determine required version from description file. This is only needed when package name can't be automatically determined from request.
  12977. */
  12978. packageName?: string;
  12979. /**
  12980. * Version requirement from module in share scope.
  12981. */
  12982. requiredVersion?: string | false;
  12983. /**
  12984. * Module is looked up under this key from the share scope.
  12985. */
  12986. shareKey?: string;
  12987. /**
  12988. * Share scope name.
  12989. */
  12990. shareScope?: string;
  12991. /**
  12992. * Allow only a single version of the shared module in share scope (disabled by default).
  12993. */
  12994. singleton?: boolean;
  12995. /**
  12996. * Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).
  12997. */
  12998. strictVersion?: boolean;
  12999. /**
  13000. * Version of the provided module. Will replace lower matching versions, but not higher.
  13001. */
  13002. version?: string | false;
  13003. }
  13004. /**
  13005. * Modules that should be shared in the share scope. Property names are used to match requested modules in this compilation. Relative requests are resolved, module requests are matched unresolved, absolute paths will match resolved requests. A trailing slash will match all requests with this prefix. In this case shareKey must also have a trailing slash.
  13006. */
  13007. declare interface SharedObject {
  13008. [index: string]: string | SharedConfig;
  13009. }
  13010. declare class SideEffectsFlagPlugin {
  13011. constructor(analyseSource?: boolean);
  13012. /**
  13013. * Apply the plugin
  13014. */
  13015. apply(compiler: Compiler): void;
  13016. static moduleHasSideEffects(
  13017. moduleName: string,
  13018. flagValue: undefined | string | boolean | string[],
  13019. cache: Map<string, RegExp>
  13020. ): undefined | boolean;
  13021. }
  13022. type SimpleType = "string" | "number" | "boolean";
  13023. declare class SizeOnlySource extends Source {
  13024. constructor(size: number);
  13025. }
  13026. declare abstract class Snapshot {
  13027. startTime?: number;
  13028. fileTimestamps?: Map<string, null | FileSystemInfoEntry>;
  13029. fileHashes?: Map<string, null | string>;
  13030. fileTshs?: Map<string, null | string | TimestampAndHash>;
  13031. contextTimestamps?: Map<string, null | ResolvedContextFileSystemInfoEntry>;
  13032. contextHashes?: Map<string, null | string>;
  13033. contextTshs?: Map<string, null | ResolvedContextTimestampAndHash>;
  13034. missingExistence?: Map<string, boolean>;
  13035. managedItemInfo?: Map<string, string>;
  13036. managedFiles?: Set<string>;
  13037. managedContexts?: Set<string>;
  13038. managedMissing?: Set<string>;
  13039. children?: Set<Snapshot>;
  13040. hasStartTime(): boolean;
  13041. setStartTime(value: number): void;
  13042. setMergedStartTime(value: undefined | number, snapshot: Snapshot): void;
  13043. hasFileTimestamps(): boolean;
  13044. setFileTimestamps(value: Map<string, null | FileSystemInfoEntry>): void;
  13045. hasFileHashes(): boolean;
  13046. setFileHashes(value: Map<string, null | string>): void;
  13047. hasFileTshs(): boolean;
  13048. setFileTshs(value: Map<string, null | string | TimestampAndHash>): void;
  13049. hasContextTimestamps(): boolean;
  13050. setContextTimestamps(
  13051. value: Map<string, null | ResolvedContextFileSystemInfoEntry>
  13052. ): void;
  13053. hasContextHashes(): boolean;
  13054. setContextHashes(value: Map<string, null | string>): void;
  13055. hasContextTshs(): boolean;
  13056. setContextTshs(
  13057. value: Map<string, null | ResolvedContextTimestampAndHash>
  13058. ): void;
  13059. hasMissingExistence(): boolean;
  13060. setMissingExistence(value: Map<string, boolean>): void;
  13061. hasManagedItemInfo(): boolean;
  13062. setManagedItemInfo(value: Map<string, string>): void;
  13063. hasManagedFiles(): boolean;
  13064. setManagedFiles(value: Set<string>): void;
  13065. hasManagedContexts(): boolean;
  13066. setManagedContexts(value: Set<string>): void;
  13067. hasManagedMissing(): boolean;
  13068. setManagedMissing(value: Set<string>): void;
  13069. hasChildren(): boolean;
  13070. setChildren(value: Set<Snapshot>): void;
  13071. addChild(child: Snapshot): void;
  13072. serialize(__0: ObjectSerializerContext): void;
  13073. deserialize(__0: ObjectDeserializerContext): void;
  13074. getFileIterable(): Iterable<string>;
  13075. getContextIterable(): Iterable<string>;
  13076. getMissingIterable(): Iterable<string>;
  13077. }
  13078. declare interface SnapshotOptionsFileSystemInfo {
  13079. /**
  13080. * should use hash to snapshot
  13081. */
  13082. hash?: boolean;
  13083. /**
  13084. * should use timestamp to snapshot
  13085. */
  13086. timestamp?: boolean;
  13087. }
  13088. /**
  13089. * Options affecting how file system snapshots are created and validated.
  13090. */
  13091. declare interface SnapshotOptionsWebpackOptions {
  13092. /**
  13093. * Options for snapshotting build dependencies to determine if the whole cache need to be invalidated.
  13094. */
  13095. buildDependencies?: {
  13096. /**
  13097. * Use hashes of the content of the files/directories to determine invalidation.
  13098. */
  13099. hash?: boolean;
  13100. /**
  13101. * Use timestamps of the files/directories to determine invalidation.
  13102. */
  13103. timestamp?: boolean;
  13104. };
  13105. /**
  13106. * List of paths that are managed by a package manager and contain a version or hash in its path so all files are immutable.
  13107. */
  13108. immutablePaths?: (string | RegExp)[];
  13109. /**
  13110. * List of paths that are managed by a package manager and can be trusted to not be modified otherwise.
  13111. */
  13112. managedPaths?: (string | RegExp)[];
  13113. /**
  13114. * Options for snapshotting dependencies of modules to determine if they need to be built again.
  13115. */
  13116. module?: {
  13117. /**
  13118. * Use hashes of the content of the files/directories to determine invalidation.
  13119. */
  13120. hash?: boolean;
  13121. /**
  13122. * Use timestamps of the files/directories to determine invalidation.
  13123. */
  13124. timestamp?: boolean;
  13125. };
  13126. /**
  13127. * Options for snapshotting dependencies of request resolving to determine if requests need to be re-resolved.
  13128. */
  13129. resolve?: {
  13130. /**
  13131. * Use hashes of the content of the files/directories to determine invalidation.
  13132. */
  13133. hash?: boolean;
  13134. /**
  13135. * Use timestamps of the files/directories to determine invalidation.
  13136. */
  13137. timestamp?: boolean;
  13138. };
  13139. /**
  13140. * Options for snapshotting the resolving of build dependencies to determine if the build dependencies need to be re-resolved.
  13141. */
  13142. resolveBuildDependencies?: {
  13143. /**
  13144. * Use hashes of the content of the files/directories to determine invalidation.
  13145. */
  13146. hash?: boolean;
  13147. /**
  13148. * Use timestamps of the files/directories to determine invalidation.
  13149. */
  13150. timestamp?: boolean;
  13151. };
  13152. /**
  13153. * List of paths that are not managed by a package manager and the contents are subject to change.
  13154. */
  13155. unmanagedPaths?: (string | RegExp)[];
  13156. }
  13157. declare interface SortFunction<T> {
  13158. (arg0: T, arg1: T): number;
  13159. }
  13160. declare abstract class SortableSet<T> extends Set<T> {
  13161. /**
  13162. * Sort with a comparer function
  13163. */
  13164. sortWith(sortFn?: SortFunction<T>): void;
  13165. sort(): SortableSet<T>;
  13166. /**
  13167. * Get data from cache
  13168. */
  13169. getFromCache<R>(fn: (arg0: SortableSet<T>) => R): R;
  13170. /**
  13171. * Get data from cache (ignoring sorting)
  13172. */
  13173. getFromUnorderedCache<R>(fn: (arg0: SortableSet<T>) => R): R;
  13174. toJSON(): T[];
  13175. }
  13176. declare class Source {
  13177. constructor();
  13178. size(): number;
  13179. map(options?: MapOptions): null | RawSourceMap;
  13180. sourceAndMap(options?: MapOptions): { source: string | Buffer; map: Object };
  13181. updateHash(hash: Hash): void;
  13182. source(): string | Buffer;
  13183. buffer(): Buffer;
  13184. }
  13185. declare interface SourceLike {
  13186. source(): string | Buffer;
  13187. }
  13188. declare interface SourceMap {
  13189. version: number;
  13190. sources: string[];
  13191. mappings: string;
  13192. file?: string;
  13193. sourceRoot?: string;
  13194. sourcesContent?: string[];
  13195. names?: string[];
  13196. debugId?: string;
  13197. }
  13198. declare class SourceMapDevToolPlugin {
  13199. constructor(options?: SourceMapDevToolPluginOptions);
  13200. sourceMapFilename: string | false;
  13201. sourceMappingURLComment:
  13202. | string
  13203. | false
  13204. | ((arg0: PathData, arg1?: AssetInfo) => string);
  13205. moduleFilenameTemplate: string | Function;
  13206. fallbackModuleFilenameTemplate: string | Function;
  13207. namespace: string;
  13208. options: SourceMapDevToolPluginOptions;
  13209. /**
  13210. * Apply the plugin
  13211. */
  13212. apply(compiler: Compiler): void;
  13213. }
  13214. declare interface SourceMapDevToolPluginOptions {
  13215. /**
  13216. * Appends the given value to the original asset. Usually the #sourceMappingURL comment. [url] is replaced with a URL to the source map file. false disables the appending.
  13217. */
  13218. append?:
  13219. | null
  13220. | string
  13221. | false
  13222. | ((pathData: PathData, assetInfo?: AssetInfo) => string);
  13223. /**
  13224. * Indicates whether column mappings should be used (defaults to true).
  13225. */
  13226. columns?: boolean;
  13227. /**
  13228. * Emit debug IDs into source and SourceMap.
  13229. */
  13230. debugIds?: boolean;
  13231. /**
  13232. * Exclude modules that match the given value from source map generation.
  13233. */
  13234. exclude?: string | RegExp | Rule[];
  13235. /**
  13236. * Generator string or function to create identifiers of modules for the 'sources' array in the SourceMap used only if 'moduleFilenameTemplate' would result in a conflict.
  13237. */
  13238. fallbackModuleFilenameTemplate?: string | Function;
  13239. /**
  13240. * Path prefix to which the [file] placeholder is relative to.
  13241. */
  13242. fileContext?: string;
  13243. /**
  13244. * Defines the output filename of the SourceMap (will be inlined if no value is provided).
  13245. */
  13246. filename?: null | string | false;
  13247. /**
  13248. * Include source maps for module paths that match the given value.
  13249. */
  13250. include?: string | RegExp | Rule[];
  13251. /**
  13252. * Indicates whether SourceMaps from loaders should be used (defaults to true).
  13253. */
  13254. module?: boolean;
  13255. /**
  13256. * Generator string or function to create identifiers of modules for the 'sources' array in the SourceMap.
  13257. */
  13258. moduleFilenameTemplate?: string | Function;
  13259. /**
  13260. * Namespace prefix to allow multiple webpack roots in the devtools.
  13261. */
  13262. namespace?: string;
  13263. /**
  13264. * Omit the 'sourceContents' array from the SourceMap.
  13265. */
  13266. noSources?: boolean;
  13267. /**
  13268. * Provide a custom public path for the SourceMapping comment.
  13269. */
  13270. publicPath?: string;
  13271. /**
  13272. * Provide a custom value for the 'sourceRoot' property in the SourceMap.
  13273. */
  13274. sourceRoot?: string;
  13275. /**
  13276. * Include source maps for modules based on their extension (defaults to .js and .css).
  13277. */
  13278. test?: string | RegExp | Rule[];
  13279. }
  13280. declare class SourceMapSource extends Source {
  13281. constructor(
  13282. source: string | Buffer,
  13283. name: string,
  13284. sourceMap: string | Object | Buffer,
  13285. originalSource?: string | Buffer,
  13286. innerSourceMap?: string | Object | Buffer,
  13287. removeOriginalSource?: boolean
  13288. );
  13289. getArgsAsBuffers(): [
  13290. Buffer,
  13291. string,
  13292. Buffer,
  13293. undefined | Buffer,
  13294. undefined | Buffer,
  13295. boolean
  13296. ];
  13297. }
  13298. declare interface SourcePosition {
  13299. line: number;
  13300. column?: number;
  13301. }
  13302. declare interface SplitChunksOptions {
  13303. chunksFilter: (chunk: Chunk) => undefined | boolean;
  13304. defaultSizeTypes: string[];
  13305. minSize: SplitChunksSizes;
  13306. minSizeReduction: SplitChunksSizes;
  13307. minRemainingSize: SplitChunksSizes;
  13308. enforceSizeThreshold: SplitChunksSizes;
  13309. maxInitialSize: SplitChunksSizes;
  13310. maxAsyncSize: SplitChunksSizes;
  13311. minChunks: number;
  13312. maxAsyncRequests: number;
  13313. maxInitialRequests: number;
  13314. hidePathInfo: boolean;
  13315. filename: TemplatePath;
  13316. automaticNameDelimiter: string;
  13317. getCacheGroups: (
  13318. module: Module,
  13319. context: CacheGroupsContext
  13320. ) => CacheGroupSource[];
  13321. getName: (
  13322. module?: Module,
  13323. chunks?: Chunk[],
  13324. key?: string
  13325. ) => undefined | string;
  13326. usedExports: boolean;
  13327. fallbackCacheGroup: FallbackCacheGroup;
  13328. }
  13329. declare class SplitChunksPlugin {
  13330. constructor(options?: OptimizationSplitChunksOptions);
  13331. options: SplitChunksOptions;
  13332. /**
  13333. * Apply the plugin
  13334. */
  13335. apply(compiler: Compiler): void;
  13336. }
  13337. declare interface SplitChunksSizes {
  13338. [index: string]: number;
  13339. }
  13340. declare abstract class StackedMap<K, V> {
  13341. map: Map<K, InternalCell<V>>;
  13342. stack: Map<K, InternalCell<V>>[];
  13343. set(item: K, value: V): void;
  13344. delete(item: K): void;
  13345. has(item: K): boolean;
  13346. get(item: K): Cell<V>;
  13347. asArray(): K[];
  13348. asSet(): Set<K>;
  13349. asPairArray(): [K, Cell<V>][];
  13350. asMap(): Map<K, Cell<V>>;
  13351. get size(): number;
  13352. createChild(): StackedMap<K, V>;
  13353. }
  13354. type StartupRenderContext = RenderContextJavascriptModulesPlugin & {
  13355. inlined: boolean;
  13356. };
  13357. declare interface StatFs {
  13358. (
  13359. path: PathLikeFs,
  13360. callback: (arg0: null | NodeJS.ErrnoException, arg1?: IStats) => void
  13361. ): void;
  13362. (
  13363. path: PathLikeFs,
  13364. options: undefined | (StatOptions & { bigint?: false }),
  13365. callback: (arg0: null | NodeJS.ErrnoException, arg1?: IStats) => void
  13366. ): void;
  13367. (
  13368. path: PathLikeFs,
  13369. options: StatOptions & { bigint: true },
  13370. callback: (arg0: null | NodeJS.ErrnoException, arg1?: IBigIntStats) => void
  13371. ): void;
  13372. (
  13373. path: PathLikeFs,
  13374. options: undefined | StatOptions,
  13375. callback: (
  13376. arg0: null | NodeJS.ErrnoException,
  13377. arg1?: IStats | IBigIntStats
  13378. ) => void
  13379. ): void;
  13380. }
  13381. declare interface StatOptions {
  13382. bigint?: boolean;
  13383. }
  13384. declare interface StatSync {
  13385. (path: PathLikeFs, options?: undefined): IStats;
  13386. (
  13387. path: PathLikeFs,
  13388. options?: StatSyncOptions & { bigint?: false; throwIfNoEntry: false }
  13389. ): undefined | IStats;
  13390. (
  13391. path: PathLikeFs,
  13392. options: StatSyncOptions & { bigint: true; throwIfNoEntry: false }
  13393. ): undefined | IBigIntStats;
  13394. (path: PathLikeFs, options?: StatSyncOptions & { bigint?: false }): IStats;
  13395. (path: PathLikeFs, options: StatSyncOptions & { bigint: true }): IBigIntStats;
  13396. (
  13397. path: PathLikeFs,
  13398. options: StatSyncOptions & { bigint: boolean; throwIfNoEntry?: false }
  13399. ): IStats | IBigIntStats;
  13400. (
  13401. path: PathLikeFs,
  13402. options?: StatSyncOptions
  13403. ): undefined | IStats | IBigIntStats;
  13404. }
  13405. declare interface StatSyncOptions {
  13406. bigint?: boolean;
  13407. throwIfNoEntry?: boolean;
  13408. }
  13409. declare interface StatTypes {
  13410. (
  13411. path: PathLikeTypes,
  13412. callback: (arg0: null | NodeJS.ErrnoException, arg1?: IStats) => void
  13413. ): void;
  13414. (
  13415. path: PathLikeTypes,
  13416. options: undefined | (StatOptions & { bigint?: false }),
  13417. callback: (arg0: null | NodeJS.ErrnoException, arg1?: IStats) => void
  13418. ): void;
  13419. (
  13420. path: PathLikeTypes,
  13421. options: StatOptions & { bigint: true },
  13422. callback: (arg0: null | NodeJS.ErrnoException, arg1?: IBigIntStats) => void
  13423. ): void;
  13424. (
  13425. path: PathLikeTypes,
  13426. options: undefined | StatOptions,
  13427. callback: (
  13428. arg0: null | NodeJS.ErrnoException,
  13429. arg1?: IStats | IBigIntStats
  13430. ) => void
  13431. ): void;
  13432. }
  13433. type Statement =
  13434. | FunctionDeclaration
  13435. | VariableDeclaration
  13436. | ClassDeclaration
  13437. | ExpressionStatement
  13438. | BlockStatement
  13439. | StaticBlock
  13440. | EmptyStatement
  13441. | DebuggerStatement
  13442. | WithStatement
  13443. | ReturnStatement
  13444. | LabeledStatement
  13445. | BreakStatement
  13446. | ContinueStatement
  13447. | IfStatement
  13448. | SwitchStatement
  13449. | ThrowStatement
  13450. | TryStatement
  13451. | WhileStatement
  13452. | DoWhileStatement
  13453. | ForStatement
  13454. | ForInStatement
  13455. | ForOfStatement;
  13456. type StatementPathItem =
  13457. | ImportDeclarationJavascriptParser
  13458. | ExportNamedDeclarationJavascriptParser
  13459. | ExportAllDeclarationJavascriptParser
  13460. | ImportExpressionImport
  13461. | UnaryExpression
  13462. | ArrayExpression
  13463. | ArrowFunctionExpression
  13464. | AssignmentExpression
  13465. | AwaitExpression
  13466. | BinaryExpression
  13467. | SimpleCallExpression
  13468. | NewExpression
  13469. | ChainExpression
  13470. | ClassExpression
  13471. | ConditionalExpression
  13472. | FunctionExpression
  13473. | Identifier
  13474. | SimpleLiteral
  13475. | RegExpLiteral
  13476. | BigIntLiteral
  13477. | LogicalExpression
  13478. | MemberExpression
  13479. | MetaProperty
  13480. | ObjectExpression
  13481. | SequenceExpression
  13482. | TaggedTemplateExpression
  13483. | TemplateLiteral
  13484. | ThisExpression
  13485. | UpdateExpression
  13486. | YieldExpression
  13487. | FunctionDeclaration
  13488. | VariableDeclaration
  13489. | ClassDeclaration
  13490. | ExpressionStatement
  13491. | BlockStatement
  13492. | StaticBlock
  13493. | EmptyStatement
  13494. | DebuggerStatement
  13495. | WithStatement
  13496. | ReturnStatement
  13497. | LabeledStatement
  13498. | BreakStatement
  13499. | ContinueStatement
  13500. | IfStatement
  13501. | SwitchStatement
  13502. | ThrowStatement
  13503. | TryStatement
  13504. | WhileStatement
  13505. | DoWhileStatement
  13506. | ForStatement
  13507. | ForInStatement
  13508. | ForOfStatement
  13509. | ExportDefaultDeclaration;
  13510. declare class Stats {
  13511. constructor(compilation: Compilation);
  13512. compilation: Compilation;
  13513. get hash(): string;
  13514. get startTime(): number;
  13515. get endTime(): number;
  13516. hasWarnings(): boolean;
  13517. hasErrors(): boolean;
  13518. toJson(options?: string | boolean | StatsOptions): StatsCompilation;
  13519. toString(options?: string | boolean | StatsOptions): string;
  13520. }
  13521. type StatsAsset = Record<string, any> & KnownStatsAsset;
  13522. type StatsChunk = Record<string, any> & KnownStatsChunk;
  13523. type StatsChunkGroup = Record<string, any> & KnownStatsChunkGroup;
  13524. type StatsChunkOrigin = Record<string, any> & KnownStatsChunkOrigin;
  13525. type StatsCompilation = Record<string, any> & KnownStatsCompilation;
  13526. type StatsError = Record<string, any> & KnownStatsError;
  13527. declare abstract class StatsFactory {
  13528. hooks: StatsFactoryHooks;
  13529. create(
  13530. type: string,
  13531. data: any,
  13532. baseContext: Omit<StatsFactoryContext, "type">
  13533. ): any;
  13534. }
  13535. type StatsFactoryContext = Record<string, any> & KnownStatsFactoryContext;
  13536. declare interface StatsFactoryHooks {
  13537. extract: HookMap<
  13538. SyncBailHook<[ObjectForExtract, any, StatsFactoryContext], void>
  13539. >;
  13540. filter: HookMap<
  13541. SyncBailHook<[any, StatsFactoryContext, number, number], boolean | void>
  13542. >;
  13543. sort: HookMap<
  13544. SyncBailHook<
  13545. [((arg0?: any, arg1?: any) => 0 | 1 | -1)[], StatsFactoryContext],
  13546. void
  13547. >
  13548. >;
  13549. filterSorted: HookMap<
  13550. SyncBailHook<[any, StatsFactoryContext, number, number], boolean | void>
  13551. >;
  13552. groupResults: HookMap<
  13553. SyncBailHook<[GroupConfig[], StatsFactoryContext], void>
  13554. >;
  13555. sortResults: HookMap<
  13556. SyncBailHook<
  13557. [((arg0?: any, arg1?: any) => 0 | 1 | -1)[], StatsFactoryContext],
  13558. void
  13559. >
  13560. >;
  13561. filterResults: HookMap<
  13562. SyncBailHook<[any, StatsFactoryContext, number, number], boolean | void>
  13563. >;
  13564. merge: HookMap<SyncBailHook<[any[], StatsFactoryContext], any>>;
  13565. result: HookMap<SyncBailHook<[any, StatsFactoryContext], any>>;
  13566. getItemName: HookMap<SyncBailHook<[any, StatsFactoryContext], string | void>>;
  13567. getItemFactory: HookMap<
  13568. SyncBailHook<[any, StatsFactoryContext], void | StatsFactory>
  13569. >;
  13570. }
  13571. type StatsLogging = Record<string, any> & KnownStatsLogging;
  13572. type StatsLoggingEntry = Record<string, any> & KnownStatsLoggingEntry;
  13573. type StatsModule = Record<string, any> & KnownStatsModule;
  13574. type StatsModuleIssuer = Record<string, any> & KnownStatsModuleIssuer;
  13575. type StatsModuleReason = Record<string, any> & KnownStatsModuleReason;
  13576. type StatsModuleTraceDependency = Record<string, any> &
  13577. KnownStatsModuleTraceDependency;
  13578. type StatsModuleTraceItem = Record<string, any> & KnownStatsModuleTraceItem;
  13579. /**
  13580. * Stats options object.
  13581. */
  13582. declare interface StatsOptions {
  13583. /**
  13584. * Fallback value for stats options when an option is not defined (has precedence over local webpack defaults).
  13585. */
  13586. all?: boolean;
  13587. /**
  13588. * Add assets information.
  13589. */
  13590. assets?: boolean;
  13591. /**
  13592. * Sort the assets by that field.
  13593. */
  13594. assetsSort?: string;
  13595. /**
  13596. * Space to display assets (groups will be collapsed to fit this space).
  13597. */
  13598. assetsSpace?: number;
  13599. /**
  13600. * Add built at time information.
  13601. */
  13602. builtAt?: boolean;
  13603. /**
  13604. * Add information about cached (not built) modules (deprecated: use 'cachedModules' instead).
  13605. */
  13606. cached?: boolean;
  13607. /**
  13608. * Show cached assets (setting this to `false` only shows emitted files).
  13609. */
  13610. cachedAssets?: boolean;
  13611. /**
  13612. * Add information about cached (not built) modules.
  13613. */
  13614. cachedModules?: boolean;
  13615. /**
  13616. * Add children information.
  13617. */
  13618. children?: boolean;
  13619. /**
  13620. * Display auxiliary assets in chunk groups.
  13621. */
  13622. chunkGroupAuxiliary?: boolean;
  13623. /**
  13624. * Display children of chunk groups.
  13625. */
  13626. chunkGroupChildren?: boolean;
  13627. /**
  13628. * Limit of assets displayed in chunk groups.
  13629. */
  13630. chunkGroupMaxAssets?: number;
  13631. /**
  13632. * Display all chunk groups with the corresponding bundles.
  13633. */
  13634. chunkGroups?: boolean;
  13635. /**
  13636. * Add built modules information to chunk information.
  13637. */
  13638. chunkModules?: boolean;
  13639. /**
  13640. * Space to display chunk modules (groups will be collapsed to fit this space, value is in number of modules/group).
  13641. */
  13642. chunkModulesSpace?: number;
  13643. /**
  13644. * Add the origins of chunks and chunk merging info.
  13645. */
  13646. chunkOrigins?: boolean;
  13647. /**
  13648. * Add information about parent, children and sibling chunks to chunk information.
  13649. */
  13650. chunkRelations?: boolean;
  13651. /**
  13652. * Add chunk information.
  13653. */
  13654. chunks?: boolean;
  13655. /**
  13656. * Sort the chunks by that field.
  13657. */
  13658. chunksSort?: string;
  13659. /**
  13660. * Enables/Disables colorful output.
  13661. */
  13662. colors?:
  13663. | boolean
  13664. | {
  13665. /**
  13666. * Custom color for bold text.
  13667. */
  13668. bold?: string;
  13669. /**
  13670. * Custom color for cyan text.
  13671. */
  13672. cyan?: string;
  13673. /**
  13674. * Custom color for green text.
  13675. */
  13676. green?: string;
  13677. /**
  13678. * Custom color for magenta text.
  13679. */
  13680. magenta?: string;
  13681. /**
  13682. * Custom color for red text.
  13683. */
  13684. red?: string;
  13685. /**
  13686. * Custom color for yellow text.
  13687. */
  13688. yellow?: string;
  13689. };
  13690. /**
  13691. * Context directory for request shortening.
  13692. */
  13693. context?: string;
  13694. /**
  13695. * Show chunk modules that are dependencies of other modules of the chunk.
  13696. */
  13697. dependentModules?: boolean;
  13698. /**
  13699. * Add module depth in module graph.
  13700. */
  13701. depth?: boolean;
  13702. /**
  13703. * Display the entry points with the corresponding bundles.
  13704. */
  13705. entrypoints?: boolean | "auto";
  13706. /**
  13707. * Add --env information.
  13708. */
  13709. env?: boolean;
  13710. /**
  13711. * Add details to errors (like resolving log).
  13712. */
  13713. errorDetails?: boolean | "auto";
  13714. /**
  13715. * Add internal stack trace to errors.
  13716. */
  13717. errorStack?: boolean;
  13718. /**
  13719. * Add errors.
  13720. */
  13721. errors?: boolean;
  13722. /**
  13723. * Add errors count.
  13724. */
  13725. errorsCount?: boolean;
  13726. /**
  13727. * Space to display errors (value is in number of lines).
  13728. */
  13729. errorsSpace?: number;
  13730. /**
  13731. * Please use excludeModules instead.
  13732. */
  13733. exclude?:
  13734. | string
  13735. | boolean
  13736. | RegExp
  13737. | ModuleFilterItemTypes[]
  13738. | ((
  13739. name: string,
  13740. module: StatsModule,
  13741. type: "module" | "chunk" | "root-of-chunk" | "nested"
  13742. ) => boolean);
  13743. /**
  13744. * Suppress assets that match the specified filters. Filters can be Strings, RegExps or Functions.
  13745. */
  13746. excludeAssets?:
  13747. | string
  13748. | RegExp
  13749. | AssetFilterItemTypes[]
  13750. | ((name: string, asset: StatsAsset) => boolean);
  13751. /**
  13752. * Suppress modules that match the specified filters. Filters can be Strings, RegExps, Booleans or Functions.
  13753. */
  13754. excludeModules?:
  13755. | string
  13756. | boolean
  13757. | RegExp
  13758. | ModuleFilterItemTypes[]
  13759. | ((
  13760. name: string,
  13761. module: StatsModule,
  13762. type: "module" | "chunk" | "root-of-chunk" | "nested"
  13763. ) => boolean);
  13764. /**
  13765. * Group assets by how their are related to chunks.
  13766. */
  13767. groupAssetsByChunk?: boolean;
  13768. /**
  13769. * Group assets by their status (emitted, compared for emit or cached).
  13770. */
  13771. groupAssetsByEmitStatus?: boolean;
  13772. /**
  13773. * Group assets by their extension.
  13774. */
  13775. groupAssetsByExtension?: boolean;
  13776. /**
  13777. * Group assets by their asset info (immutable, development, hotModuleReplacement, etc).
  13778. */
  13779. groupAssetsByInfo?: boolean;
  13780. /**
  13781. * Group assets by their path.
  13782. */
  13783. groupAssetsByPath?: boolean;
  13784. /**
  13785. * Group modules by their attributes (errors, warnings, assets, optional, orphan, or dependent).
  13786. */
  13787. groupModulesByAttributes?: boolean;
  13788. /**
  13789. * Group modules by their status (cached or built and cacheable).
  13790. */
  13791. groupModulesByCacheStatus?: boolean;
  13792. /**
  13793. * Group modules by their extension.
  13794. */
  13795. groupModulesByExtension?: boolean;
  13796. /**
  13797. * Group modules by their layer.
  13798. */
  13799. groupModulesByLayer?: boolean;
  13800. /**
  13801. * Group modules by their path.
  13802. */
  13803. groupModulesByPath?: boolean;
  13804. /**
  13805. * Group modules by their type.
  13806. */
  13807. groupModulesByType?: boolean;
  13808. /**
  13809. * Group reasons by their origin module.
  13810. */
  13811. groupReasonsByOrigin?: boolean;
  13812. /**
  13813. * Add the hash of the compilation.
  13814. */
  13815. hash?: boolean;
  13816. /**
  13817. * Add ids.
  13818. */
  13819. ids?: boolean;
  13820. /**
  13821. * Add logging output.
  13822. */
  13823. logging?: boolean | "none" | "error" | "warn" | "info" | "log" | "verbose";
  13824. /**
  13825. * Include debug logging of specified loggers (i. e. for plugins or loaders). Filters can be Strings, RegExps or Functions.
  13826. */
  13827. loggingDebug?:
  13828. | string
  13829. | boolean
  13830. | RegExp
  13831. | FilterItemTypes[]
  13832. | ((value: string) => boolean);
  13833. /**
  13834. * Add stack traces to logging output.
  13835. */
  13836. loggingTrace?: boolean;
  13837. /**
  13838. * Add information about assets inside modules.
  13839. */
  13840. moduleAssets?: boolean;
  13841. /**
  13842. * Add dependencies and origin of warnings/errors.
  13843. */
  13844. moduleTrace?: boolean;
  13845. /**
  13846. * Add built modules information.
  13847. */
  13848. modules?: boolean;
  13849. /**
  13850. * Sort the modules by that field.
  13851. */
  13852. modulesSort?: string;
  13853. /**
  13854. * Space to display modules (groups will be collapsed to fit this space, value is in number of modules/groups).
  13855. */
  13856. modulesSpace?: number;
  13857. /**
  13858. * Add information about modules nested in other modules (like with module concatenation).
  13859. */
  13860. nestedModules?: boolean;
  13861. /**
  13862. * Space to display modules nested within other modules (groups will be collapsed to fit this space, value is in number of modules/group).
  13863. */
  13864. nestedModulesSpace?: number;
  13865. /**
  13866. * Show reasons why optimization bailed out for modules.
  13867. */
  13868. optimizationBailout?: boolean;
  13869. /**
  13870. * Add information about orphan modules.
  13871. */
  13872. orphanModules?: boolean;
  13873. /**
  13874. * Add output path information.
  13875. */
  13876. outputPath?: boolean;
  13877. /**
  13878. * Add performance hint flags.
  13879. */
  13880. performance?: boolean;
  13881. /**
  13882. * Preset for the default values.
  13883. */
  13884. preset?: string | boolean;
  13885. /**
  13886. * Show exports provided by modules.
  13887. */
  13888. providedExports?: boolean;
  13889. /**
  13890. * Add public path information.
  13891. */
  13892. publicPath?: boolean;
  13893. /**
  13894. * Add information about the reasons why modules are included.
  13895. */
  13896. reasons?: boolean;
  13897. /**
  13898. * Space to display reasons (groups will be collapsed to fit this space).
  13899. */
  13900. reasonsSpace?: number;
  13901. /**
  13902. * Add information about assets that are related to other assets (like SourceMaps for assets).
  13903. */
  13904. relatedAssets?: boolean;
  13905. /**
  13906. * Add information about runtime modules (deprecated: use 'runtimeModules' instead).
  13907. */
  13908. runtime?: boolean;
  13909. /**
  13910. * Add information about runtime modules.
  13911. */
  13912. runtimeModules?: boolean;
  13913. /**
  13914. * Add the source code of modules.
  13915. */
  13916. source?: boolean;
  13917. /**
  13918. * Add timing information.
  13919. */
  13920. timings?: boolean;
  13921. /**
  13922. * Show exports used by modules.
  13923. */
  13924. usedExports?: boolean;
  13925. /**
  13926. * Add webpack version information.
  13927. */
  13928. version?: boolean;
  13929. /**
  13930. * Add warnings.
  13931. */
  13932. warnings?: boolean;
  13933. /**
  13934. * Add warnings count.
  13935. */
  13936. warningsCount?: boolean;
  13937. /**
  13938. * Suppress listing warnings that match the specified filters (they will still be counted). Filters can be Strings, RegExps or Functions.
  13939. */
  13940. warningsFilter?:
  13941. | string
  13942. | RegExp
  13943. | WarningFilterItemTypes[]
  13944. | ((warning: StatsError, value: string) => boolean);
  13945. /**
  13946. * Space to display warnings (value is in number of lines).
  13947. */
  13948. warningsSpace?: number;
  13949. }
  13950. declare interface StatsPrintHooks {
  13951. sortElements: HookMap<SyncBailHook<[string[], StatsPrinterContext], void>>;
  13952. printElements: HookMap<
  13953. SyncBailHook<[PrintedElement[], StatsPrinterContext], string | void>
  13954. >;
  13955. sortItems: HookMap<
  13956. SyncBailHook<[any[], StatsPrinterContext], boolean | void>
  13957. >;
  13958. getItemName: HookMap<SyncBailHook<[any, StatsPrinterContext], string | void>>;
  13959. printItems: HookMap<
  13960. SyncBailHook<[string[], StatsPrinterContext], string | void>
  13961. >;
  13962. print: HookMap<SyncBailHook<[any, StatsPrinterContext], string | void>>;
  13963. result: HookMap<SyncWaterfallHook<[string, StatsPrinterContext]>>;
  13964. }
  13965. declare abstract class StatsPrinter {
  13966. hooks: StatsPrintHooks;
  13967. print(type: string, object?: any, baseContext?: StatsPrinterContext): string;
  13968. }
  13969. type StatsPrinterContext = Record<string, any> &
  13970. KnownStatsPrinterColorFn &
  13971. KnownStatsPrinterFormaters &
  13972. KnownStatsPrinterContext;
  13973. type StatsProfile = Record<string, any> & KnownStatsProfile;
  13974. type StatsValue =
  13975. | boolean
  13976. | StatsOptions
  13977. | "none"
  13978. | "verbose"
  13979. | "summary"
  13980. | "errors-only"
  13981. | "errors-warnings"
  13982. | "minimal"
  13983. | "normal"
  13984. | "detailed";
  13985. type Supports = undefined | string;
  13986. declare class SyncModuleIdsPlugin {
  13987. constructor(__0: {
  13988. /**
  13989. * path to file
  13990. */
  13991. path: string;
  13992. /**
  13993. * context for module names
  13994. */
  13995. context?: string;
  13996. /**
  13997. * selector for modules
  13998. */
  13999. test: (arg0: Module) => boolean;
  14000. /**
  14001. * operation mode (defaults to merge)
  14002. */
  14003. mode?: "read" | "create" | "merge" | "update";
  14004. });
  14005. /**
  14006. * Apply the plugin
  14007. */
  14008. apply(compiler: Compiler): void;
  14009. }
  14010. declare interface SyntheticDependencyLocation {
  14011. name: string;
  14012. index?: number;
  14013. }
  14014. declare const TOMBSTONE: unique symbol;
  14015. declare const TRANSITIVE: unique symbol;
  14016. declare const TRANSITIVE_ONLY: unique symbol;
  14017. /**
  14018. * Helper function for joining two ranges into a single range. This is useful
  14019. * when working with AST nodes, as it allows you to combine the ranges of child nodes
  14020. * to create the range of the _parent node_.
  14021. */
  14022. declare interface TagInfo {
  14023. tag: any;
  14024. data: any;
  14025. next?: TagInfo;
  14026. }
  14027. declare interface TargetItem {
  14028. module: Module;
  14029. connection: ModuleGraphConnection;
  14030. export?: string[];
  14031. }
  14032. declare interface TargetItemWithoutConnection {
  14033. module: Module;
  14034. export: string[];
  14035. }
  14036. declare class Template {
  14037. constructor();
  14038. static getFunctionContent(fn: Function): string;
  14039. static toIdentifier(str: string): string;
  14040. static toComment(str: string): string;
  14041. static toNormalComment(str: string): string;
  14042. static toPath(str: string): string;
  14043. static numberToIdentifier(n: number): string;
  14044. static numberToIdentifierContinuation(n: number): string;
  14045. static indent(s: string | string[]): string;
  14046. static prefix(s: string | string[], prefix: string): string;
  14047. static asString(str: string | string[]): string;
  14048. static getModulesArrayBounds(modules: WithId[]): false | [number, number];
  14049. static renderChunkModules(
  14050. renderContext: ChunkRenderContextJavascriptModulesPlugin,
  14051. modules: Module[],
  14052. renderModule: (arg0: Module) => null | Source,
  14053. prefix?: string
  14054. ): null | Source;
  14055. static renderRuntimeModules(
  14056. runtimeModules: RuntimeModule[],
  14057. renderContext: RenderContextJavascriptModulesPlugin & {
  14058. codeGenerationResults?: CodeGenerationResults;
  14059. }
  14060. ): Source;
  14061. static renderChunkRuntimeModules(
  14062. runtimeModules: RuntimeModule[],
  14063. renderContext: RenderContextJavascriptModulesPlugin
  14064. ): Source;
  14065. static NUMBER_OF_IDENTIFIER_START_CHARS: number;
  14066. static NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS: number;
  14067. }
  14068. type TemplatePath = string | ((arg0: PathData, arg1?: AssetInfo) => string);
  14069. declare interface TimestampAndHash {
  14070. safeTime: number;
  14071. timestamp?: number;
  14072. hash: string;
  14073. }
  14074. declare class TopLevelSymbol {
  14075. constructor(name: string);
  14076. name: string;
  14077. }
  14078. /**
  14079. * Use a Trusted Types policy to create urls for chunks.
  14080. */
  14081. declare interface TrustedTypes {
  14082. /**
  14083. * If the call to `trustedTypes.createPolicy(...)` fails -- e.g., due to the policy name missing from the CSP `trusted-types` list, or it being a duplicate name, etc. -- controls whether to continue with loading in the hope that `require-trusted-types-for 'script'` isn't enforced yet, versus fail immediately. Default behavior is 'stop'.
  14084. */
  14085. onPolicyCreationFailure?: "continue" | "stop";
  14086. /**
  14087. * The name of the Trusted Types policy created by webpack to serve bundle chunks.
  14088. */
  14089. policyName?: string;
  14090. }
  14091. declare const UNDEFINED_MARKER: unique symbol;
  14092. /**
  14093. * `URL` class is a global reference for `require('url').URL`
  14094. * https://nodejs.org/api/url.html#the-whatwg-url-api
  14095. */
  14096. declare interface URL_url extends URL {}
  14097. declare interface UnsafeCacheData {
  14098. factoryMeta?: FactoryMeta;
  14099. resolveOptions?: ResolveOptions;
  14100. }
  14101. declare interface UpdateHashContextDependency {
  14102. chunkGraph: ChunkGraph;
  14103. runtime: RuntimeSpec;
  14104. runtimeTemplate?: RuntimeTemplate;
  14105. }
  14106. declare interface UpdateHashContextGenerator {
  14107. /**
  14108. * the module
  14109. */
  14110. module: NormalModule;
  14111. chunkGraph: ChunkGraph;
  14112. runtime: RuntimeSpec;
  14113. runtimeTemplate?: RuntimeTemplate;
  14114. }
  14115. type UsageStateType = 0 | 1 | 2 | 3 | 4;
  14116. type UsedName = string | false | string[];
  14117. type Value = string | number | boolean | RegExp;
  14118. type ValueCacheVersion = string | Set<string>;
  14119. declare class VariableInfo {
  14120. constructor(
  14121. declaredScope: ScopeInfo,
  14122. freeName?: string | true,
  14123. tagInfo?: TagInfo
  14124. );
  14125. declaredScope: ScopeInfo;
  14126. freeName?: string | true;
  14127. tagInfo?: TagInfo;
  14128. }
  14129. declare interface VariableInfoInterface {
  14130. declaredScope: ScopeInfo;
  14131. freeName?: string | true;
  14132. tagInfo?: TagInfo;
  14133. }
  14134. type WarningFilterItemTypes =
  14135. | string
  14136. | RegExp
  14137. | ((warning: StatsError, value: string) => boolean);
  14138. declare interface WatchFileSystem {
  14139. watch: (
  14140. files: Iterable<string>,
  14141. directories: Iterable<string>,
  14142. missing: Iterable<string>,
  14143. startTime: number,
  14144. options: WatchOptions,
  14145. callback: (
  14146. arg0: null | Error,
  14147. arg1?: Map<string, FileSystemInfoEntry | "ignore">,
  14148. arg2?: Map<string, FileSystemInfoEntry | "ignore">,
  14149. arg3?: Set<string>,
  14150. arg4?: Set<string>
  14151. ) => void,
  14152. callbackUndelayed: (arg0: string, arg1: number) => void
  14153. ) => Watcher;
  14154. }
  14155. declare class WatchIgnorePlugin {
  14156. constructor(options: WatchIgnorePluginOptions);
  14157. paths: (string | RegExp)[];
  14158. /**
  14159. * Apply the plugin
  14160. */
  14161. apply(compiler: Compiler): void;
  14162. }
  14163. declare interface WatchIgnorePluginOptions {
  14164. /**
  14165. * A list of RegExps or absolute paths to directories or files that should be ignored.
  14166. */
  14167. paths: (string | RegExp)[];
  14168. }
  14169. /**
  14170. * Options for the watcher.
  14171. */
  14172. declare interface WatchOptions {
  14173. /**
  14174. * Delay the rebuilt after the first change. Value is a time in ms.
  14175. */
  14176. aggregateTimeout?: number;
  14177. /**
  14178. * Resolve symlinks and watch symlink and real file. This is usually not needed as webpack already resolves symlinks ('resolve.symlinks').
  14179. */
  14180. followSymlinks?: boolean;
  14181. /**
  14182. * Ignore some files from watching (glob pattern or regexp).
  14183. */
  14184. ignored?: string | RegExp | string[];
  14185. /**
  14186. * Enable polling mode for watching.
  14187. */
  14188. poll?: number | boolean;
  14189. /**
  14190. * Stop watching when stdin stream has ended.
  14191. */
  14192. stdin?: boolean;
  14193. }
  14194. declare interface Watcher {
  14195. /**
  14196. * closes the watcher and all underlying file watchers
  14197. */
  14198. close: () => void;
  14199. /**
  14200. * closes the watcher, but keeps underlying file watchers alive until the next watch call
  14201. */
  14202. pause: () => void;
  14203. /**
  14204. * get current aggregated changes that have not yet send to callback
  14205. */
  14206. getAggregatedChanges?: () => null | Set<string>;
  14207. /**
  14208. * get current aggregated removals that have not yet send to callback
  14209. */
  14210. getAggregatedRemovals?: () => null | Set<string>;
  14211. /**
  14212. * get info about files
  14213. */
  14214. getFileTimeInfoEntries: () => Map<string, FileSystemInfoEntry | "ignore">;
  14215. /**
  14216. * get info about directories
  14217. */
  14218. getContextTimeInfoEntries: () => Map<string, FileSystemInfoEntry | "ignore">;
  14219. /**
  14220. * get info about timestamps and changes
  14221. */
  14222. getInfo?: () => WatcherInfo;
  14223. }
  14224. declare interface WatcherInfo {
  14225. /**
  14226. * get current aggregated changes that have not yet send to callback
  14227. */
  14228. changes: null | Set<string>;
  14229. /**
  14230. * get current aggregated removals that have not yet send to callback
  14231. */
  14232. removals: null | Set<string>;
  14233. /**
  14234. * get info about files
  14235. */
  14236. fileTimeInfoEntries: Map<string, FileSystemInfoEntry | "ignore">;
  14237. /**
  14238. * get info about directories
  14239. */
  14240. contextTimeInfoEntries: Map<string, FileSystemInfoEntry | "ignore">;
  14241. }
  14242. declare abstract class Watching {
  14243. startTime: null | number;
  14244. invalid: boolean;
  14245. handler: CallbackFunction_1<Stats>;
  14246. callbacks: CallbackFunction_1<void>[];
  14247. closed: boolean;
  14248. suspended: boolean;
  14249. blocked: boolean;
  14250. watchOptions: WatchOptions;
  14251. compiler: Compiler;
  14252. running: boolean;
  14253. watcher?: null | Watcher;
  14254. pausedWatcher?: null | Watcher;
  14255. lastWatcherStartTime?: number;
  14256. watch(
  14257. files: Iterable<string>,
  14258. dirs: Iterable<string>,
  14259. missing: Iterable<string>
  14260. ): void;
  14261. invalidate(callback?: CallbackFunction_1<void>): void;
  14262. suspend(): void;
  14263. resume(): void;
  14264. close(callback: CallbackFunction_1<void>): void;
  14265. }
  14266. declare abstract class WeakTupleMap<T extends any[], V> {
  14267. set(...args: [T, ...V[]]): void;
  14268. has(...args: T): boolean;
  14269. get(...args: T): undefined | V;
  14270. provide(...args: [T, ...(() => V)[]]): V;
  14271. delete(...args: T): void;
  14272. clear(): void;
  14273. }
  14274. declare interface WebAssemblyRenderContext {
  14275. /**
  14276. * the chunk
  14277. */
  14278. chunk: Chunk;
  14279. /**
  14280. * the dependency templates
  14281. */
  14282. dependencyTemplates: DependencyTemplates;
  14283. /**
  14284. * the runtime template
  14285. */
  14286. runtimeTemplate: RuntimeTemplate;
  14287. /**
  14288. * the module graph
  14289. */
  14290. moduleGraph: ModuleGraph;
  14291. /**
  14292. * the chunk graph
  14293. */
  14294. chunkGraph: ChunkGraph;
  14295. /**
  14296. * results of code generation
  14297. */
  14298. codeGenerationResults: CodeGenerationResults;
  14299. }
  14300. declare class WebWorkerTemplatePlugin {
  14301. constructor();
  14302. /**
  14303. * Apply the plugin
  14304. */
  14305. apply(compiler: Compiler): void;
  14306. }
  14307. declare class WebpackError extends Error {
  14308. /**
  14309. * Creates an instance of WebpackError.
  14310. */
  14311. constructor(message?: string);
  14312. details?: string;
  14313. module?: null | Module;
  14314. loc?: SyntheticDependencyLocation | RealDependencyLocation;
  14315. hideStack?: boolean;
  14316. chunk?: Chunk;
  14317. file?: string;
  14318. serialize(__0: ObjectSerializerContext): void;
  14319. deserialize(__0: ObjectDeserializerContext): void;
  14320. /**
  14321. * Create .stack property on a target object
  14322. */
  14323. static captureStackTrace(
  14324. targetObject: object,
  14325. constructorOpt?: Function
  14326. ): void;
  14327. /**
  14328. * Optional override for formatting stack traces
  14329. */
  14330. static prepareStackTrace?: (
  14331. err: Error,
  14332. stackTraces: NodeJS.CallSite[]
  14333. ) => any;
  14334. static stackTraceLimit: number;
  14335. }
  14336. declare abstract class WebpackLogger {
  14337. getChildLogger: (arg0: string | (() => string)) => WebpackLogger;
  14338. error(...args: any[]): void;
  14339. warn(...args: any[]): void;
  14340. info(...args: any[]): void;
  14341. log(...args: any[]): void;
  14342. debug(...args: any[]): void;
  14343. assert(assertion: any, ...args: any[]): void;
  14344. trace(): void;
  14345. clear(): void;
  14346. status(...args: any[]): void;
  14347. group(...args: any[]): void;
  14348. groupCollapsed(...args: any[]): void;
  14349. groupEnd(): void;
  14350. profile(label?: string): void;
  14351. profileEnd(label?: string): void;
  14352. time(label: string): void;
  14353. timeLog(label?: string): void;
  14354. timeEnd(label?: string): void;
  14355. timeAggregate(label?: string): void;
  14356. timeAggregateEnd(label?: string): void;
  14357. }
  14358. declare class WebpackOptionsApply extends OptionsApply {
  14359. constructor();
  14360. }
  14361. declare class WebpackOptionsDefaulter {
  14362. constructor();
  14363. process(options: Configuration): WebpackOptionsNormalized;
  14364. }
  14365. /**
  14366. * Normalized webpack options object.
  14367. */
  14368. declare interface WebpackOptionsNormalized {
  14369. /**
  14370. * Set the value of `require.amd` and `define.amd`. Or disable AMD support.
  14371. */
  14372. amd?: false | { [index: string]: any };
  14373. /**
  14374. * Report the first error as a hard error instead of tolerating it.
  14375. */
  14376. bail?: boolean;
  14377. /**
  14378. * Cache generated modules and chunks to improve performance for multiple incremental builds.
  14379. */
  14380. cache: CacheOptionsNormalized;
  14381. /**
  14382. * The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.
  14383. */
  14384. context?: string;
  14385. /**
  14386. * References to other configurations to depend on.
  14387. */
  14388. dependencies?: string[];
  14389. /**
  14390. * Options for the webpack-dev-server.
  14391. */
  14392. devServer?: false | { [index: string]: any };
  14393. /**
  14394. * A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
  14395. */
  14396. devtool?: string | false;
  14397. /**
  14398. * The entry point(s) of the compilation.
  14399. */
  14400. entry: EntryNormalized;
  14401. /**
  14402. * Enables/Disables experiments (experimental features with relax SemVer compatibility).
  14403. */
  14404. experiments: ExperimentsNormalized;
  14405. /**
  14406. * Specify dependencies that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`.
  14407. */
  14408. externals: Externals;
  14409. /**
  14410. * Enable presets of externals for specific targets.
  14411. */
  14412. externalsPresets: ExternalsPresets;
  14413. /**
  14414. * Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
  14415. */
  14416. externalsType?:
  14417. | "import"
  14418. | "var"
  14419. | "module"
  14420. | "assign"
  14421. | "this"
  14422. | "window"
  14423. | "self"
  14424. | "global"
  14425. | "commonjs"
  14426. | "commonjs2"
  14427. | "commonjs-module"
  14428. | "commonjs-static"
  14429. | "amd"
  14430. | "amd-require"
  14431. | "umd"
  14432. | "umd2"
  14433. | "jsonp"
  14434. | "system"
  14435. | "promise"
  14436. | "module-import"
  14437. | "script"
  14438. | "node-commonjs";
  14439. /**
  14440. * Ignore specific warnings.
  14441. */
  14442. ignoreWarnings?: ((
  14443. warning: WebpackError,
  14444. compilation: Compilation
  14445. ) => boolean)[];
  14446. /**
  14447. * Options for infrastructure level logging.
  14448. */
  14449. infrastructureLogging: InfrastructureLogging;
  14450. /**
  14451. * Custom values available in the loader context.
  14452. */
  14453. loader?: Loader;
  14454. /**
  14455. * Enable production optimizations or development hints.
  14456. */
  14457. mode?: "none" | "development" | "production";
  14458. /**
  14459. * Options affecting the normal modules (`NormalModuleFactory`).
  14460. */
  14461. module: ModuleOptionsNormalized;
  14462. /**
  14463. * Name of the configuration. Used when loading multiple configurations.
  14464. */
  14465. name?: string;
  14466. /**
  14467. * Include polyfills or mocks for various node stuff.
  14468. */
  14469. node: Node;
  14470. /**
  14471. * Enables/Disables integrated optimizations.
  14472. */
  14473. optimization: Optimization;
  14474. /**
  14475. * Normalized options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.
  14476. */
  14477. output: OutputNormalized;
  14478. /**
  14479. * The number of parallel processed modules in the compilation.
  14480. */
  14481. parallelism?: number;
  14482. /**
  14483. * Configuration for web performance recommendations.
  14484. */
  14485. performance?: false | PerformanceOptions;
  14486. /**
  14487. * Add additional plugins to the compiler.
  14488. */
  14489. plugins: (
  14490. | undefined
  14491. | null
  14492. | false
  14493. | ""
  14494. | 0
  14495. | ((this: Compiler, compiler: Compiler) => void)
  14496. | WebpackPluginInstance
  14497. )[];
  14498. /**
  14499. * Capture timing information for each module.
  14500. */
  14501. profile?: boolean;
  14502. /**
  14503. * Store compiler state to a json file.
  14504. */
  14505. recordsInputPath?: string | false;
  14506. /**
  14507. * Load compiler state from a json file.
  14508. */
  14509. recordsOutputPath?: string | false;
  14510. /**
  14511. * Options for the resolver.
  14512. */
  14513. resolve: ResolveOptions;
  14514. /**
  14515. * Options for the resolver when resolving loaders.
  14516. */
  14517. resolveLoader: ResolveOptions;
  14518. /**
  14519. * Options affecting how file system snapshots are created and validated.
  14520. */
  14521. snapshot: SnapshotOptionsWebpackOptions;
  14522. /**
  14523. * Stats options object or preset name.
  14524. */
  14525. stats: StatsValue;
  14526. /**
  14527. * Environment to build for. An array of environments to build for all of them when possible.
  14528. */
  14529. target?: string | false | string[];
  14530. /**
  14531. * Enter watch mode, which rebuilds on file change.
  14532. */
  14533. watch?: boolean;
  14534. /**
  14535. * Options for the watcher.
  14536. */
  14537. watchOptions: WatchOptions;
  14538. }
  14539. /**
  14540. * Plugin instance.
  14541. */
  14542. declare interface WebpackPluginInstance {
  14543. [index: string]: any;
  14544. /**
  14545. * The run point of the plugin, required method.
  14546. */
  14547. apply: (compiler: Compiler) => void;
  14548. }
  14549. declare interface WithId {
  14550. id: string | number;
  14551. }
  14552. declare interface WithOptions {
  14553. /**
  14554. * create a resolver with additional/different options
  14555. */
  14556. withOptions: (
  14557. arg0: Partial<ResolveOptionsWithDependencyType>
  14558. ) => ResolverWithOptions;
  14559. }
  14560. declare interface WriteFile {
  14561. (
  14562. file: PathOrFileDescriptorFs,
  14563. data:
  14564. | string
  14565. | Uint8Array
  14566. | Uint8ClampedArray
  14567. | Uint16Array
  14568. | Uint32Array
  14569. | Int8Array
  14570. | Int16Array
  14571. | Int32Array
  14572. | BigUint64Array
  14573. | BigInt64Array
  14574. | Float32Array
  14575. | Float64Array
  14576. | DataView,
  14577. options: WriteFileOptions,
  14578. callback: (arg0: null | NodeJS.ErrnoException) => void
  14579. ): void;
  14580. (
  14581. file: PathOrFileDescriptorFs,
  14582. data:
  14583. | string
  14584. | Uint8Array
  14585. | Uint8ClampedArray
  14586. | Uint16Array
  14587. | Uint32Array
  14588. | Int8Array
  14589. | Int16Array
  14590. | Int32Array
  14591. | BigUint64Array
  14592. | BigInt64Array
  14593. | Float32Array
  14594. | Float64Array
  14595. | DataView,
  14596. callback: (arg0: null | NodeJS.ErrnoException) => void
  14597. ): void;
  14598. }
  14599. type WriteFileOptions =
  14600. | null
  14601. | "ascii"
  14602. | "utf8"
  14603. | "utf-8"
  14604. | "utf16le"
  14605. | "utf-16le"
  14606. | "ucs2"
  14607. | "ucs-2"
  14608. | "latin1"
  14609. | "binary"
  14610. | "base64"
  14611. | "base64url"
  14612. | "hex"
  14613. | (ObjectEncodingOptions &
  14614. Abortable & { mode?: string | number; flag?: string; flush?: boolean });
  14615. declare interface WriteOnlySet<T> {
  14616. add: (item: T) => void;
  14617. }
  14618. declare interface WriteStreamOptions {
  14619. flags?: string;
  14620. encoding?:
  14621. | "ascii"
  14622. | "utf8"
  14623. | "utf-8"
  14624. | "utf16le"
  14625. | "utf-16le"
  14626. | "ucs2"
  14627. | "ucs-2"
  14628. | "latin1"
  14629. | "binary"
  14630. | "base64"
  14631. | "base64url"
  14632. | "hex";
  14633. fd?: any;
  14634. mode?: number;
  14635. autoClose?: boolean;
  14636. emitClose?: boolean;
  14637. start?: number;
  14638. signal?: null | AbortSignal;
  14639. fs?: null | CreateWriteStreamFSImplementation;
  14640. }
  14641. type __TypeWebpackOptions = (data: object) =>
  14642. | string
  14643. | {
  14644. /**
  14645. * Unique loader options identifier.
  14646. */
  14647. ident?: string;
  14648. /**
  14649. * Loader name.
  14650. */
  14651. loader?: string;
  14652. /**
  14653. * Loader options.
  14654. */
  14655. options?: string | { [index: string]: any };
  14656. }
  14657. | __TypeWebpackOptions
  14658. | __Type_2[];
  14659. type __Type_2 =
  14660. | undefined
  14661. | null
  14662. | string
  14663. | false
  14664. | 0
  14665. | {
  14666. /**
  14667. * Unique loader options identifier.
  14668. */
  14669. ident?: string;
  14670. /**
  14671. * Loader name.
  14672. */
  14673. loader?: string;
  14674. /**
  14675. * Loader options.
  14676. */
  14677. options?: string | { [index: string]: any };
  14678. }
  14679. | ((data: object) =>
  14680. | string
  14681. | {
  14682. /**
  14683. * Unique loader options identifier.
  14684. */
  14685. ident?: string;
  14686. /**
  14687. * Loader name.
  14688. */
  14689. loader?: string;
  14690. /**
  14691. * Loader options.
  14692. */
  14693. options?: string | { [index: string]: any };
  14694. }
  14695. | __TypeWebpackOptions
  14696. | __Type_2[]);
  14697. declare function exports(
  14698. options: Configuration,
  14699. callback?: CallbackWebpack<Stats>
  14700. ): Compiler;
  14701. declare function exports(
  14702. options: ReadonlyArray<Configuration> & MultiCompilerOptions,
  14703. callback?: CallbackWebpack<MultiStats>
  14704. ): MultiCompiler;
  14705. declare namespace exports {
  14706. export const webpack: {
  14707. (options: Configuration, callback?: CallbackWebpack<Stats>): Compiler;
  14708. (
  14709. options: ReadonlyArray<Configuration> & MultiCompilerOptions,
  14710. callback?: CallbackWebpack<MultiStats>
  14711. ): MultiCompiler;
  14712. };
  14713. export const validate: (arg0: Configuration | Configuration[]) => void;
  14714. export const validateSchema: (
  14715. schema: Parameters<typeof validateFunction>[0],
  14716. options: Parameters<typeof validateFunction>[1],
  14717. validationConfiguration?: ValidationErrorConfiguration
  14718. ) => void;
  14719. export const version: string;
  14720. export namespace cli {
  14721. export let getArguments: (schema?: any) => Flags;
  14722. export let processArguments: (
  14723. args: Flags,
  14724. config: any,
  14725. values: Record<string, Value[]>
  14726. ) => null | Problem[];
  14727. }
  14728. export namespace ModuleFilenameHelpers {
  14729. export let ALL_LOADERS_RESOURCE: string;
  14730. export let REGEXP_ALL_LOADERS_RESOURCE: RegExp;
  14731. export let LOADERS_RESOURCE: string;
  14732. export let REGEXP_LOADERS_RESOURCE: RegExp;
  14733. export let RESOURCE: string;
  14734. export let REGEXP_RESOURCE: RegExp;
  14735. export let ABSOLUTE_RESOURCE_PATH: string;
  14736. export let REGEXP_ABSOLUTE_RESOURCE_PATH: RegExp;
  14737. export let RESOURCE_PATH: string;
  14738. export let REGEXP_RESOURCE_PATH: RegExp;
  14739. export let ALL_LOADERS: string;
  14740. export let REGEXP_ALL_LOADERS: RegExp;
  14741. export let LOADERS: string;
  14742. export let REGEXP_LOADERS: RegExp;
  14743. export let QUERY: string;
  14744. export let REGEXP_QUERY: RegExp;
  14745. export let ID: string;
  14746. export let REGEXP_ID: RegExp;
  14747. export let HASH: string;
  14748. export let REGEXP_HASH: RegExp;
  14749. export let NAMESPACE: string;
  14750. export let REGEXP_NAMESPACE: RegExp;
  14751. export let createFilename: (
  14752. module: string | Module,
  14753. options: any,
  14754. __2: {
  14755. /**
  14756. * requestShortener
  14757. */
  14758. requestShortener: RequestShortener;
  14759. /**
  14760. * chunk graph
  14761. */
  14762. chunkGraph: ChunkGraph;
  14763. /**
  14764. * the hash function to use
  14765. */
  14766. hashFunction?: string | typeof Hash;
  14767. }
  14768. ) => string;
  14769. export let replaceDuplicates: <T>(
  14770. array: T[],
  14771. fn: (
  14772. duplicateItem: T,
  14773. duplicateItemIndex: number,
  14774. numberOfTimesReplaced: number
  14775. ) => T,
  14776. comparator?: (firstElement: T, nextElement: T) => 0 | 1 | -1
  14777. ) => T[];
  14778. export let matchPart: (str: string, test: Matcher) => boolean;
  14779. export let matchObject: (obj: MatchObject, str: string) => boolean;
  14780. }
  14781. export namespace OptimizationStages {
  14782. export let STAGE_BASIC: -10;
  14783. export let STAGE_DEFAULT: 0;
  14784. export let STAGE_ADVANCED: 10;
  14785. }
  14786. export namespace RuntimeGlobals {
  14787. export let require: "__webpack_require__";
  14788. export let requireScope: "__webpack_require__.*";
  14789. export let exports: "__webpack_exports__";
  14790. export let thisAsExports: "top-level-this-exports";
  14791. export let returnExportsFromRuntime: "return-exports-from-runtime";
  14792. export let module: "module";
  14793. export let moduleId: "module.id";
  14794. export let moduleLoaded: "module.loaded";
  14795. export let publicPath: "__webpack_require__.p";
  14796. export let entryModuleId: "__webpack_require__.s";
  14797. export let moduleCache: "__webpack_require__.c";
  14798. export let moduleFactories: "__webpack_require__.m";
  14799. export let moduleFactoriesAddOnly: "__webpack_require__.m (add only)";
  14800. export let ensureChunk: "__webpack_require__.e";
  14801. export let ensureChunkHandlers: "__webpack_require__.f";
  14802. export let ensureChunkIncludeEntries: "__webpack_require__.f (include entries)";
  14803. export let prefetchChunk: "__webpack_require__.E";
  14804. export let prefetchChunkHandlers: "__webpack_require__.F";
  14805. export let preloadChunk: "__webpack_require__.G";
  14806. export let preloadChunkHandlers: "__webpack_require__.H";
  14807. export let definePropertyGetters: "__webpack_require__.d";
  14808. export let makeNamespaceObject: "__webpack_require__.r";
  14809. export let createFakeNamespaceObject: "__webpack_require__.t";
  14810. export let compatGetDefaultExport: "__webpack_require__.n";
  14811. export let harmonyModuleDecorator: "__webpack_require__.hmd";
  14812. export let nodeModuleDecorator: "__webpack_require__.nmd";
  14813. export let getFullHash: "__webpack_require__.h";
  14814. export let wasmInstances: "__webpack_require__.w";
  14815. export let instantiateWasm: "__webpack_require__.v";
  14816. export let uncaughtErrorHandler: "__webpack_require__.oe";
  14817. export let scriptNonce: "__webpack_require__.nc";
  14818. export let loadScript: "__webpack_require__.l";
  14819. export let createScript: "__webpack_require__.ts";
  14820. export let createScriptUrl: "__webpack_require__.tu";
  14821. export let getTrustedTypesPolicy: "__webpack_require__.tt";
  14822. export let hasFetchPriority: "has fetch priority";
  14823. export let chunkName: "__webpack_require__.cn";
  14824. export let runtimeId: "__webpack_require__.j";
  14825. export let getChunkScriptFilename: "__webpack_require__.u";
  14826. export let getChunkCssFilename: "__webpack_require__.k";
  14827. export let hasCssModules: "has css modules";
  14828. export let getChunkUpdateScriptFilename: "__webpack_require__.hu";
  14829. export let getChunkUpdateCssFilename: "__webpack_require__.hk";
  14830. export let startup: "__webpack_require__.x";
  14831. export let startupNoDefault: "__webpack_require__.x (no default handler)";
  14832. export let startupOnlyAfter: "__webpack_require__.x (only after)";
  14833. export let startupOnlyBefore: "__webpack_require__.x (only before)";
  14834. export let chunkCallback: "webpackChunk";
  14835. export let startupEntrypoint: "__webpack_require__.X";
  14836. export let onChunksLoaded: "__webpack_require__.O";
  14837. export let externalInstallChunk: "__webpack_require__.C";
  14838. export let interceptModuleExecution: "__webpack_require__.i";
  14839. export let global: "__webpack_require__.g";
  14840. export let shareScopeMap: "__webpack_require__.S";
  14841. export let initializeSharing: "__webpack_require__.I";
  14842. export let currentRemoteGetScope: "__webpack_require__.R";
  14843. export let getUpdateManifestFilename: "__webpack_require__.hmrF";
  14844. export let hmrDownloadManifest: "__webpack_require__.hmrM";
  14845. export let hmrDownloadUpdateHandlers: "__webpack_require__.hmrC";
  14846. export let hmrModuleData: "__webpack_require__.hmrD";
  14847. export let hmrInvalidateModuleHandlers: "__webpack_require__.hmrI";
  14848. export let hmrRuntimeStatePrefix: "__webpack_require__.hmrS";
  14849. export let amdDefine: "__webpack_require__.amdD";
  14850. export let amdOptions: "__webpack_require__.amdO";
  14851. export let system: "__webpack_require__.System";
  14852. export let hasOwnProperty: "__webpack_require__.o";
  14853. export let systemContext: "__webpack_require__.y";
  14854. export let baseURI: "__webpack_require__.b";
  14855. export let relativeUrl: "__webpack_require__.U";
  14856. export let asyncModule: "__webpack_require__.a";
  14857. }
  14858. export const UsageState: Readonly<{
  14859. Unused: 0;
  14860. OnlyPropertiesUsed: 1;
  14861. NoInfo: 2;
  14862. Unknown: 3;
  14863. Used: 4;
  14864. }>;
  14865. export namespace cache {
  14866. export { MemoryCachePlugin };
  14867. }
  14868. export namespace config {
  14869. export const getNormalizedWebpackOptions: (
  14870. config: Configuration
  14871. ) => WebpackOptionsNormalized;
  14872. export const applyWebpackOptionsDefaults: (
  14873. options: WebpackOptionsNormalized,
  14874. compilerIndex?: number
  14875. ) => ResolvedOptions;
  14876. }
  14877. export namespace dependencies {
  14878. export {
  14879. ModuleDependency,
  14880. HarmonyImportDependency,
  14881. ConstDependency,
  14882. NullDependency
  14883. };
  14884. }
  14885. export namespace ids {
  14886. export {
  14887. ChunkModuleIdRangePlugin,
  14888. NaturalModuleIdsPlugin,
  14889. OccurrenceModuleIdsPlugin,
  14890. NamedModuleIdsPlugin,
  14891. DeterministicChunkIdsPlugin,
  14892. DeterministicModuleIdsPlugin,
  14893. NamedChunkIdsPlugin,
  14894. OccurrenceChunkIdsPlugin,
  14895. HashedModuleIdsPlugin
  14896. };
  14897. }
  14898. export namespace javascript {
  14899. export {
  14900. EnableChunkLoadingPlugin,
  14901. JavascriptModulesPlugin,
  14902. JavascriptParser
  14903. };
  14904. }
  14905. export namespace optimize {
  14906. export namespace InnerGraph {
  14907. export let bailout: (parserState: ParserState) => void;
  14908. export let enable: (parserState: ParserState) => void;
  14909. export let isEnabled: (parserState: ParserState) => boolean;
  14910. export let addUsage: (
  14911. state: ParserState,
  14912. symbol: null | TopLevelSymbol,
  14913. usage: string | true | TopLevelSymbol
  14914. ) => void;
  14915. export let addVariableUsage: (
  14916. parser: JavascriptParser,
  14917. name: string,
  14918. usage: string | true | TopLevelSymbol
  14919. ) => void;
  14920. export let inferDependencyUsage: (state: ParserState) => void;
  14921. export let onUsage: (
  14922. state: ParserState,
  14923. onUsageCallback: (arg0?: boolean | Set<string>) => void
  14924. ) => void;
  14925. export let setTopLevelSymbol: (
  14926. state: ParserState,
  14927. symbol?: TopLevelSymbol
  14928. ) => void;
  14929. export let getTopLevelSymbol: (
  14930. state: ParserState
  14931. ) => void | TopLevelSymbol;
  14932. export let tagTopLevelSymbol: (
  14933. parser: JavascriptParser,
  14934. name: string
  14935. ) => undefined | TopLevelSymbol;
  14936. export let isDependencyUsedByExports: (
  14937. dependency: Dependency,
  14938. usedByExports: boolean | Set<string>,
  14939. moduleGraph: ModuleGraph,
  14940. runtime: RuntimeSpec
  14941. ) => boolean;
  14942. export let getDependencyUsedByExportsCondition: (
  14943. dependency: Dependency,
  14944. usedByExports: undefined | boolean | Set<string>,
  14945. moduleGraph: ModuleGraph
  14946. ) =>
  14947. | null
  14948. | false
  14949. | ((arg0: ModuleGraphConnection, arg1: RuntimeSpec) => ConnectionState);
  14950. export { TopLevelSymbol, topLevelSymbolTag };
  14951. }
  14952. export {
  14953. AggressiveMergingPlugin,
  14954. AggressiveSplittingPlugin,
  14955. LimitChunkCountPlugin,
  14956. MergeDuplicateChunksPlugin,
  14957. MinChunkSizePlugin,
  14958. ModuleConcatenationPlugin,
  14959. RealContentHashPlugin,
  14960. RuntimeChunkPlugin,
  14961. SideEffectsFlagPlugin,
  14962. SplitChunksPlugin
  14963. };
  14964. }
  14965. export namespace runtime {
  14966. export { GetChunkFilenameRuntimeModule, LoadScriptRuntimeModule };
  14967. }
  14968. export namespace prefetch {
  14969. export { ChunkPrefetchPreloadPlugin };
  14970. }
  14971. export namespace web {
  14972. export {
  14973. FetchCompileWasmPlugin,
  14974. FetchCompileAsyncWasmPlugin,
  14975. JsonpChunkLoadingRuntimeModule,
  14976. JsonpTemplatePlugin,
  14977. CssLoadingRuntimeModule
  14978. };
  14979. }
  14980. export namespace esm {
  14981. export { ModuleChunkLoadingRuntimeModule };
  14982. }
  14983. export namespace webworker {
  14984. export { WebWorkerTemplatePlugin };
  14985. }
  14986. export namespace node {
  14987. export {
  14988. NodeEnvironmentPlugin,
  14989. NodeSourcePlugin,
  14990. NodeTargetPlugin,
  14991. NodeTemplatePlugin,
  14992. ReadFileCompileWasmPlugin,
  14993. ReadFileCompileAsyncWasmPlugin
  14994. };
  14995. }
  14996. export namespace electron {
  14997. export { ElectronTargetPlugin };
  14998. }
  14999. export namespace wasm {
  15000. export { AsyncWebAssemblyModulesPlugin, EnableWasmLoadingPlugin };
  15001. }
  15002. export namespace css {
  15003. export { CssModulesPlugin };
  15004. }
  15005. export namespace library {
  15006. export { AbstractLibraryPlugin, EnableLibraryPlugin };
  15007. }
  15008. export namespace container {
  15009. export const scope: <T>(
  15010. scope: string,
  15011. options: ContainerOptionsFormat<T>
  15012. ) => Record<string, string | string[] | T>;
  15013. export {
  15014. ContainerPlugin,
  15015. ContainerReferencePlugin,
  15016. ModuleFederationPlugin
  15017. };
  15018. }
  15019. export namespace sharing {
  15020. export const scope: <T>(
  15021. scope: string,
  15022. options: ContainerOptionsFormat<T>
  15023. ) => Record<string, string | string[] | T>;
  15024. export { ConsumeSharedPlugin, ProvideSharedPlugin, SharePlugin };
  15025. }
  15026. export namespace debug {
  15027. export { ProfilingPlugin };
  15028. }
  15029. export namespace util {
  15030. export const createHash: (algorithm: Algorithm) => Hash;
  15031. export namespace comparators {
  15032. export let compareChunksById: (a: Chunk, b: Chunk) => 0 | 1 | -1;
  15033. export let compareModulesByIdentifier: (
  15034. a: Module,
  15035. b: Module
  15036. ) => 0 | 1 | -1;
  15037. export let compareModulesById: ParameterizedComparator<
  15038. ChunkGraph,
  15039. Module
  15040. >;
  15041. export let compareNumbers: (a: number, b: number) => 0 | 1 | -1;
  15042. export let compareStringsNumeric: (a: string, b: string) => 0 | 1 | -1;
  15043. export let compareModulesByPostOrderIndexOrIdentifier: ParameterizedComparator<
  15044. ModuleGraph,
  15045. Module
  15046. >;
  15047. export let compareModulesByPreOrderIndexOrIdentifier: ParameterizedComparator<
  15048. ModuleGraph,
  15049. Module
  15050. >;
  15051. export let compareModulesByIdOrIdentifier: ParameterizedComparator<
  15052. ChunkGraph,
  15053. Module
  15054. >;
  15055. export let compareChunks: ParameterizedComparator<ChunkGraph, Chunk>;
  15056. export let compareIds: (
  15057. a: string | number,
  15058. b: string | number
  15059. ) => 0 | 1 | -1;
  15060. export let compareStrings: (a: string, b: string) => 0 | 1 | -1;
  15061. export let compareChunkGroupsByIndex: (
  15062. a: ChunkGroup,
  15063. b: ChunkGroup
  15064. ) => 0 | 1 | -1;
  15065. export let concatComparators: <T>(
  15066. c1: Comparator<T>,
  15067. c2: Comparator<T>,
  15068. ...cRest: Comparator<T>[]
  15069. ) => Comparator<T>;
  15070. export let compareSelect: <T, R>(
  15071. getter: Selector<T, R>,
  15072. comparator: Comparator<R>
  15073. ) => Comparator<T>;
  15074. export let compareIterables: <T>(
  15075. elementComparator: Comparator<T>
  15076. ) => Comparator<Iterable<T>>;
  15077. export let keepOriginalOrder: <T>(iterable: Iterable<T>) => Comparator<T>;
  15078. export let compareChunksNatural: (
  15079. chunkGraph: ChunkGraph
  15080. ) => Comparator<Chunk>;
  15081. export let compareLocations: (
  15082. a: DependencyLocation,
  15083. b: DependencyLocation
  15084. ) => 0 | 1 | -1;
  15085. }
  15086. export namespace runtime {
  15087. export let getEntryRuntime: (
  15088. compilation: Compilation,
  15089. name: string,
  15090. options?: EntryOptions
  15091. ) => RuntimeSpec;
  15092. export let forEachRuntime: (
  15093. runtime: RuntimeSpec,
  15094. fn: (arg0?: string) => void,
  15095. deterministicOrder?: boolean
  15096. ) => void;
  15097. export let getRuntimeKey: (runtime: RuntimeSpec) => string;
  15098. export let keyToRuntime: (key: string) => RuntimeSpec;
  15099. export let runtimeToString: (runtime: RuntimeSpec) => string;
  15100. export let runtimeConditionToString: (
  15101. runtimeCondition: RuntimeCondition
  15102. ) => string;
  15103. export let runtimeEqual: (a: RuntimeSpec, b: RuntimeSpec) => boolean;
  15104. export let compareRuntime: (a: RuntimeSpec, b: RuntimeSpec) => 0 | 1 | -1;
  15105. export let mergeRuntime: (a: RuntimeSpec, b: RuntimeSpec) => RuntimeSpec;
  15106. export let mergeRuntimeCondition: (
  15107. a: RuntimeCondition,
  15108. b: RuntimeCondition,
  15109. runtime: RuntimeSpec
  15110. ) => RuntimeCondition;
  15111. export let mergeRuntimeConditionNonFalse: (
  15112. a: undefined | string | true | SortableSet<string>,
  15113. b: undefined | string | true | SortableSet<string>,
  15114. runtime: RuntimeSpec
  15115. ) => undefined | string | true | SortableSet<string>;
  15116. export let mergeRuntimeOwned: (
  15117. a: RuntimeSpec,
  15118. b: RuntimeSpec
  15119. ) => RuntimeSpec;
  15120. export let intersectRuntime: (
  15121. a: RuntimeSpec,
  15122. b: RuntimeSpec
  15123. ) => RuntimeSpec;
  15124. export let subtractRuntime: (
  15125. a: RuntimeSpec,
  15126. b: RuntimeSpec
  15127. ) => RuntimeSpec;
  15128. export let subtractRuntimeCondition: (
  15129. a: RuntimeCondition,
  15130. b: RuntimeCondition,
  15131. runtime: RuntimeSpec
  15132. ) => RuntimeCondition;
  15133. export let filterRuntime: (
  15134. runtime: RuntimeSpec,
  15135. filter: (arg0: RuntimeSpec) => boolean
  15136. ) => undefined | string | boolean | SortableSet<string>;
  15137. export { RuntimeSpecMap, RuntimeSpecSet };
  15138. }
  15139. export namespace serialization {
  15140. export const register: (
  15141. Constructor: Constructor,
  15142. request: string,
  15143. name: null | string,
  15144. serializer: ObjectSerializer
  15145. ) => void;
  15146. export const registerLoader: (
  15147. regExp: RegExp,
  15148. loader: (arg0: string) => boolean
  15149. ) => void;
  15150. export const registerNotSerializable: (Constructor: Constructor) => void;
  15151. export const NOT_SERIALIZABLE: object;
  15152. export const buffersSerializer: Serializer;
  15153. export let createFileSerializer: (
  15154. fs: IntermediateFileSystem,
  15155. hashFunction: string | typeof Hash
  15156. ) => Serializer;
  15157. export { MEASURE_START_OPERATION, MEASURE_END_OPERATION };
  15158. }
  15159. export const cleverMerge: <T, O>(
  15160. first?: null | T,
  15161. second?: null | O
  15162. ) => T | O | (T & O);
  15163. export function compileBooleanMatcher(
  15164. map: Record<string | number, boolean>
  15165. ): boolean | ((arg0: string) => string);
  15166. export namespace compileBooleanMatcher {
  15167. export let fromLists: (
  15168. positiveItems: string[],
  15169. negativeItems: string[]
  15170. ) => (arg0: string) => string;
  15171. export let itemsToRegexp: (itemsArr: string[]) => string;
  15172. }
  15173. export { LazySet };
  15174. }
  15175. export namespace sources {
  15176. export {
  15177. Source,
  15178. RawSource,
  15179. OriginalSource,
  15180. ReplaceSource,
  15181. SourceMapSource,
  15182. ConcatSource,
  15183. PrefixSource,
  15184. CachedSource,
  15185. SizeOnlySource,
  15186. CompatSource
  15187. };
  15188. }
  15189. export namespace experiments {
  15190. export namespace schemes {
  15191. export { HttpUriPlugin };
  15192. }
  15193. export namespace ids {
  15194. export { SyncModuleIdsPlugin };
  15195. }
  15196. }
  15197. export type WebpackPluginFunction = (
  15198. this: Compiler,
  15199. compiler: Compiler
  15200. ) => void;
  15201. export {
  15202. AutomaticPrefetchPlugin,
  15203. AsyncDependenciesBlock,
  15204. BannerPlugin,
  15205. Cache,
  15206. Chunk,
  15207. ChunkGraph,
  15208. CleanPlugin,
  15209. Compilation,
  15210. Compiler,
  15211. ConcatenationScope,
  15212. ContextExclusionPlugin,
  15213. ContextReplacementPlugin,
  15214. DefinePlugin,
  15215. DelegatedPlugin,
  15216. Dependency,
  15217. DllPlugin,
  15218. DllReferencePlugin,
  15219. DynamicEntryPlugin,
  15220. EntryOptionPlugin,
  15221. EntryPlugin,
  15222. EnvironmentPlugin,
  15223. EvalDevToolModulePlugin,
  15224. EvalSourceMapDevToolPlugin,
  15225. ExternalModule,
  15226. ExternalsPlugin,
  15227. Generator,
  15228. HotUpdateChunk,
  15229. HotModuleReplacementPlugin,
  15230. InitFragment,
  15231. IgnorePlugin,
  15232. JavascriptModulesPlugin,
  15233. LibManifestPlugin,
  15234. LibraryTemplatePlugin,
  15235. LoaderOptionsPlugin,
  15236. LoaderTargetPlugin,
  15237. Module,
  15238. ModuleGraph,
  15239. ModuleGraphConnection,
  15240. NoEmitOnErrorsPlugin,
  15241. NormalModule,
  15242. NormalModuleReplacementPlugin,
  15243. MultiCompiler,
  15244. Parser,
  15245. PlatformPlugin,
  15246. PrefetchPlugin,
  15247. ProgressPlugin,
  15248. ProvidePlugin,
  15249. RuntimeModule,
  15250. EntryPlugin as SingleEntryPlugin,
  15251. SourceMapDevToolPlugin,
  15252. Stats,
  15253. Template,
  15254. WatchIgnorePlugin,
  15255. WebpackError,
  15256. WebpackOptionsApply,
  15257. WebpackOptionsDefaulter,
  15258. ValidationError as WebpackOptionsValidationError,
  15259. ValidationError,
  15260. Entry,
  15261. EntryNormalized,
  15262. EntryObject,
  15263. ExternalItemFunctionData,
  15264. ExternalItemObjectKnown,
  15265. ExternalItemObjectUnknown,
  15266. ExternalItemValue,
  15267. Externals,
  15268. FileCacheOptions,
  15269. LibraryOptions,
  15270. MemoryCacheOptions,
  15271. ModuleOptions,
  15272. ResolveOptions,
  15273. RuleSetCondition,
  15274. RuleSetConditionAbsolute,
  15275. RuleSetRule,
  15276. RuleSetUse,
  15277. RuleSetUseItem,
  15278. StatsOptions,
  15279. Configuration,
  15280. WebpackOptionsNormalized,
  15281. WebpackPluginInstance,
  15282. ChunkGroup,
  15283. Asset,
  15284. AssetInfo,
  15285. EntryOptions,
  15286. PathData,
  15287. AssetEmittedInfo,
  15288. MultiCompilerOptions,
  15289. MultiStats,
  15290. ResolveData,
  15291. ParserState,
  15292. ResolvePluginInstance,
  15293. Resolver,
  15294. Watching,
  15295. Argument,
  15296. Problem,
  15297. StatsAsset,
  15298. StatsChunk,
  15299. StatsChunkGroup,
  15300. StatsChunkOrigin,
  15301. StatsCompilation,
  15302. StatsError,
  15303. StatsLogging,
  15304. StatsLoggingEntry,
  15305. StatsModule,
  15306. StatsModuleIssuer,
  15307. StatsModuleReason,
  15308. StatsModuleTraceDependency,
  15309. StatsModuleTraceItem,
  15310. StatsProfile,
  15311. InputFileSystem,
  15312. OutputFileSystem,
  15313. LoaderModule,
  15314. RawLoaderDefinition,
  15315. LoaderDefinition,
  15316. LoaderDefinitionFunction,
  15317. PitchLoaderDefinitionFunction,
  15318. RawLoaderDefinitionFunction,
  15319. LoaderContextDeclarationsIndex as LoaderContext
  15320. };
  15321. }
  15322. declare const topLevelSymbolTag: unique symbol;
  15323. export = exports;