index.d.ts 543 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599
  1. /**
  2. * @license Angular v16.2.9
  3. * (c) 2010-2022 Google LLC. https://angular.io/
  4. * License: MIT
  5. */
  6. import { BehaviorSubject } from 'rxjs';
  7. import { Observable } from 'rxjs';
  8. import { Subject } from 'rxjs';
  9. import { Subscribable } from 'rxjs';
  10. import { Subscription } from 'rxjs';
  11. /**
  12. * @description
  13. *
  14. * Represents an abstract class `T`, if applied to a concrete class it would stop being
  15. * instantiable.
  16. *
  17. * @publicApi
  18. */
  19. export declare interface AbstractType<T> extends Function {
  20. prototype: T;
  21. }
  22. /**
  23. * @description
  24. * A lifecycle hook that is called after the default change detector has
  25. * completed checking all content of a directive. It will run after the content
  26. * has been checked and most of the time it's during a change detection cycle.
  27. *
  28. * @see {@link AfterViewChecked}
  29. * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
  30. *
  31. * @usageNotes
  32. * The following snippet shows how a component can implement this interface to
  33. * define its own after-check functionality.
  34. *
  35. * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterContentChecked'}
  36. *
  37. * @publicApi
  38. */
  39. export declare interface AfterContentChecked {
  40. /**
  41. * A callback method that is invoked immediately after the
  42. * default change detector has completed checking all of the directive's
  43. * content.
  44. */
  45. ngAfterContentChecked(): void;
  46. }
  47. /**
  48. * @description
  49. * A lifecycle hook that is called after Angular has fully initialized
  50. * all content of a directive. It will run only once when the projected content is initialized.
  51. * Define an `ngAfterContentInit()` method to handle any additional initialization tasks.
  52. *
  53. * @see {@link OnInit}
  54. * @see {@link AfterViewInit}
  55. * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
  56. *
  57. * @usageNotes
  58. * The following snippet shows how a component can implement this interface to
  59. * define its own content initialization method.
  60. *
  61. * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterContentInit'}
  62. *
  63. * @publicApi
  64. */
  65. export declare interface AfterContentInit {
  66. /**
  67. * A callback method that is invoked immediately after
  68. * Angular has completed initialization of all of the directive's
  69. * content.
  70. * It is invoked only once when the directive is instantiated.
  71. */
  72. ngAfterContentInit(): void;
  73. }
  74. /**
  75. * Register a callback to be invoked the next time the application
  76. * finishes rendering.
  77. *
  78. * Note that the callback will run
  79. * - in the order it was registered
  80. * - on browser platforms only
  81. *
  82. * <div class="alert is-important">
  83. *
  84. * Components are not guaranteed to be [hydrated](guide/hydration) before the callback runs.
  85. * You must use caution when directly reading or writing the DOM and layout.
  86. *
  87. * </div>
  88. *
  89. * @param callback A callback function to register
  90. *
  91. * @usageNotes
  92. *
  93. * Use `afterNextRender` to read or write the DOM once,
  94. * for example to initialize a non-Angular library.
  95. *
  96. * ### Example
  97. * ```ts
  98. * @Component({
  99. * selector: 'my-chart-cmp',
  100. * template: `<div #chart>{{ ... }}</div>`,
  101. * })
  102. * export class MyChartCmp {
  103. * @ViewChild('chart') chartRef: ElementRef;
  104. * chart: MyChart|null;
  105. *
  106. * constructor() {
  107. * afterNextRender(() => {
  108. * this.chart = new MyChart(this.chartRef.nativeElement);
  109. * });
  110. * }
  111. * }
  112. * ```
  113. *
  114. * @developerPreview
  115. */
  116. export declare function afterNextRender(callback: VoidFunction, options?: AfterRenderOptions): AfterRenderRef;
  117. /**
  118. * Register a callback to be invoked each time the application
  119. * finishes rendering.
  120. *
  121. * Note that the callback will run
  122. * - in the order it was registered
  123. * - once per render
  124. * - on browser platforms only
  125. *
  126. * <div class="alert is-important">
  127. *
  128. * Components are not guaranteed to be [hydrated](guide/hydration) before the callback runs.
  129. * You must use caution when directly reading or writing the DOM and layout.
  130. *
  131. * </div>
  132. *
  133. * @param callback A callback function to register
  134. *
  135. * @usageNotes
  136. *
  137. * Use `afterRender` to read or write the DOM after each render.
  138. *
  139. * ### Example
  140. * ```ts
  141. * @Component({
  142. * selector: 'my-cmp',
  143. * template: `<span #content>{{ ... }}</span>`,
  144. * })
  145. * export class MyComponent {
  146. * @ViewChild('content') contentRef: ElementRef;
  147. *
  148. * constructor() {
  149. * afterRender(() => {
  150. * console.log('content height: ' + this.contentRef.nativeElement.scrollHeight);
  151. * });
  152. * }
  153. * }
  154. * ```
  155. *
  156. * @developerPreview
  157. */
  158. export declare function afterRender(callback: VoidFunction, options?: AfterRenderOptions): AfterRenderRef;
  159. /**
  160. * Options passed to `afterRender` and `afterNextRender`.
  161. *
  162. * @developerPreview
  163. */
  164. export declare interface AfterRenderOptions {
  165. /**
  166. * The `Injector` to use during creation.
  167. *
  168. * If this is not provided, the current injection context will be used instead (via `inject`).
  169. */
  170. injector?: Injector;
  171. }
  172. /**
  173. * A callback that runs after render.
  174. *
  175. * @developerPreview
  176. */
  177. export declare interface AfterRenderRef {
  178. /**
  179. * Shut down the callback, preventing it from being called again.
  180. */
  181. destroy(): void;
  182. }
  183. /**
  184. * @description
  185. * A lifecycle hook that is called after the default change detector has
  186. * completed checking a component's view for changes.
  187. *
  188. * @see {@link AfterContentChecked}
  189. * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
  190. *
  191. * @usageNotes
  192. * The following snippet shows how a component can implement this interface to
  193. * define its own after-check functionality.
  194. *
  195. * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterViewChecked'}
  196. *
  197. * @publicApi
  198. */
  199. export declare interface AfterViewChecked {
  200. /**
  201. * A callback method that is invoked immediately after the
  202. * default change detector has completed one change-check cycle
  203. * for a component's view.
  204. */
  205. ngAfterViewChecked(): void;
  206. }
  207. /**
  208. * @description
  209. * A lifecycle hook that is called after Angular has fully initialized
  210. * a component's view.
  211. * Define an `ngAfterViewInit()` method to handle any additional initialization tasks.
  212. *
  213. * @see {@link OnInit}
  214. * @see {@link AfterContentInit}
  215. * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
  216. *
  217. * @usageNotes
  218. * The following snippet shows how a component can implement this interface to
  219. * define its own view initialization method.
  220. *
  221. * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterViewInit'}
  222. *
  223. * @publicApi
  224. */
  225. export declare interface AfterViewInit {
  226. /**
  227. * A callback method that is invoked immediately after
  228. * Angular has completed initialization of a component's view.
  229. * It is invoked only once when the view is instantiated.
  230. *
  231. */
  232. ngAfterViewInit(): void;
  233. }
  234. /**
  235. * A [DI token](guide/glossary#di-token "DI token definition") that indicates which animations
  236. * module has been loaded.
  237. * @publicApi
  238. */
  239. export declare const ANIMATION_MODULE_TYPE: InjectionToken<"NoopAnimations" | "BrowserAnimations">;
  240. /**
  241. * A [DI token](guide/glossary#di-token "DI token definition") that provides a set of callbacks to
  242. * be called for every component that is bootstrapped.
  243. *
  244. * Each callback must take a `ComponentRef` instance and return nothing.
  245. *
  246. * `(componentRef: ComponentRef) => void`
  247. *
  248. * @publicApi
  249. */
  250. export declare const APP_BOOTSTRAP_LISTENER: InjectionToken<((compRef: ComponentRef<any>) => void)[]>;
  251. /**
  252. * A [DI token](guide/glossary#di-token "DI token definition") representing a string ID, used
  253. * primarily for prefixing application attributes and CSS styles when
  254. * {@link ViewEncapsulation#Emulated} is being used.
  255. *
  256. * The token is needed in cases when multiple applications are bootstrapped on a page
  257. * (for example, using `bootstrapApplication` calls). In this case, ensure that those applications
  258. * have different `APP_ID` value setup. For example:
  259. *
  260. * ```
  261. * bootstrapApplication(ComponentA, {
  262. * providers: [
  263. * { provide: APP_ID, useValue: 'app-a' },
  264. * // ... other providers ...
  265. * ]
  266. * });
  267. *
  268. * bootstrapApplication(ComponentB, {
  269. * providers: [
  270. * { provide: APP_ID, useValue: 'app-b' },
  271. * // ... other providers ...
  272. * ]
  273. * });
  274. * ```
  275. *
  276. * By default, when there is only one application bootstrapped, you don't need to provide the
  277. * `APP_ID` token (the `ng` will be used as an app ID).
  278. *
  279. * @publicApi
  280. */
  281. export declare const APP_ID: InjectionToken<string>;
  282. /**
  283. * A [DI token](guide/glossary#di-token "DI token definition") that you can use to provide
  284. * one or more initialization functions.
  285. *
  286. * The provided functions are injected at application startup and executed during
  287. * app initialization. If any of these functions returns a Promise or an Observable, initialization
  288. * does not complete until the Promise is resolved or the Observable is completed.
  289. *
  290. * You can, for example, create a factory function that loads language data
  291. * or an external configuration, and provide that function to the `APP_INITIALIZER` token.
  292. * The function is executed during the application bootstrap process,
  293. * and the needed data is available on startup.
  294. *
  295. * @see {@link ApplicationInitStatus}
  296. *
  297. * @usageNotes
  298. *
  299. * The following example illustrates how to configure a multi-provider using `APP_INITIALIZER` token
  300. * and a function returning a promise.
  301. * ### Example with NgModule-based application
  302. * ```
  303. * function initializeApp(): Promise<any> {
  304. * return new Promise((resolve, reject) => {
  305. * // Do some asynchronous stuff
  306. * resolve();
  307. * });
  308. * }
  309. *
  310. * @NgModule({
  311. * imports: [BrowserModule],
  312. * declarations: [AppComponent],
  313. * bootstrap: [AppComponent],
  314. * providers: [{
  315. * provide: APP_INITIALIZER,
  316. * useFactory: () => initializeApp,
  317. * multi: true
  318. * }]
  319. * })
  320. * export class AppModule {}
  321. * ```
  322. *
  323. * ### Example with standalone application
  324. * ```
  325. * export function initializeApp(http: HttpClient) {
  326. * return (): Promise<any> =>
  327. * firstValueFrom(
  328. * http
  329. * .get("https://someUrl.com/api/user")
  330. * .pipe(tap(user => { ... }))
  331. * );
  332. * }
  333. *
  334. * bootstrapApplication(App, {
  335. * providers: [
  336. * provideHttpClient(),
  337. * {
  338. * provide: APP_INITIALIZER,
  339. * useFactory: initializeApp,
  340. * multi: true,
  341. * deps: [HttpClient],
  342. * },
  343. * ],
  344. * });
  345. * ```
  346. *
  347. *
  348. * It's also possible to configure a multi-provider using `APP_INITIALIZER` token and a function
  349. * returning an observable, see an example below. Note: the `HttpClient` in this example is used for
  350. * demo purposes to illustrate how the factory function can work with other providers available
  351. * through DI.
  352. *
  353. * ### Example with NgModule-based application
  354. * ```
  355. * function initializeAppFactory(httpClient: HttpClient): () => Observable<any> {
  356. * return () => httpClient.get("https://someUrl.com/api/user")
  357. * .pipe(
  358. * tap(user => { ... })
  359. * );
  360. * }
  361. *
  362. * @NgModule({
  363. * imports: [BrowserModule, HttpClientModule],
  364. * declarations: [AppComponent],
  365. * bootstrap: [AppComponent],
  366. * providers: [{
  367. * provide: APP_INITIALIZER,
  368. * useFactory: initializeAppFactory,
  369. * deps: [HttpClient],
  370. * multi: true
  371. * }]
  372. * })
  373. * export class AppModule {}
  374. * ```
  375. *
  376. * ### Example with standalone application
  377. *
  378. * function initializeAppFactory(httpClient: HttpClient): () => Observable<any> {
  379. * return () => httpClient.get("https://someUrl.com/api/user")
  380. * .pipe(
  381. * tap(user => { ... })
  382. * );
  383. * }
  384. *
  385. * bootstrapApplication(App, {
  386. * providers: [
  387. * provideHttpClient(),
  388. * {
  389. * provide: APP_INITIALIZER,
  390. * useFactory: initializeApp,
  391. * multi: true,
  392. * deps: [HttpClient],
  393. * },
  394. * ],
  395. * });
  396. *
  397. * @publicApi
  398. */
  399. export declare const APP_INITIALIZER: InjectionToken<readonly (() => Observable<unknown> | Promise<unknown> | void)[]>;
  400. /**
  401. * Set of config options available during the application bootstrap operation.
  402. *
  403. * @publicApi
  404. */
  405. export declare interface ApplicationConfig {
  406. /**
  407. * List of providers that should be available to the root component and all its children.
  408. */
  409. providers: Array<Provider | EnvironmentProviders>;
  410. }
  411. /**
  412. * A class that reflects the state of running {@link APP_INITIALIZER} functions.
  413. *
  414. * @publicApi
  415. */
  416. export declare class ApplicationInitStatus {
  417. private resolve;
  418. private reject;
  419. private initialized;
  420. readonly done = false;
  421. readonly donePromise: Promise<any>;
  422. private readonly appInits;
  423. constructor();
  424. static ɵfac: i0.ɵɵFactoryDeclaration<ApplicationInitStatus, never>;
  425. static ɵprov: i0.ɵɵInjectableDeclaration<ApplicationInitStatus>;
  426. }
  427. /**
  428. * Re-exported by `BrowserModule`, which is included automatically in the root
  429. * `AppModule` when you create a new app with the CLI `new` command. Eagerly injects
  430. * `ApplicationRef` to instantiate it.
  431. *
  432. * @publicApi
  433. */
  434. export declare class ApplicationModule {
  435. constructor(appRef: ApplicationRef);
  436. static ɵfac: i0.ɵɵFactoryDeclaration<ApplicationModule, never>;
  437. static ɵmod: i0.ɵɵNgModuleDeclaration<ApplicationModule, never, never, never>;
  438. static ɵinj: i0.ɵɵInjectorDeclaration<ApplicationModule>;
  439. }
  440. /**
  441. * A reference to an Angular application running on a page.
  442. *
  443. * @usageNotes
  444. * {@a is-stable-examples}
  445. * ### isStable examples and caveats
  446. *
  447. * Note two important points about `isStable`, demonstrated in the examples below:
  448. * - the application will never be stable if you start any kind
  449. * of recurrent asynchronous task when the application starts
  450. * (for example for a polling process, started with a `setInterval`, a `setTimeout`
  451. * or using RxJS operators like `interval`);
  452. * - the `isStable` Observable runs outside of the Angular zone.
  453. *
  454. * Let's imagine that you start a recurrent task
  455. * (here incrementing a counter, using RxJS `interval`),
  456. * and at the same time subscribe to `isStable`.
  457. *
  458. * ```
  459. * constructor(appRef: ApplicationRef) {
  460. * appRef.isStable.pipe(
  461. * filter(stable => stable)
  462. * ).subscribe(() => console.log('App is stable now');
  463. * interval(1000).subscribe(counter => console.log(counter));
  464. * }
  465. * ```
  466. * In this example, `isStable` will never emit `true`,
  467. * and the trace "App is stable now" will never get logged.
  468. *
  469. * If you want to execute something when the app is stable,
  470. * you have to wait for the application to be stable
  471. * before starting your polling process.
  472. *
  473. * ```
  474. * constructor(appRef: ApplicationRef) {
  475. * appRef.isStable.pipe(
  476. * first(stable => stable),
  477. * tap(stable => console.log('App is stable now')),
  478. * switchMap(() => interval(1000))
  479. * ).subscribe(counter => console.log(counter));
  480. * }
  481. * ```
  482. * In this example, the trace "App is stable now" will be logged
  483. * and then the counter starts incrementing every second.
  484. *
  485. * Note also that this Observable runs outside of the Angular zone,
  486. * which means that the code in the subscription
  487. * to this Observable will not trigger the change detection.
  488. *
  489. * Let's imagine that instead of logging the counter value,
  490. * you update a field of your component
  491. * and display it in its template.
  492. *
  493. * ```
  494. * constructor(appRef: ApplicationRef) {
  495. * appRef.isStable.pipe(
  496. * first(stable => stable),
  497. * switchMap(() => interval(1000))
  498. * ).subscribe(counter => this.value = counter);
  499. * }
  500. * ```
  501. * As the `isStable` Observable runs outside the zone,
  502. * the `value` field will be updated properly,
  503. * but the template will not be refreshed!
  504. *
  505. * You'll have to manually trigger the change detection to update the template.
  506. *
  507. * ```
  508. * constructor(appRef: ApplicationRef, cd: ChangeDetectorRef) {
  509. * appRef.isStable.pipe(
  510. * first(stable => stable),
  511. * switchMap(() => interval(1000))
  512. * ).subscribe(counter => {
  513. * this.value = counter;
  514. * cd.detectChanges();
  515. * });
  516. * }
  517. * ```
  518. *
  519. * Or make the subscription callback run inside the zone.
  520. *
  521. * ```
  522. * constructor(appRef: ApplicationRef, zone: NgZone) {
  523. * appRef.isStable.pipe(
  524. * first(stable => stable),
  525. * switchMap(() => interval(1000))
  526. * ).subscribe(counter => zone.run(() => this.value = counter));
  527. * }
  528. * ```
  529. *
  530. * @publicApi
  531. */
  532. export declare class ApplicationRef {
  533. private _runningTick;
  534. private _destroyed;
  535. private _destroyListeners;
  536. private readonly internalErrorHandler;
  537. private readonly zoneIsStable;
  538. /**
  539. * Indicates whether this instance was destroyed.
  540. */
  541. get destroyed(): boolean;
  542. /**
  543. * Get a list of component types registered to this application.
  544. * This list is populated even before the component is created.
  545. */
  546. readonly componentTypes: Type<any>[];
  547. /**
  548. * Get a list of components registered to this application.
  549. */
  550. readonly components: ComponentRef<any>[];
  551. /**
  552. * Returns an Observable that indicates when the application is stable or unstable.
  553. */
  554. readonly isStable: Observable<boolean>;
  555. private readonly _injector;
  556. /**
  557. * The `EnvironmentInjector` used to create this application.
  558. */
  559. get injector(): EnvironmentInjector;
  560. /**
  561. * Bootstrap a component onto the element identified by its selector or, optionally, to a
  562. * specified element.
  563. *
  564. * @usageNotes
  565. * ### Bootstrap process
  566. *
  567. * When bootstrapping a component, Angular mounts it onto a target DOM element
  568. * and kicks off automatic change detection. The target DOM element can be
  569. * provided using the `rootSelectorOrNode` argument.
  570. *
  571. * If the target DOM element is not provided, Angular tries to find one on a page
  572. * using the `selector` of the component that is being bootstrapped
  573. * (first matched element is used).
  574. *
  575. * ### Example
  576. *
  577. * Generally, we define the component to bootstrap in the `bootstrap` array of `NgModule`,
  578. * but it requires us to know the component while writing the application code.
  579. *
  580. * Imagine a situation where we have to wait for an API call to decide about the component to
  581. * bootstrap. We can use the `ngDoBootstrap` hook of the `NgModule` and call this method to
  582. * dynamically bootstrap a component.
  583. *
  584. * {@example core/ts/platform/platform.ts region='componentSelector'}
  585. *
  586. * Optionally, a component can be mounted onto a DOM element that does not match the
  587. * selector of the bootstrapped component.
  588. *
  589. * In the following example, we are providing a CSS selector to match the target element.
  590. *
  591. * {@example core/ts/platform/platform.ts region='cssSelector'}
  592. *
  593. * While in this example, we are providing reference to a DOM node.
  594. *
  595. * {@example core/ts/platform/platform.ts region='domNode'}
  596. */
  597. bootstrap<C>(component: Type<C>, rootSelectorOrNode?: string | any): ComponentRef<C>;
  598. /**
  599. * Bootstrap a component onto the element identified by its selector or, optionally, to a
  600. * specified element.
  601. *
  602. * @usageNotes
  603. * ### Bootstrap process
  604. *
  605. * When bootstrapping a component, Angular mounts it onto a target DOM element
  606. * and kicks off automatic change detection. The target DOM element can be
  607. * provided using the `rootSelectorOrNode` argument.
  608. *
  609. * If the target DOM element is not provided, Angular tries to find one on a page
  610. * using the `selector` of the component that is being bootstrapped
  611. * (first matched element is used).
  612. *
  613. * ### Example
  614. *
  615. * Generally, we define the component to bootstrap in the `bootstrap` array of `NgModule`,
  616. * but it requires us to know the component while writing the application code.
  617. *
  618. * Imagine a situation where we have to wait for an API call to decide about the component to
  619. * bootstrap. We can use the `ngDoBootstrap` hook of the `NgModule` and call this method to
  620. * dynamically bootstrap a component.
  621. *
  622. * {@example core/ts/platform/platform.ts region='componentSelector'}
  623. *
  624. * Optionally, a component can be mounted onto a DOM element that does not match the
  625. * selector of the bootstrapped component.
  626. *
  627. * In the following example, we are providing a CSS selector to match the target element.
  628. *
  629. * {@example core/ts/platform/platform.ts region='cssSelector'}
  630. *
  631. * While in this example, we are providing reference to a DOM node.
  632. *
  633. * {@example core/ts/platform/platform.ts region='domNode'}
  634. *
  635. * @deprecated Passing Component factories as the `Application.bootstrap` function argument is
  636. * deprecated. Pass Component Types instead.
  637. */
  638. bootstrap<C>(componentFactory: ComponentFactory<C>, rootSelectorOrNode?: string | any): ComponentRef<C>;
  639. /**
  640. * Invoke this method to explicitly process change detection and its side-effects.
  641. *
  642. * In development mode, `tick()` also performs a second change detection cycle to ensure that no
  643. * further changes are detected. If additional changes are picked up during this second cycle,
  644. * bindings in the app have side-effects that cannot be resolved in a single change detection
  645. * pass.
  646. * In this case, Angular throws an error, since an Angular application can only have one change
  647. * detection pass during which all change detection must complete.
  648. */
  649. tick(): void;
  650. /**
  651. * Attaches a view so that it will be dirty checked.
  652. * The view will be automatically detached when it is destroyed.
  653. * This will throw if the view is already attached to a ViewContainer.
  654. */
  655. attachView(viewRef: ViewRef): void;
  656. /**
  657. * Detaches a view from dirty checking again.
  658. */
  659. detachView(viewRef: ViewRef): void;
  660. private _loadComponent;
  661. /**
  662. * Registers a listener to be called when an instance is destroyed.
  663. *
  664. * @param callback A callback function to add as a listener.
  665. * @returns A function which unregisters a listener.
  666. */
  667. onDestroy(callback: () => void): VoidFunction;
  668. /**
  669. * Destroys an Angular application represented by this `ApplicationRef`. Calling this function
  670. * will destroy the associated environment injectors as well as all the bootstrapped components
  671. * with their views.
  672. */
  673. destroy(): void;
  674. /**
  675. * Returns the number of attached views.
  676. */
  677. get viewCount(): number;
  678. private warnIfDestroyed;
  679. static ɵfac: i0.ɵɵFactoryDeclaration<ApplicationRef, never>;
  680. static ɵprov: i0.ɵɵInjectableDeclaration<ApplicationRef>;
  681. }
  682. /**
  683. * @publicApi
  684. */
  685. export declare function asNativeElements(debugEls: DebugElement[]): any;
  686. /**
  687. * Asserts that the current stack frame is within an [injection
  688. * context](guide/dependency-injection-context) and has access to `inject`.
  689. *
  690. * @param debugFn a reference to the function making the assertion (used for the error message).
  691. *
  692. * @publicApi
  693. */
  694. export declare function assertInInjectionContext(debugFn: Function): void;
  695. /**
  696. * Checks that there is currently a platform that contains the given token as a provider.
  697. *
  698. * @publicApi
  699. */
  700. export declare function assertPlatform(requiredToken: any): PlatformRef;
  701. /**
  702. * Type of the Attribute metadata.
  703. *
  704. * @publicApi
  705. */
  706. export declare interface Attribute {
  707. /**
  708. * The name of the attribute whose value can be injected.
  709. */
  710. attributeName: string;
  711. }
  712. /**
  713. * Attribute decorator and metadata.
  714. *
  715. * @Annotation
  716. * @publicApi
  717. */
  718. export declare const Attribute: AttributeDecorator;
  719. /**
  720. * Type of the Attribute decorator / constructor function.
  721. *
  722. * @publicApi
  723. */
  724. export declare interface AttributeDecorator {
  725. /**
  726. * Parameter decorator for a directive constructor that designates
  727. * a host-element attribute whose value is injected as a constant string literal.
  728. *
  729. * @usageNotes
  730. *
  731. * Suppose we have an `<input>` element and want to know its `type`.
  732. *
  733. * ```html
  734. * <input type="text">
  735. * ```
  736. *
  737. * The following example uses the decorator to inject the string literal `text` in a directive.
  738. *
  739. * {@example core/ts/metadata/metadata.ts region='attributeMetadata'}
  740. *
  741. * The following example uses the decorator in a component constructor.
  742. *
  743. * {@example core/ts/metadata/metadata.ts region='attributeFactory'}
  744. *
  745. */
  746. (name: string): any;
  747. new (name: string): Attribute;
  748. }
  749. /**
  750. * Transforms a value (typically a string) to a boolean.
  751. * Intended to be used as a transform function of an input.
  752. *
  753. * @usageNotes
  754. * ```typescript
  755. * @Input({ transform: booleanAttribute }) status!: boolean;
  756. * ```
  757. * @param value Value to be transformed.
  758. *
  759. * @publicApi
  760. */
  761. export declare function booleanAttribute(value: unknown): boolean;
  762. /**
  763. * Provides additional options to the bootstrapping process.
  764. *
  765. * @publicApi
  766. */
  767. export declare interface BootstrapOptions {
  768. /**
  769. * Optionally specify which `NgZone` should be used.
  770. *
  771. * - Provide your own `NgZone` instance.
  772. * - `zone.js` - Use default `NgZone` which requires `Zone.js`.
  773. * - `noop` - Use `NoopNgZone` which does nothing.
  774. */
  775. ngZone?: NgZone | 'zone.js' | 'noop';
  776. /**
  777. * Optionally specify coalescing event change detections or not.
  778. * Consider the following case.
  779. *
  780. * ```
  781. * <div (click)="doSomething()">
  782. * <button (click)="doSomethingElse()"></button>
  783. * </div>
  784. * ```
  785. *
  786. * When button is clicked, because of the event bubbling, both
  787. * event handlers will be called and 2 change detections will be
  788. * triggered. We can coalesce such kind of events to only trigger
  789. * change detection only once.
  790. *
  791. * By default, this option will be false. So the events will not be
  792. * coalesced and the change detection will be triggered multiple times.
  793. * And if this option be set to true, the change detection will be
  794. * triggered async by scheduling a animation frame. So in the case above,
  795. * the change detection will only be triggered once.
  796. */
  797. ngZoneEventCoalescing?: boolean;
  798. /**
  799. * Optionally specify if `NgZone#run()` method invocations should be coalesced
  800. * into a single change detection.
  801. *
  802. * Consider the following case.
  803. * ```
  804. * for (let i = 0; i < 10; i ++) {
  805. * ngZone.run(() => {
  806. * // do something
  807. * });
  808. * }
  809. * ```
  810. *
  811. * This case triggers the change detection multiple times.
  812. * With ngZoneRunCoalescing options, all change detections in an event loop trigger only once.
  813. * In addition, the change detection executes in requestAnimation.
  814. *
  815. */
  816. ngZoneRunCoalescing?: boolean;
  817. }
  818. /**
  819. * The strategy that the default change detector uses to detect changes.
  820. * When set, takes effect the next time change detection is triggered.
  821. *
  822. * @see {@link ChangeDetectorRef#usage-notes Change detection usage}
  823. *
  824. * @publicApi
  825. */
  826. export declare enum ChangeDetectionStrategy {
  827. /**
  828. * Use the `CheckOnce` strategy, meaning that automatic change detection is deactivated
  829. * until reactivated by setting the strategy to `Default` (`CheckAlways`).
  830. * Change detection can still be explicitly invoked.
  831. * This strategy applies to all child directives and cannot be overridden.
  832. */
  833. OnPush = 0,
  834. /**
  835. * Use the default `CheckAlways` strategy, in which change detection is automatic until
  836. * explicitly deactivated.
  837. */
  838. Default = 1
  839. }
  840. declare type ChangeDetectionStrategy_2 = number;
  841. /**
  842. * Base class that provides change detection functionality.
  843. * A change-detection tree collects all views that are to be checked for changes.
  844. * Use the methods to add and remove views from the tree, initiate change-detection,
  845. * and explicitly mark views as _dirty_, meaning that they have changed and need to be re-rendered.
  846. *
  847. * @see [Using change detection hooks](guide/lifecycle-hooks#using-change-detection-hooks)
  848. * @see [Defining custom change detection](guide/lifecycle-hooks#defining-custom-change-detection)
  849. *
  850. * @usageNotes
  851. *
  852. * The following examples demonstrate how to modify default change-detection behavior
  853. * to perform explicit detection when needed.
  854. *
  855. * ### Use `markForCheck()` with `CheckOnce` strategy
  856. *
  857. * The following example sets the `OnPush` change-detection strategy for a component
  858. * (`CheckOnce`, rather than the default `CheckAlways`), then forces a second check
  859. * after an interval.
  860. *
  861. * <code-example path="core/ts/change_detect/change-detection.ts"
  862. * region="mark-for-check"></code-example>
  863. *
  864. * ### Detach change detector to limit how often check occurs
  865. *
  866. * The following example defines a component with a large list of read-only data
  867. * that is expected to change constantly, many times per second.
  868. * To improve performance, we want to check and update the list
  869. * less often than the changes actually occur. To do that, we detach
  870. * the component's change detector and perform an explicit local check every five seconds.
  871. *
  872. * <code-example path="core/ts/change_detect/change-detection.ts" region="detach"></code-example>
  873. *
  874. *
  875. * ### Reattaching a detached component
  876. *
  877. * The following example creates a component displaying live data.
  878. * The component detaches its change detector from the main change detector tree
  879. * when the `live` property is set to false, and reattaches it when the property
  880. * becomes true.
  881. *
  882. * <code-example path="core/ts/change_detect/change-detection.ts" region="reattach"></code-example>
  883. *
  884. * @publicApi
  885. */
  886. export declare abstract class ChangeDetectorRef {
  887. /**
  888. * When a view uses the {@link ChangeDetectionStrategy#OnPush} (checkOnce)
  889. * change detection strategy, explicitly marks the view as changed so that
  890. * it can be checked again.
  891. *
  892. * Components are normally marked as dirty (in need of rerendering) when inputs
  893. * have changed or events have fired in the view. Call this method to ensure that
  894. * a component is checked even if these triggers have not occurred.
  895. *
  896. * <!-- TODO: Add a link to a chapter on OnPush components -->
  897. *
  898. */
  899. abstract markForCheck(): void;
  900. /**
  901. * Detaches this view from the change-detection tree.
  902. * A detached view is not checked until it is reattached.
  903. * Use in combination with `detectChanges()` to implement local change detection checks.
  904. *
  905. * Detached views are not checked during change detection runs until they are
  906. * re-attached, even if they are marked as dirty.
  907. *
  908. * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
  909. * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
  910. *
  911. */
  912. abstract detach(): void;
  913. /**
  914. * Checks this view and its children. Use in combination with {@link ChangeDetectorRef#detach}
  915. * to implement local change detection checks.
  916. *
  917. * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
  918. * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
  919. *
  920. */
  921. abstract detectChanges(): void;
  922. /**
  923. * Checks the change detector and its children, and throws if any changes are detected.
  924. *
  925. * Use in development mode to verify that running change detection doesn't introduce
  926. * other changes. Calling it in production mode is a noop.
  927. */
  928. abstract checkNoChanges(): void;
  929. /**
  930. * Re-attaches the previously detached view to the change detection tree.
  931. * Views are attached to the tree by default.
  932. *
  933. * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
  934. *
  935. */
  936. abstract reattach(): void;
  937. }
  938. declare interface ChangeDetectorRefInterface extends ChangeDetectorRef {
  939. }
  940. declare const CHILD_HEAD = 12;
  941. declare const CHILD_TAIL = 13;
  942. /**
  943. * Configures the `Injector` to return an instance of `useClass` for a token.
  944. * @see ["Dependency Injection Guide"](guide/dependency-injection).
  945. *
  946. * @usageNotes
  947. *
  948. * {@example core/di/ts/provider_spec.ts region='ClassProvider'}
  949. *
  950. * Note that following two providers are not equal:
  951. *
  952. * {@example core/di/ts/provider_spec.ts region='ClassProviderDifference'}
  953. *
  954. * ### Multi-value example
  955. *
  956. * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
  957. *
  958. * @publicApi
  959. */
  960. export declare interface ClassProvider extends ClassSansProvider {
  961. /**
  962. * An injection token. (Typically an instance of `Type` or `InjectionToken`, but can be `any`).
  963. */
  964. provide: any;
  965. /**
  966. * When true, injector returns an array of instances. This is useful to allow multiple
  967. * providers spread across many files to provide configuration information to a common token.
  968. */
  969. multi?: boolean;
  970. }
  971. /**
  972. * Configures the `Injector` to return a value by invoking a `useClass` function.
  973. * Base for `ClassProvider` decorator.
  974. *
  975. * @see ["Dependency Injection Guide"](guide/dependency-injection).
  976. *
  977. * @publicApi
  978. */
  979. export declare interface ClassSansProvider {
  980. /**
  981. * Class to instantiate for the `token`.
  982. */
  983. useClass: Type<any>;
  984. }
  985. declare const CLEANUP = 7;
  986. /**
  987. * Low-level service for running the angular compiler during runtime
  988. * to create {@link ComponentFactory}s, which
  989. * can later be used to create and render a Component instance.
  990. *
  991. * Each `@NgModule` provides an own `Compiler` to its injector,
  992. * that will use the directives/pipes of the ng module for compilation
  993. * of components.
  994. *
  995. * @publicApi
  996. *
  997. * @deprecated
  998. * Ivy JIT mode doesn't require accessing this symbol.
  999. * See [JIT API changes due to ViewEngine deprecation](guide/deprecations#jit-api-changes) for
  1000. * additional context.
  1001. */
  1002. export declare class Compiler {
  1003. /**
  1004. * Compiles the given NgModule and all of its components. All templates of the components
  1005. * have to be inlined.
  1006. */
  1007. compileModuleSync<T>(moduleType: Type<T>): NgModuleFactory<T>;
  1008. /**
  1009. * Compiles the given NgModule and all of its components
  1010. */
  1011. compileModuleAsync<T>(moduleType: Type<T>): Promise<NgModuleFactory<T>>;
  1012. /**
  1013. * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.
  1014. */
  1015. compileModuleAndAllComponentsSync<T>(moduleType: Type<T>): ModuleWithComponentFactories<T>;
  1016. /**
  1017. * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.
  1018. */
  1019. compileModuleAndAllComponentsAsync<T>(moduleType: Type<T>): Promise<ModuleWithComponentFactories<T>>;
  1020. /**
  1021. * Clears all caches.
  1022. */
  1023. clearCache(): void;
  1024. /**
  1025. * Clears the cache for the given component/ngModule.
  1026. */
  1027. clearCacheFor(type: Type<any>): void;
  1028. /**
  1029. * Returns the id for a given NgModule, if one is defined and known to the compiler.
  1030. */
  1031. getModuleId(moduleType: Type<any>): string | undefined;
  1032. static ɵfac: i0.ɵɵFactoryDeclaration<Compiler, never>;
  1033. static ɵprov: i0.ɵɵInjectableDeclaration<Compiler>;
  1034. }
  1035. /**
  1036. * Token to provide CompilerOptions in the platform injector.
  1037. *
  1038. * @publicApi
  1039. */
  1040. export declare const COMPILER_OPTIONS: InjectionToken<CompilerOptions[]>;
  1041. /**
  1042. * A factory for creating a Compiler
  1043. *
  1044. * @publicApi
  1045. *
  1046. * @deprecated
  1047. * Ivy JIT mode doesn't require accessing this symbol.
  1048. * See [JIT API changes due to ViewEngine deprecation](guide/deprecations#jit-api-changes) for
  1049. * additional context.
  1050. */
  1051. export declare abstract class CompilerFactory {
  1052. abstract createCompiler(options?: CompilerOptions[]): Compiler;
  1053. }
  1054. /**
  1055. * Options for creating a compiler.
  1056. *
  1057. * Note: the `useJit` and `missingTranslation` config options are not used in Ivy, passing them has
  1058. * no effect. Those config options are deprecated since v13.
  1059. *
  1060. * @publicApi
  1061. */
  1062. export declare type CompilerOptions = {
  1063. /**
  1064. * @deprecated not used at all in Ivy, providing this config option has no effect.
  1065. */
  1066. useJit?: boolean;
  1067. defaultEncapsulation?: ViewEncapsulation;
  1068. providers?: StaticProvider[];
  1069. /**
  1070. * @deprecated not used at all in Ivy, providing this config option has no effect.
  1071. */
  1072. missingTranslation?: MissingTranslationStrategy;
  1073. preserveWhitespaces?: boolean;
  1074. };
  1075. /**
  1076. * Supplies configuration metadata for an Angular component.
  1077. *
  1078. * @publicApi
  1079. */
  1080. export declare interface Component extends Directive {
  1081. /**
  1082. * The change-detection strategy to use for this component.
  1083. *
  1084. * When a component is instantiated, Angular creates a change detector,
  1085. * which is responsible for propagating the component's bindings.
  1086. * The strategy is one of:
  1087. * - `ChangeDetectionStrategy#OnPush` sets the strategy to `CheckOnce` (on demand).
  1088. * - `ChangeDetectionStrategy#Default` sets the strategy to `CheckAlways`.
  1089. */
  1090. changeDetection?: ChangeDetectionStrategy;
  1091. /**
  1092. * Defines the set of injectable objects that are visible to its view DOM children.
  1093. * See [example](#injecting-a-class-with-a-view-provider).
  1094. *
  1095. */
  1096. viewProviders?: Provider[];
  1097. /**
  1098. * The module ID of the module that contains the component.
  1099. * The component must be able to resolve relative URLs for templates and styles.
  1100. * SystemJS exposes the `__moduleName` variable within each module.
  1101. * In CommonJS, this can be set to `module.id`.
  1102. *
  1103. * @deprecated This option does not have any effect. Will be removed in Angular v17.
  1104. */
  1105. moduleId?: string;
  1106. /**
  1107. * The relative path or absolute URL of a template file for an Angular component.
  1108. * If provided, do not supply an inline template using `template`.
  1109. *
  1110. */
  1111. templateUrl?: string;
  1112. /**
  1113. * An inline template for an Angular component. If provided,
  1114. * do not supply a template file using `templateUrl`.
  1115. *
  1116. */
  1117. template?: string;
  1118. /**
  1119. * One or more relative paths or absolute URLs for files containing CSS stylesheets to use
  1120. * in this component.
  1121. */
  1122. styleUrls?: string[];
  1123. /**
  1124. * One or more inline CSS stylesheets to use
  1125. * in this component.
  1126. */
  1127. styles?: string[];
  1128. /**
  1129. * One or more animation `trigger()` calls, containing
  1130. * [`state()`](api/animations/state) and `transition()` definitions.
  1131. * See the [Animations guide](/guide/animations) and animations API documentation.
  1132. *
  1133. */
  1134. animations?: any[];
  1135. /**
  1136. * An encapsulation policy for the component's styling.
  1137. * Possible values:
  1138. * - `ViewEncapsulation.Emulated`: Apply modified component styles in order to emulate
  1139. * a native Shadow DOM CSS encapsulation behavior.
  1140. * - `ViewEncapsulation.None`: Apply component styles globally without any sort of encapsulation.
  1141. * - `ViewEncapsulation.ShadowDom`: Use the browser's native Shadow DOM API to encapsulate styles.
  1142. *
  1143. * If not supplied, the value is taken from the `CompilerOptions`
  1144. * which defaults to `ViewEncapsulation.Emulated`.
  1145. *
  1146. * If the policy is `ViewEncapsulation.Emulated` and the component has no
  1147. * {@link Component#styles styles} nor {@link Component#styleUrls styleUrls},
  1148. * the policy is automatically switched to `ViewEncapsulation.None`.
  1149. */
  1150. encapsulation?: ViewEncapsulation;
  1151. /**
  1152. * Overrides the default interpolation start and end delimiters (`{{` and `}}`).
  1153. */
  1154. interpolation?: [string, string];
  1155. /**
  1156. * True to preserve or false to remove potentially superfluous whitespace characters
  1157. * from the compiled template. Whitespace characters are those matching the `\s`
  1158. * character class in JavaScript regular expressions. Default is false, unless
  1159. * overridden in compiler options.
  1160. */
  1161. preserveWhitespaces?: boolean;
  1162. /**
  1163. * Angular components marked as `standalone` do not need to be declared in an NgModule. Such
  1164. * components directly manage their own template dependencies (components, directives, and pipes
  1165. * used in a template) via the imports property.
  1166. *
  1167. * More information about standalone components, directives, and pipes can be found in [this
  1168. * guide](guide/standalone-components).
  1169. */
  1170. standalone?: boolean;
  1171. /**
  1172. * The imports property specifies the standalone component's template dependencies — those
  1173. * directives, components, and pipes that can be used within its template. Standalone components
  1174. * can import other standalone components, directives, and pipes as well as existing NgModules.
  1175. *
  1176. * This property is only available for standalone components - specifying it for components
  1177. * declared in an NgModule generates a compilation error.
  1178. *
  1179. * More information about standalone components, directives, and pipes can be found in [this
  1180. * guide](guide/standalone-components).
  1181. */
  1182. imports?: (Type<any> | ReadonlyArray<any>)[];
  1183. /**
  1184. * The set of schemas that declare elements to be allowed in a standalone component. Elements and
  1185. * properties that are neither Angular components nor directives must be declared in a schema.
  1186. *
  1187. * This property is only available for standalone components - specifying it for components
  1188. * declared in an NgModule generates a compilation error.
  1189. *
  1190. * More information about standalone components, directives, and pipes can be found in [this
  1191. * guide](guide/standalone-components).
  1192. */
  1193. schemas?: SchemaMetadata[];
  1194. }
  1195. /**
  1196. * Component decorator and metadata.
  1197. *
  1198. * @Annotation
  1199. * @publicApi
  1200. */
  1201. export declare const Component: ComponentDecorator;
  1202. /**
  1203. * Component decorator interface
  1204. *
  1205. * @publicApi
  1206. */
  1207. export declare interface ComponentDecorator {
  1208. /**
  1209. * Decorator that marks a class as an Angular component and provides configuration
  1210. * metadata that determines how the component should be processed,
  1211. * instantiated, and used at runtime.
  1212. *
  1213. * Components are the most basic UI building block of an Angular app.
  1214. * An Angular app contains a tree of Angular components.
  1215. *
  1216. * Angular components are a subset of directives, always associated with a template.
  1217. * Unlike other directives, only one component can be instantiated for a given element in a
  1218. * template.
  1219. *
  1220. * A component must belong to an NgModule in order for it to be available
  1221. * to another component or application. To make it a member of an NgModule,
  1222. * list it in the `declarations` field of the `NgModule` metadata.
  1223. *
  1224. * Note that, in addition to these options for configuring a directive,
  1225. * you can control a component's runtime behavior by implementing
  1226. * life-cycle hooks. For more information, see the
  1227. * [Lifecycle Hooks](guide/lifecycle-hooks) guide.
  1228. *
  1229. * @usageNotes
  1230. *
  1231. * ### Setting component inputs
  1232. *
  1233. * The following example creates a component with two data-bound properties,
  1234. * specified by the `inputs` value.
  1235. *
  1236. * <code-example path="core/ts/metadata/directives.ts" region="component-input"></code-example>
  1237. *
  1238. *
  1239. * ### Setting component outputs
  1240. *
  1241. * The following example shows two event emitters that emit on an interval. One
  1242. * emits an output every second, while the other emits every five seconds.
  1243. *
  1244. * {@example core/ts/metadata/directives.ts region='component-output-interval'}
  1245. *
  1246. * ### Injecting a class with a view provider
  1247. *
  1248. * The following simple example injects a class into a component
  1249. * using the view provider specified in component metadata:
  1250. *
  1251. * ```ts
  1252. * class Greeter {
  1253. * greet(name:string) {
  1254. * return 'Hello ' + name + '!';
  1255. * }
  1256. * }
  1257. *
  1258. * @Directive({
  1259. * selector: 'needs-greeter'
  1260. * })
  1261. * class NeedsGreeter {
  1262. * greeter:Greeter;
  1263. *
  1264. * constructor(greeter:Greeter) {
  1265. * this.greeter = greeter;
  1266. * }
  1267. * }
  1268. *
  1269. * @Component({
  1270. * selector: 'greet',
  1271. * viewProviders: [
  1272. * Greeter
  1273. * ],
  1274. * template: `<needs-greeter></needs-greeter>`
  1275. * })
  1276. * class HelloWorld {
  1277. * }
  1278. *
  1279. * ```
  1280. *
  1281. * ### Preserving whitespace
  1282. *
  1283. * Removing whitespace can greatly reduce AOT-generated code size and speed up view creation.
  1284. * As of Angular 6, the default for `preserveWhitespaces` is false (whitespace is removed).
  1285. * To change the default setting for all components in your application, set
  1286. * the `preserveWhitespaces` option of the AOT compiler.
  1287. *
  1288. * By default, the AOT compiler removes whitespace characters as follows:
  1289. * * Trims all whitespaces at the beginning and the end of a template.
  1290. * * Removes whitespace-only text nodes. For example,
  1291. *
  1292. * ```html
  1293. * <button>Action 1</button> <button>Action 2</button>
  1294. * ```
  1295. *
  1296. * becomes:
  1297. *
  1298. * ```html
  1299. * <button>Action 1</button><button>Action 2</button>
  1300. * ```
  1301. *
  1302. * * Replaces a series of whitespace characters in text nodes with a single space.
  1303. * For example, `<span>\n some text\n</span>` becomes `<span> some text </span>`.
  1304. * * Does NOT alter text nodes inside HTML tags such as `<pre>` or `<textarea>`,
  1305. * where whitespace characters are significant.
  1306. *
  1307. * Note that these transformations can influence DOM nodes layout, although impact
  1308. * should be minimal.
  1309. *
  1310. * You can override the default behavior to preserve whitespace characters
  1311. * in certain fragments of a template. For example, you can exclude an entire
  1312. * DOM sub-tree by using the `ngPreserveWhitespaces` attribute:
  1313. *
  1314. * ```html
  1315. * <div ngPreserveWhitespaces>
  1316. * whitespaces are preserved here
  1317. * <span> and here </span>
  1318. * </div>
  1319. * ```
  1320. *
  1321. * You can force a single space to be preserved in a text node by using `&ngsp;`,
  1322. * which is replaced with a space character by Angular's template
  1323. * compiler:
  1324. *
  1325. * ```html
  1326. * <a>Spaces</a>&ngsp;<a>between</a>&ngsp;<a>links.</a>
  1327. * <!-- compiled to be equivalent to:
  1328. * <a>Spaces</a> <a>between</a> <a>links.</a> -->
  1329. * ```
  1330. *
  1331. * Note that sequences of `&ngsp;` are still collapsed to just one space character when
  1332. * the `preserveWhitespaces` option is set to `false`.
  1333. *
  1334. * ```html
  1335. * <a>before</a>&ngsp;&ngsp;&ngsp;<a>after</a>
  1336. * <!-- compiled to be equivalent to:
  1337. * <a>before</a> <a>after</a> -->
  1338. * ```
  1339. *
  1340. * To preserve sequences of whitespace characters, use the
  1341. * `ngPreserveWhitespaces` attribute.
  1342. *
  1343. * @Annotation
  1344. */
  1345. (obj: Component): TypeDecorator;
  1346. /**
  1347. * See the `Component` decorator.
  1348. */
  1349. new (obj: Component): Component;
  1350. }
  1351. declare interface ComponentDefFeature {
  1352. <T>(componentDef: ɵComponentDef<T>): void;
  1353. /**
  1354. * Marks a feature as something that {@link InheritDefinitionFeature} will execute
  1355. * during inheritance.
  1356. *
  1357. * NOTE: DO NOT SET IN ROOT OF MODULE! Doing so will result in tree-shakers/bundlers
  1358. * identifying the change as a side effect, and the feature will be included in
  1359. * every bundle.
  1360. */
  1361. ngInherit?: true;
  1362. }
  1363. declare interface ComponentDefinition<T> extends Omit<DirectiveDefinition<T>, 'features'> {
  1364. /**
  1365. * The number of nodes, local refs, and pipes in this component template.
  1366. *
  1367. * Used to calculate the length of this component's LView array, so we
  1368. * can pre-fill the array and set the binding start index.
  1369. */
  1370. decls: number;
  1371. /**
  1372. * The number of bindings in this component template (including pure fn bindings).
  1373. *
  1374. * Used to calculate the length of this component's LView array, so we
  1375. * can pre-fill the array and set the host binding start index.
  1376. */
  1377. vars: number;
  1378. /**
  1379. * Template function use for rendering DOM.
  1380. *
  1381. * This function has following structure.
  1382. *
  1383. * ```
  1384. * function Template<T>(ctx:T, creationMode: boolean) {
  1385. * if (creationMode) {
  1386. * // Contains creation mode instructions.
  1387. * }
  1388. * // Contains binding update instructions
  1389. * }
  1390. * ```
  1391. *
  1392. * Common instructions are:
  1393. * Creation mode instructions:
  1394. * - `elementStart`, `elementEnd`
  1395. * - `text`
  1396. * - `container`
  1397. * - `listener`
  1398. *
  1399. * Binding update instructions:
  1400. * - `bind`
  1401. * - `elementAttribute`
  1402. * - `elementProperty`
  1403. * - `elementClass`
  1404. * - `elementStyle`
  1405. *
  1406. */
  1407. template: ComponentTemplate<T>;
  1408. /**
  1409. * Constants for the nodes in the component's view.
  1410. * Includes attribute arrays, local definition arrays etc.
  1411. */
  1412. consts?: TConstantsOrFactory;
  1413. /**
  1414. * An array of `ngContent[selector]` values that were found in the template.
  1415. */
  1416. ngContentSelectors?: string[];
  1417. /**
  1418. * A list of optional features to apply.
  1419. *
  1420. * See: {@link NgOnChangesFeature}, {@link ProvidersFeature}
  1421. */
  1422. features?: ComponentDefFeature[];
  1423. /**
  1424. * Defines template and style encapsulation options available for Component's {@link Component}.
  1425. */
  1426. encapsulation?: ViewEncapsulation;
  1427. /**
  1428. * Defines arbitrary developer-defined data to be stored on a renderer instance.
  1429. * This is useful for renderers that delegate to other renderers.
  1430. *
  1431. * see: animation
  1432. */
  1433. data?: {
  1434. [kind: string]: any;
  1435. };
  1436. /**
  1437. * A set of styles that the component needs to be present for component to render correctly.
  1438. */
  1439. styles?: string[];
  1440. /**
  1441. * The strategy that the default change detector uses to detect changes.
  1442. * When set, takes effect the next time change detection is triggered.
  1443. */
  1444. changeDetection?: ChangeDetectionStrategy;
  1445. /**
  1446. * Registry of directives, components, and pipes that may be found in this component's view.
  1447. *
  1448. * This property is either an array of types or a function that returns the array of types. This
  1449. * function may be necessary to support forward declarations.
  1450. */
  1451. dependencies?: TypeOrFactory<DependencyTypeList>;
  1452. /**
  1453. * The set of schemas that declare elements to be allowed in the component's template.
  1454. */
  1455. schemas?: SchemaMetadata[] | null;
  1456. }
  1457. /**
  1458. * Base class for a factory that can create a component dynamically.
  1459. * Instantiate a factory for a given type of component with `resolveComponentFactory()`.
  1460. * Use the resulting `ComponentFactory.create()` method to create a component of that type.
  1461. *
  1462. * @see [Dynamic Components](guide/dynamic-component-loader)
  1463. *
  1464. * @publicApi
  1465. *
  1466. * @deprecated Angular no longer requires Component factories. Please use other APIs where
  1467. * Component class can be used directly.
  1468. */
  1469. declare abstract class ComponentFactory<C> {
  1470. /**
  1471. * The component's HTML selector.
  1472. */
  1473. abstract get selector(): string;
  1474. /**
  1475. * The type of component the factory will create.
  1476. */
  1477. abstract get componentType(): Type<any>;
  1478. /**
  1479. * Selector for all <ng-content> elements in the component.
  1480. */
  1481. abstract get ngContentSelectors(): string[];
  1482. /**
  1483. * The inputs of the component.
  1484. */
  1485. abstract get inputs(): {
  1486. propName: string;
  1487. templateName: string;
  1488. transform?: (value: any) => any;
  1489. }[];
  1490. /**
  1491. * The outputs of the component.
  1492. */
  1493. abstract get outputs(): {
  1494. propName: string;
  1495. templateName: string;
  1496. }[];
  1497. /**
  1498. * Creates a new component.
  1499. */
  1500. abstract create(injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string | any, environmentInjector?: EnvironmentInjector | NgModuleRef<any>): ComponentRef<C>;
  1501. }
  1502. export { ComponentFactory }
  1503. export { ComponentFactory as ɵComponentFactory }
  1504. /**
  1505. * A simple registry that maps `Components` to generated `ComponentFactory` classes
  1506. * that can be used to create instances of components.
  1507. * Use to obtain the factory for a given component type,
  1508. * then use the factory's `create()` method to create a component of that type.
  1509. *
  1510. * Note: since v13, dynamic component creation via
  1511. * [`ViewContainerRef.createComponent`](api/core/ViewContainerRef#createComponent)
  1512. * does **not** require resolving component factory: component class can be used directly.
  1513. *
  1514. * @publicApi
  1515. *
  1516. * @deprecated Angular no longer requires Component factories. Please use other APIs where
  1517. * Component class can be used directly.
  1518. */
  1519. export declare abstract class ComponentFactoryResolver {
  1520. static NULL: ComponentFactoryResolver;
  1521. /**
  1522. * Retrieves the factory object that creates a component of the given type.
  1523. * @param component The component type.
  1524. */
  1525. abstract resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>;
  1526. }
  1527. declare class ComponentFactoryResolver_2 extends ComponentFactoryResolver {
  1528. private ngModule?;
  1529. /**
  1530. * @param ngModule The NgModuleRef to which all resolved factories are bound.
  1531. */
  1532. constructor(ngModule?: NgModuleRef<any> | undefined);
  1533. resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>;
  1534. }
  1535. /**
  1536. * An interface that describes the subset of component metadata
  1537. * that can be retrieved using the `reflectComponentType` function.
  1538. *
  1539. * @publicApi
  1540. */
  1541. export declare interface ComponentMirror<C> {
  1542. /**
  1543. * The component's HTML selector.
  1544. */
  1545. get selector(): string;
  1546. /**
  1547. * The type of component the factory will create.
  1548. */
  1549. get type(): Type<C>;
  1550. /**
  1551. * The inputs of the component.
  1552. */
  1553. get inputs(): ReadonlyArray<{
  1554. readonly propName: string;
  1555. readonly templateName: string;
  1556. readonly transform?: (value: any) => any;
  1557. }>;
  1558. /**
  1559. * The outputs of the component.
  1560. */
  1561. get outputs(): ReadonlyArray<{
  1562. readonly propName: string;
  1563. readonly templateName: string;
  1564. }>;
  1565. /**
  1566. * Selector for all <ng-content> elements in the component.
  1567. */
  1568. get ngContentSelectors(): ReadonlyArray<string>;
  1569. /**
  1570. * Whether this component is marked as standalone.
  1571. * Note: an extra flag, not present in `ComponentFactory`.
  1572. */
  1573. get isStandalone(): boolean;
  1574. }
  1575. /**
  1576. * Represents a component created by a `ComponentFactory`.
  1577. * Provides access to the component instance and related objects,
  1578. * and provides the means of destroying the instance.
  1579. *
  1580. * @publicApi
  1581. */
  1582. export declare abstract class ComponentRef<C> {
  1583. /**
  1584. * Updates a specified input name to a new value. Using this method will properly mark for check
  1585. * component using the `OnPush` change detection strategy. It will also assure that the
  1586. * `OnChanges` lifecycle hook runs when a dynamically created component is change-detected.
  1587. *
  1588. * @param name The name of an input.
  1589. * @param value The new value of an input.
  1590. */
  1591. abstract setInput(name: string, value: unknown): void;
  1592. /**
  1593. * The host or anchor [element](guide/glossary#element) for this component instance.
  1594. */
  1595. abstract get location(): ElementRef;
  1596. /**
  1597. * The [dependency injector](guide/glossary#injector) for this component instance.
  1598. */
  1599. abstract get injector(): Injector;
  1600. /**
  1601. * This component instance.
  1602. */
  1603. abstract get instance(): C;
  1604. /**
  1605. * The [host view](guide/glossary#view-hierarchy) defined by the template
  1606. * for this component instance.
  1607. */
  1608. abstract get hostView(): ViewRef;
  1609. /**
  1610. * The change detector for this component instance.
  1611. */
  1612. abstract get changeDetectorRef(): ChangeDetectorRef;
  1613. /**
  1614. * The type of this component (as created by a `ComponentFactory` class).
  1615. */
  1616. abstract get componentType(): Type<any>;
  1617. /**
  1618. * Destroys the component instance and all of the data structures associated with it.
  1619. */
  1620. abstract destroy(): void;
  1621. /**
  1622. * A lifecycle hook that provides additional developer-defined cleanup
  1623. * functionality for the component.
  1624. * @param callback A handler function that cleans up developer-defined data
  1625. * associated with this component. Called when the `destroy()` method is invoked.
  1626. */
  1627. abstract onDestroy(callback: Function): void;
  1628. }
  1629. /**
  1630. * Definition of what a template rendering function should look like for a component.
  1631. */
  1632. declare type ComponentTemplate<T> = {
  1633. <U extends T>(rf: ɵRenderFlags, ctx: T | U): void;
  1634. };
  1635. /**
  1636. * Create a computed `Signal` which derives a reactive value from an expression.
  1637. *
  1638. * @developerPreview
  1639. */
  1640. export declare function computed<T>(computation: () => T, options?: CreateComputedOptions<T>): Signal<T>;
  1641. /**
  1642. * Configures the `Injector` to return an instance of a token.
  1643. *
  1644. * @see ["Dependency Injection Guide"](guide/dependency-injection).
  1645. *
  1646. * @usageNotes
  1647. *
  1648. * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}
  1649. *
  1650. * ### Multi-value example
  1651. *
  1652. * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
  1653. *
  1654. * @publicApi
  1655. */
  1656. export declare interface ConstructorProvider extends ConstructorSansProvider {
  1657. /**
  1658. * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
  1659. */
  1660. provide: Type<any>;
  1661. /**
  1662. * When true, injector returns an array of instances. This is useful to allow multiple
  1663. * providers spread across many files to provide configuration information to a common token.
  1664. */
  1665. multi?: boolean;
  1666. }
  1667. /**
  1668. * Configures the `Injector` to return an instance of a token.
  1669. *
  1670. * @see ["Dependency Injection Guide"](guide/dependency-injection).
  1671. *
  1672. * @usageNotes
  1673. *
  1674. * ```ts
  1675. * @Injectable(SomeModule, {deps: []})
  1676. * class MyService {}
  1677. * ```
  1678. *
  1679. * @publicApi
  1680. */
  1681. export declare interface ConstructorSansProvider {
  1682. /**
  1683. * A list of `token`s to be resolved by the injector.
  1684. */
  1685. deps?: any[];
  1686. }
  1687. declare const CONTAINERS = "c";
  1688. /**
  1689. * Type of the ContentChild metadata.
  1690. *
  1691. * @publicApi
  1692. */
  1693. export declare type ContentChild = Query;
  1694. /**
  1695. * ContentChild decorator and metadata.
  1696. *
  1697. *
  1698. * @Annotation
  1699. *
  1700. * @publicApi
  1701. */
  1702. export declare const ContentChild: ContentChildDecorator;
  1703. /**
  1704. * Type of the ContentChild decorator / constructor function.
  1705. *
  1706. * @publicApi
  1707. */
  1708. export declare interface ContentChildDecorator {
  1709. /**
  1710. * @description
  1711. * Property decorator that configures a content query.
  1712. *
  1713. * Use to get the first element or the directive matching the selector from the content DOM.
  1714. * If the content DOM changes, and a new child matches the selector,
  1715. * the property will be updated.
  1716. *
  1717. * Content queries are set before the `ngAfterContentInit` callback is called.
  1718. *
  1719. * Does not retrieve elements or directives that are in other components' templates,
  1720. * since a component's template is always a black box to its ancestors.
  1721. *
  1722. * **Metadata Properties**:
  1723. *
  1724. * * **selector** - The directive type or the name used for querying.
  1725. * * **descendants** - If `true` (default) include all descendants of the element. If `false` then
  1726. * only query direct children of the element.
  1727. * * **read** - Used to read a different token from the queried element.
  1728. * * **static** - True to resolve query results before change detection runs,
  1729. * false to resolve after change detection. Defaults to false.
  1730. *
  1731. * The following selectors are supported.
  1732. * * Any class with the `@Component` or `@Directive` decorator
  1733. * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`
  1734. * with `@ContentChild('cmp')`)
  1735. * * Any provider defined in the child component tree of the current component (e.g.
  1736. * `@ContentChild(SomeService) someService: SomeService`)
  1737. * * Any provider defined through a string token (e.g. `@ContentChild('someToken') someTokenVal:
  1738. * any`)
  1739. * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ContentChild(TemplateRef)
  1740. * template;`)
  1741. *
  1742. * The following values are supported by `read`:
  1743. * * Any class with the `@Component` or `@Directive` decorator
  1744. * * Any provider defined on the injector of the component that is matched by the `selector` of
  1745. * this query
  1746. * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)
  1747. * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`
  1748. *
  1749. * @usageNotes
  1750. *
  1751. * {@example core/di/ts/contentChild/content_child_howto.ts region='HowTo'}
  1752. *
  1753. * ### Example
  1754. *
  1755. * {@example core/di/ts/contentChild/content_child_example.ts region='Component'}
  1756. *
  1757. * @Annotation
  1758. */
  1759. (selector: ProviderToken<unknown> | Function | string, opts?: {
  1760. descendants?: boolean;
  1761. read?: any;
  1762. static?: boolean;
  1763. }): any;
  1764. new (selector: ProviderToken<unknown> | Function | string, opts?: {
  1765. descendants?: boolean;
  1766. read?: any;
  1767. static?: boolean;
  1768. }): ContentChild;
  1769. }
  1770. /**
  1771. * Type of the ContentChildren metadata.
  1772. *
  1773. *
  1774. * @Annotation
  1775. * @publicApi
  1776. */
  1777. export declare type ContentChildren = Query;
  1778. /**
  1779. * ContentChildren decorator and metadata.
  1780. *
  1781. *
  1782. * @Annotation
  1783. * @publicApi
  1784. */
  1785. export declare const ContentChildren: ContentChildrenDecorator;
  1786. /**
  1787. * Type of the ContentChildren decorator / constructor function.
  1788. *
  1789. * @see {@link ContentChildren}
  1790. * @publicApi
  1791. */
  1792. export declare interface ContentChildrenDecorator {
  1793. /**
  1794. * @description
  1795. * Property decorator that configures a content query.
  1796. *
  1797. * Use to get the `QueryList` of elements or directives from the content DOM.
  1798. * Any time a child element is added, removed, or moved, the query list will be
  1799. * updated, and the changes observable of the query list will emit a new value.
  1800. *
  1801. * Content queries are set before the `ngAfterContentInit` callback is called.
  1802. *
  1803. * Does not retrieve elements or directives that are in other components' templates,
  1804. * since a component's template is always a black box to its ancestors.
  1805. *
  1806. * **Metadata Properties**:
  1807. *
  1808. * * **selector** - The directive type or the name used for querying.
  1809. * * **descendants** - If `true` include all descendants of the element. If `false` then only
  1810. * query direct children of the element.
  1811. * * **emitDistinctChangesOnly** - The ` QueryList#changes` observable will emit new values only
  1812. * if the QueryList result has changed. When `false` the `changes` observable might emit even
  1813. * if the QueryList has not changed.
  1814. * ** Note: *** This config option is **deprecated**, it will be permanently set to `true` and
  1815. * removed in future versions of Angular.
  1816. * * **read** - Used to read a different token from the queried elements.
  1817. *
  1818. * The following selectors are supported.
  1819. * * Any class with the `@Component` or `@Directive` decorator
  1820. * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`
  1821. * with `@ContentChildren('cmp')`)
  1822. * * Any provider defined in the child component tree of the current component (e.g.
  1823. * `@ContentChildren(SomeService) someService: SomeService`)
  1824. * * Any provider defined through a string token (e.g. `@ContentChildren('someToken')
  1825. * someTokenVal: any`)
  1826. * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with
  1827. * `@ContentChildren(TemplateRef) template;`)
  1828. *
  1829. * In addition, multiple string selectors can be separated with a comma (e.g.
  1830. * `@ContentChildren('cmp1,cmp2')`)
  1831. *
  1832. * The following values are supported by `read`:
  1833. * * Any class with the `@Component` or `@Directive` decorator
  1834. * * Any provider defined on the injector of the component that is matched by the `selector` of
  1835. * this query
  1836. * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)
  1837. * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`
  1838. *
  1839. * @usageNotes
  1840. *
  1841. * Here is a simple demonstration of how the `ContentChildren` decorator can be used.
  1842. *
  1843. * {@example core/di/ts/contentChildren/content_children_howto.ts region='HowTo'}
  1844. *
  1845. * ### Tab-pane example
  1846. *
  1847. * Here is a slightly more realistic example that shows how `ContentChildren` decorators
  1848. * can be used to implement a tab pane component.
  1849. *
  1850. * {@example core/di/ts/contentChildren/content_children_example.ts region='Component'}
  1851. *
  1852. * @Annotation
  1853. */
  1854. (selector: ProviderToken<unknown> | Function | string, opts?: {
  1855. descendants?: boolean;
  1856. emitDistinctChangesOnly?: boolean;
  1857. read?: any;
  1858. }): any;
  1859. new (selector: ProviderToken<unknown> | Function | string, opts?: {
  1860. descendants?: boolean;
  1861. emitDistinctChangesOnly?: boolean;
  1862. read?: any;
  1863. }): Query;
  1864. }
  1865. /**
  1866. * Definition of what a content queries function should look like.
  1867. */
  1868. declare type ContentQueriesFunction<T> = <U extends T>(rf: ɵRenderFlags, ctx: U, directiveIndex: number) => void;
  1869. declare const CONTEXT = 8;
  1870. /**
  1871. * Creates a `ComponentRef` instance based on provided component type and a set of options.
  1872. *
  1873. * @usageNotes
  1874. *
  1875. * The example below demonstrates how the `createComponent` function can be used
  1876. * to create an instance of a ComponentRef dynamically and attach it to an ApplicationRef,
  1877. * so that it gets included into change detection cycles.
  1878. *
  1879. * Note: the example uses standalone components, but the function can also be used for
  1880. * non-standalone components (declared in an NgModule) as well.
  1881. *
  1882. * ```typescript
  1883. * @Component({
  1884. * standalone: true,
  1885. * template: `Hello {{ name }}!`
  1886. * })
  1887. * class HelloComponent {
  1888. * name = 'Angular';
  1889. * }
  1890. *
  1891. * @Component({
  1892. * standalone: true,
  1893. * template: `<div id="hello-component-host"></div>`
  1894. * })
  1895. * class RootComponent {}
  1896. *
  1897. * // Bootstrap an application.
  1898. * const applicationRef = await bootstrapApplication(RootComponent);
  1899. *
  1900. * // Locate a DOM node that would be used as a host.
  1901. * const hostElement = document.getElementById('hello-component-host');
  1902. *
  1903. * // Get an `EnvironmentInjector` instance from the `ApplicationRef`.
  1904. * const environmentInjector = applicationRef.injector;
  1905. *
  1906. * // We can now create a `ComponentRef` instance.
  1907. * const componentRef = createComponent(HelloComponent, {hostElement, environmentInjector});
  1908. *
  1909. * // Last step is to register the newly created ref using the `ApplicationRef` instance
  1910. * // to include the component view into change detection cycles.
  1911. * applicationRef.attachView(componentRef.hostView);
  1912. * componentRef.changeDetectorRef.detectChanges();
  1913. * ```
  1914. *
  1915. * @param component Component class reference.
  1916. * @param options Set of options to use:
  1917. * * `environmentInjector`: An `EnvironmentInjector` instance to be used for the component, see
  1918. * additional info about it [here](/guide/standalone-components#environment-injectors).
  1919. * * `hostElement` (optional): A DOM node that should act as a host node for the component. If not
  1920. * provided, Angular creates one based on the tag name used in the component selector (and falls
  1921. * back to using `div` if selector doesn't have tag name info).
  1922. * * `elementInjector` (optional): An `ElementInjector` instance, see additional info about it
  1923. * [here](/guide/hierarchical-dependency-injection#elementinjector).
  1924. * * `projectableNodes` (optional): A list of DOM nodes that should be projected through
  1925. * [`<ng-content>`](api/core/ng-content) of the new component instance.
  1926. * @returns ComponentRef instance that represents a given Component.
  1927. *
  1928. * @publicApi
  1929. */
  1930. export declare function createComponent<C>(component: Type<C>, options: {
  1931. environmentInjector: EnvironmentInjector;
  1932. hostElement?: Element;
  1933. elementInjector?: Injector;
  1934. projectableNodes?: Node[][];
  1935. }): ComponentRef<C>;
  1936. /**
  1937. * Options passed to the `computed` creation function.
  1938. *
  1939. * @developerPreview
  1940. */
  1941. export declare interface CreateComputedOptions<T> {
  1942. /**
  1943. * A comparison function which defines equality for computed values.
  1944. */
  1945. equal?: ValueEqualityFn<T>;
  1946. }
  1947. /**
  1948. * Options passed to the `effect` function.
  1949. *
  1950. * @developerPreview
  1951. */
  1952. export declare interface CreateEffectOptions {
  1953. /**
  1954. * The `Injector` in which to create the effect.
  1955. *
  1956. * If this is not provided, the current [injection context](guide/dependency-injection-context)
  1957. * will be used instead (via `inject`).
  1958. */
  1959. injector?: Injector;
  1960. /**
  1961. * Whether the `effect` should require manual cleanup.
  1962. *
  1963. * If this is `false` (the default) the effect will automatically register itself to be cleaned up
  1964. * with the current `DestroyRef`.
  1965. */
  1966. manualCleanup?: boolean;
  1967. /**
  1968. * Whether the `effect` should allow writing to signals.
  1969. *
  1970. * Using effects to synchronize data by writing to signals can lead to confusing and potentially
  1971. * incorrect behavior, and should be enabled only when necessary.
  1972. */
  1973. allowSignalWrites?: boolean;
  1974. }
  1975. /**
  1976. * Create a new environment injector.
  1977. *
  1978. * Learn more about environment injectors in
  1979. * [this guide](guide/standalone-components#environment-injectors).
  1980. *
  1981. * @param providers An array of providers.
  1982. * @param parent A parent environment injector.
  1983. * @param debugName An optional name for this injector instance, which will be used in error
  1984. * messages.
  1985. *
  1986. * @publicApi
  1987. */
  1988. export declare function createEnvironmentInjector(providers: Array<Provider | EnvironmentProviders>, parent: EnvironmentInjector, debugName?: string | null): EnvironmentInjector;
  1989. /**
  1990. * Returns a new NgModuleRef instance based on the NgModule class and parent injector provided.
  1991. *
  1992. * @param ngModule NgModule class.
  1993. * @param parentInjector Optional injector instance to use as a parent for the module injector. If
  1994. * not provided, `NullInjector` will be used instead.
  1995. * @returns NgModuleRef that represents an NgModule instance.
  1996. *
  1997. * @publicApi
  1998. */
  1999. export declare function createNgModule<T>(ngModule: Type<T>, parentInjector?: Injector): NgModuleRef<T>;
  2000. /**
  2001. * The `createNgModule` function alias for backwards-compatibility.
  2002. * Please avoid using it directly and use `createNgModule` instead.
  2003. *
  2004. * @deprecated Use `createNgModule` instead.
  2005. */
  2006. export declare const createNgModuleRef: typeof createNgModule;
  2007. /**
  2008. * Creates a platform.
  2009. * Platforms must be created on launch using this function.
  2010. *
  2011. * @publicApi
  2012. */
  2013. export declare function createPlatform(injector: Injector): PlatformRef;
  2014. /**
  2015. * Creates a factory for a platform. Can be used to provide or override `Providers` specific to
  2016. * your application's runtime needs, such as `PLATFORM_INITIALIZER` and `PLATFORM_ID`.
  2017. * @param parentPlatformFactory Another platform factory to modify. Allows you to compose factories
  2018. * to build up configurations that might be required by different libraries or parts of the
  2019. * application.
  2020. * @param name Identifies the new platform factory.
  2021. * @param providers A set of dependency providers for platforms created with the new factory.
  2022. *
  2023. * @publicApi
  2024. */
  2025. export declare function createPlatformFactory(parentPlatformFactory: ((extraProviders?: StaticProvider[]) => PlatformRef) | null, name: string, providers?: StaticProvider[]): (extraProviders?: StaticProvider[]) => PlatformRef;
  2026. /**
  2027. * Options passed to the `signal` creation function.
  2028. *
  2029. * @developerPreview
  2030. */
  2031. export declare interface CreateSignalOptions<T> {
  2032. /**
  2033. * A comparison function which defines equality for signal values.
  2034. */
  2035. equal?: ValueEqualityFn<T>;
  2036. }
  2037. /**
  2038. * Token used to configure the [Content Security Policy](https://web.dev/strict-csp/) nonce that
  2039. * Angular will apply when inserting inline styles. If not provided, Angular will look up its value
  2040. * from the `ngCspNonce` attribute of the application root node.
  2041. *
  2042. * @publicApi
  2043. */
  2044. export declare const CSP_NONCE: InjectionToken<string | null>;
  2045. /**
  2046. * Expresses a single CSS Selector.
  2047. *
  2048. * Beginning of array
  2049. * - First index: element name
  2050. * - Subsequent odd indices: attr keys
  2051. * - Subsequent even indices: attr values
  2052. *
  2053. * After SelectorFlags.CLASS flag
  2054. * - Class name values
  2055. *
  2056. * SelectorFlags.NOT flag
  2057. * - Changes the mode to NOT
  2058. * - Can be combined with other flags to set the element / attr / class mode
  2059. *
  2060. * e.g. SelectorFlags.NOT | SelectorFlags.ELEMENT
  2061. *
  2062. * Example:
  2063. * Original: `div.foo.bar[attr1=val1][attr2]`
  2064. * Parsed: ['div', 'attr1', 'val1', 'attr2', '', SelectorFlags.CLASS, 'foo', 'bar']
  2065. *
  2066. * Original: 'div[attr1]:not(.foo[attr2])
  2067. * Parsed: [
  2068. * 'div', 'attr1', '',
  2069. * SelectorFlags.NOT | SelectorFlags.ATTRIBUTE 'attr2', '', SelectorFlags.CLASS, 'foo'
  2070. * ]
  2071. *
  2072. * See more examples in node_selector_matcher_spec.ts
  2073. */
  2074. declare type CssSelector = (string | SelectorFlags)[];
  2075. /**
  2076. * An object literal of this type is used to represent the metadata of a constructor dependency.
  2077. * The type itself is never referred to from generated code.
  2078. *
  2079. * @publicApi
  2080. */
  2081. declare type CtorDependency = {
  2082. /**
  2083. * If an `@Attribute` decorator is used, this represents the injected attribute's name. If the
  2084. * attribute name is a dynamic expression instead of a string literal, this will be the unknown
  2085. * type.
  2086. */
  2087. attribute?: string | unknown;
  2088. /**
  2089. * If `@Optional()` is used, this key is set to true.
  2090. */
  2091. optional?: true;
  2092. /**
  2093. * If `@Host` is used, this key is set to true.
  2094. */
  2095. host?: true;
  2096. /**
  2097. * If `@Self` is used, this key is set to true.
  2098. */
  2099. self?: true;
  2100. /**
  2101. * If `@SkipSelf` is used, this key is set to true.
  2102. */
  2103. skipSelf?: true;
  2104. } | null;
  2105. /**
  2106. * Defines a schema that allows an NgModule to contain the following:
  2107. * - Non-Angular elements named with dash case (`-`).
  2108. * - Element properties named with dash case (`-`).
  2109. * Dash case is the naming convention for custom elements.
  2110. *
  2111. * @publicApi
  2112. */
  2113. export declare const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata;
  2114. /**
  2115. * @publicApi
  2116. *
  2117. * @see [Component testing scenarios](guide/testing-components-scenarios)
  2118. * @see [Basics of testing components](guide/testing-components-basics)
  2119. * @see [Testing utility APIs](guide/testing-utility-apis)
  2120. */
  2121. export declare class DebugElement extends DebugNode {
  2122. constructor(nativeNode: Element);
  2123. /**
  2124. * The underlying DOM element at the root of the component.
  2125. */
  2126. get nativeElement(): any;
  2127. /**
  2128. * The element tag name, if it is an element.
  2129. */
  2130. get name(): string;
  2131. /**
  2132. * Gets a map of property names to property values for an element.
  2133. *
  2134. * This map includes:
  2135. * - Regular property bindings (e.g. `[id]="id"`)
  2136. * - Host property bindings (e.g. `host: { '[id]': "id" }`)
  2137. * - Interpolated property bindings (e.g. `id="{{ value }}")
  2138. *
  2139. * It does not include:
  2140. * - input property bindings (e.g. `[myCustomInput]="value"`)
  2141. * - attribute bindings (e.g. `[attr.role]="menu"`)
  2142. */
  2143. get properties(): {
  2144. [key: string]: any;
  2145. };
  2146. /**
  2147. * A map of attribute names to attribute values for an element.
  2148. */
  2149. get attributes(): {
  2150. [key: string]: string | null;
  2151. };
  2152. /**
  2153. * The inline styles of the DOM element.
  2154. *
  2155. * Will be `null` if there is no `style` property on the underlying DOM element.
  2156. *
  2157. * @see [ElementCSSInlineStyle](https://developer.mozilla.org/en-US/docs/Web/API/ElementCSSInlineStyle/style)
  2158. */
  2159. get styles(): {
  2160. [key: string]: string | null;
  2161. };
  2162. /**
  2163. * A map containing the class names on the element as keys.
  2164. *
  2165. * This map is derived from the `className` property of the DOM element.
  2166. *
  2167. * Note: The values of this object will always be `true`. The class key will not appear in the KV
  2168. * object if it does not exist on the element.
  2169. *
  2170. * @see [Element.className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className)
  2171. */
  2172. get classes(): {
  2173. [key: string]: boolean;
  2174. };
  2175. /**
  2176. * The `childNodes` of the DOM element as a `DebugNode` array.
  2177. *
  2178. * @see [Node.childNodes](https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes)
  2179. */
  2180. get childNodes(): DebugNode[];
  2181. /**
  2182. * The immediate `DebugElement` children. Walk the tree by descending through `children`.
  2183. */
  2184. get children(): DebugElement[];
  2185. /**
  2186. * @returns the first `DebugElement` that matches the predicate at any depth in the subtree.
  2187. */
  2188. query(predicate: Predicate<DebugElement>): DebugElement;
  2189. /**
  2190. * @returns All `DebugElement` matches for the predicate at any depth in the subtree.
  2191. */
  2192. queryAll(predicate: Predicate<DebugElement>): DebugElement[];
  2193. /**
  2194. * @returns All `DebugNode` matches for the predicate at any depth in the subtree.
  2195. */
  2196. queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[];
  2197. /**
  2198. * Triggers the event by its name if there is a corresponding listener in the element's
  2199. * `listeners` collection.
  2200. *
  2201. * If the event lacks a listener or there's some other problem, consider
  2202. * calling `nativeElement.dispatchEvent(eventObject)`.
  2203. *
  2204. * @param eventName The name of the event to trigger
  2205. * @param eventObj The _event object_ expected by the handler
  2206. *
  2207. * @see [Testing components scenarios](guide/testing-components-scenarios#trigger-event-handler)
  2208. */
  2209. triggerEventHandler(eventName: string, eventObj?: any): void;
  2210. }
  2211. /**
  2212. * @publicApi
  2213. */
  2214. export declare class DebugEventListener {
  2215. name: string;
  2216. callback: Function;
  2217. constructor(name: string, callback: Function);
  2218. }
  2219. /**
  2220. * @publicApi
  2221. */
  2222. export declare class DebugNode {
  2223. /**
  2224. * The underlying DOM node.
  2225. */
  2226. readonly nativeNode: any;
  2227. constructor(nativeNode: Node);
  2228. /**
  2229. * The `DebugElement` parent. Will be `null` if this is the root element.
  2230. */
  2231. get parent(): DebugElement | null;
  2232. /**
  2233. * The host dependency injector. For example, the root element's component instance injector.
  2234. */
  2235. get injector(): Injector;
  2236. /**
  2237. * The element's own component instance, if it has one.
  2238. */
  2239. get componentInstance(): any;
  2240. /**
  2241. * An object that provides parent context for this element. Often an ancestor component instance
  2242. * that governs this element.
  2243. *
  2244. * When an element is repeated within *ngFor, the context is an `NgForOf` whose `$implicit`
  2245. * property is the value of the row instance value. For example, the `hero` in `*ngFor="let hero
  2246. * of heroes"`.
  2247. */
  2248. get context(): any;
  2249. /**
  2250. * The callbacks attached to the component's @Output properties and/or the element's event
  2251. * properties.
  2252. */
  2253. get listeners(): DebugEventListener[];
  2254. /**
  2255. * Dictionary of objects associated with template local variables (e.g. #foo), keyed by the local
  2256. * variable name.
  2257. */
  2258. get references(): {
  2259. [key: string]: any;
  2260. };
  2261. /**
  2262. * This component's injector lookup tokens. Includes the component itself plus the tokens that the
  2263. * component lists in its providers metadata.
  2264. */
  2265. get providerTokens(): any[];
  2266. }
  2267. declare const DECLARATION_COMPONENT_VIEW = 15;
  2268. declare const DECLARATION_LCONTAINER = 16;
  2269. declare const DECLARATION_VIEW = 14;
  2270. /**
  2271. * Provide this token to set the default currency code your application uses for
  2272. * CurrencyPipe when there is no currency code passed into it. This is only used by
  2273. * CurrencyPipe and has no relation to locale currency. Defaults to USD if not configured.
  2274. *
  2275. * See the [i18n guide](guide/i18n-common-locale-id) for more information.
  2276. *
  2277. * <div class="alert is-helpful">
  2278. *
  2279. * **Deprecation notice:**
  2280. *
  2281. * The default currency code is currently always `USD` but this is deprecated from v9.
  2282. *
  2283. * **In v10 the default currency code will be taken from the current locale.**
  2284. *
  2285. * If you need the previous behavior then set it by creating a `DEFAULT_CURRENCY_CODE` provider in
  2286. * your application `NgModule`:
  2287. *
  2288. * ```ts
  2289. * {provide: DEFAULT_CURRENCY_CODE, useValue: 'USD'}
  2290. * ```
  2291. *
  2292. * </div>
  2293. *
  2294. * @usageNotes
  2295. * ### Example
  2296. *
  2297. * ```typescript
  2298. * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
  2299. * import { AppModule } from './app/app.module';
  2300. *
  2301. * platformBrowserDynamic().bootstrapModule(AppModule, {
  2302. * providers: [{provide: DEFAULT_CURRENCY_CODE, useValue: 'EUR' }]
  2303. * });
  2304. * ```
  2305. *
  2306. * @publicApi
  2307. */
  2308. export declare const DEFAULT_CURRENCY_CODE: InjectionToken<string>;
  2309. /**
  2310. * @deprecated v4.0.0 - Should not be part of public API.
  2311. * @publicApi
  2312. */
  2313. export declare class DefaultIterableDiffer<V> implements IterableDiffer<V>, IterableChanges<V> {
  2314. readonly length: number;
  2315. readonly collection: V[] | Iterable<V> | null;
  2316. private _linkedRecords;
  2317. private _unlinkedRecords;
  2318. private _previousItHead;
  2319. private _itHead;
  2320. private _itTail;
  2321. private _additionsHead;
  2322. private _additionsTail;
  2323. private _movesHead;
  2324. private _movesTail;
  2325. private _removalsHead;
  2326. private _removalsTail;
  2327. private _identityChangesHead;
  2328. private _identityChangesTail;
  2329. private _trackByFn;
  2330. constructor(trackByFn?: TrackByFunction<V>);
  2331. forEachItem(fn: (record: IterableChangeRecord_<V>) => void): void;
  2332. forEachOperation(fn: (item: IterableChangeRecord<V>, previousIndex: number | null, currentIndex: number | null) => void): void;
  2333. forEachPreviousItem(fn: (record: IterableChangeRecord_<V>) => void): void;
  2334. forEachAddedItem(fn: (record: IterableChangeRecord_<V>) => void): void;
  2335. forEachMovedItem(fn: (record: IterableChangeRecord_<V>) => void): void;
  2336. forEachRemovedItem(fn: (record: IterableChangeRecord_<V>) => void): void;
  2337. forEachIdentityChange(fn: (record: IterableChangeRecord_<V>) => void): void;
  2338. diff(collection: NgIterable<V> | null | undefined): DefaultIterableDiffer<V> | null;
  2339. onDestroy(): void;
  2340. check(collection: NgIterable<V>): boolean;
  2341. get isDirty(): boolean;
  2342. private _addToRemovals;
  2343. }
  2344. declare type DeferredDepsFn = () => Array<Promise<Type<unknown>> | Type<unknown>>;
  2345. /**
  2346. * @deprecated in v8, delete after v10. This API should be used only by generated code, and that
  2347. * code should now use ɵɵdefineInjectable instead.
  2348. * @publicApi
  2349. */
  2350. export declare const defineInjectable: typeof ɵɵdefineInjectable;
  2351. declare const DEHYDRATED_VIEWS = 10;
  2352. /**
  2353. * An object that contains hydration-related information serialized
  2354. * on the server, as well as the necessary references to segments of
  2355. * the DOM, to facilitate the hydration process for a given view
  2356. * inside a view container (either an embedded view or a view created
  2357. * for a component).
  2358. */
  2359. declare interface DehydratedContainerView extends DehydratedView {
  2360. data: Readonly<SerializedContainerView>;
  2361. }
  2362. /**
  2363. * An object that contains hydration-related information serialized
  2364. * on the server, as well as the necessary references to segments of
  2365. * the DOM, to facilitate the hydration process for a given hydration
  2366. * boundary on the client.
  2367. */
  2368. declare interface DehydratedView {
  2369. /**
  2370. * The readonly hydration annotation data.
  2371. */
  2372. data: Readonly<SerializedView>;
  2373. /**
  2374. * A reference to the first child in a DOM segment associated
  2375. * with a given hydration boundary.
  2376. */
  2377. firstChild: RNode | null;
  2378. /**
  2379. * Stores references to first nodes in DOM segments that
  2380. * represent either an <ng-container> or a view container.
  2381. */
  2382. segmentHeads?: {
  2383. [index: number]: RNode | null;
  2384. };
  2385. /**
  2386. * An instance of a Set that represents nodes disconnected from
  2387. * the DOM tree at the serialization time, but otherwise present
  2388. * in the internal data structures.
  2389. *
  2390. * The Set is based on the `SerializedView[DISCONNECTED_NODES]` data
  2391. * and is needed to have constant-time lookups.
  2392. *
  2393. * If the value is `null`, it means that there were no disconnected
  2394. * nodes detected in this view at serialization time.
  2395. */
  2396. disconnectedNodes?: Set<number> | null;
  2397. }
  2398. declare type DependencyTypeList = (ɵDirectiveType<any> | ɵComponentType<any> | PipeType<any> | Type<any>)[];
  2399. declare const DESCENDANT_VIEWS_TO_REFRESH = 5;
  2400. /**
  2401. * Array of destroy hooks that should be executed for a view and their directive indices.
  2402. *
  2403. * The array is set up as a series of number/function or number/(number|function)[]:
  2404. * - Even indices represent the context with which hooks should be called.
  2405. * - Odd indices are the hook functions themselves. If a value at an odd index is an array,
  2406. * it represents the destroy hooks of a `multi` provider where:
  2407. * - Even indices represent the index of the provider for which we've registered a destroy hook,
  2408. * inside of the `multi` provider array.
  2409. * - Odd indices are the destroy hook functions.
  2410. * For example:
  2411. * LView: `[0, 1, 2, AService, 4, [BService, CService, DService]]`
  2412. * destroyHooks: `[3, AService.ngOnDestroy, 5, [0, BService.ngOnDestroy, 2, DService.ngOnDestroy]]`
  2413. *
  2414. * In the example above `AService` is a type provider with an `ngOnDestroy`, whereas `BService`,
  2415. * `CService` and `DService` are part of a `multi` provider where only `BService` and `DService`
  2416. * have an `ngOnDestroy` hook.
  2417. */
  2418. declare type DestroyHookData = (HookEntry | HookData)[];
  2419. /**
  2420. * Destroys the current Angular platform and all Angular applications on the page.
  2421. * Destroys all modules and listeners registered with the platform.
  2422. *
  2423. * @publicApi
  2424. */
  2425. export declare function destroyPlatform(): void;
  2426. /**
  2427. * `DestroyRef` lets you set callbacks to run for any cleanup or destruction behavior.
  2428. * The scope of this destruction depends on where `DestroyRef` is injected. If `DestroyRef`
  2429. * is injected in a component or directive, the callbacks run when that component or
  2430. * directive is destroyed. Otherwise the callbacks run when a corresponding injector is destroyed.
  2431. *
  2432. * @publicApi
  2433. */
  2434. export declare abstract class DestroyRef {
  2435. /**
  2436. * Registers a destroy callback in a given lifecycle scope. Returns a cleanup function that can
  2437. * be invoked to unregister the callback.
  2438. *
  2439. * @usageNotes
  2440. * ### Example
  2441. * ```typescript
  2442. * const destroyRef = inject(DestroyRef);
  2443. *
  2444. * // register a destroy callback
  2445. * const unregisterFn = destroyRef.onDestroy(() => doSomethingOnDestroy());
  2446. *
  2447. * // stop the destroy callback from executing if needed
  2448. * unregisterFn();
  2449. * ```
  2450. */
  2451. abstract onDestroy(callback: () => void): () => void;
  2452. }
  2453. /**
  2454. * Directive decorator and metadata.
  2455. *
  2456. * @Annotation
  2457. * @publicApi
  2458. */
  2459. export declare interface Directive {
  2460. /**
  2461. * The CSS selector that identifies this directive in a template
  2462. * and triggers instantiation of the directive.
  2463. *
  2464. * Declare as one of the following:
  2465. *
  2466. * - `element-name`: Select by element name.
  2467. * - `.class`: Select by class name.
  2468. * - `[attribute]`: Select by attribute name.
  2469. * - `[attribute=value]`: Select by attribute name and value.
  2470. * - `:not(sub_selector)`: Select only if the element does not match the `sub_selector`.
  2471. * - `selector1, selector2`: Select if either `selector1` or `selector2` matches.
  2472. *
  2473. * Angular only allows directives to apply on CSS selectors that do not cross
  2474. * element boundaries.
  2475. *
  2476. * For the following template HTML, a directive with an `input[type=text]` selector,
  2477. * would be instantiated only on the `<input type="text">` element.
  2478. *
  2479. * ```html
  2480. * <form>
  2481. * <input type="text">
  2482. * <input type="radio">
  2483. * <form>
  2484. * ```
  2485. *
  2486. */
  2487. selector?: string;
  2488. /**
  2489. * Enumerates the set of data-bound input properties for a directive
  2490. *
  2491. * Angular automatically updates input properties during change detection.
  2492. * The `inputs` property accepts either strings or object literals that configure the directive
  2493. * properties that should be exposed as inputs.
  2494. *
  2495. * When an object literal is passed in, the `name` property indicates which property on the
  2496. * class the input should write to, while the `alias` determines the name under
  2497. * which the input will be available in template bindings. The `required` property indicates that
  2498. * the input is required which will trigger a compile-time error if it isn't passed in when the
  2499. * directive is used.
  2500. *
  2501. * When a string is passed into the `inputs` array, it can have a format of `'name'` or
  2502. * `'name: alias'` where `name` is the property on the class that the directive should write
  2503. * to, while the `alias` determines the name under which the input will be available in
  2504. * template bindings. String-based input definitions are assumed to be optional.
  2505. *
  2506. * @usageNotes
  2507. *
  2508. * The following example creates a component with two data-bound properties.
  2509. *
  2510. * ```typescript
  2511. * @Component({
  2512. * selector: 'bank-account',
  2513. * inputs: ['bankName', {name: 'id', alias: 'account-id'}],
  2514. * template: `
  2515. * Bank Name: {{bankName}}
  2516. * Account Id: {{id}}
  2517. * `
  2518. * })
  2519. * class BankAccount {
  2520. * bankName: string;
  2521. * id: string;
  2522. * }
  2523. * ```
  2524. *
  2525. */
  2526. inputs?: ({
  2527. name: string;
  2528. alias?: string;
  2529. required?: boolean;
  2530. transform?: (value: any) => any;
  2531. } | string)[];
  2532. /**
  2533. * Enumerates the set of event-bound output properties.
  2534. *
  2535. * When an output property emits an event, an event handler attached to that event
  2536. * in the template is invoked.
  2537. *
  2538. * The `outputs` property defines a set of `directiveProperty` to `alias`
  2539. * configuration:
  2540. *
  2541. * - `directiveProperty` specifies the component property that emits events.
  2542. * - `alias` specifies the DOM property the event handler is attached to.
  2543. *
  2544. * @usageNotes
  2545. *
  2546. * ```typescript
  2547. * @Component({
  2548. * selector: 'child-dir',
  2549. * outputs: [ 'bankNameChange' ],
  2550. * template: `<input (input)="bankNameChange.emit($event.target.value)" />`
  2551. * })
  2552. * class ChildDir {
  2553. * bankNameChange: EventEmitter<string> = new EventEmitter<string>();
  2554. * }
  2555. *
  2556. * @Component({
  2557. * selector: 'main',
  2558. * template: `
  2559. * {{ bankName }} <child-dir (bankNameChange)="onBankNameChange($event)"></child-dir>
  2560. * `
  2561. * })
  2562. * class MainComponent {
  2563. * bankName: string;
  2564. *
  2565. * onBankNameChange(bankName: string) {
  2566. * this.bankName = bankName;
  2567. * }
  2568. * }
  2569. * ```
  2570. *
  2571. */
  2572. outputs?: string[];
  2573. /**
  2574. * Configures the [injector](guide/glossary#injector) of this
  2575. * directive or component with a [token](guide/glossary#di-token)
  2576. * that maps to a [provider](guide/glossary#provider) of a dependency.
  2577. */
  2578. providers?: Provider[];
  2579. /**
  2580. * Defines the name that can be used in the template to assign this directive to a variable.
  2581. *
  2582. * @usageNotes
  2583. *
  2584. * ```ts
  2585. * @Directive({
  2586. * selector: 'child-dir',
  2587. * exportAs: 'child'
  2588. * })
  2589. * class ChildDir {
  2590. * }
  2591. *
  2592. * @Component({
  2593. * selector: 'main',
  2594. * template: `<child-dir #c="child"></child-dir>`
  2595. * })
  2596. * class MainComponent {
  2597. * }
  2598. * ```
  2599. *
  2600. */
  2601. exportAs?: string;
  2602. /**
  2603. * Configures the queries that will be injected into the directive.
  2604. *
  2605. * Content queries are set before the `ngAfterContentInit` callback is called.
  2606. * View queries are set before the `ngAfterViewInit` callback is called.
  2607. *
  2608. * @usageNotes
  2609. *
  2610. * The following example shows how queries are defined
  2611. * and when their results are available in lifecycle hooks:
  2612. *
  2613. * ```ts
  2614. * @Component({
  2615. * selector: 'someDir',
  2616. * queries: {
  2617. * contentChildren: new ContentChildren(ChildDirective),
  2618. * viewChildren: new ViewChildren(ChildDirective)
  2619. * },
  2620. * template: '<child-directive></child-directive>'
  2621. * })
  2622. * class SomeDir {
  2623. * contentChildren: QueryList<ChildDirective>,
  2624. * viewChildren: QueryList<ChildDirective>
  2625. *
  2626. * ngAfterContentInit() {
  2627. * // contentChildren is set
  2628. * }
  2629. *
  2630. * ngAfterViewInit() {
  2631. * // viewChildren is set
  2632. * }
  2633. * }
  2634. * ```
  2635. *
  2636. * @Annotation
  2637. */
  2638. queries?: {
  2639. [key: string]: any;
  2640. };
  2641. /**
  2642. * Maps class properties to host element bindings for properties,
  2643. * attributes, and events, using a set of key-value pairs.
  2644. *
  2645. * Angular automatically checks host property bindings during change detection.
  2646. * If a binding changes, Angular updates the directive's host element.
  2647. *
  2648. * When the key is a property of the host element, the property value is
  2649. * propagated to the specified DOM property.
  2650. *
  2651. * When the key is a static attribute in the DOM, the attribute value
  2652. * is propagated to the specified property in the host element.
  2653. *
  2654. * For event handling:
  2655. * - The key is the DOM event that the directive listens to.
  2656. * To listen to global events, add the target to the event name.
  2657. * The target can be `window`, `document` or `body`.
  2658. * - The value is the statement to execute when the event occurs. If the
  2659. * statement evaluates to `false`, then `preventDefault` is applied on the DOM
  2660. * event. A handler method can refer to the `$event` local variable.
  2661. *
  2662. */
  2663. host?: {
  2664. [key: string]: string;
  2665. };
  2666. /**
  2667. * When present, this directive/component is ignored by the AOT compiler.
  2668. * It remains in distributed code, and the JIT compiler attempts to compile it
  2669. * at run time, in the browser.
  2670. * To ensure the correct behavior, the app must import `@angular/compiler`.
  2671. */
  2672. jit?: true;
  2673. /**
  2674. * Angular directives marked as `standalone` do not need to be declared in an NgModule. Such
  2675. * directives don't depend on any "intermediate context" of an NgModule (ex. configured
  2676. * providers).
  2677. *
  2678. * More information about standalone components, directives, and pipes can be found in [this
  2679. * guide](guide/standalone-components).
  2680. */
  2681. standalone?: boolean;
  2682. /**
  2683. * Standalone directives that should be applied to the host whenever the directive is matched.
  2684. * By default, none of the inputs or outputs of the host directives will be available on the host,
  2685. * unless they are specified in the `inputs` or `outputs` properties.
  2686. *
  2687. * You can additionally alias inputs and outputs by putting a colon and the alias after the
  2688. * original input or output name. For example, if a directive applied via `hostDirectives`
  2689. * defines an input named `menuDisabled`, you can alias this to `disabled` by adding
  2690. * `'menuDisabled: disabled'` as an entry to `inputs`.
  2691. */
  2692. hostDirectives?: (Type<unknown> | {
  2693. directive: Type<unknown>;
  2694. inputs?: string[];
  2695. outputs?: string[];
  2696. })[];
  2697. }
  2698. /**
  2699. * Type of the Directive metadata.
  2700. *
  2701. * @publicApi
  2702. */
  2703. export declare const Directive: DirectiveDecorator;
  2704. /**
  2705. * Type of the Directive decorator / constructor function.
  2706. * @publicApi
  2707. */
  2708. export declare interface DirectiveDecorator {
  2709. /**
  2710. * Decorator that marks a class as an Angular directive.
  2711. * You can define your own directives to attach custom behavior to elements in the DOM.
  2712. *
  2713. * The options provide configuration metadata that determines
  2714. * how the directive should be processed, instantiated and used at
  2715. * runtime.
  2716. *
  2717. * Directive classes, like component classes, can implement
  2718. * [life-cycle hooks](guide/lifecycle-hooks) to influence their configuration and behavior.
  2719. *
  2720. *
  2721. * @usageNotes
  2722. * To define a directive, mark the class with the decorator and provide metadata.
  2723. *
  2724. * ```ts
  2725. * import {Directive} from '@angular/core';
  2726. *
  2727. * @Directive({
  2728. * selector: 'my-directive',
  2729. * })
  2730. * export class MyDirective {
  2731. * ...
  2732. * }
  2733. * ```
  2734. *
  2735. * ### Declaring directives
  2736. *
  2737. * In order to make a directive available to other components in your application, you should do
  2738. * one of the following:
  2739. * - either mark the directive as [standalone](guide/standalone-components),
  2740. * - or declare it in an NgModule by adding it to the `declarations` and `exports` fields.
  2741. *
  2742. * ** Marking a directive as standalone **
  2743. *
  2744. * You can add the `standalone: true` flag to the Directive decorator metadata to declare it as
  2745. * [standalone](guide/standalone-components):
  2746. *
  2747. * ```ts
  2748. * @Directive({
  2749. * standalone: true,
  2750. * selector: 'my-directive',
  2751. * })
  2752. * class MyDirective {}
  2753. * ```
  2754. *
  2755. * When marking a directive as standalone, please make sure that the directive is not already
  2756. * declared in an NgModule.
  2757. *
  2758. *
  2759. * ** Declaring a directive in an NgModule **
  2760. *
  2761. * Another approach is to declare a directive in an NgModule:
  2762. *
  2763. * ```ts
  2764. * @Directive({
  2765. * selector: 'my-directive',
  2766. * })
  2767. * class MyDirective {}
  2768. *
  2769. * @NgModule({
  2770. * declarations: [MyDirective, SomeComponent],
  2771. * exports: [MyDirective], // making it available outside of this module
  2772. * })
  2773. * class SomeNgModule {}
  2774. * ```
  2775. *
  2776. * When declaring a directive in an NgModule, please make sure that:
  2777. * - the directive is declared in exactly one NgModule.
  2778. * - the directive is not standalone.
  2779. * - you do not re-declare a directive imported from another module.
  2780. * - the directive is included into the `exports` field as well if you want this directive to be
  2781. * accessible for components outside of the NgModule.
  2782. *
  2783. *
  2784. * @Annotation
  2785. */
  2786. (obj?: Directive): TypeDecorator;
  2787. /**
  2788. * See the `Directive` decorator.
  2789. */
  2790. new (obj?: Directive): Directive;
  2791. }
  2792. declare interface DirectiveDefFeature {
  2793. <T>(directiveDef: ɵDirectiveDef<T>): void;
  2794. /**
  2795. * Marks a feature as something that {@link InheritDefinitionFeature} will execute
  2796. * during inheritance.
  2797. *
  2798. * NOTE: DO NOT SET IN ROOT OF MODULE! Doing so will result in tree-shakers/bundlers
  2799. * identifying the change as a side effect, and the feature will be included in
  2800. * every bundle.
  2801. */
  2802. ngInherit?: true;
  2803. }
  2804. declare interface DirectiveDefinition<T> {
  2805. /**
  2806. * Directive type, needed to configure the injector.
  2807. */
  2808. type: Type<T>;
  2809. /** The selectors that will be used to match nodes to this directive. */
  2810. selectors?: ɵCssSelectorList;
  2811. /**
  2812. * A map of input names.
  2813. *
  2814. * The format is in: `{[actualPropertyName: string]:(string|[string, string, Function])}`.
  2815. *
  2816. * Given:
  2817. * ```
  2818. * class MyComponent {
  2819. * @Input()
  2820. * publicInput1: string;
  2821. *
  2822. * @Input('publicInput2')
  2823. * declaredInput2: string;
  2824. *
  2825. * @Input({transform: (value: boolean) => value ? 1 : 0})
  2826. * transformedInput3: number;
  2827. * }
  2828. * ```
  2829. *
  2830. * is described as:
  2831. * ```
  2832. * {
  2833. * publicInput1: 'publicInput1',
  2834. * declaredInput2: ['declaredInput2', 'publicInput2'],
  2835. * transformedInput3: [
  2836. * 'transformedInput3',
  2837. * 'transformedInput3',
  2838. * (value: boolean) => value ? 1 : 0
  2839. * ]
  2840. * }
  2841. * ```
  2842. *
  2843. * Which the minifier may translate to:
  2844. * ```
  2845. * {
  2846. * minifiedPublicInput1: 'publicInput1',
  2847. * minifiedDeclaredInput2: [ 'publicInput2', 'declaredInput2'],
  2848. * minifiedTransformedInput3: [
  2849. * 'transformedInput3',
  2850. * 'transformedInput3',
  2851. * (value: boolean) => value ? 1 : 0
  2852. * ]
  2853. * }
  2854. * ```
  2855. *
  2856. * This allows the render to re-construct the minified, public, and declared names
  2857. * of properties.
  2858. *
  2859. * NOTE:
  2860. * - Because declared and public name are usually same we only generate the array
  2861. * `['declared', 'public']` format when they differ.
  2862. * - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has
  2863. * inconsistent behavior in that it uses declared names rather than minified or public. For
  2864. * this reason `NgOnChanges` will be deprecated and removed in future version and this
  2865. * API will be simplified to be consistent with `output`.
  2866. */
  2867. inputs?: {
  2868. [P in keyof T]?: string | [string, string, InputTransformFunction?];
  2869. };
  2870. /**
  2871. * A map of output names.
  2872. *
  2873. * The format is in: `{[actualPropertyName: string]:string}`.
  2874. *
  2875. * Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.
  2876. *
  2877. * This allows the render to re-construct the minified and non-minified names
  2878. * of properties.
  2879. */
  2880. outputs?: {
  2881. [P in keyof T]?: string;
  2882. };
  2883. /**
  2884. * A list of optional features to apply.
  2885. *
  2886. * See: {@link NgOnChangesFeature}, {@link ProvidersFeature}, {@link InheritDefinitionFeature}
  2887. */
  2888. features?: DirectiveDefFeature[];
  2889. /**
  2890. * Function executed by the parent template to allow child directive to apply host bindings.
  2891. */
  2892. hostBindings?: HostBindingsFunction<T>;
  2893. /**
  2894. * The number of bindings in this directive `hostBindings` (including pure fn bindings).
  2895. *
  2896. * Used to calculate the length of the component's LView array, so we
  2897. * can pre-fill the array and set the host binding start index.
  2898. */
  2899. hostVars?: number;
  2900. /**
  2901. * Assign static attribute values to a host element.
  2902. *
  2903. * This property will assign static attribute values as well as class and style
  2904. * values to a host element. Since attribute values can consist of different types of values,
  2905. * the `hostAttrs` array must include the values in the following format:
  2906. *
  2907. * attrs = [
  2908. * // static attributes (like `title`, `name`, `id`...)
  2909. * attr1, value1, attr2, value,
  2910. *
  2911. * // a single namespace value (like `x:id`)
  2912. * NAMESPACE_MARKER, namespaceUri1, name1, value1,
  2913. *
  2914. * // another single namespace value (like `x:name`)
  2915. * NAMESPACE_MARKER, namespaceUri2, name2, value2,
  2916. *
  2917. * // a series of CSS classes that will be applied to the element (no spaces)
  2918. * CLASSES_MARKER, class1, class2, class3,
  2919. *
  2920. * // a series of CSS styles (property + value) that will be applied to the element
  2921. * STYLES_MARKER, prop1, value1, prop2, value2
  2922. * ]
  2923. *
  2924. * All non-class and non-style attributes must be defined at the start of the list
  2925. * first before all class and style values are set. When there is a change in value
  2926. * type (like when classes and styles are introduced) a marker must be used to separate
  2927. * the entries. The marker values themselves are set via entries found in the
  2928. * [AttributeMarker] enum.
  2929. */
  2930. hostAttrs?: TAttributes;
  2931. /**
  2932. * Function to create instances of content queries associated with a given directive.
  2933. */
  2934. contentQueries?: ContentQueriesFunction<T>;
  2935. /**
  2936. * Additional set of instructions specific to view query processing. This could be seen as a
  2937. * set of instructions to be inserted into the template function.
  2938. */
  2939. viewQuery?: ViewQueriesFunction<T> | null;
  2940. /**
  2941. * Defines the name that can be used in the template to assign this directive to a variable.
  2942. *
  2943. * See: {@link Directive.exportAs}
  2944. */
  2945. exportAs?: string[];
  2946. /**
  2947. * Whether this directive/component is standalone.
  2948. */
  2949. standalone?: boolean;
  2950. /**
  2951. * Whether this directive/component is signal-based.
  2952. */
  2953. signals?: boolean;
  2954. }
  2955. declare type DirectiveDefList = (ɵDirectiveDef<any> | ɵComponentDef<any>)[];
  2956. /**
  2957. * Type used for directiveDefs on component definition.
  2958. *
  2959. * The function is necessary to be able to support forward declarations.
  2960. */
  2961. declare type DirectiveDefListOrFactory = (() => DirectiveDefList) | DirectiveDefList;
  2962. declare const DISCONNECTED_NODES = "d";
  2963. /**
  2964. * @description
  2965. * Hook for manual bootstrapping of the application instead of using `bootstrap` array in @NgModule
  2966. * annotation. This hook is invoked only when the `bootstrap` array is empty or not provided.
  2967. *
  2968. * Reference to the current application is provided as a parameter.
  2969. *
  2970. * See ["Bootstrapping"](guide/bootstrapping).
  2971. *
  2972. * @usageNotes
  2973. * The example below uses `ApplicationRef.bootstrap()` to render the
  2974. * `AppComponent` on the page.
  2975. *
  2976. * ```typescript
  2977. * class AppModule implements DoBootstrap {
  2978. * ngDoBootstrap(appRef: ApplicationRef) {
  2979. * appRef.bootstrap(AppComponent); // Or some other component
  2980. * }
  2981. * }
  2982. * ```
  2983. *
  2984. * @publicApi
  2985. */
  2986. export declare interface DoBootstrap {
  2987. ngDoBootstrap(appRef: ApplicationRef): void;
  2988. }
  2989. /**
  2990. * A lifecycle hook that invokes a custom change-detection function for a directive,
  2991. * in addition to the check performed by the default change-detector.
  2992. *
  2993. * The default change-detection algorithm looks for differences by comparing
  2994. * bound-property values by reference across change detection runs. You can use this
  2995. * hook to check for and respond to changes by some other means.
  2996. *
  2997. * When the default change detector detects changes, it invokes `ngOnChanges()` if supplied,
  2998. * regardless of whether you perform additional change detection.
  2999. * Typically, you should not use both `DoCheck` and `OnChanges` to respond to
  3000. * changes on the same input.
  3001. *
  3002. * @see {@link OnChanges}
  3003. * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
  3004. *
  3005. * @usageNotes
  3006. * The following snippet shows how a component can implement this interface
  3007. * to invoke it own change-detection cycle.
  3008. *
  3009. * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='DoCheck'}
  3010. *
  3011. * For a more complete example and discussion, see
  3012. * [Defining custom change detection](guide/lifecycle-hooks#defining-custom-change-detection).
  3013. *
  3014. * @publicApi
  3015. */
  3016. export declare interface DoCheck {
  3017. /**
  3018. * A callback method that performs change-detection, invoked
  3019. * after the default change-detector runs.
  3020. * See `KeyValueDiffers` and `IterableDiffers` for implementing
  3021. * custom change checking for collections.
  3022. *
  3023. */
  3024. ngDoCheck(): void;
  3025. }
  3026. /**
  3027. * Create a global `Effect` for the given reactive function.
  3028. *
  3029. * @developerPreview
  3030. */
  3031. export declare function effect(effectFn: (onCleanup: EffectCleanupRegisterFn) => void, options?: CreateEffectOptions): EffectRef;
  3032. /**
  3033. * An effect can, optionally, register a cleanup function. If registered, the cleanup is executed
  3034. * before the next effect run. The cleanup function makes it possible to "cancel" any work that the
  3035. * previous effect run might have started.
  3036. *
  3037. * @developerPreview
  3038. */
  3039. export declare type EffectCleanupFn = () => void;
  3040. /**
  3041. * A callback passed to the effect function that makes it possible to register cleanup logic.
  3042. */
  3043. declare type EffectCleanupRegisterFn = (cleanupFn: EffectCleanupFn) => void;
  3044. /**
  3045. * Tracks all effects registered within a given application and runs them via `flush`.
  3046. */
  3047. declare class EffectManager {
  3048. private all;
  3049. private queue;
  3050. create(effectFn: (onCleanup: (cleanupFn: EffectCleanupFn) => void) => void, destroyRef: DestroyRef | null, allowSignalWrites: boolean): EffectRef;
  3051. flush(): void;
  3052. get isQueueEmpty(): boolean;
  3053. /** @nocollapse */
  3054. static ɵprov: unknown;
  3055. }
  3056. /**
  3057. * A global reactive effect, which can be manually destroyed.
  3058. *
  3059. * @developerPreview
  3060. */
  3061. export declare interface EffectRef {
  3062. /**
  3063. * Shut down the effect, removing it from any upcoming scheduled executions.
  3064. */
  3065. destroy(): void;
  3066. }
  3067. /**
  3068. * Keys within serialized view data structure to represent various
  3069. * parts. See the `SerializedView` interface below for additional information.
  3070. */
  3071. declare const ELEMENT_CONTAINERS = "e";
  3072. /**
  3073. * Marks that the next string is an element name.
  3074. *
  3075. * See `I18nMutateOpCodes` documentation.
  3076. */
  3077. declare const ELEMENT_MARKER: ELEMENT_MARKER;
  3078. declare interface ELEMENT_MARKER {
  3079. marker: 'element';
  3080. }
  3081. /**
  3082. * A wrapper around a native element inside of a View.
  3083. *
  3084. * An `ElementRef` is backed by a render-specific element. In the browser, this is usually a DOM
  3085. * element.
  3086. *
  3087. * @security Permitting direct access to the DOM can make your application more vulnerable to
  3088. * XSS attacks. Carefully review any use of `ElementRef` in your code. For more detail, see the
  3089. * [Security Guide](https://g.co/ng/security).
  3090. *
  3091. * @publicApi
  3092. */
  3093. export declare class ElementRef<T = any> {
  3094. /**
  3095. * <div class="callout is-critical">
  3096. * <header>Use with caution</header>
  3097. * <p>
  3098. * Use this API as the last resort when direct access to DOM is needed. Use templating and
  3099. * data-binding provided by Angular instead. Alternatively you can take a look at {@link
  3100. * Renderer2} which provides an API that can be safely used.
  3101. * </p>
  3102. * </div>
  3103. */
  3104. nativeElement: T;
  3105. constructor(nativeElement: T);
  3106. }
  3107. declare const EMBEDDED_VIEW_INJECTOR = 20;
  3108. /**
  3109. * Represents an Angular [view](guide/glossary#view) in a view container.
  3110. * An [embedded view](guide/glossary#view-hierarchy) can be referenced from a component
  3111. * other than the hosting component whose template defines it, or it can be defined
  3112. * independently by a `TemplateRef`.
  3113. *
  3114. * Properties of elements in a view can change, but the structure (number and order) of elements in
  3115. * a view cannot. Change the structure of elements by inserting, moving, or
  3116. * removing nested views in a view container.
  3117. *
  3118. * @see {@link ViewContainerRef}
  3119. *
  3120. * @usageNotes
  3121. *
  3122. * The following template breaks down into two separate `TemplateRef` instances,
  3123. * an outer one and an inner one.
  3124. *
  3125. * ```
  3126. * Count: {{items.length}}
  3127. * <ul>
  3128. * <li *ngFor="let item of items">{{item}}</li>
  3129. * </ul>
  3130. * ```
  3131. *
  3132. * This is the outer `TemplateRef`:
  3133. *
  3134. * ```
  3135. * Count: {{items.length}}
  3136. * <ul>
  3137. * <ng-template ngFor let-item [ngForOf]="items"></ng-template>
  3138. * </ul>
  3139. * ```
  3140. *
  3141. * This is the inner `TemplateRef`:
  3142. *
  3143. * ```
  3144. * <li>{{item}}</li>
  3145. * ```
  3146. *
  3147. * The outer and inner `TemplateRef` instances are assembled into views as follows:
  3148. *
  3149. * ```
  3150. * <!-- ViewRef: outer-0 -->
  3151. * Count: 2
  3152. * <ul>
  3153. * <ng-template view-container-ref></ng-template>
  3154. * <!-- ViewRef: inner-1 --><li>first</li><!-- /ViewRef: inner-1 -->
  3155. * <!-- ViewRef: inner-2 --><li>second</li><!-- /ViewRef: inner-2 -->
  3156. * </ul>
  3157. * <!-- /ViewRef: outer-0 -->
  3158. * ```
  3159. * @publicApi
  3160. */
  3161. export declare abstract class EmbeddedViewRef<C> extends ViewRef {
  3162. /**
  3163. * The context for this view, inherited from the anchor element.
  3164. */
  3165. abstract context: C;
  3166. /**
  3167. * The root nodes for this embedded view.
  3168. */
  3169. abstract get rootNodes(): any[];
  3170. }
  3171. /**
  3172. * Disable Angular's development mode, which turns off assertions and other
  3173. * checks within the framework.
  3174. *
  3175. * One important assertion this disables verifies that a change detection pass
  3176. * does not result in additional changes to any bindings (also known as
  3177. * unidirectional data flow).
  3178. *
  3179. * Using this method is discouraged as the Angular CLI will set production mode when using the
  3180. * `optimization` option.
  3181. * @see {@link cli/build ng build}
  3182. *
  3183. * @publicApi
  3184. */
  3185. export declare function enableProdMode(): void;
  3186. declare const ENVIRONMENT = 10;
  3187. /**
  3188. * A multi-provider token for initialization functions that will run upon construction of an
  3189. * environment injector.
  3190. *
  3191. * @publicApi
  3192. */
  3193. export declare const ENVIRONMENT_INITIALIZER: InjectionToken<() => void>;
  3194. /**
  3195. * An `Injector` that's part of the environment injector hierarchy, which exists outside of the
  3196. * component tree.
  3197. */
  3198. export declare abstract class EnvironmentInjector implements Injector {
  3199. /**
  3200. * Retrieves an instance from the injector based on the provided token.
  3201. * @returns The instance from the injector if defined, otherwise the `notFoundValue`.
  3202. * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.
  3203. */
  3204. abstract get<T>(token: ProviderToken<T>, notFoundValue: undefined, options: InjectOptions & {
  3205. optional?: false;
  3206. }): T;
  3207. /**
  3208. * Retrieves an instance from the injector based on the provided token.
  3209. * @returns The instance from the injector if defined, otherwise the `notFoundValue`.
  3210. * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.
  3211. */
  3212. abstract get<T>(token: ProviderToken<T>, notFoundValue: null | undefined, options: InjectOptions): T | null;
  3213. /**
  3214. * Retrieves an instance from the injector based on the provided token.
  3215. * @returns The instance from the injector if defined, otherwise the `notFoundValue`.
  3216. * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.
  3217. */
  3218. abstract get<T>(token: ProviderToken<T>, notFoundValue?: T, options?: InjectOptions): T;
  3219. /**
  3220. * Retrieves an instance from the injector based on the provided token.
  3221. * @returns The instance from the injector if defined, otherwise the `notFoundValue`.
  3222. * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.
  3223. * @deprecated use object-based flags (`InjectOptions`) instead.
  3224. */
  3225. abstract get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;
  3226. /**
  3227. * @deprecated from v4.0.0 use ProviderToken<T>
  3228. * @suppress {duplicate}
  3229. */
  3230. abstract get(token: any, notFoundValue?: any): any;
  3231. /**
  3232. * Runs the given function in the context of this `EnvironmentInjector`.
  3233. *
  3234. * Within the function's stack frame, [`inject`](api/core/inject) can be used to inject
  3235. * dependencies from this injector. Note that `inject` is only usable synchronously, and cannot be
  3236. * used in any asynchronous callbacks or after any `await` points.
  3237. *
  3238. * @param fn the closure to be run in the context of this injector
  3239. * @returns the return value of the function, if any
  3240. * @deprecated use the standalone function `runInInjectionContext` instead
  3241. */
  3242. abstract runInContext<ReturnT>(fn: () => ReturnT): ReturnT;
  3243. abstract destroy(): void;
  3244. }
  3245. /**
  3246. * Encapsulated `Provider`s that are only accepted during creation of an `EnvironmentInjector` (e.g.
  3247. * in an `NgModule`).
  3248. *
  3249. * Using this wrapper type prevents providers which are only designed to work in
  3250. * application/environment injectors from being accidentally included in
  3251. * `@Component.providers` and ending up in a component injector.
  3252. *
  3253. * This wrapper type prevents access to the `Provider`s inside.
  3254. *
  3255. * @see {@link makeEnvironmentProviders}
  3256. * @see {@link importProvidersFrom}
  3257. *
  3258. * @publicApi
  3259. */
  3260. export declare type EnvironmentProviders = {
  3261. ɵbrand: 'EnvironmentProviders';
  3262. };
  3263. /**
  3264. * Provides a hook for centralized exception handling.
  3265. *
  3266. * The default implementation of `ErrorHandler` prints error messages to the `console`. To
  3267. * intercept error handling, write a custom exception handler that replaces this default as
  3268. * appropriate for your app.
  3269. *
  3270. * @usageNotes
  3271. * ### Example
  3272. *
  3273. * ```
  3274. * class MyErrorHandler implements ErrorHandler {
  3275. * handleError(error) {
  3276. * // do something with the exception
  3277. * }
  3278. * }
  3279. *
  3280. * @NgModule({
  3281. * providers: [{provide: ErrorHandler, useClass: MyErrorHandler}]
  3282. * })
  3283. * class MyModule {}
  3284. * ```
  3285. *
  3286. * @publicApi
  3287. */
  3288. export declare class ErrorHandler {
  3289. handleError(error: any): void;
  3290. }
  3291. /**
  3292. * Use in components with the `@Output` directive to emit custom events
  3293. * synchronously or asynchronously, and register handlers for those events
  3294. * by subscribing to an instance.
  3295. *
  3296. * @usageNotes
  3297. *
  3298. * Extends
  3299. * [RxJS `Subject`](https://rxjs.dev/api/index/class/Subject)
  3300. * for Angular by adding the `emit()` method.
  3301. *
  3302. * In the following example, a component defines two output properties
  3303. * that create event emitters. When the title is clicked, the emitter
  3304. * emits an open or close event to toggle the current visibility state.
  3305. *
  3306. * ```html
  3307. * @Component({
  3308. * selector: 'zippy',
  3309. * template: `
  3310. * <div class="zippy">
  3311. * <div (click)="toggle()">Toggle</div>
  3312. * <div [hidden]="!visible">
  3313. * <ng-content></ng-content>
  3314. * </div>
  3315. * </div>`})
  3316. * export class Zippy {
  3317. * visible: boolean = true;
  3318. * @Output() open: EventEmitter<any> = new EventEmitter();
  3319. * @Output() close: EventEmitter<any> = new EventEmitter();
  3320. *
  3321. * toggle() {
  3322. * this.visible = !this.visible;
  3323. * if (this.visible) {
  3324. * this.open.emit(null);
  3325. * } else {
  3326. * this.close.emit(null);
  3327. * }
  3328. * }
  3329. * }
  3330. * ```
  3331. *
  3332. * Access the event object with the `$event` argument passed to the output event
  3333. * handler:
  3334. *
  3335. * ```html
  3336. * <zippy (open)="onOpen($event)" (close)="onClose($event)"></zippy>
  3337. * ```
  3338. *
  3339. * @see [Observables in Angular](guide/observables-in-angular)
  3340. * @publicApi
  3341. */
  3342. export declare interface EventEmitter<T> extends Subject<T> {
  3343. /**
  3344. * Creates an instance of this class that can
  3345. * deliver events synchronously or asynchronously.
  3346. *
  3347. * @param [isAsync=false] When true, deliver events asynchronously.
  3348. *
  3349. */
  3350. new (isAsync?: boolean): EventEmitter<T>;
  3351. /**
  3352. * Emits an event containing a given value.
  3353. * @param value The value to emit.
  3354. */
  3355. emit(value?: T): void;
  3356. /**
  3357. * Registers handlers for events emitted by this instance.
  3358. * @param next When supplied, a custom handler for emitted events.
  3359. * @param error When supplied, a custom handler for an error notification from this emitter.
  3360. * @param complete When supplied, a custom handler for a completion notification from this
  3361. * emitter.
  3362. */
  3363. subscribe(next?: (value: T) => void, error?: (error: any) => void, complete?: () => void): Subscription;
  3364. /**
  3365. * Registers handlers for events emitted by this instance.
  3366. * @param observerOrNext When supplied, a custom handler for emitted events, or an observer
  3367. * object.
  3368. * @param error When supplied, a custom handler for an error notification from this emitter.
  3369. * @param complete When supplied, a custom handler for a completion notification from this
  3370. * emitter.
  3371. */
  3372. subscribe(observerOrNext?: any, error?: any, complete?: any): Subscription;
  3373. }
  3374. /**
  3375. * @publicApi
  3376. */
  3377. export declare const EventEmitter: {
  3378. new (isAsync?: boolean): EventEmitter<any>;
  3379. new <T>(isAsync?: boolean): EventEmitter<T>;
  3380. readonly prototype: EventEmitter<any>;
  3381. };
  3382. /**
  3383. * Configures the `Injector` to return a value of another `useExisting` token.
  3384. *
  3385. * @see ["Dependency Injection Guide"](guide/dependency-injection).
  3386. *
  3387. * @usageNotes
  3388. *
  3389. * {@example core/di/ts/provider_spec.ts region='ExistingProvider'}
  3390. *
  3391. * ### Multi-value example
  3392. *
  3393. * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
  3394. *
  3395. * @publicApi
  3396. */
  3397. export declare interface ExistingProvider extends ExistingSansProvider {
  3398. /**
  3399. * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
  3400. */
  3401. provide: any;
  3402. /**
  3403. * When true, injector returns an array of instances. This is useful to allow multiple
  3404. * providers spread across many files to provide configuration information to a common token.
  3405. */
  3406. multi?: boolean;
  3407. }
  3408. /**
  3409. * Configures the `Injector` to return a value of another `useExisting` token.
  3410. *
  3411. * @see {@link ExistingProvider}
  3412. * @see ["Dependency Injection Guide"](guide/dependency-injection).
  3413. *
  3414. * @publicApi
  3415. */
  3416. export declare interface ExistingSansProvider {
  3417. /**
  3418. * Existing `token` to return. (Equivalent to `injector.get(useExisting)`)
  3419. */
  3420. useExisting: any;
  3421. }
  3422. /**
  3423. * Definition of what a factory function should look like.
  3424. */
  3425. declare type FactoryFn<T> = {
  3426. /**
  3427. * Subclasses without an explicit constructor call through to the factory of their base
  3428. * definition, providing it with their own constructor to instantiate.
  3429. */
  3430. <U extends T>(t?: Type<U>): U;
  3431. /**
  3432. * If no constructor to instantiate is provided, an instance of type T itself is created.
  3433. */
  3434. (t?: undefined): T;
  3435. };
  3436. /**
  3437. * Configures the `Injector` to return a value by invoking a `useFactory` function.
  3438. * @see ["Dependency Injection Guide"](guide/dependency-injection).
  3439. *
  3440. * @usageNotes
  3441. *
  3442. * {@example core/di/ts/provider_spec.ts region='FactoryProvider'}
  3443. *
  3444. * Dependencies can also be marked as optional:
  3445. *
  3446. * {@example core/di/ts/provider_spec.ts region='FactoryProviderOptionalDeps'}
  3447. *
  3448. * ### Multi-value example
  3449. *
  3450. * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
  3451. *
  3452. * @publicApi
  3453. */
  3454. export declare interface FactoryProvider extends FactorySansProvider {
  3455. /**
  3456. * An injection token. (Typically an instance of `Type` or `InjectionToken`, but can be `any`).
  3457. */
  3458. provide: any;
  3459. /**
  3460. * When true, injector returns an array of instances. This is useful to allow multiple
  3461. * providers spread across many files to provide configuration information to a common token.
  3462. */
  3463. multi?: boolean;
  3464. }
  3465. /**
  3466. * Configures the `Injector` to return a value by invoking a `useFactory` function.
  3467. *
  3468. * @see {@link FactoryProvider}
  3469. * @see ["Dependency Injection Guide"](guide/dependency-injection).
  3470. *
  3471. * @publicApi
  3472. */
  3473. export declare interface FactorySansProvider {
  3474. /**
  3475. * A function to invoke to create a value for this `token`. The function is invoked with
  3476. * resolved values of `token`s in the `deps` field.
  3477. */
  3478. useFactory: Function;
  3479. /**
  3480. * A list of `token`s to be resolved by the injector. The list of values is then
  3481. * used as arguments to the `useFactory` function.
  3482. */
  3483. deps?: any[];
  3484. }
  3485. declare const FLAGS = 2;
  3486. /**
  3487. * Allows to refer to references which are not yet defined.
  3488. *
  3489. * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of
  3490. * DI is declared, but not yet defined. It is also used when the `token` which we use when creating
  3491. * a query is not yet defined.
  3492. *
  3493. * `forwardRef` is also used to break circularities in standalone components imports.
  3494. *
  3495. * @usageNotes
  3496. * ### Circular dependency example
  3497. * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}
  3498. *
  3499. * ### Circular standalone reference import example
  3500. * ```ts
  3501. * @Component({
  3502. * standalone: true,
  3503. * imports: [ChildComponent],
  3504. * selector: 'app-parent',
  3505. * template: `<app-child [hideParent]="hideParent"></app-child>`,
  3506. * })
  3507. * export class ParentComponent {
  3508. * @Input() hideParent: boolean;
  3509. * }
  3510. *
  3511. *
  3512. * @Component({
  3513. * standalone: true,
  3514. * imports: [CommonModule, forwardRef(() => ParentComponent)],
  3515. * selector: 'app-child',
  3516. * template: `<app-parent *ngIf="!hideParent"></app-parent>`,
  3517. * })
  3518. * export class ChildComponent {
  3519. * @Input() hideParent: boolean;
  3520. * }
  3521. * ```
  3522. *
  3523. * @publicApi
  3524. */
  3525. export declare function forwardRef(forwardRefFn: ForwardRefFn): Type<any>;
  3526. /**
  3527. * An interface that a function passed into {@link forwardRef} has to implement.
  3528. *
  3529. * @usageNotes
  3530. * ### Example
  3531. *
  3532. * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref_fn'}
  3533. * @publicApi
  3534. */
  3535. export declare interface ForwardRefFn {
  3536. (): any;
  3537. }
  3538. /**
  3539. * @publicApi
  3540. */
  3541. declare function getDebugNode(nativeNode: any): DebugNode | null;
  3542. export { getDebugNode }
  3543. export { getDebugNode as ɵgetDebugNode }
  3544. /**
  3545. * Returns the NgModuleFactory with the given id (specified using [@NgModule.id
  3546. * field](api/core/NgModule#id)), if it exists and has been loaded. Factories for NgModules that do
  3547. * not specify an `id` cannot be retrieved. Throws if an NgModule cannot be found.
  3548. * @publicApi
  3549. * @deprecated Use `getNgModuleById` instead.
  3550. */
  3551. export declare function getModuleFactory(id: string): NgModuleFactory<any>;
  3552. /**
  3553. * Returns the NgModule class with the given id (specified using [@NgModule.id
  3554. * field](api/core/NgModule#id)), if it exists and has been loaded. Classes for NgModules that do
  3555. * not specify an `id` cannot be retrieved. Throws if an NgModule cannot be found.
  3556. * @publicApi
  3557. */
  3558. export declare function getNgModuleById<T>(id: string): Type<T>;
  3559. /**
  3560. * Returns the current platform.
  3561. *
  3562. * @publicApi
  3563. */
  3564. export declare function getPlatform(): PlatformRef | null;
  3565. /**
  3566. * Adapter interface for retrieving the `Testability` service associated for a
  3567. * particular context.
  3568. *
  3569. * @publicApi
  3570. */
  3571. export declare interface GetTestability {
  3572. addToWindow(registry: TestabilityRegistry): void;
  3573. findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean): Testability | null;
  3574. }
  3575. /**
  3576. * The goal here is to make sure that the browser DOM API is the Renderer.
  3577. * We do this by defining a subset of DOM API to be the renderer and then
  3578. * use that at runtime for rendering.
  3579. *
  3580. * At runtime we can then use the DOM api directly, in server or web-worker
  3581. * it will be easy to implement such API.
  3582. */
  3583. declare type GlobalTargetName = 'document' | 'window' | 'body';
  3584. declare type GlobalTargetResolver = (element: any) => EventTarget;
  3585. /**
  3586. * Flag to signify that this `LContainer` may have transplanted views which need to be change
  3587. * detected. (see: `LView[DECLARATION_COMPONENT_VIEW])`.
  3588. *
  3589. * This flag, once set, is never unset for the `LContainer`. This means that when unset we can skip
  3590. * a lot of work in `refreshEmbeddedViews`. But when set we still need to verify
  3591. * that the `MOVED_VIEWS` are transplanted and on-push.
  3592. */
  3593. declare const HAS_TRANSPLANTED_VIEWS = 2;
  3594. /**
  3595. * Array of hooks that should be executed for a view and their directive indices.
  3596. *
  3597. * For each node of the view, the following data is stored:
  3598. * 1) Node index (optional)
  3599. * 2) A series of number/function pairs where:
  3600. * - even indices are directive indices
  3601. * - odd indices are hook functions
  3602. *
  3603. * Special cases:
  3604. * - a negative directive index flags an init hook (ngOnInit, ngAfterContentInit, ngAfterViewInit)
  3605. */
  3606. declare type HookData = HookEntry[];
  3607. /**
  3608. * Information necessary to call a hook. E.g. the callback that
  3609. * needs to invoked and the index at which to find its context.
  3610. */
  3611. declare type HookEntry = number | HookFn;
  3612. /** Single hook callback function. */
  3613. declare type HookFn = () => void;
  3614. declare const HOST = 0;
  3615. /**
  3616. * Type of the Host metadata.
  3617. *
  3618. * @publicApi
  3619. */
  3620. export declare interface Host {
  3621. }
  3622. /**
  3623. * Host decorator and metadata.
  3624. *
  3625. * @Annotation
  3626. * @publicApi
  3627. */
  3628. export declare const Host: HostDecorator;
  3629. /**
  3630. * Type of the HostBinding metadata.
  3631. *
  3632. * @publicApi
  3633. */
  3634. export declare interface HostBinding {
  3635. /**
  3636. * The DOM property that is bound to a data property.
  3637. * This field also accepts:
  3638. * * classes, prefixed by `class.`
  3639. * * styles, prefixed by `style.`
  3640. * * attributes, prefixed by `attr.`
  3641. */
  3642. hostPropertyName?: string;
  3643. }
  3644. /**
  3645. * @Annotation
  3646. * @publicApi
  3647. */
  3648. export declare const HostBinding: HostBindingDecorator;
  3649. /**
  3650. * Type of the HostBinding decorator / constructor function.
  3651. *
  3652. * @publicApi
  3653. */
  3654. export declare interface HostBindingDecorator {
  3655. /**
  3656. * Decorator that marks a DOM property or an element class, style or attribute as a host-binding
  3657. * property and supplies configuration metadata. Angular automatically checks host bindings during
  3658. * change detection, and if a binding changes it updates the host element of the directive.
  3659. *
  3660. * @usageNotes
  3661. *
  3662. * The following example creates a directive that sets the `valid` and `invalid`
  3663. * class, a style color, and an id on the DOM element that has an `ngModel` directive on it.
  3664. *
  3665. * ```typescript
  3666. * @Directive({selector: '[ngModel]'})
  3667. * class NgModelStatus {
  3668. * constructor(public control: NgModel) {}
  3669. * // class bindings
  3670. * @HostBinding('class.valid') get valid() { return this.control.valid; }
  3671. * @HostBinding('class.invalid') get invalid() { return this.control.invalid; }
  3672. *
  3673. * // style binding
  3674. * @HostBinding('style.color') get color() { return this.control.valid ? 'green': 'red'; }
  3675. *
  3676. * // style binding also supports a style unit extension
  3677. * @HostBinding('style.width.px') @Input() width: number = 500;
  3678. *
  3679. * // attribute binding
  3680. * @HostBinding('attr.aria-required')
  3681. * @Input() required: boolean = false;
  3682. *
  3683. * // property binding
  3684. * @HostBinding('id') get id() { return this.control.value?.length ? 'odd': 'even'; }
  3685. *
  3686. * @Component({
  3687. * selector: 'app',
  3688. * template: `<input [(ngModel)]="prop">`,
  3689. * })
  3690. * class App {
  3691. * prop;
  3692. * }
  3693. * ```
  3694. *
  3695. */
  3696. (hostPropertyName?: string): any;
  3697. new (hostPropertyName?: string): any;
  3698. }
  3699. /**
  3700. * Stores a set of OpCodes to process `HostBindingsFunction` associated with a current view.
  3701. *
  3702. * In order to invoke `HostBindingsFunction` we need:
  3703. * 1. 'elementIdx`: Index to the element associated with the `HostBindingsFunction`.
  3704. * 2. 'directiveIdx`: Index to the directive associated with the `HostBindingsFunction`. (This will
  3705. * become the context for the `HostBindingsFunction` invocation.)
  3706. * 3. `bindingRootIdx`: Location where the bindings for the `HostBindingsFunction` start. Internally
  3707. * `HostBindingsFunction` binding indexes start from `0` so we need to add `bindingRootIdx` to
  3708. * it.
  3709. * 4. `HostBindingsFunction`: A host binding function to execute.
  3710. *
  3711. * The above information needs to be encoded into the `HostBindingOpCodes` in an efficient manner.
  3712. *
  3713. * 1. `elementIdx` is encoded into the `HostBindingOpCodes` as `~elementIdx` (so a negative number);
  3714. * 2. `directiveIdx`
  3715. * 3. `bindingRootIdx`
  3716. * 4. `HostBindingsFunction` is passed in as is.
  3717. *
  3718. * The `HostBindingOpCodes` array contains:
  3719. * - negative number to select the element index.
  3720. * - followed by 1 or more of:
  3721. * - a number to select the directive index
  3722. * - a number to select the bindingRoot index
  3723. * - and a function to invoke.
  3724. *
  3725. * ## Example
  3726. *
  3727. * ```
  3728. * const hostBindingOpCodes = [
  3729. * ~30, // Select element 30
  3730. * 40, 45, MyDir.ɵdir.hostBindings // Invoke host bindings on MyDir on element 30;
  3731. * // directiveIdx = 40; bindingRootIdx = 45;
  3732. * 50, 55, OtherDir.ɵdir.hostBindings // Invoke host bindings on OtherDire on element 30
  3733. * // directiveIdx = 50; bindingRootIdx = 55;
  3734. * ]
  3735. * ```
  3736. *
  3737. * ## Pseudocode
  3738. * ```
  3739. * const hostBindingOpCodes = tView.hostBindingOpCodes;
  3740. * if (hostBindingOpCodes === null) return;
  3741. * for (let i = 0; i < hostBindingOpCodes.length; i++) {
  3742. * const opCode = hostBindingOpCodes[i] as number;
  3743. * if (opCode < 0) {
  3744. * // Negative numbers are element indexes.
  3745. * setSelectedIndex(~opCode);
  3746. * } else {
  3747. * // Positive numbers are NumberTuple which store bindingRootIndex and directiveIndex.
  3748. * const directiveIdx = opCode;
  3749. * const bindingRootIndx = hostBindingOpCodes[++i] as number;
  3750. * const hostBindingFn = hostBindingOpCodes[++i] as HostBindingsFunction<any>;
  3751. * setBindingRootForHostBindings(bindingRootIndx, directiveIdx);
  3752. * const context = lView[directiveIdx];
  3753. * hostBindingFn(RenderFlags.Update, context);
  3754. * }
  3755. * }
  3756. * ```
  3757. *
  3758. */
  3759. declare interface HostBindingOpCodes extends Array<number | HostBindingsFunction<any>> {
  3760. __brand__: 'HostBindingOpCodes';
  3761. debug?: string[];
  3762. }
  3763. declare type HostBindingsFunction<T> = <U extends T>(rf: ɵRenderFlags, ctx: U) => void;
  3764. /**
  3765. * Type of the `Host` decorator / constructor function.
  3766. *
  3767. * @publicApi
  3768. */
  3769. export declare interface HostDecorator {
  3770. /**
  3771. * Parameter decorator on a view-provider parameter of a class constructor
  3772. * that tells the DI framework to resolve the view by checking injectors of child
  3773. * elements, and stop when reaching the host element of the current component.
  3774. *
  3775. * @usageNotes
  3776. *
  3777. * The following shows use with the `@Optional` decorator, and allows for a `null` result.
  3778. *
  3779. * <code-example path="core/di/ts/metadata_spec.ts" region="Host">
  3780. * </code-example>
  3781. *
  3782. * For an extended example, see ["Dependency Injection
  3783. * Guide"](guide/dependency-injection-in-action#optional).
  3784. */
  3785. (): any;
  3786. new (): Host;
  3787. }
  3788. /**
  3789. * Mapping between the public aliases of directive bindings and the underlying inputs/outputs that
  3790. * they represent. Also serves as an allowlist of the inputs/outputs from the host directive that
  3791. * the author has decided to expose.
  3792. */
  3793. declare type HostDirectiveBindingMap = {
  3794. [publicName: string]: string;
  3795. };
  3796. /** Values that can be used to define a host directive through the `HostDirectivesFeature`. */
  3797. declare type HostDirectiveConfig = Type<unknown> | {
  3798. directive: Type<unknown>;
  3799. inputs?: string[];
  3800. outputs?: string[];
  3801. };
  3802. /** Runtime information used to configure a host directive. */
  3803. declare interface HostDirectiveDef<T = unknown> {
  3804. /** Class representing the host directive. */
  3805. directive: Type<T>;
  3806. /** Directive inputs that have been exposed. */
  3807. inputs: HostDirectiveBindingMap;
  3808. /** Directive outputs that have been exposed. */
  3809. outputs: HostDirectiveBindingMap;
  3810. }
  3811. /**
  3812. * Mapping between a directive that was used as a host directive
  3813. * and the configuration that was used to define it as such.
  3814. */
  3815. declare type HostDirectiveDefs = Map<ɵDirectiveDef<unknown>, HostDirectiveDef>;
  3816. /**
  3817. * Type of the HostListener metadata.
  3818. *
  3819. * @publicApi
  3820. */
  3821. export declare interface HostListener {
  3822. /**
  3823. * The DOM event to listen for.
  3824. */
  3825. eventName?: string;
  3826. /**
  3827. * A set of arguments to pass to the handler method when the event occurs.
  3828. */
  3829. args?: string[];
  3830. }
  3831. /**
  3832. * Decorator that binds a DOM event to a host listener and supplies configuration metadata.
  3833. * Angular invokes the supplied handler method when the host element emits the specified event,
  3834. * and updates the bound element with the result.
  3835. *
  3836. * If the handler method returns false, applies `preventDefault` on the bound element.
  3837. *
  3838. * @usageNotes
  3839. *
  3840. * The following example declares a directive
  3841. * that attaches a click listener to a button and counts clicks.
  3842. *
  3843. * ```ts
  3844. * @Directive({selector: 'button[counting]'})
  3845. * class CountClicks {
  3846. * numberOfClicks = 0;
  3847. *
  3848. * @HostListener('click', ['$event.target'])
  3849. * onClick(btn) {
  3850. * console.log('button', btn, 'number of clicks:', this.numberOfClicks++);
  3851. * }
  3852. * }
  3853. *
  3854. * @Component({
  3855. * selector: 'app',
  3856. * template: '<button counting>Increment</button>',
  3857. * })
  3858. * class App {}
  3859. *
  3860. * ```
  3861. *
  3862. * The following example registers another DOM event handler that listens for `Enter` key-press
  3863. * events on the global `window`.
  3864. * ``` ts
  3865. * import { HostListener, Component } from "@angular/core";
  3866. *
  3867. * @Component({
  3868. * selector: 'app',
  3869. * template: `<h1>Hello, you have pressed enter {{counter}} number of times!</h1> Press enter key
  3870. * to increment the counter.
  3871. * <button (click)="resetCounter()">Reset Counter</button>`
  3872. * })
  3873. * class AppComponent {
  3874. * counter = 0;
  3875. * @HostListener('window:keydown.enter', ['$event'])
  3876. * handleKeyDown(event: KeyboardEvent) {
  3877. * this.counter++;
  3878. * }
  3879. * resetCounter() {
  3880. * this.counter = 0;
  3881. * }
  3882. * }
  3883. * ```
  3884. * The list of valid key names for `keydown` and `keyup` events
  3885. * can be found here:
  3886. * https://www.w3.org/TR/DOM-Level-3-Events-key/#named-key-attribute-values
  3887. *
  3888. * Note that keys can also be combined, e.g. `@HostListener('keydown.shift.a')`.
  3889. *
  3890. * The global target names that can be used to prefix an event name are
  3891. * `document:`, `window:` and `body:`.
  3892. *
  3893. * @Annotation
  3894. * @publicApi
  3895. */
  3896. export declare const HostListener: HostListenerDecorator;
  3897. /**
  3898. * Type of the HostListener decorator / constructor function.
  3899. *
  3900. * @publicApi
  3901. */
  3902. export declare interface HostListenerDecorator {
  3903. /**
  3904. * Decorator that declares a DOM event to listen for,
  3905. * and provides a handler method to run when that event occurs.
  3906. *
  3907. * Angular invokes the supplied handler method when the host element emits the specified event,
  3908. * and updates the bound element with the result.
  3909. *
  3910. * If the handler method returns false, applies `preventDefault` on the bound element.
  3911. */
  3912. (eventName: string, args?: string[]): any;
  3913. new (eventName: string, args?: string[]): any;
  3914. }
  3915. declare const HYDRATION = 22;
  3916. declare namespace i0 {
  3917. export {
  3918. ɵɵinject,
  3919. ɵɵdefineInjectable,
  3920. ɵɵdefineInjector,
  3921. ɵɵInjectableDeclaration,
  3922. ɵNgModuleDef as NgModuleDef,
  3923. ɵɵdefineNgModule,
  3924. ɵɵFactoryDeclaration,
  3925. ɵɵInjectorDeclaration,
  3926. ɵɵNgModuleDeclaration,
  3927. ɵsetClassMetadata as setClassMetadata,
  3928. ɵNgModuleFactory as NgModuleFactory,
  3929. ɵnoSideEffects,
  3930. ITS_JUST_ANGULAR
  3931. }
  3932. }
  3933. /**
  3934. * Array storing OpCode for dynamically creating `i18n` translation DOM elements.
  3935. *
  3936. * This array creates a sequence of `Text` and `Comment` (as ICU anchor) DOM elements. It consists
  3937. * of a pair of `number` and `string` pairs which encode the operations for the creation of the
  3938. * translated block.
  3939. *
  3940. * The number is shifted and encoded according to `I18nCreateOpCode`
  3941. *
  3942. * Pseudocode:
  3943. * ```
  3944. * const i18nCreateOpCodes = [
  3945. * 10 << I18nCreateOpCode.SHIFT, "Text Node add to DOM",
  3946. * 11 << I18nCreateOpCode.SHIFT | I18nCreateOpCode.COMMENT, "Comment Node add to DOM",
  3947. * 12 << I18nCreateOpCode.SHIFT | I18nCreateOpCode.APPEND_LATER, "Text Node added later"
  3948. * ];
  3949. *
  3950. * for(var i=0; i<i18nCreateOpCodes.length; i++) {
  3951. * const opcode = i18NCreateOpCodes[i++];
  3952. * const index = opcode >> I18nCreateOpCode.SHIFT;
  3953. * const text = i18NCreateOpCodes[i];
  3954. * let node: Text|Comment;
  3955. * if (opcode & I18nCreateOpCode.COMMENT === I18nCreateOpCode.COMMENT) {
  3956. * node = lView[~index] = document.createComment(text);
  3957. * } else {
  3958. * node = lView[index] = document.createText(text);
  3959. * }
  3960. * if (opcode & I18nCreateOpCode.APPEND_EAGERLY !== I18nCreateOpCode.APPEND_EAGERLY) {
  3961. * parentNode.appendChild(node);
  3962. * }
  3963. * }
  3964. * ```
  3965. */
  3966. declare interface I18nCreateOpCodes extends Array<number | string>, I18nDebug {
  3967. __brand__: 'I18nCreateOpCodes';
  3968. }
  3969. declare interface I18nDebug {
  3970. /**
  3971. * Human readable representation of the OpCode arrays.
  3972. *
  3973. * NOTE: This property only exists if `ngDevMode` is set to `true` and it is not present in
  3974. * production. Its presence is purely to help debug issue in development, and should not be relied
  3975. * on in production application.
  3976. */
  3977. debug?: string[];
  3978. }
  3979. /**
  3980. * Stores a list of nodes which need to be removed.
  3981. *
  3982. * Numbers are indexes into the `LView`
  3983. * - index > 0: `removeRNode(lView[0])`
  3984. * - index < 0: `removeICU(~lView[0])`
  3985. */
  3986. declare interface I18nRemoveOpCodes extends Array<number> {
  3987. __brand__: 'I18nRemoveOpCodes';
  3988. }
  3989. /**
  3990. * Stores DOM operations which need to be applied to update DOM render tree due to changes in
  3991. * expressions.
  3992. *
  3993. * The basic idea is that `i18nExp` OpCodes capture expression changes and update a change
  3994. * mask bit. (Bit 1 for expression 1, bit 2 for expression 2 etc..., bit 32 for expression 32 and
  3995. * higher.) The OpCodes then compare its own change mask against the expression change mask to
  3996. * determine if the OpCodes should execute.
  3997. *
  3998. * NOTE: 32nd bit is special as it says 32nd or higher. This way if we have more than 32 bindings
  3999. * the code still works, but with lower efficiency. (it is unlikely that a translation would have
  4000. * more than 32 bindings.)
  4001. *
  4002. * These OpCodes can be used by both the i18n block as well as ICU sub-block.
  4003. *
  4004. * ## Example
  4005. *
  4006. * Assume
  4007. * ```ts
  4008. * if (rf & RenderFlags.Update) {
  4009. * i18nExp(ctx.exp1); // If changed set mask bit 1
  4010. * i18nExp(ctx.exp2); // If changed set mask bit 2
  4011. * i18nExp(ctx.exp3); // If changed set mask bit 3
  4012. * i18nExp(ctx.exp4); // If changed set mask bit 4
  4013. * i18nApply(0); // Apply all changes by executing the OpCodes.
  4014. * }
  4015. * ```
  4016. * We can assume that each call to `i18nExp` sets an internal `changeMask` bit depending on the
  4017. * index of `i18nExp`.
  4018. *
  4019. * ### OpCodes
  4020. * ```ts
  4021. * <I18nUpdateOpCodes>[
  4022. * // The following OpCodes represent: `<div i18n-title="pre{{exp1}}in{{exp2}}post">`
  4023. * // If `changeMask & 0b11`
  4024. * // has changed then execute update OpCodes.
  4025. * // has NOT changed then skip `8` values and start processing next OpCodes.
  4026. * 0b11, 8,
  4027. * // Concatenate `newValue = 'pre'+lView[bindIndex-4]+'in'+lView[bindIndex-3]+'post';`.
  4028. * 'pre', -4, 'in', -3, 'post',
  4029. * // Update attribute: `elementAttribute(1, 'title', sanitizerFn(newValue));`
  4030. * 1 << SHIFT_REF | Attr, 'title', sanitizerFn,
  4031. *
  4032. * // The following OpCodes represent: `<div i18n>Hello {{exp3}}!">`
  4033. * // If `changeMask & 0b100`
  4034. * // has changed then execute update OpCodes.
  4035. * // has NOT changed then skip `4` values and start processing next OpCodes.
  4036. * 0b100, 4,
  4037. * // Concatenate `newValue = 'Hello ' + lView[bindIndex -2] + '!';`.
  4038. * 'Hello ', -2, '!',
  4039. * // Update text: `lView[1].textContent = newValue;`
  4040. * 1 << SHIFT_REF | Text,
  4041. *
  4042. * // The following OpCodes represent: `<div i18n>{exp4, plural, ... }">`
  4043. * // If `changeMask & 0b1000`
  4044. * // has changed then execute update OpCodes.
  4045. * // has NOT changed then skip `2` values and start processing next OpCodes.
  4046. * 0b1000, 2,
  4047. * // Concatenate `newValue = lView[bindIndex -1];`.
  4048. * -1,
  4049. * // Switch ICU: `icuSwitchCase(lView[1], 0, newValue);`
  4050. * 0 << SHIFT_ICU | 1 << SHIFT_REF | IcuSwitch,
  4051. *
  4052. * // Note `changeMask & -1` is always true, so the IcuUpdate will always execute.
  4053. * -1, 1,
  4054. * // Update ICU: `icuUpdateCase(lView[1], 0);`
  4055. * 0 << SHIFT_ICU | 1 << SHIFT_REF | IcuUpdate,
  4056. *
  4057. * ];
  4058. * ```
  4059. *
  4060. */
  4061. declare interface I18nUpdateOpCodes extends Array<string | number | SanitizerFn | null>, I18nDebug {
  4062. __brand__: 'I18nUpdateOpCodes';
  4063. }
  4064. /**
  4065. * Marks that the next string is comment text need for ICU.
  4066. *
  4067. * See `I18nMutateOpCodes` documentation.
  4068. */
  4069. declare const ICU_MARKER: ICU_MARKER;
  4070. declare interface ICU_MARKER {
  4071. marker: 'ICU';
  4072. }
  4073. /**
  4074. * Array storing OpCode for dynamically creating `i18n` blocks.
  4075. *
  4076. * Example:
  4077. * ```ts
  4078. * <I18nCreateOpCode>[
  4079. * // For adding text nodes
  4080. * // ---------------------
  4081. * // Equivalent to:
  4082. * // lView[1].appendChild(lView[0] = document.createTextNode('xyz'));
  4083. * 'xyz', 0, 1 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,
  4084. *
  4085. * // For adding element nodes
  4086. * // ---------------------
  4087. * // Equivalent to:
  4088. * // lView[1].appendChild(lView[0] = document.createElement('div'));
  4089. * ELEMENT_MARKER, 'div', 0, 1 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,
  4090. *
  4091. * // For adding comment nodes
  4092. * // ---------------------
  4093. * // Equivalent to:
  4094. * // lView[1].appendChild(lView[0] = document.createComment(''));
  4095. * ICU_MARKER, '', 0, 1 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,
  4096. *
  4097. * // For moving existing nodes to a different location
  4098. * // --------------------------------------------------
  4099. * // Equivalent to:
  4100. * // const node = lView[1];
  4101. * // lView[2].appendChild(node);
  4102. * 1 << SHIFT_REF | Select, 2 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,
  4103. *
  4104. * // For removing existing nodes
  4105. * // --------------------------------------------------
  4106. * // const node = lView[1];
  4107. * // removeChild(tView.data(1), node, lView);
  4108. * 1 << SHIFT_REF | Remove,
  4109. *
  4110. * // For writing attributes
  4111. * // --------------------------------------------------
  4112. * // const node = lView[1];
  4113. * // node.setAttribute('attr', 'value');
  4114. * 1 << SHIFT_REF | Attr, 'attr', 'value'
  4115. * ];
  4116. * ```
  4117. */
  4118. declare interface IcuCreateOpCodes extends Array<number | string | ELEMENT_MARKER | ICU_MARKER | null>, I18nDebug {
  4119. __brand__: 'I18nCreateOpCodes';
  4120. }
  4121. /**
  4122. * Defines the ICU type of `select` or `plural`
  4123. */
  4124. declare const enum IcuType {
  4125. select = 0,
  4126. plural = 1
  4127. }
  4128. declare const ID = 19;
  4129. /**
  4130. * Providers that were imported from NgModules via the `importProvidersFrom` function.
  4131. *
  4132. * These providers are meant for use in an application injector (or other environment injectors) and
  4133. * should not be used in component injectors.
  4134. *
  4135. * This type cannot be directly implemented. It's returned from the `importProvidersFrom` function
  4136. * and serves to prevent the extracted NgModule providers from being used in the wrong contexts.
  4137. *
  4138. * @see {@link importProvidersFrom}
  4139. *
  4140. * @publicApi
  4141. * @deprecated replaced by `EnvironmentProviders`
  4142. */
  4143. export declare type ImportedNgModuleProviders = EnvironmentProviders;
  4144. /**
  4145. * Collects providers from all NgModules and standalone components, including transitively imported
  4146. * ones.
  4147. *
  4148. * Providers extracted via `importProvidersFrom` are only usable in an application injector or
  4149. * another environment injector (such as a route injector). They should not be used in component
  4150. * providers.
  4151. *
  4152. * More information about standalone components can be found in [this
  4153. * guide](guide/standalone-components).
  4154. *
  4155. * @usageNotes
  4156. * The results of the `importProvidersFrom` call can be used in the `bootstrapApplication` call:
  4157. *
  4158. * ```typescript
  4159. * await bootstrapApplication(RootComponent, {
  4160. * providers: [
  4161. * importProvidersFrom(NgModuleOne, NgModuleTwo)
  4162. * ]
  4163. * });
  4164. * ```
  4165. *
  4166. * You can also use the `importProvidersFrom` results in the `providers` field of a route, when a
  4167. * standalone component is used:
  4168. *
  4169. * ```typescript
  4170. * export const ROUTES: Route[] = [
  4171. * {
  4172. * path: 'foo',
  4173. * providers: [
  4174. * importProvidersFrom(NgModuleOne, NgModuleTwo)
  4175. * ],
  4176. * component: YourStandaloneComponent
  4177. * }
  4178. * ];
  4179. * ```
  4180. *
  4181. * @returns Collected providers from the specified list of types.
  4182. * @publicApi
  4183. */
  4184. export declare function importProvidersFrom(...sources: ImportProvidersSource[]): EnvironmentProviders;
  4185. /**
  4186. * A source of providers for the `importProvidersFrom` function.
  4187. *
  4188. * @publicApi
  4189. */
  4190. export declare type ImportProvidersSource = Type<unknown> | ModuleWithProviders<unknown> | Array<ImportProvidersSource>;
  4191. /**
  4192. * This array contains information about input properties that
  4193. * need to be set once from attribute data. It's ordered by
  4194. * directive index (relative to element) so it's simple to
  4195. * look up a specific directive's initial input data.
  4196. *
  4197. * Within each sub-array:
  4198. *
  4199. * i+0: attribute name
  4200. * i+1: minified/internal input name
  4201. * i+2: initial value
  4202. *
  4203. * If a directive on a node does not have any input properties
  4204. * that should be set from attributes, its index is set to null
  4205. * to avoid a sparse array.
  4206. *
  4207. * e.g. [null, ['role-min', 'minified-input', 'button']]
  4208. */
  4209. declare type InitialInputData = (InitialInputs | null)[];
  4210. /**
  4211. * Used by InitialInputData to store input properties
  4212. * that should be set once from attributes.
  4213. *
  4214. * i+0: attribute name
  4215. * i+1: minified/internal input name
  4216. * i+2: initial value
  4217. *
  4218. * e.g. ['role-min', 'minified-input', 'button']
  4219. */
  4220. declare type InitialInputs = string[];
  4221. /**
  4222. * Type of the Inject metadata.
  4223. *
  4224. * @publicApi
  4225. */
  4226. export declare interface Inject {
  4227. /**
  4228. * A [DI token](guide/glossary#di-token) that maps to the dependency to be injected.
  4229. */
  4230. token: any;
  4231. }
  4232. /**
  4233. * Inject decorator and metadata.
  4234. *
  4235. * @Annotation
  4236. * @publicApi
  4237. */
  4238. export declare const Inject: InjectDecorator;
  4239. /**
  4240. * @param token A token that represents a dependency that should be injected.
  4241. * @returns the injected value if operation is successful, `null` otherwise.
  4242. * @throws if called outside of a supported context.
  4243. *
  4244. * @publicApi
  4245. */
  4246. export declare function inject<T>(token: ProviderToken<T>): T;
  4247. /**
  4248. * @param token A token that represents a dependency that should be injected.
  4249. * @param flags Control how injection is executed. The flags correspond to injection strategies that
  4250. * can be specified with parameter decorators `@Host`, `@Self`, `@SkipSelf`, and `@Optional`.
  4251. * @returns the injected value if operation is successful, `null` otherwise.
  4252. * @throws if called outside of a supported context.
  4253. *
  4254. * @publicApi
  4255. * @deprecated prefer an options object instead of `InjectFlags`
  4256. */
  4257. export declare function inject<T>(token: ProviderToken<T>, flags?: InjectFlags): T | null;
  4258. /**
  4259. * @param token A token that represents a dependency that should be injected.
  4260. * @param options Control how injection is executed. Options correspond to injection strategies
  4261. * that can be specified with parameter decorators `@Host`, `@Self`, `@SkipSelf`, and
  4262. * `@Optional`.
  4263. * @returns the injected value if operation is successful.
  4264. * @throws if called outside of a supported context, or if the token is not found.
  4265. *
  4266. * @publicApi
  4267. */
  4268. export declare function inject<T>(token: ProviderToken<T>, options: InjectOptions & {
  4269. optional?: false;
  4270. }): T;
  4271. /**
  4272. * @param token A token that represents a dependency that should be injected.
  4273. * @param options Control how injection is executed. Options correspond to injection strategies
  4274. * that can be specified with parameter decorators `@Host`, `@Self`, `@SkipSelf`, and
  4275. * `@Optional`.
  4276. * @returns the injected value if operation is successful, `null` if the token is not
  4277. * found and optional injection has been requested.
  4278. * @throws if called outside of a supported context, or if the token is not found and optional
  4279. * injection was not requested.
  4280. *
  4281. * @publicApi
  4282. */
  4283. export declare function inject<T>(token: ProviderToken<T>, options: InjectOptions): T | null;
  4284. /**
  4285. * Type of the Injectable metadata.
  4286. *
  4287. * @publicApi
  4288. */
  4289. export declare interface Injectable {
  4290. /**
  4291. * Determines which injectors will provide the injectable.
  4292. *
  4293. * - `Type<any>` - associates the injectable with an `@NgModule` or other `InjectorType`. This
  4294. * option is DEPRECATED.
  4295. * - 'null' : Equivalent to `undefined`. The injectable is not provided in any scope automatically
  4296. * and must be added to a `providers` array of an [@NgModule](api/core/NgModule#providers),
  4297. * [@Component](api/core/Directive#providers) or [@Directive](api/core/Directive#providers).
  4298. *
  4299. * The following options specify that this injectable should be provided in one of the following
  4300. * injectors:
  4301. * - 'root' : The application-level injector in most apps.
  4302. * - 'platform' : A special singleton platform injector shared by all
  4303. * applications on the page.
  4304. * - 'any' : Provides a unique instance in each lazy loaded module while all eagerly loaded
  4305. * modules share one instance. This option is DEPRECATED.
  4306. *
  4307. */
  4308. providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;
  4309. }
  4310. /**
  4311. * Injectable decorator and metadata.
  4312. *
  4313. * @Annotation
  4314. * @publicApi
  4315. */
  4316. export declare const Injectable: InjectableDecorator;
  4317. /**
  4318. * Type of the Injectable decorator / constructor function.
  4319. *
  4320. * @publicApi
  4321. */
  4322. export declare interface InjectableDecorator {
  4323. /**
  4324. * Decorator that marks a class as available to be
  4325. * provided and injected as a dependency.
  4326. *
  4327. * @see [Introduction to Services and DI](guide/architecture-services)
  4328. * @see [Dependency Injection Guide](guide/dependency-injection)
  4329. *
  4330. * @usageNotes
  4331. *
  4332. * Marking a class with `@Injectable` ensures that the compiler
  4333. * will generate the necessary metadata to create the class's
  4334. * dependencies when the class is injected.
  4335. *
  4336. * The following example shows how a service class is properly
  4337. * marked so that a supporting service can be injected upon creation.
  4338. *
  4339. * <code-example path="core/di/ts/metadata_spec.ts" region="Injectable"></code-example>
  4340. *
  4341. */
  4342. (): TypeDecorator;
  4343. (options?: {
  4344. providedIn: Type<any> | 'root' | 'platform' | 'any' | null;
  4345. } & InjectableProvider): TypeDecorator;
  4346. new (): Injectable;
  4347. new (options?: {
  4348. providedIn: Type<any> | 'root' | 'platform' | 'any' | null;
  4349. } & InjectableProvider): Injectable;
  4350. }
  4351. /**
  4352. * Injectable providers used in `@Injectable` decorator.
  4353. *
  4354. * @publicApi
  4355. */
  4356. export declare type InjectableProvider = ValueSansProvider | ExistingSansProvider | StaticClassSansProvider | ConstructorSansProvider | FactorySansProvider | ClassSansProvider;
  4357. /**
  4358. * A `Type` which has a `ɵprov: ɵɵInjectableDeclaration` static field.
  4359. *
  4360. * `InjectableType`s contain their own Dependency Injection metadata and are usable in an
  4361. * `InjectorDef`-based `StaticInjector`.
  4362. *
  4363. * @publicApi
  4364. */
  4365. export declare interface InjectableType<T> extends Type<T> {
  4366. /**
  4367. * Opaque type whose structure is highly version dependent. Do not rely on any properties.
  4368. */
  4369. ɵprov: unknown;
  4370. }
  4371. /**
  4372. * Type of the Inject decorator / constructor function.
  4373. *
  4374. * @publicApi
  4375. */
  4376. export declare interface InjectDecorator {
  4377. /**
  4378. * Parameter decorator on a dependency parameter of a class constructor
  4379. * that specifies a custom provider of the dependency.
  4380. *
  4381. * @usageNotes
  4382. * The following example shows a class constructor that specifies a
  4383. * custom provider of a dependency using the parameter decorator.
  4384. *
  4385. * When `@Inject()` is not present, the injector uses the type annotation of the
  4386. * parameter as the provider.
  4387. *
  4388. * <code-example path="core/di/ts/metadata_spec.ts" region="InjectWithoutDecorator">
  4389. * </code-example>
  4390. *
  4391. * @see ["Dependency Injection Guide"](guide/dependency-injection)
  4392. *
  4393. */
  4394. (token: any): any;
  4395. new (token: any): Inject;
  4396. }
  4397. /**
  4398. * Injection flags for DI.
  4399. *
  4400. * @publicApi
  4401. * @deprecated use an options object for [`inject`](api/core/inject) instead.
  4402. */
  4403. export declare enum InjectFlags {
  4404. /** Check self and check parent injector if needed */
  4405. Default = 0,
  4406. /**
  4407. * Specifies that an injector should retrieve a dependency from any injector until reaching the
  4408. * host element of the current component. (Only used with Element Injector)
  4409. */
  4410. Host = 1,
  4411. /** Don't ascend to ancestors of the node requesting injection. */
  4412. Self = 2,
  4413. /** Skip the node that is requesting injection. */
  4414. SkipSelf = 4,
  4415. /** Inject `defaultValue` instead if token not found. */
  4416. Optional = 8
  4417. }
  4418. /**
  4419. * Creates a token that can be used in a DI Provider.
  4420. *
  4421. * Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a
  4422. * runtime representation) such as when injecting an interface, callable type, array or
  4423. * parameterized type.
  4424. *
  4425. * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by
  4426. * the `Injector`. This provides an additional level of type safety.
  4427. *
  4428. * <div class="alert is-helpful">
  4429. *
  4430. * **Important Note**: Ensure that you use the same instance of the `InjectionToken` in both the
  4431. * provider and the injection call. Creating a new instance of `InjectionToken` in different places,
  4432. * even with the same description, will be treated as different tokens by Angular's DI system,
  4433. * leading to a `NullInjectorError`.
  4434. *
  4435. * </div>
  4436. *
  4437. * <code-example format="typescript" language="typescript" path="injection-token/src/main.ts"
  4438. * region="InjectionToken"></code-example>
  4439. *
  4440. * When creating an `InjectionToken`, you can optionally specify a factory function which returns
  4441. * (possibly by creating) a default value of the parameterized type `T`. This sets up the
  4442. * `InjectionToken` using this factory as a provider as if it was defined explicitly in the
  4443. * application's root injector. If the factory function, which takes zero arguments, needs to inject
  4444. * dependencies, it can do so using the [`inject`](api/core/inject) function.
  4445. * As you can see in the Tree-shakable InjectionToken example below.
  4446. *
  4447. * Additionally, if a `factory` is specified you can also specify the `providedIn` option, which
  4448. * overrides the above behavior and marks the token as belonging to a particular `@NgModule` (note:
  4449. * this option is now deprecated). As mentioned above, `'root'` is the default value for
  4450. * `providedIn`.
  4451. *
  4452. * The `providedIn: NgModule` and `providedIn: 'any'` options are deprecated.
  4453. *
  4454. * @usageNotes
  4455. * ### Basic Examples
  4456. *
  4457. * ### Plain InjectionToken
  4458. *
  4459. * {@example core/di/ts/injector_spec.ts region='InjectionToken'}
  4460. *
  4461. * ### Tree-shakable InjectionToken
  4462. *
  4463. * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}
  4464. *
  4465. * @publicApi
  4466. */
  4467. export declare class InjectionToken<T> {
  4468. protected _desc: string;
  4469. readonly ɵprov: unknown;
  4470. /**
  4471. * @param _desc Description for the token,
  4472. * used only for debugging purposes,
  4473. * it should but does not need to be unique
  4474. * @param options Options for the token's usage, as described above
  4475. */
  4476. constructor(_desc: string, options?: {
  4477. providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;
  4478. factory: () => T;
  4479. });
  4480. toString(): string;
  4481. }
  4482. /**
  4483. * Type of the options argument to [`inject`](api/core/inject).
  4484. *
  4485. * @publicApi
  4486. */
  4487. export declare interface InjectOptions {
  4488. /**
  4489. * Use optional injection, and return `null` if the requested token is not found.
  4490. */
  4491. optional?: boolean;
  4492. /**
  4493. * Start injection at the parent of the current injector.
  4494. */
  4495. skipSelf?: boolean;
  4496. /**
  4497. * Only query the current injector for the token, and don't fall back to the parent injector if
  4498. * it's not found.
  4499. */
  4500. self?: boolean;
  4501. /**
  4502. * Stop injection at the host component's injector. Only relevant when injecting from an element
  4503. * injector, and a no-op for environment injectors.
  4504. */
  4505. host?: boolean;
  4506. }
  4507. /**
  4508. * An InjectionToken that gets the current `Injector` for `createInjector()`-style injectors.
  4509. *
  4510. * Requesting this token instead of `Injector` allows `StaticInjector` to be tree-shaken from a
  4511. * project.
  4512. *
  4513. * @publicApi
  4514. */
  4515. export declare const INJECTOR: InjectionToken<Injector>;
  4516. /**
  4517. * Concrete injectors implement this interface. Injectors are configured
  4518. * with [providers](guide/glossary#provider) that associate
  4519. * dependencies of various types with [injection tokens](guide/glossary#di-token).
  4520. *
  4521. * @see ["DI Providers"](guide/dependency-injection-providers).
  4522. * @see {@link StaticProvider}
  4523. *
  4524. * @usageNotes
  4525. *
  4526. * The following example creates a service injector instance.
  4527. *
  4528. * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}
  4529. *
  4530. * ### Usage example
  4531. *
  4532. * {@example core/di/ts/injector_spec.ts region='Injector'}
  4533. *
  4534. * `Injector` returns itself when given `Injector` as a token:
  4535. *
  4536. * {@example core/di/ts/injector_spec.ts region='injectInjector'}
  4537. *
  4538. * @publicApi
  4539. */
  4540. export declare abstract class Injector {
  4541. static THROW_IF_NOT_FOUND: {};
  4542. static NULL: Injector;
  4543. /**
  4544. * Internal note on the `options?: InjectOptions|InjectFlags` override of the `get`
  4545. * method: consider dropping the `InjectFlags` part in one of the major versions.
  4546. * It can **not** be done in minor/patch, since it's breaking for custom injectors
  4547. * that only implement the old `InjectorFlags` interface.
  4548. */
  4549. /**
  4550. * Retrieves an instance from the injector based on the provided token.
  4551. * @returns The instance from the injector if defined, otherwise the `notFoundValue`.
  4552. * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.
  4553. */
  4554. abstract get<T>(token: ProviderToken<T>, notFoundValue: undefined, options: InjectOptions & {
  4555. optional?: false;
  4556. }): T;
  4557. /**
  4558. * Retrieves an instance from the injector based on the provided token.
  4559. * @returns The instance from the injector if defined, otherwise the `notFoundValue`.
  4560. * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.
  4561. */
  4562. abstract get<T>(token: ProviderToken<T>, notFoundValue: null | undefined, options: InjectOptions): T | null;
  4563. /**
  4564. * Retrieves an instance from the injector based on the provided token.
  4565. * @returns The instance from the injector if defined, otherwise the `notFoundValue`.
  4566. * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.
  4567. */
  4568. abstract get<T>(token: ProviderToken<T>, notFoundValue?: T, options?: InjectOptions | InjectFlags): T;
  4569. /**
  4570. * Retrieves an instance from the injector based on the provided token.
  4571. * @returns The instance from the injector if defined, otherwise the `notFoundValue`.
  4572. * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.
  4573. * @deprecated use object-based flags (`InjectOptions`) instead.
  4574. */
  4575. abstract get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;
  4576. /**
  4577. * @deprecated from v4.0.0 use ProviderToken<T>
  4578. * @suppress {duplicate}
  4579. */
  4580. abstract get(token: any, notFoundValue?: any): any;
  4581. /**
  4582. * @deprecated from v5 use the new signature Injector.create(options)
  4583. */
  4584. static create(providers: StaticProvider[], parent?: Injector): Injector;
  4585. /**
  4586. * Creates a new injector instance that provides one or more dependencies,
  4587. * according to a given type or types of `StaticProvider`.
  4588. *
  4589. * @param options An object with the following properties:
  4590. * * `providers`: An array of providers of the [StaticProvider type](api/core/StaticProvider).
  4591. * * `parent`: (optional) A parent injector.
  4592. * * `name`: (optional) A developer-defined identifying name for the new injector.
  4593. *
  4594. * @returns The new injector instance.
  4595. *
  4596. */
  4597. static create(options: {
  4598. providers: Array<Provider | StaticProvider>;
  4599. parent?: Injector;
  4600. name?: string;
  4601. }): Injector;
  4602. /** @nocollapse */
  4603. static ɵprov: unknown;
  4604. }
  4605. declare const INJECTOR_2 = 9;
  4606. declare type InjectorScope = 'root' | 'platform' | 'environment';
  4607. /**
  4608. * A type which has an `InjectorDef` static field.
  4609. *
  4610. * `InjectorTypes` can be used to configure a `StaticInjector`.
  4611. *
  4612. * This is an opaque type whose structure is highly version dependent. Do not rely on any
  4613. * properties.
  4614. *
  4615. * @publicApi
  4616. */
  4617. export declare interface InjectorType<T> extends Type<T> {
  4618. ɵfac?: unknown;
  4619. ɵinj: unknown;
  4620. }
  4621. /**
  4622. * Describes the `InjectorDef` equivalent of a `ModuleWithProviders`, an `InjectorType` with an
  4623. * associated array of providers.
  4624. *
  4625. * Objects of this type can be listed in the imports section of an `InjectorDef`.
  4626. *
  4627. * NOTE: This is a private type and should not be exported
  4628. */
  4629. declare interface InjectorTypeWithProviders<T> {
  4630. ngModule: InjectorType<T>;
  4631. providers?: (Type<any> | ValueProvider | ExistingProvider | FactoryProvider | ConstructorProvider | StaticClassProvider | ClassProvider | EnvironmentProviders | any[])[];
  4632. }
  4633. /**
  4634. * Type of metadata for an `Input` property.
  4635. *
  4636. * @publicApi
  4637. */
  4638. export declare interface Input {
  4639. /**
  4640. * The name of the DOM property to which the input property is bound.
  4641. */
  4642. alias?: string;
  4643. /**
  4644. * Whether the input is required for the directive to function.
  4645. */
  4646. required?: boolean;
  4647. /**
  4648. * Function with which to transform the input value before assigning it to the directive instance.
  4649. */
  4650. transform?: (value: any) => any;
  4651. }
  4652. /**
  4653. * @Annotation
  4654. * @publicApi
  4655. */
  4656. export declare const Input: InputDecorator;
  4657. /**
  4658. * @publicApi
  4659. */
  4660. export declare interface InputDecorator {
  4661. /**
  4662. * Decorator that marks a class field as an input property and supplies configuration metadata.
  4663. * The input property is bound to a DOM property in the template. During change detection,
  4664. * Angular automatically updates the data property with the DOM property's value.
  4665. *
  4666. * @usageNotes
  4667. *
  4668. * You can supply an optional name to use in templates when the
  4669. * component is instantiated, that maps to the
  4670. * name of the bound property. By default, the original
  4671. * name of the bound property is used for input binding.
  4672. *
  4673. * The following example creates a component with two input properties,
  4674. * one of which is given a special binding name.
  4675. *
  4676. * ```typescript
  4677. * import { Component, Input, numberAttribute, booleanAttribute } from '@angular/core';
  4678. * @Component({
  4679. * selector: 'bank-account',
  4680. * template: `
  4681. * Bank Name: {{bankName}}
  4682. * Account Id: {{id}}
  4683. * Account Status: {{status ? 'Active' : 'InActive'}}
  4684. * `
  4685. * })
  4686. * class BankAccount {
  4687. * // This property is bound using its original name.
  4688. * // Defining argument required as true inside the Input Decorator
  4689. * // makes this property deceleration as mandatory
  4690. * @Input({ required: true }) bankName!: string;
  4691. * // Argument alias makes this property value is bound to a different property name
  4692. * // when this component is instantiated in a template.
  4693. * // Argument transform convert the input value from string to number
  4694. * @Input({ alias:'account-id', transform: numberAttribute }) id: number;
  4695. * // Argument transform the input value from string to boolean
  4696. * @Input({ transform: booleanAttribute }) status: boolean;
  4697. * // this property is not bound, and is not automatically updated by Angular
  4698. * normalizedBankName: string;
  4699. * }
  4700. *
  4701. * @Component({
  4702. * selector: 'app',
  4703. * template: `
  4704. * <bank-account bankName="RBC" account-id="4747" status="true"></bank-account>
  4705. * `
  4706. * })
  4707. * class App {}
  4708. * ```
  4709. *
  4710. * @see [Input and Output properties](guide/inputs-outputs)
  4711. */
  4712. (arg?: string | Input): any;
  4713. new (arg?: string | Input): any;
  4714. }
  4715. /** Function that can be used to transform incoming input values. */
  4716. declare type InputTransformFunction = (value: any) => any;
  4717. declare type InputTransformFunction_2 = any;
  4718. /**
  4719. * See `TNode.insertBeforeIndex`
  4720. */
  4721. declare type InsertBeforeIndex = null | number | number[];
  4722. declare interface InternalNgModuleRef<T> extends NgModuleRef<T> {
  4723. _bootstrapComponents: Type<any>[];
  4724. }
  4725. declare interface InternalViewRef extends ViewRef {
  4726. detachFromAppRef(): void;
  4727. attachToAppRef(appRef: ViewRefTracker): void;
  4728. }
  4729. /**
  4730. * Returns whether Angular is in development mode.
  4731. *
  4732. * By default, this is true, unless `enableProdMode` is invoked prior to calling this method or the
  4733. * application is built using the Angular CLI with the `optimization` option.
  4734. * @see {@link cli/build ng build}
  4735. *
  4736. * @publicApi
  4737. */
  4738. export declare function isDevMode(): boolean;
  4739. /**
  4740. * Checks if the given `value` is a reactive `Signal`.
  4741. *
  4742. * @developerPreview
  4743. */
  4744. export declare function isSignal(value: unknown): value is Signal<unknown>;
  4745. /**
  4746. * Checks whether a given Component, Directive or Pipe is marked as standalone.
  4747. * This will return false if passed anything other than a Component, Directive, or Pipe class
  4748. * See [this guide](/guide/standalone-components) for additional information:
  4749. *
  4750. * @param type A reference to a Component, Directive or Pipe.
  4751. * @publicApi
  4752. */
  4753. export declare function isStandalone(type: Type<unknown>): boolean;
  4754. /**
  4755. * Record representing the item change information.
  4756. *
  4757. * @publicApi
  4758. */
  4759. export declare interface IterableChangeRecord<V> {
  4760. /** Current index of the item in `Iterable` or null if removed. */
  4761. readonly currentIndex: number | null;
  4762. /** Previous index of the item in `Iterable` or null if added. */
  4763. readonly previousIndex: number | null;
  4764. /** The item. */
  4765. readonly item: V;
  4766. /** Track by identity as computed by the `TrackByFunction`. */
  4767. readonly trackById: any;
  4768. }
  4769. declare class IterableChangeRecord_<V> implements IterableChangeRecord<V> {
  4770. item: V;
  4771. trackById: any;
  4772. currentIndex: number | null;
  4773. previousIndex: number | null;
  4774. constructor(item: V, trackById: any);
  4775. }
  4776. /**
  4777. * An object describing the changes in the `Iterable` collection since last time
  4778. * `IterableDiffer#diff()` was invoked.
  4779. *
  4780. * @publicApi
  4781. */
  4782. export declare interface IterableChanges<V> {
  4783. /**
  4784. * Iterate over all changes. `IterableChangeRecord` will contain information about changes
  4785. * to each item.
  4786. */
  4787. forEachItem(fn: (record: IterableChangeRecord<V>) => void): void;
  4788. /**
  4789. * Iterate over a set of operations which when applied to the original `Iterable` will produce the
  4790. * new `Iterable`.
  4791. *
  4792. * NOTE: These are not necessarily the actual operations which were applied to the original
  4793. * `Iterable`, rather these are a set of computed operations which may not be the same as the
  4794. * ones applied.
  4795. *
  4796. * @param record A change which needs to be applied
  4797. * @param previousIndex The `IterableChangeRecord#previousIndex` of the `record` refers to the
  4798. * original `Iterable` location, where as `previousIndex` refers to the transient location
  4799. * of the item, after applying the operations up to this point.
  4800. * @param currentIndex The `IterableChangeRecord#currentIndex` of the `record` refers to the
  4801. * original `Iterable` location, where as `currentIndex` refers to the transient location
  4802. * of the item, after applying the operations up to this point.
  4803. */
  4804. forEachOperation(fn: (record: IterableChangeRecord<V>, previousIndex: number | null, currentIndex: number | null) => void): void;
  4805. /**
  4806. * Iterate over changes in the order of original `Iterable` showing where the original items
  4807. * have moved.
  4808. */
  4809. forEachPreviousItem(fn: (record: IterableChangeRecord<V>) => void): void;
  4810. /** Iterate over all added items. */
  4811. forEachAddedItem(fn: (record: IterableChangeRecord<V>) => void): void;
  4812. /** Iterate over all moved items. */
  4813. forEachMovedItem(fn: (record: IterableChangeRecord<V>) => void): void;
  4814. /** Iterate over all removed items. */
  4815. forEachRemovedItem(fn: (record: IterableChangeRecord<V>) => void): void;
  4816. /**
  4817. * Iterate over all items which had their identity (as computed by the `TrackByFunction`)
  4818. * changed.
  4819. */
  4820. forEachIdentityChange(fn: (record: IterableChangeRecord<V>) => void): void;
  4821. }
  4822. /**
  4823. * A strategy for tracking changes over time to an iterable. Used by {@link NgForOf} to
  4824. * respond to changes in an iterable by effecting equivalent changes in the DOM.
  4825. *
  4826. * @publicApi
  4827. */
  4828. export declare interface IterableDiffer<V> {
  4829. /**
  4830. * Compute a difference between the previous state and the new `object` state.
  4831. *
  4832. * @param object containing the new value.
  4833. * @returns an object describing the difference. The return value is only valid until the next
  4834. * `diff()` invocation.
  4835. */
  4836. diff(object: NgIterable<V> | undefined | null): IterableChanges<V> | null;
  4837. }
  4838. /**
  4839. * Provides a factory for {@link IterableDiffer}.
  4840. *
  4841. * @publicApi
  4842. */
  4843. export declare interface IterableDifferFactory {
  4844. supports(objects: any): boolean;
  4845. create<V>(trackByFn?: TrackByFunction<V>): IterableDiffer<V>;
  4846. }
  4847. /**
  4848. * A repository of different iterable diffing strategies used by NgFor, NgClass, and others.
  4849. *
  4850. * @publicApi
  4851. */
  4852. export declare class IterableDiffers {
  4853. private factories;
  4854. /** @nocollapse */
  4855. static ɵprov: unknown;
  4856. constructor(factories: IterableDifferFactory[]);
  4857. static create(factories: IterableDifferFactory[], parent?: IterableDiffers): IterableDiffers;
  4858. /**
  4859. * Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the
  4860. * inherited {@link IterableDiffers} instance with the provided factories and return a new
  4861. * {@link IterableDiffers} instance.
  4862. *
  4863. * @usageNotes
  4864. * ### Example
  4865. *
  4866. * The following example shows how to extend an existing list of factories,
  4867. * which will only be applied to the injector for this component and its children.
  4868. * This step is all that's required to make a new {@link IterableDiffer} available.
  4869. *
  4870. * ```
  4871. * @Component({
  4872. * viewProviders: [
  4873. * IterableDiffers.extend([new ImmutableListDiffer()])
  4874. * ]
  4875. * })
  4876. * ```
  4877. */
  4878. static extend(factories: IterableDifferFactory[]): StaticProvider;
  4879. find(iterable: any): IterableDifferFactory;
  4880. }
  4881. /**
  4882. * The existence of this constant (in this particular file) informs the Angular compiler that the
  4883. * current program is actually @angular/core, which needs to be compiled specially.
  4884. */
  4885. declare const ITS_JUST_ANGULAR = true;
  4886. /**
  4887. * `KeyValueArray` is an array where even positions contain keys and odd positions contain values.
  4888. *
  4889. * `KeyValueArray` provides a very efficient way of iterating over its contents. For small
  4890. * sets (~10) the cost of binary searching an `KeyValueArray` has about the same performance
  4891. * characteristics that of a `Map` with significantly better memory footprint.
  4892. *
  4893. * If used as a `Map` the keys are stored in alphabetical order so that they can be binary searched
  4894. * for retrieval.
  4895. *
  4896. * See: `keyValueArraySet`, `keyValueArrayGet`, `keyValueArrayIndexOf`, `keyValueArrayDelete`.
  4897. */
  4898. declare interface KeyValueArray<VALUE> extends Array<VALUE | string> {
  4899. __brand__: 'array-map';
  4900. }
  4901. /**
  4902. * Record representing the item change information.
  4903. *
  4904. * @publicApi
  4905. */
  4906. export declare interface KeyValueChangeRecord<K, V> {
  4907. /**
  4908. * Current key in the Map.
  4909. */
  4910. readonly key: K;
  4911. /**
  4912. * Current value for the key or `null` if removed.
  4913. */
  4914. readonly currentValue: V | null;
  4915. /**
  4916. * Previous value for the key or `null` if added.
  4917. */
  4918. readonly previousValue: V | null;
  4919. }
  4920. /**
  4921. * An object describing the changes in the `Map` or `{[k:string]: string}` since last time
  4922. * `KeyValueDiffer#diff()` was invoked.
  4923. *
  4924. * @publicApi
  4925. */
  4926. export declare interface KeyValueChanges<K, V> {
  4927. /**
  4928. * Iterate over all changes. `KeyValueChangeRecord` will contain information about changes
  4929. * to each item.
  4930. */
  4931. forEachItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
  4932. /**
  4933. * Iterate over changes in the order of original Map showing where the original items
  4934. * have moved.
  4935. */
  4936. forEachPreviousItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
  4937. /**
  4938. * Iterate over all keys for which values have changed.
  4939. */
  4940. forEachChangedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
  4941. /**
  4942. * Iterate over all added items.
  4943. */
  4944. forEachAddedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
  4945. /**
  4946. * Iterate over all removed items.
  4947. */
  4948. forEachRemovedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
  4949. }
  4950. /**
  4951. * A differ that tracks changes made to an object over time.
  4952. *
  4953. * @publicApi
  4954. */
  4955. export declare interface KeyValueDiffer<K, V> {
  4956. /**
  4957. * Compute a difference between the previous state and the new `object` state.
  4958. *
  4959. * @param object containing the new value.
  4960. * @returns an object describing the difference. The return value is only valid until the next
  4961. * `diff()` invocation.
  4962. */
  4963. diff(object: Map<K, V>): KeyValueChanges<K, V> | null;
  4964. /**
  4965. * Compute a difference between the previous state and the new `object` state.
  4966. *
  4967. * @param object containing the new value.
  4968. * @returns an object describing the difference. The return value is only valid until the next
  4969. * `diff()` invocation.
  4970. */
  4971. diff(object: {
  4972. [key: string]: V;
  4973. }): KeyValueChanges<string, V> | null;
  4974. }
  4975. /**
  4976. * Provides a factory for {@link KeyValueDiffer}.
  4977. *
  4978. * @publicApi
  4979. */
  4980. export declare interface KeyValueDifferFactory {
  4981. /**
  4982. * Test to see if the differ knows how to diff this kind of object.
  4983. */
  4984. supports(objects: any): boolean;
  4985. /**
  4986. * Create a `KeyValueDiffer`.
  4987. */
  4988. create<K, V>(): KeyValueDiffer<K, V>;
  4989. }
  4990. /**
  4991. * A repository of different Map diffing strategies used by NgClass, NgStyle, and others.
  4992. *
  4993. * @publicApi
  4994. */
  4995. export declare class KeyValueDiffers {
  4996. /** @nocollapse */
  4997. static ɵprov: unknown;
  4998. /**
  4999. * @deprecated v4.0.0 - Should be private.
  5000. */
  5001. factories: KeyValueDifferFactory[];
  5002. constructor(factories: KeyValueDifferFactory[]);
  5003. static create<S>(factories: KeyValueDifferFactory[], parent?: KeyValueDiffers): KeyValueDiffers;
  5004. /**
  5005. * Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the
  5006. * inherited {@link KeyValueDiffers} instance with the provided factories and return a new
  5007. * {@link KeyValueDiffers} instance.
  5008. *
  5009. * @usageNotes
  5010. * ### Example
  5011. *
  5012. * The following example shows how to extend an existing list of factories,
  5013. * which will only be applied to the injector for this component and its children.
  5014. * This step is all that's required to make a new {@link KeyValueDiffer} available.
  5015. *
  5016. * ```
  5017. * @Component({
  5018. * viewProviders: [
  5019. * KeyValueDiffers.extend([new ImmutableMapDiffer()])
  5020. * ]
  5021. * })
  5022. * ```
  5023. */
  5024. static extend<S>(factories: KeyValueDifferFactory[]): StaticProvider;
  5025. find(kv: any): KeyValueDifferFactory;
  5026. }
  5027. /**
  5028. * The state associated with a container.
  5029. *
  5030. * This is an array so that its structure is closer to LView. This helps
  5031. * when traversing the view tree (which is a mix of containers and component
  5032. * views), so we can jump to viewOrContainer[NEXT] in the same way regardless
  5033. * of type.
  5034. */
  5035. declare interface LContainer extends Array<any> {
  5036. /**
  5037. * The host element of this LContainer.
  5038. *
  5039. * The host could be an LView if this container is on a component node.
  5040. * In that case, the component LView is its HOST.
  5041. */
  5042. readonly [HOST]: RElement | RComment | LView;
  5043. /**
  5044. * This is a type field which allows us to differentiate `LContainer` from `StylingContext` in an
  5045. * efficient way. The value is always set to `true`
  5046. */
  5047. [TYPE]: true;
  5048. /**
  5049. * Flag to signify that this `LContainer` may have transplanted views which need to be change
  5050. * detected. (see: `LView[DECLARATION_COMPONENT_VIEW])`.
  5051. *
  5052. * This flag, once set, is never unset for the `LContainer`.
  5053. */
  5054. [HAS_TRANSPLANTED_VIEWS]: boolean;
  5055. /**
  5056. * Access to the parent view is necessary so we can propagate back
  5057. * up from inside a container to parent[NEXT].
  5058. */
  5059. [PARENT]: LView;
  5060. /**
  5061. * This allows us to jump from a container to a sibling container or component
  5062. * view with the same parent, so we can remove listeners efficiently.
  5063. */
  5064. [NEXT]: LView | LContainer | null;
  5065. /**
  5066. * The number of direct transplanted views which need a refresh or have descendants themselves
  5067. * that need a refresh but have not marked their ancestors as Dirty. This tells us that during
  5068. * change detection we should still descend to find those children to refresh, even if the parents
  5069. * are not `Dirty`/`CheckAlways`.
  5070. */
  5071. [DESCENDANT_VIEWS_TO_REFRESH]: number;
  5072. /**
  5073. * A collection of views created based on the underlying `<ng-template>` element but inserted into
  5074. * a different `LContainer`. We need to track views created from a given declaration point since
  5075. * queries collect matches from the embedded view declaration point and _not_ the insertion point.
  5076. */
  5077. [MOVED_VIEWS]: LView[] | null;
  5078. /**
  5079. * Pointer to the `TNode` which represents the host of the container.
  5080. */
  5081. [T_HOST]: TNode;
  5082. /** The comment element that serves as an anchor for this LContainer. */
  5083. [NATIVE]: RComment;
  5084. /**
  5085. * Array of `ViewRef`s used by any `ViewContainerRef`s that point to this container.
  5086. *
  5087. * This is lazily initialized by `ViewContainerRef` when the first view is inserted.
  5088. *
  5089. * NOTE: This is stored as `any[]` because render3 should really not be aware of `ViewRef` and
  5090. * doing so creates circular dependency.
  5091. */
  5092. [VIEW_REFS]: unknown[] | null;
  5093. /**
  5094. * Array of dehydrated views within this container.
  5095. *
  5096. * This information is used during the hydration process on the client.
  5097. * The hydration logic tries to find a matching dehydrated view, "claim" it
  5098. * and use this information to do further matching. After that, this "claimed"
  5099. * view is removed from the list. The remaining "unclaimed" views are
  5100. * "garbage-collected" later on, i.e. removed from the DOM once the hydration
  5101. * logic finishes.
  5102. */
  5103. [DEHYDRATED_VIEWS]: DehydratedContainerView[] | null;
  5104. }
  5105. /**
  5106. * Provide this token to set the locale of your application.
  5107. * It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,
  5108. * DecimalPipe and PercentPipe) and by ICU expressions.
  5109. *
  5110. * See the [i18n guide](guide/i18n-common-locale-id) for more information.
  5111. *
  5112. * @usageNotes
  5113. * ### Example
  5114. *
  5115. * ```typescript
  5116. * import { LOCALE_ID } from '@angular/core';
  5117. * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
  5118. * import { AppModule } from './app/app.module';
  5119. *
  5120. * platformBrowserDynamic().bootstrapModule(AppModule, {
  5121. * providers: [{provide: LOCALE_ID, useValue: 'en-US' }]
  5122. * });
  5123. * ```
  5124. *
  5125. * @publicApi
  5126. */
  5127. export declare const LOCALE_ID: InjectionToken<string>;
  5128. /**
  5129. * Type for a function that extracts a value for a local refs.
  5130. * Example:
  5131. * - `<div #nativeDivEl>` - `nativeDivEl` should point to the native `<div>` element;
  5132. * - `<ng-template #tplRef>` - `tplRef` should point to the `TemplateRef` instance;
  5133. */
  5134. declare type LocalRefExtractor = (tNode: TNodeWithLocalRefs, currentView: LView) => any;
  5135. /**
  5136. * lQueries represent a collection of individual LQuery objects tracked in a given view.
  5137. */
  5138. declare interface LQueries {
  5139. /**
  5140. * A collection of queries tracked in a given view.
  5141. */
  5142. queries: LQuery<any>[];
  5143. /**
  5144. * A method called when a new embedded view is created. As a result a set of LQueries applicable
  5145. * for a new embedded view is instantiated (cloned) from the declaration view.
  5146. * @param tView
  5147. */
  5148. createEmbeddedView(tView: TView): LQueries | null;
  5149. /**
  5150. * A method called when an embedded view is inserted into a container. As a result all impacted
  5151. * `LQuery` objects (and associated `QueryList`) are marked as dirty.
  5152. * @param tView
  5153. */
  5154. insertView(tView: TView): void;
  5155. /**
  5156. * A method called when an embedded view is detached from a container. As a result all impacted
  5157. * `LQuery` objects (and associated `QueryList`) are marked as dirty.
  5158. * @param tView
  5159. */
  5160. detachView(tView: TView): void;
  5161. }
  5162. /**
  5163. * An interface that represents query-related information specific to a view instance. Most notably
  5164. * it contains:
  5165. * - materialized query matches;
  5166. * - a pointer to a QueryList where materialized query results should be reported.
  5167. */
  5168. declare interface LQuery<T> {
  5169. /**
  5170. * Materialized query matches for a given view only (!). Results are initialized lazily so the
  5171. * array of matches is set to `null` initially.
  5172. */
  5173. matches: (T | null)[] | null;
  5174. /**
  5175. * A QueryList where materialized query results should be reported.
  5176. */
  5177. queryList: QueryList<T>;
  5178. /**
  5179. * Clones an LQuery for an embedded view. A cloned query shares the same `QueryList` but has a
  5180. * separate collection of materialized matches.
  5181. */
  5182. clone(): LQuery<T>;
  5183. /**
  5184. * Called when an embedded view, impacting results of this query, is inserted or removed.
  5185. */
  5186. setDirty(): void;
  5187. }
  5188. /**
  5189. * `LView` stores all of the information needed to process the instructions as
  5190. * they are invoked from the template. Each embedded view and component view has its
  5191. * own `LView`. When processing a particular view, we set the `viewData` to that
  5192. * `LView`. When that view is done processing, the `viewData` is set back to
  5193. * whatever the original `viewData` was before (the parent `LView`).
  5194. *
  5195. * Keeping separate state for each view facilities view insertion / deletion, so we
  5196. * don't have to edit the data array based on which views are present.
  5197. */
  5198. declare interface LView<T = unknown> extends Array<any> {
  5199. /**
  5200. * The node into which this `LView` is inserted.
  5201. */
  5202. [HOST]: RElement | null;
  5203. /**
  5204. * The static data for this view. We need a reference to this so we can easily walk up the
  5205. * node tree in DI and get the TView.data array associated with a node (where the
  5206. * directive defs are stored).
  5207. */
  5208. readonly [TVIEW]: TView;
  5209. /** Flags for this view. See LViewFlags for more info. */
  5210. [FLAGS]: LViewFlags;
  5211. /**
  5212. * This may store an {@link LView} or {@link LContainer}.
  5213. *
  5214. * `LView` - The parent view. This is needed when we exit the view and must restore the previous
  5215. * LView. Without this, the render method would have to keep a stack of
  5216. * views as it is recursively rendering templates.
  5217. *
  5218. * `LContainer` - The current view is part of a container, and is an embedded view.
  5219. */
  5220. [PARENT]: LView | LContainer | null;
  5221. /**
  5222. *
  5223. * The next sibling LView or LContainer.
  5224. *
  5225. * Allows us to propagate between sibling view states that aren't in the same
  5226. * container. Embedded views already have a node.next, but it is only set for
  5227. * views in the same container. We need a way to link component views and views
  5228. * across containers as well.
  5229. */
  5230. [NEXT]: LView | LContainer | null;
  5231. /** Queries active for this view - nodes from a view are reported to those queries. */
  5232. [QUERIES]: LQueries | null;
  5233. /**
  5234. * Store the `TNode` of the location where the current `LView` is inserted into.
  5235. *
  5236. * Given:
  5237. * ```
  5238. * <div>
  5239. * <ng-template><span></span></ng-template>
  5240. * </div>
  5241. * ```
  5242. *
  5243. * We end up with two `TView`s.
  5244. * - `parent` `TView` which contains `<div><!-- anchor --></div>`
  5245. * - `child` `TView` which contains `<span></span>`
  5246. *
  5247. * Typically the `child` is inserted into the declaration location of the `parent`, but it can be
  5248. * inserted anywhere. Because it can be inserted anywhere it is not possible to store the
  5249. * insertion information in the `TView` and instead we must store it in the `LView[T_HOST]`.
  5250. *
  5251. * So to determine where is our insertion parent we would execute:
  5252. * ```
  5253. * const parentLView = lView[PARENT];
  5254. * const parentTNode = lView[T_HOST];
  5255. * const insertionParent = parentLView[parentTNode.index];
  5256. * ```
  5257. *
  5258. *
  5259. * If `null`, this is the root view of an application (root component is in this view) and it has
  5260. * no parents.
  5261. */
  5262. [T_HOST]: TNode | null;
  5263. /**
  5264. * When a view is destroyed, listeners need to be released and outputs need to be
  5265. * unsubscribed. This context array stores both listener functions wrapped with
  5266. * their context and output subscription instances for a particular view.
  5267. *
  5268. * These change per LView instance, so they cannot be stored on TView. Instead,
  5269. * TView.cleanup saves an index to the necessary context in this array.
  5270. *
  5271. * After `LView` is created it is possible to attach additional instance specific functions at the
  5272. * end of the `lView[CLEANUP]` because we know that no more `T` level cleanup functions will be
  5273. * added here.
  5274. */
  5275. [CLEANUP]: any[] | null;
  5276. /**
  5277. * - For dynamic views, this is the context with which to render the template (e.g.
  5278. * `NgForContext`), or `{}` if not defined explicitly.
  5279. * - For root view of the root component it's a reference to the component instance itself.
  5280. * - For components, the context is a reference to the component instance itself.
  5281. * - For inline views, the context is null.
  5282. */
  5283. [CONTEXT]: T;
  5284. /** An optional Module Injector to be used as fall back after Element Injectors are consulted. */
  5285. readonly [INJECTOR_2]: Injector | null;
  5286. /**
  5287. * Contextual data that is shared across multiple instances of `LView` in the same application.
  5288. */
  5289. [ENVIRONMENT]: LViewEnvironment;
  5290. /** Renderer to be used for this view. */
  5291. [RENDERER]: Renderer;
  5292. /**
  5293. * Reference to the first LView or LContainer beneath this LView in
  5294. * the hierarchy.
  5295. *
  5296. * Necessary to store this so views can traverse through their nested views
  5297. * to remove listeners and call onDestroy callbacks.
  5298. */
  5299. [CHILD_HEAD]: LView | LContainer | null;
  5300. /**
  5301. * The last LView or LContainer beneath this LView in the hierarchy.
  5302. *
  5303. * The tail allows us to quickly add a new state to the end of the view list
  5304. * without having to propagate starting from the first child.
  5305. */
  5306. [CHILD_TAIL]: LView | LContainer | null;
  5307. /**
  5308. * View where this view's template was declared.
  5309. *
  5310. * The template for a dynamically created view may be declared in a different view than
  5311. * it is inserted. We already track the "insertion view" (view where the template was
  5312. * inserted) in LView[PARENT], but we also need access to the "declaration view"
  5313. * (view where the template was declared). Otherwise, we wouldn't be able to call the
  5314. * view's template function with the proper contexts. Context should be inherited from
  5315. * the declaration view tree, not the insertion view tree.
  5316. *
  5317. * Example (AppComponent template):
  5318. *
  5319. * <ng-template #foo></ng-template> <-- declared here -->
  5320. * <some-comp [tpl]="foo"></some-comp> <-- inserted inside this component -->
  5321. *
  5322. * The <ng-template> above is declared in the AppComponent template, but it will be passed into
  5323. * SomeComp and inserted there. In this case, the declaration view would be the AppComponent,
  5324. * but the insertion view would be SomeComp. When we are removing views, we would want to
  5325. * traverse through the insertion view to clean up listeners. When we are calling the
  5326. * template function during change detection, we need the declaration view to get inherited
  5327. * context.
  5328. */
  5329. [DECLARATION_VIEW]: LView | null;
  5330. /**
  5331. * Points to the declaration component view, used to track transplanted `LView`s.
  5332. *
  5333. * See: `DECLARATION_VIEW` which points to the actual `LView` where it was declared, whereas
  5334. * `DECLARATION_COMPONENT_VIEW` points to the component which may not be same as
  5335. * `DECLARATION_VIEW`.
  5336. *
  5337. * Example:
  5338. * ```
  5339. * <#VIEW #myComp>
  5340. * <div *ngIf="true">
  5341. * <ng-template #myTmpl>...</ng-template>
  5342. * </div>
  5343. * </#VIEW>
  5344. * ```
  5345. * In the above case `DECLARATION_VIEW` for `myTmpl` points to the `LView` of `ngIf` whereas
  5346. * `DECLARATION_COMPONENT_VIEW` points to `LView` of the `myComp` which owns the template.
  5347. *
  5348. * The reason for this is that all embedded views are always check-always whereas the component
  5349. * view can be check-always or on-push. When we have a transplanted view it is important to
  5350. * determine if we have transplanted a view from check-always declaration to on-push insertion
  5351. * point. In such a case the transplanted view needs to be added to the `LContainer` in the
  5352. * declared `LView` and CD during the declared view CD (in addition to the CD at the insertion
  5353. * point.) (Any transplanted views which are intra Component are of no interest because the CD
  5354. * strategy of declaration and insertion will always be the same, because it is the same
  5355. * component.)
  5356. *
  5357. * Queries already track moved views in `LView[DECLARATION_LCONTAINER]` and
  5358. * `LContainer[MOVED_VIEWS]`. However the queries also track `LView`s which moved within the same
  5359. * component `LView`. Transplanted views are a subset of moved views, and we use
  5360. * `DECLARATION_COMPONENT_VIEW` to differentiate them. As in this example.
  5361. *
  5362. * Example showing intra component `LView` movement.
  5363. * ```
  5364. * <#VIEW #myComp>
  5365. * <div *ngIf="condition; then thenBlock else elseBlock"></div>
  5366. * <ng-template #thenBlock>Content to render when condition is true.</ng-template>
  5367. * <ng-template #elseBlock>Content to render when condition is false.</ng-template>
  5368. * </#VIEW>
  5369. * ```
  5370. * The `thenBlock` and `elseBlock` is moved but not transplanted.
  5371. *
  5372. * Example showing inter component `LView` movement (transplanted view).
  5373. * ```
  5374. * <#VIEW #myComp>
  5375. * <ng-template #myTmpl>...</ng-template>
  5376. * <insertion-component [template]="myTmpl"></insertion-component>
  5377. * </#VIEW>
  5378. * ```
  5379. * In the above example `myTmpl` is passed into a different component. If `insertion-component`
  5380. * instantiates `myTmpl` and `insertion-component` is on-push then the `LContainer` needs to be
  5381. * marked as containing transplanted views and those views need to be CD as part of the
  5382. * declaration CD.
  5383. *
  5384. *
  5385. * When change detection runs, it iterates over `[MOVED_VIEWS]` and CDs any child `LView`s where
  5386. * the `DECLARATION_COMPONENT_VIEW` of the current component and the child `LView` does not match
  5387. * (it has been transplanted across components.)
  5388. *
  5389. * Note: `[DECLARATION_COMPONENT_VIEW]` points to itself if the LView is a component view (the
  5390. * simplest / most common case).
  5391. *
  5392. * see also:
  5393. * - https://hackmd.io/@mhevery/rJUJsvv9H write up of the problem
  5394. * - `LContainer[HAS_TRANSPLANTED_VIEWS]` which marks which `LContainer` has transplanted views.
  5395. * - `LContainer[TRANSPLANT_HEAD]` and `LContainer[TRANSPLANT_TAIL]` storage for transplanted
  5396. * - `LView[DECLARATION_LCONTAINER]` similar problem for queries
  5397. * - `LContainer[MOVED_VIEWS]` similar problem for queries
  5398. */
  5399. [DECLARATION_COMPONENT_VIEW]: LView;
  5400. /**
  5401. * A declaration point of embedded views (ones instantiated based on the content of a
  5402. * <ng-template>), null for other types of views.
  5403. *
  5404. * We need to track all embedded views created from a given declaration point so we can prepare
  5405. * query matches in a proper order (query matches are ordered based on their declaration point and
  5406. * _not_ the insertion point).
  5407. */
  5408. [DECLARATION_LCONTAINER]: LContainer | null;
  5409. /**
  5410. * More flags for this view. See PreOrderHookFlags for more info.
  5411. */
  5412. [PREORDER_HOOK_FLAGS]: PreOrderHookFlags;
  5413. /**
  5414. * The number of direct transplanted views which need a refresh or have descendants themselves
  5415. * that need a refresh but have not marked their ancestors as Dirty. This tells us that during
  5416. * change detection we should still descend to find those children to refresh, even if the parents
  5417. * are not `Dirty`/`CheckAlways`.
  5418. */
  5419. [DESCENDANT_VIEWS_TO_REFRESH]: number;
  5420. /** Unique ID of the view. Used for `__ngContext__` lookups in the `LView` registry. */
  5421. [ID]: number;
  5422. /**
  5423. * A container related to hydration annotation information that's associated with this LView.
  5424. */
  5425. [HYDRATION]: DehydratedView | null;
  5426. /**
  5427. * Optional injector assigned to embedded views that takes
  5428. * precedence over the element and module injectors.
  5429. */
  5430. readonly [EMBEDDED_VIEW_INJECTOR]: Injector | null;
  5431. /**
  5432. * A collection of callbacks functions that are executed when a given LView is destroyed. Those
  5433. * are user defined, LView-specific destroy callbacks that don't have any corresponding TView
  5434. * entries.
  5435. */
  5436. [ON_DESTROY_HOOKS]: Array<() => void> | null;
  5437. /**
  5438. * The `Consumer` for this `LView`'s template so that signal reads can be tracked.
  5439. *
  5440. * This is initially `null` and gets assigned a consumer after template execution
  5441. * if any signals were read.
  5442. */
  5443. [REACTIVE_TEMPLATE_CONSUMER]: ReactiveLViewConsumer | null;
  5444. /**
  5445. * Same as REACTIVE_TEMPLATE_CONSUMER, but for the host bindings of the LView.
  5446. */
  5447. [REACTIVE_HOST_BINDING_CONSUMER]: ReactiveLViewConsumer | null;
  5448. }
  5449. /**
  5450. * Contextual data that is shared across multiple instances of `LView` in the same application.
  5451. */
  5452. declare interface LViewEnvironment {
  5453. /** Factory to be used for creating Renderer. */
  5454. rendererFactory: RendererFactory;
  5455. /** An optional custom sanitizer. */
  5456. sanitizer: Sanitizer | null;
  5457. /** Container for reactivity system `effect`s. */
  5458. effectManager: EffectManager | null;
  5459. /** Container for after render hooks */
  5460. afterRenderEventManager: ɵAfterRenderEventManager | null;
  5461. }
  5462. /** Flags associated with an LView (saved in LView[FLAGS]) */
  5463. declare const enum LViewFlags {
  5464. /** The state of the init phase on the first 2 bits */
  5465. InitPhaseStateIncrementer = 1,
  5466. InitPhaseStateMask = 3,
  5467. /**
  5468. * Whether or not the view is in creationMode.
  5469. *
  5470. * This must be stored in the view rather than using `data` as a marker so that
  5471. * we can properly support embedded views. Otherwise, when exiting a child view
  5472. * back into the parent view, `data` will be defined and `creationMode` will be
  5473. * improperly reported as false.
  5474. */
  5475. CreationMode = 4,
  5476. /**
  5477. * Whether or not this LView instance is on its first processing pass.
  5478. *
  5479. * An LView instance is considered to be on its "first pass" until it
  5480. * has completed one creation mode run and one update mode run. At this
  5481. * time, the flag is turned off.
  5482. */
  5483. FirstLViewPass = 8,
  5484. /** Whether this view has default change detection strategy (checks always) or onPush */
  5485. CheckAlways = 16,
  5486. /** Whether there are any i18n blocks inside this LView. */
  5487. HasI18n = 32,
  5488. /** Whether or not this view is currently dirty (needing check) */
  5489. Dirty = 64,
  5490. /** Whether or not this view is currently attached to change detection tree. */
  5491. Attached = 128,
  5492. /** Whether or not this view is destroyed. */
  5493. Destroyed = 256,
  5494. /** Whether or not this view is the root view */
  5495. IsRoot = 512,
  5496. /**
  5497. * Whether this moved LView was needs to be refreshed. Similar to the Dirty flag, but used for
  5498. * transplanted and signal views where the parent/ancestor views are not marked dirty as well.
  5499. * i.e. "Refresh just this view". Used in conjunction with the DESCENDANT_VIEWS_TO_REFRESH
  5500. * counter.
  5501. */
  5502. RefreshView = 1024,
  5503. /** Indicates that the view **or any of its ancestors** have an embedded view injector. */
  5504. HasEmbeddedViewInjector = 2048,
  5505. /** Indicates that the view was created with `signals: true`. */
  5506. SignalView = 4096,
  5507. /**
  5508. * This is the count of the bits the 1 was shifted above (base 10)
  5509. */
  5510. IndexWithinInitPhaseShift = 13,
  5511. /**
  5512. * Index of the current init phase on last 21 bits
  5513. */
  5514. IndexWithinInitPhaseIncrementer = 8192,
  5515. IndexWithinInitPhaseReset = 8191
  5516. }
  5517. /**
  5518. * Wrap an array of `Provider`s into `EnvironmentProviders`, preventing them from being accidentally
  5519. * referenced in `@Component` in a component injector.
  5520. */
  5521. export declare function makeEnvironmentProviders(providers: (Provider | EnvironmentProviders)[]): EnvironmentProviders;
  5522. /**
  5523. * Create a `StateKey<T>` that can be used to store value of type T with `TransferState`.
  5524. *
  5525. * Example:
  5526. *
  5527. * ```
  5528. * const COUNTER_KEY = makeStateKey<number>('counter');
  5529. * let value = 10;
  5530. *
  5531. * transferState.set(COUNTER_KEY, value);
  5532. * ```
  5533. *
  5534. * @publicApi
  5535. */
  5536. export declare function makeStateKey<T = void>(key: string): StateKey<T>;
  5537. /**
  5538. * Merge multiple application configurations from left to right.
  5539. *
  5540. * @param configs Two or more configurations to be merged.
  5541. * @returns A merged [ApplicationConfig](api/core/ApplicationConfig).
  5542. *
  5543. * @publicApi
  5544. */
  5545. export declare function mergeApplicationConfig(...configs: ApplicationConfig[]): ApplicationConfig;
  5546. /**
  5547. * Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy
  5548. * that the compiler should use in case of missing translations:
  5549. * - Error: throw if you have missing translations.
  5550. * - Warning (default): show a warning in the console and/or shell.
  5551. * - Ignore: do nothing.
  5552. *
  5553. * See the [i18n guide](guide/i18n-common-merge#report-missing-translations) for more information.
  5554. *
  5555. * @usageNotes
  5556. * ### Example
  5557. * ```typescript
  5558. * import { MissingTranslationStrategy } from '@angular/core';
  5559. * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
  5560. * import { AppModule } from './app/app.module';
  5561. *
  5562. * platformBrowserDynamic().bootstrapModule(AppModule, {
  5563. * missingTranslation: MissingTranslationStrategy.Error
  5564. * });
  5565. * ```
  5566. *
  5567. * @publicApi
  5568. */
  5569. export declare enum MissingTranslationStrategy {
  5570. Error = 0,
  5571. Warning = 1,
  5572. Ignore = 2
  5573. }
  5574. /**
  5575. * Combination of NgModuleFactory and ComponentFactories.
  5576. *
  5577. * @publicApi
  5578. *
  5579. * @deprecated
  5580. * Ivy JIT mode doesn't require accessing this symbol.
  5581. * See [JIT API changes due to ViewEngine deprecation](guide/deprecations#jit-api-changes) for
  5582. * additional context.
  5583. */
  5584. export declare class ModuleWithComponentFactories<T> {
  5585. ngModuleFactory: NgModuleFactory<T>;
  5586. componentFactories: ComponentFactory<any>[];
  5587. constructor(ngModuleFactory: NgModuleFactory<T>, componentFactories: ComponentFactory<any>[]);
  5588. }
  5589. /**
  5590. * A wrapper around an NgModule that associates it with [providers](guide/glossary#provider
  5591. * "Definition"). Usage without a generic type is deprecated.
  5592. *
  5593. * @see [Deprecations](guide/deprecations#modulewithproviders-type-without-a-generic)
  5594. *
  5595. * @publicApi
  5596. */
  5597. export declare interface ModuleWithProviders<T> {
  5598. ngModule: Type<T>;
  5599. providers?: Array<Provider | EnvironmentProviders>;
  5600. }
  5601. declare const MOVED_VIEWS = 9;
  5602. declare const MULTIPLIER = "x";
  5603. declare type Mutable<T extends {
  5604. [x: string]: any;
  5605. }, K extends string> = {
  5606. [P in K]: T[P];
  5607. };
  5608. declare const NATIVE = 7;
  5609. declare const NEXT = 4;
  5610. /**
  5611. * A type describing supported iterable types.
  5612. *
  5613. * @publicApi
  5614. */
  5615. export declare type NgIterable<T> = Array<T> | Iterable<T>;
  5616. /**
  5617. * Type of the NgModule metadata.
  5618. *
  5619. * @publicApi
  5620. */
  5621. export declare interface NgModule {
  5622. /**
  5623. * The set of injectable objects that are available in the injector
  5624. * of this module.
  5625. *
  5626. * @see [Dependency Injection guide](guide/dependency-injection)
  5627. * @see [NgModule guide](guide/providers)
  5628. *
  5629. * @usageNotes
  5630. *
  5631. * Dependencies whose providers are listed here become available for injection
  5632. * into any component, directive, pipe or service that is a child of this injector.
  5633. * The NgModule used for bootstrapping uses the root injector, and can provide dependencies
  5634. * to any part of the app.
  5635. *
  5636. * A lazy-loaded module has its own injector, typically a child of the app root injector.
  5637. * Lazy-loaded services are scoped to the lazy-loaded module's injector.
  5638. * If a lazy-loaded module also provides the `UserService`, any component created
  5639. * within that module's context (such as by router navigation) gets the local instance
  5640. * of the service, not the instance in the root injector.
  5641. * Components in external modules continue to receive the instance provided by their injectors.
  5642. *
  5643. * ### Example
  5644. *
  5645. * The following example defines a class that is injected in
  5646. * the HelloWorld NgModule:
  5647. *
  5648. * ```
  5649. * class Greeter {
  5650. * greet(name:string) {
  5651. * return 'Hello ' + name + '!';
  5652. * }
  5653. * }
  5654. *
  5655. * @NgModule({
  5656. * providers: [
  5657. * Greeter
  5658. * ]
  5659. * })
  5660. * class HelloWorld {
  5661. * greeter:Greeter;
  5662. *
  5663. * constructor(greeter:Greeter) {
  5664. * this.greeter = greeter;
  5665. * }
  5666. * }
  5667. * ```
  5668. */
  5669. providers?: Array<Provider | EnvironmentProviders>;
  5670. /**
  5671. * The set of components, directives, and pipes ([declarables](guide/glossary#declarable))
  5672. * that belong to this module.
  5673. *
  5674. * @usageNotes
  5675. *
  5676. * The set of selectors that are available to a template include those declared here, and
  5677. * those that are exported from imported NgModules.
  5678. *
  5679. * Declarables must belong to exactly one module.
  5680. * The compiler emits an error if you try to declare the same class in more than one module.
  5681. * Be careful not to declare a class that is imported from another module.
  5682. *
  5683. * ### Example
  5684. *
  5685. * The following example allows the CommonModule to use the `NgFor`
  5686. * directive.
  5687. *
  5688. * ```javascript
  5689. * @NgModule({
  5690. * declarations: [NgFor]
  5691. * })
  5692. * class CommonModule {
  5693. * }
  5694. * ```
  5695. */
  5696. declarations?: Array<Type<any> | any[]>;
  5697. /**
  5698. * The set of NgModules whose exported [declarables](guide/glossary#declarable)
  5699. * are available to templates in this module.
  5700. *
  5701. * @usageNotes
  5702. *
  5703. * A template can use exported declarables from any
  5704. * imported module, including those from modules that are imported indirectly
  5705. * and re-exported.
  5706. * For example, `ModuleA` imports `ModuleB`, and also exports
  5707. * it, which makes the declarables from `ModuleB` available
  5708. * wherever `ModuleA` is imported.
  5709. *
  5710. * ### Example
  5711. *
  5712. * The following example allows MainModule to use anything exported by
  5713. * `CommonModule`:
  5714. *
  5715. * ```javascript
  5716. * @NgModule({
  5717. * imports: [CommonModule]
  5718. * })
  5719. * class MainModule {
  5720. * }
  5721. * ```
  5722. *
  5723. */
  5724. imports?: Array<Type<any> | ModuleWithProviders<{}> | any[]>;
  5725. /**
  5726. * The set of components, directives, and pipes declared in this
  5727. * NgModule that can be used in the template of any component that is part of an
  5728. * NgModule that imports this NgModule. Exported declarations are the module's public API.
  5729. *
  5730. * A declarable belongs to one and only one NgModule.
  5731. * A module can list another module among its exports, in which case all of that module's
  5732. * public declaration are exported.
  5733. *
  5734. * @usageNotes
  5735. *
  5736. * Declarations are private by default.
  5737. * If this ModuleA does not export UserComponent, then only the components within this
  5738. * ModuleA can use UserComponent.
  5739. *
  5740. * ModuleA can import ModuleB and also export it, making exports from ModuleB
  5741. * available to an NgModule that imports ModuleA.
  5742. *
  5743. * ### Example
  5744. *
  5745. * The following example exports the `NgFor` directive from CommonModule.
  5746. *
  5747. * ```javascript
  5748. * @NgModule({
  5749. * exports: [NgFor]
  5750. * })
  5751. * class CommonModule {
  5752. * }
  5753. * ```
  5754. */
  5755. exports?: Array<Type<any> | any[]>;
  5756. /**
  5757. * The set of components that are bootstrapped when this module is bootstrapped.
  5758. */
  5759. bootstrap?: Array<Type<any> | any[]>;
  5760. /**
  5761. * The set of schemas that declare elements to be allowed in the NgModule.
  5762. * Elements and properties that are neither Angular components nor directives
  5763. * must be declared in a schema.
  5764. *
  5765. * Allowed value are `NO_ERRORS_SCHEMA` and `CUSTOM_ELEMENTS_SCHEMA`.
  5766. *
  5767. * @security When using one of `NO_ERRORS_SCHEMA` or `CUSTOM_ELEMENTS_SCHEMA`
  5768. * you must ensure that allowed elements and properties securely escape inputs.
  5769. */
  5770. schemas?: Array<SchemaMetadata | any[]>;
  5771. /**
  5772. * A name or path that uniquely identifies this NgModule in `getNgModuleById`.
  5773. * If left `undefined`, the NgModule is not registered with `getNgModuleById`.
  5774. */
  5775. id?: string;
  5776. /**
  5777. * When present, this module is ignored by the AOT compiler.
  5778. * It remains in distributed code, and the JIT compiler attempts to compile it
  5779. * at run time, in the browser.
  5780. * To ensure the correct behavior, the app must import `@angular/compiler`.
  5781. */
  5782. jit?: true;
  5783. }
  5784. /**
  5785. * @Annotation
  5786. */
  5787. export declare const NgModule: NgModuleDecorator;
  5788. /**
  5789. * Type of the NgModule decorator / constructor function.
  5790. *
  5791. * @publicApi
  5792. */
  5793. export declare interface NgModuleDecorator {
  5794. /**
  5795. * Decorator that marks a class as an NgModule and supplies configuration metadata.
  5796. */
  5797. (obj?: NgModule): TypeDecorator;
  5798. new (obj?: NgModule): NgModule;
  5799. }
  5800. /**
  5801. * @publicApi
  5802. *
  5803. * @deprecated
  5804. * This class was mostly used as a part of ViewEngine-based JIT API and is no longer needed in Ivy
  5805. * JIT mode. See [JIT API changes due to ViewEngine deprecation](guide/deprecations#jit-api-changes)
  5806. * for additional context. Angular provides APIs that accept NgModule classes directly (such as
  5807. * [PlatformRef.bootstrapModule](api/core/PlatformRef#bootstrapModule) and
  5808. * [createNgModule](api/core/createNgModule)), consider switching to those APIs instead of
  5809. * using factory-based ones.
  5810. */
  5811. export declare abstract class NgModuleFactory<T> {
  5812. abstract get moduleType(): Type<T>;
  5813. abstract create(parentInjector: Injector | null): NgModuleRef<T>;
  5814. }
  5815. /**
  5816. * Represents an instance of an `NgModule` created by an `NgModuleFactory`.
  5817. * Provides access to the `NgModule` instance and related objects.
  5818. *
  5819. * @publicApi
  5820. */
  5821. export declare abstract class NgModuleRef<T> {
  5822. /**
  5823. * The injector that contains all of the providers of the `NgModule`.
  5824. */
  5825. abstract get injector(): EnvironmentInjector;
  5826. /**
  5827. * The resolver that can retrieve component factories in a context of this module.
  5828. *
  5829. * Note: since v13, dynamic component creation via
  5830. * [`ViewContainerRef.createComponent`](api/core/ViewContainerRef#createComponent)
  5831. * does **not** require resolving component factory: component class can be used directly.
  5832. *
  5833. * @deprecated Angular no longer requires Component factories. Please use other APIs where
  5834. * Component class can be used directly.
  5835. */
  5836. abstract get componentFactoryResolver(): ComponentFactoryResolver;
  5837. /**
  5838. * The `NgModule` instance.
  5839. */
  5840. abstract get instance(): T;
  5841. /**
  5842. * Destroys the module instance and all of the data structures associated with it.
  5843. */
  5844. abstract destroy(): void;
  5845. /**
  5846. * Registers a callback to be executed when the module is destroyed.
  5847. */
  5848. abstract onDestroy(callback: () => void): void;
  5849. }
  5850. /**
  5851. * NgModule scope info as provided by NgModule decorator.
  5852. */
  5853. declare interface NgModuleScopeInfoFromDecorator {
  5854. /** List of components, directives, and pipes declared by this module. */
  5855. declarations?: Type<any>[] | (() => Type<any>[]);
  5856. /** List of modules or `ModuleWithProviders` imported by this module. */
  5857. imports?: Type<any>[] | (() => Type<any>[]);
  5858. /**
  5859. * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this
  5860. * module.
  5861. */
  5862. exports?: Type<any>[] | (() => Type<any>[]);
  5863. }
  5864. /**
  5865. * A token for third-party components that can register themselves with NgProbe.
  5866. *
  5867. * @publicApi
  5868. */
  5869. export declare class NgProbeToken {
  5870. name: string;
  5871. token: any;
  5872. constructor(name: string, token: any);
  5873. }
  5874. /**
  5875. * An injectable service for executing work inside or outside of the Angular zone.
  5876. *
  5877. * The most common use of this service is to optimize performance when starting a work consisting of
  5878. * one or more asynchronous tasks that don't require UI updates or error handling to be handled by
  5879. * Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks
  5880. * can reenter the Angular zone via {@link #run}.
  5881. *
  5882. * <!-- TODO: add/fix links to:
  5883. * - docs explaining zones and the use of zones in Angular and change-detection
  5884. * - link to runOutsideAngular/run (throughout this file!)
  5885. * -->
  5886. *
  5887. * @usageNotes
  5888. * ### Example
  5889. *
  5890. * ```
  5891. * import {Component, NgZone} from '@angular/core';
  5892. * import {NgIf} from '@angular/common';
  5893. *
  5894. * @Component({
  5895. * selector: 'ng-zone-demo',
  5896. * template: `
  5897. * <h2>Demo: NgZone</h2>
  5898. *
  5899. * <p>Progress: {{progress}}%</p>
  5900. * <p *ngIf="progress >= 100">Done processing {{label}} of Angular zone!</p>
  5901. *
  5902. * <button (click)="processWithinAngularZone()">Process within Angular zone</button>
  5903. * <button (click)="processOutsideOfAngularZone()">Process outside of Angular zone</button>
  5904. * `,
  5905. * })
  5906. * export class NgZoneDemo {
  5907. * progress: number = 0;
  5908. * label: string;
  5909. *
  5910. * constructor(private _ngZone: NgZone) {}
  5911. *
  5912. * // Loop inside the Angular zone
  5913. * // so the UI DOES refresh after each setTimeout cycle
  5914. * processWithinAngularZone() {
  5915. * this.label = 'inside';
  5916. * this.progress = 0;
  5917. * this._increaseProgress(() => console.log('Inside Done!'));
  5918. * }
  5919. *
  5920. * // Loop outside of the Angular zone
  5921. * // so the UI DOES NOT refresh after each setTimeout cycle
  5922. * processOutsideOfAngularZone() {
  5923. * this.label = 'outside';
  5924. * this.progress = 0;
  5925. * this._ngZone.runOutsideAngular(() => {
  5926. * this._increaseProgress(() => {
  5927. * // reenter the Angular zone and display done
  5928. * this._ngZone.run(() => { console.log('Outside Done!'); });
  5929. * });
  5930. * });
  5931. * }
  5932. *
  5933. * _increaseProgress(doneCallback: () => void) {
  5934. * this.progress += 1;
  5935. * console.log(`Current progress: ${this.progress}%`);
  5936. *
  5937. * if (this.progress < 100) {
  5938. * window.setTimeout(() => this._increaseProgress(doneCallback), 10);
  5939. * } else {
  5940. * doneCallback();
  5941. * }
  5942. * }
  5943. * }
  5944. * ```
  5945. *
  5946. * @publicApi
  5947. */
  5948. export declare class NgZone {
  5949. readonly hasPendingMacrotasks: boolean;
  5950. readonly hasPendingMicrotasks: boolean;
  5951. /**
  5952. * Whether there are no outstanding microtasks or macrotasks.
  5953. */
  5954. readonly isStable: boolean;
  5955. /**
  5956. * Notifies when code enters Angular Zone. This gets fired first on VM Turn.
  5957. */
  5958. readonly onUnstable: EventEmitter<any>;
  5959. /**
  5960. * Notifies when there is no more microtasks enqueued in the current VM Turn.
  5961. * This is a hint for Angular to do change detection, which may enqueue more microtasks.
  5962. * For this reason this event can fire multiple times per VM Turn.
  5963. */
  5964. readonly onMicrotaskEmpty: EventEmitter<any>;
  5965. /**
  5966. * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which
  5967. * implies we are about to relinquish VM turn.
  5968. * This event gets called just once.
  5969. */
  5970. readonly onStable: EventEmitter<any>;
  5971. /**
  5972. * Notifies that an error has been delivered.
  5973. */
  5974. readonly onError: EventEmitter<any>;
  5975. constructor({ enableLongStackTrace, shouldCoalesceEventChangeDetection, shouldCoalesceRunChangeDetection }: {
  5976. enableLongStackTrace?: boolean | undefined;
  5977. shouldCoalesceEventChangeDetection?: boolean | undefined;
  5978. shouldCoalesceRunChangeDetection?: boolean | undefined;
  5979. });
  5980. /**
  5981. This method checks whether the method call happens within an Angular Zone instance.
  5982. */
  5983. static isInAngularZone(): boolean;
  5984. /**
  5985. Assures that the method is called within the Angular Zone, otherwise throws an error.
  5986. */
  5987. static assertInAngularZone(): void;
  5988. /**
  5989. Assures that the method is called outside of the Angular Zone, otherwise throws an error.
  5990. */
  5991. static assertNotInAngularZone(): void;
  5992. /**
  5993. * Executes the `fn` function synchronously within the Angular zone and returns value returned by
  5994. * the function.
  5995. *
  5996. * Running functions via `run` allows you to reenter Angular zone from a task that was executed
  5997. * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
  5998. *
  5999. * Any future tasks or microtasks scheduled from within this function will continue executing from
  6000. * within the Angular zone.
  6001. *
  6002. * If a synchronous error happens it will be rethrown and not reported via `onError`.
  6003. */
  6004. run<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T;
  6005. /**
  6006. * Executes the `fn` function synchronously within the Angular zone as a task and returns value
  6007. * returned by the function.
  6008. *
  6009. * Running functions via `run` allows you to reenter Angular zone from a task that was executed
  6010. * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
  6011. *
  6012. * Any future tasks or microtasks scheduled from within this function will continue executing from
  6013. * within the Angular zone.
  6014. *
  6015. * If a synchronous error happens it will be rethrown and not reported via `onError`.
  6016. */
  6017. runTask<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[], name?: string): T;
  6018. /**
  6019. * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not
  6020. * rethrown.
  6021. */
  6022. runGuarded<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T;
  6023. /**
  6024. * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by
  6025. * the function.
  6026. *
  6027. * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do
  6028. * work that
  6029. * doesn't trigger Angular change-detection or is subject to Angular's error handling.
  6030. *
  6031. * Any future tasks or microtasks scheduled from within this function will continue executing from
  6032. * outside of the Angular zone.
  6033. *
  6034. * Use {@link #run} to reenter the Angular zone and do work that updates the application model.
  6035. */
  6036. runOutsideAngular<T>(fn: (...args: any[]) => T): T;
  6037. }
  6038. /**
  6039. * Used to configure event and run coalescing with `provideZoneChangeDetection`.
  6040. *
  6041. * @publicApi
  6042. *
  6043. * @see {@link provideZoneChangeDetection}
  6044. */
  6045. export declare interface NgZoneOptions {
  6046. /**
  6047. * Optionally specify coalescing event change detections or not.
  6048. * Consider the following case.
  6049. *
  6050. * ```
  6051. * <div (click)="doSomething()">
  6052. * <button (click)="doSomethingElse()"></button>
  6053. * </div>
  6054. * ```
  6055. *
  6056. * When button is clicked, because of the event bubbling, both
  6057. * event handlers will be called and 2 change detections will be
  6058. * triggered. We can coalesce such kind of events to only trigger
  6059. * change detection only once.
  6060. *
  6061. * By default, this option will be false. So the events will not be
  6062. * coalesced and the change detection will be triggered multiple times.
  6063. * And if this option be set to true, the change detection will be
  6064. * triggered async by scheduling a animation frame. So in the case above,
  6065. * the change detection will only be triggered once.
  6066. */
  6067. eventCoalescing?: boolean;
  6068. /**
  6069. * Optionally specify if `NgZone#run()` method invocations should be coalesced
  6070. * into a single change detection.
  6071. *
  6072. * Consider the following case.
  6073. * ```
  6074. * for (let i = 0; i < 10; i ++) {
  6075. * ngZone.run(() => {
  6076. * // do something
  6077. * });
  6078. * }
  6079. * ```
  6080. *
  6081. * This case triggers the change detection multiple times.
  6082. * With ngZoneRunCoalescing options, all change detections in an event loop trigger only once.
  6083. * In addition, the change detection executes in requestAnimation.
  6084. *
  6085. */
  6086. runCoalescing?: boolean;
  6087. }
  6088. /**
  6089. * Defines a schema that allows any property on any element.
  6090. *
  6091. * This schema allows you to ignore the errors related to any unknown elements or properties in a
  6092. * template. The usage of this schema is generally discouraged because it prevents useful validation
  6093. * and may hide real errors in your template. Consider using the `CUSTOM_ELEMENTS_SCHEMA` instead.
  6094. *
  6095. * @publicApi
  6096. */
  6097. export declare const NO_ERRORS_SCHEMA: SchemaMetadata;
  6098. declare const NODES = "n";
  6099. declare const NUM_ROOT_NODES = "r";
  6100. /**
  6101. * Transforms a value (typically a string) to a number.
  6102. * Intended to be used as a transform function of an input.
  6103. * @param value Value to be transformed.
  6104. * @param fallbackValue Value to use if the provided value can't be parsed as a number.
  6105. *
  6106. * @usageNotes
  6107. * ```typescript
  6108. * @Input({ transform: numberAttribute }) id!: number;
  6109. * ```
  6110. *
  6111. * @publicApi
  6112. */
  6113. export declare function numberAttribute(value: unknown, fallbackValue?: number): number;
  6114. declare const ON_DESTROY_HOOKS = 21;
  6115. /**
  6116. * @description
  6117. * A lifecycle hook that is called when any data-bound property of a directive changes.
  6118. * Define an `ngOnChanges()` method to handle the changes.
  6119. *
  6120. * @see {@link DoCheck}
  6121. * @see {@link OnInit}
  6122. * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
  6123. *
  6124. * @usageNotes
  6125. * The following snippet shows how a component can implement this interface to
  6126. * define an on-changes handler for an input property.
  6127. *
  6128. * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnChanges'}
  6129. *
  6130. * @publicApi
  6131. */
  6132. export declare interface OnChanges {
  6133. /**
  6134. * A callback method that is invoked immediately after the
  6135. * default change detector has checked data-bound properties
  6136. * if at least one has changed, and before the view and content
  6137. * children are checked.
  6138. * @param changes The changed properties.
  6139. */
  6140. ngOnChanges(changes: SimpleChanges): void;
  6141. }
  6142. /**
  6143. * A lifecycle hook that is called when a directive, pipe, or service is destroyed.
  6144. * Use for any custom cleanup that needs to occur when the
  6145. * instance is destroyed.
  6146. * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
  6147. *
  6148. * @usageNotes
  6149. * The following snippet shows how a component can implement this interface
  6150. * to define its own custom clean-up method.
  6151. *
  6152. * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnDestroy'}
  6153. *
  6154. * @publicApi
  6155. */
  6156. export declare interface OnDestroy {
  6157. /**
  6158. * A callback method that performs custom clean-up, invoked immediately
  6159. * before a directive, pipe, or service instance is destroyed.
  6160. */
  6161. ngOnDestroy(): void;
  6162. }
  6163. /**
  6164. * @description
  6165. * A lifecycle hook that is called after Angular has initialized
  6166. * all data-bound properties of a directive.
  6167. * Define an `ngOnInit()` method to handle any additional initialization tasks.
  6168. *
  6169. * @see {@link AfterContentInit}
  6170. * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
  6171. *
  6172. * @usageNotes
  6173. * The following snippet shows how a component can implement this interface to
  6174. * define its own initialization method.
  6175. *
  6176. * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnInit'}
  6177. *
  6178. * @publicApi
  6179. */
  6180. export declare interface OnInit {
  6181. /**
  6182. * A callback method that is invoked immediately after the
  6183. * default change detector has checked the directive's
  6184. * data-bound properties for the first time,
  6185. * and before any of the view or content children have been checked.
  6186. * It is invoked only once when the directive is instantiated.
  6187. */
  6188. ngOnInit(): void;
  6189. }
  6190. declare type OpaqueValue = unknown;
  6191. declare interface OpaqueViewState {
  6192. '__brand__': 'Brand for OpaqueViewState that nothing will match';
  6193. }
  6194. /**
  6195. * Type of the Optional metadata.
  6196. *
  6197. * @publicApi
  6198. */
  6199. export declare interface Optional {
  6200. }
  6201. /**
  6202. * Optional decorator and metadata.
  6203. *
  6204. * @Annotation
  6205. * @publicApi
  6206. */
  6207. export declare const Optional: OptionalDecorator;
  6208. /**
  6209. * Type of the Optional decorator / constructor function.
  6210. *
  6211. * @publicApi
  6212. */
  6213. export declare interface OptionalDecorator {
  6214. /**
  6215. * Parameter decorator to be used on constructor parameters,
  6216. * which marks the parameter as being an optional dependency.
  6217. * The DI framework provides `null` if the dependency is not found.
  6218. *
  6219. * Can be used together with other parameter decorators
  6220. * that modify how dependency injection operates.
  6221. *
  6222. * @usageNotes
  6223. *
  6224. * The following code allows the possibility of a `null` result:
  6225. *
  6226. * <code-example path="core/di/ts/metadata_spec.ts" region="Optional">
  6227. * </code-example>
  6228. *
  6229. * @see ["Dependency Injection Guide"](guide/dependency-injection).
  6230. */
  6231. (): any;
  6232. new (): Optional;
  6233. }
  6234. /**
  6235. * Type of the Output metadata.
  6236. *
  6237. * @publicApi
  6238. */
  6239. export declare interface Output {
  6240. /**
  6241. * The name of the DOM property to which the output property is bound.
  6242. */
  6243. alias?: string;
  6244. }
  6245. /**
  6246. * @Annotation
  6247. * @publicApi
  6248. */
  6249. export declare const Output: OutputDecorator;
  6250. /**
  6251. * Type of the Output decorator / constructor function.
  6252. *
  6253. * @publicApi
  6254. */
  6255. export declare interface OutputDecorator {
  6256. /**
  6257. * Decorator that marks a class field as an output property and supplies configuration metadata.
  6258. * The DOM property bound to the output property is automatically updated during change detection.
  6259. *
  6260. * @usageNotes
  6261. *
  6262. * You can supply an optional name to use in templates when the
  6263. * component is instantiated, that maps to the
  6264. * name of the bound property. By default, the original
  6265. * name of the bound property is used for output binding.
  6266. *
  6267. * See `Input` decorator for an example of providing a binding name.
  6268. *
  6269. * @see [Input and Output properties](guide/inputs-outputs)
  6270. *
  6271. */
  6272. (alias?: string): any;
  6273. new (alias?: string): any;
  6274. }
  6275. /**
  6276. * A [DI token](guide/glossary#di-token "DI token definition") that indicates the root directory of
  6277. * the application
  6278. * @publicApi
  6279. * @deprecated
  6280. */
  6281. export declare const PACKAGE_ROOT_URL: InjectionToken<string>;
  6282. declare const PARENT = 3;
  6283. /**
  6284. * Type of the Pipe metadata.
  6285. *
  6286. * @publicApi
  6287. */
  6288. export declare interface Pipe {
  6289. /**
  6290. * The pipe name to use in template bindings.
  6291. * Typically uses [lowerCamelCase](guide/glossary#case-types)
  6292. * because the name cannot contain hyphens.
  6293. */
  6294. name: string;
  6295. /**
  6296. * When true, the pipe is pure, meaning that the
  6297. * `transform()` method is invoked only when its input arguments
  6298. * change. Pipes are pure by default.
  6299. *
  6300. * If the pipe has internal state (that is, the result
  6301. * depends on state other than its arguments), set `pure` to false.
  6302. * In this case, the pipe is invoked on each change-detection cycle,
  6303. * even if the arguments have not changed.
  6304. */
  6305. pure?: boolean;
  6306. /**
  6307. * Angular pipes marked as `standalone` do not need to be declared in an NgModule. Such
  6308. * pipes don't depend on any "intermediate context" of an NgModule (ex. configured providers).
  6309. *
  6310. * More information about standalone components, directives, and pipes can be found in [this
  6311. * guide](guide/standalone-components).
  6312. */
  6313. standalone?: boolean;
  6314. }
  6315. /**
  6316. * @Annotation
  6317. * @publicApi
  6318. */
  6319. export declare const Pipe: PipeDecorator;
  6320. /**
  6321. * Type of the Pipe decorator / constructor function.
  6322. *
  6323. * @publicApi
  6324. */
  6325. export declare interface PipeDecorator {
  6326. /**
  6327. *
  6328. * Decorator that marks a class as pipe and supplies configuration metadata.
  6329. *
  6330. * A pipe class must implement the `PipeTransform` interface.
  6331. * For example, if the name is "myPipe", use a template binding expression
  6332. * such as the following:
  6333. *
  6334. * ```
  6335. * {{ exp | myPipe }}
  6336. * ```
  6337. *
  6338. * The result of the expression is passed to the pipe's `transform()` method.
  6339. *
  6340. * A pipe must belong to an NgModule in order for it to be available
  6341. * to a template. To make it a member of an NgModule,
  6342. * list it in the `declarations` field of the `NgModule` metadata.
  6343. *
  6344. * @see [Style Guide: Pipe Names](guide/styleguide#02-09)
  6345. *
  6346. */
  6347. (obj: Pipe): TypeDecorator;
  6348. /**
  6349. * See the `Pipe` decorator.
  6350. */
  6351. new (obj: Pipe): Pipe;
  6352. }
  6353. declare type PipeDefList = ɵPipeDef<any>[];
  6354. /**
  6355. * Type used for PipeDefs on component definition.
  6356. *
  6357. * The function is necessary to be able to support forward declarations.
  6358. */
  6359. declare type PipeDefListOrFactory = (() => PipeDefList) | PipeDefList;
  6360. /**
  6361. * An interface that is implemented by pipes in order to perform a transformation.
  6362. * Angular invokes the `transform` method with the value of a binding
  6363. * as the first argument, and any parameters as the second argument in list form.
  6364. *
  6365. * @usageNotes
  6366. *
  6367. * In the following example, `TruncatePipe` returns the shortened value with an added ellipses.
  6368. *
  6369. * <code-example path="core/ts/pipes/simple_truncate.ts" header="simple_truncate.ts"></code-example>
  6370. *
  6371. * Invoking `{{ 'It was the best of times' | truncate }}` in a template will produce `It was...`.
  6372. *
  6373. * In the following example, `TruncatePipe` takes parameters that sets the truncated length and the
  6374. * string to append with.
  6375. *
  6376. * <code-example path="core/ts/pipes/truncate.ts" header="truncate.ts"></code-example>
  6377. *
  6378. * Invoking `{{ 'It was the best of times' | truncate:4:'....' }}` in a template will produce `It
  6379. * was the best....`.
  6380. *
  6381. * @publicApi
  6382. */
  6383. export declare interface PipeTransform {
  6384. transform(value: any, ...args: any[]): any;
  6385. }
  6386. /**
  6387. * A subclass of `Type` which has a static `ɵpipe`:`PipeDef` field making it
  6388. * consumable for rendering.
  6389. */
  6390. declare interface PipeType<T> extends Type<T> {
  6391. ɵpipe: unknown;
  6392. }
  6393. /**
  6394. * A token that indicates an opaque platform ID.
  6395. * @publicApi
  6396. */
  6397. export declare const PLATFORM_ID: InjectionToken<Object>;
  6398. /**
  6399. * A function that is executed when a platform is initialized.
  6400. * @publicApi
  6401. */
  6402. export declare const PLATFORM_INITIALIZER: InjectionToken<(() => void)[]>;
  6403. /**
  6404. * This platform has to be included in any other platform
  6405. *
  6406. * @publicApi
  6407. */
  6408. export declare const platformCore: (extraProviders?: StaticProvider[] | undefined) => PlatformRef;
  6409. /**
  6410. * The Angular platform is the entry point for Angular on a web page.
  6411. * Each page has exactly one platform. Services (such as reflection) which are common
  6412. * to every Angular application running on the page are bound in its scope.
  6413. * A page's platform is initialized implicitly when a platform is created using a platform
  6414. * factory such as `PlatformBrowser`, or explicitly by calling the `createPlatform()` function.
  6415. *
  6416. * @publicApi
  6417. */
  6418. export declare class PlatformRef {
  6419. private _injector;
  6420. private _modules;
  6421. private _destroyListeners;
  6422. private _destroyed;
  6423. /**
  6424. * Creates an instance of an `@NgModule` for the given platform.
  6425. *
  6426. * @deprecated Passing NgModule factories as the `PlatformRef.bootstrapModuleFactory` function
  6427. * argument is deprecated. Use the `PlatformRef.bootstrapModule` API instead.
  6428. */
  6429. bootstrapModuleFactory<M>(moduleFactory: NgModuleFactory<M>, options?: BootstrapOptions): Promise<NgModuleRef<M>>;
  6430. /**
  6431. * Creates an instance of an `@NgModule` for a given platform.
  6432. *
  6433. * @usageNotes
  6434. * ### Simple Example
  6435. *
  6436. * ```typescript
  6437. * @NgModule({
  6438. * imports: [BrowserModule]
  6439. * })
  6440. * class MyModule {}
  6441. *
  6442. * let moduleRef = platformBrowser().bootstrapModule(MyModule);
  6443. * ```
  6444. *
  6445. */
  6446. bootstrapModule<M>(moduleType: Type<M>, compilerOptions?: (CompilerOptions & BootstrapOptions) | Array<CompilerOptions & BootstrapOptions>): Promise<NgModuleRef<M>>;
  6447. private _moduleDoBootstrap;
  6448. /**
  6449. * Registers a listener to be called when the platform is destroyed.
  6450. */
  6451. onDestroy(callback: () => void): void;
  6452. /**
  6453. * Retrieves the platform {@link Injector}, which is the parent injector for
  6454. * every Angular application on the page and provides singleton providers.
  6455. */
  6456. get injector(): Injector;
  6457. /**
  6458. * Destroys the current Angular platform and all Angular applications on the page.
  6459. * Destroys all modules and listeners registered with the platform.
  6460. */
  6461. destroy(): void;
  6462. /**
  6463. * Indicates whether this instance was destroyed.
  6464. */
  6465. get destroyed(): boolean;
  6466. static ɵfac: i0.ɵɵFactoryDeclaration<PlatformRef, never>;
  6467. static ɵprov: i0.ɵɵInjectableDeclaration<PlatformRef>;
  6468. }
  6469. declare interface PlatformReflectionCapabilities {
  6470. factory(type: Type<any>): Function;
  6471. hasLifecycleHook(type: any, lcProperty: string): boolean;
  6472. /**
  6473. * Return a list of annotations/types for constructor parameters
  6474. */
  6475. parameters(type: Type<any>): any[][];
  6476. /**
  6477. * Return a list of annotations declared on the class
  6478. */
  6479. annotations(type: Type<any>): any[];
  6480. /**
  6481. * Return a object literal which describes the annotations on Class fields/properties.
  6482. */
  6483. propMetadata(typeOrFunc: Type<any>): {
  6484. [key: string]: any[];
  6485. };
  6486. }
  6487. /**
  6488. * A boolean-valued function over a value, possibly including context information
  6489. * regarding that value's position in an array.
  6490. *
  6491. * @publicApi
  6492. */
  6493. export declare interface Predicate<T> {
  6494. (value: T): boolean;
  6495. }
  6496. declare const PREORDER_HOOK_FLAGS = 17;
  6497. /** More flags associated with an LView (saved in LView[PREORDER_HOOK_FLAGS]) */
  6498. declare const enum PreOrderHookFlags {
  6499. /**
  6500. The index of the next pre-order hook to be called in the hooks array, on the first 16
  6501. bits
  6502. */
  6503. IndexOfTheNextPreOrderHookMaskMask = 65535,
  6504. /**
  6505. * The number of init hooks that have already been called, on the last 16 bits
  6506. */
  6507. NumberOfInitHooksCalledIncrementer = 65536,
  6508. NumberOfInitHooksCalledShift = 16,
  6509. NumberOfInitHooksCalledMask = 4294901760
  6510. }
  6511. /**
  6512. * Describes a function that is used to process provider lists (such as provider
  6513. * overrides).
  6514. */
  6515. declare type ProcessProvidersFunction = (providers: Provider[]) => Provider[];
  6516. /**
  6517. * List of slots for a projection. A slot can be either based on a parsed CSS selector
  6518. * which will be used to determine nodes which are projected into that slot.
  6519. *
  6520. * When set to "*", the slot is reserved and can be used for multi-slot projection
  6521. * using {@link ViewContainerRef#createComponent}. The last slot that specifies the
  6522. * wildcard selector will retrieve all projectable nodes which do not match any selector.
  6523. */
  6524. declare type ProjectionSlots = (ɵCssSelectorList | '*')[];
  6525. /**
  6526. * This mapping is necessary so we can set input properties and output listeners
  6527. * properly at runtime when property names are minified or aliased.
  6528. *
  6529. * Key: unminified / public input or output name
  6530. * Value: array containing minified / internal name and related directive index
  6531. *
  6532. * The value must be an array to support inputs and outputs with the same name
  6533. * on the same node.
  6534. */
  6535. declare type PropertyAliases = {
  6536. [key: string]: PropertyAliasValue;
  6537. };
  6538. /**
  6539. * Store the runtime input or output names for all the directives.
  6540. *
  6541. * i+0: directive instance index
  6542. * i+1: privateName
  6543. *
  6544. * e.g. [0, 'change-minified']
  6545. */
  6546. declare type PropertyAliasValue = (number | string)[];
  6547. /**
  6548. * Describes how the `Injector` should be configured.
  6549. * @see ["Dependency Injection Guide"](guide/dependency-injection).
  6550. *
  6551. * @see {@link StaticProvider}
  6552. *
  6553. * @publicApi
  6554. */
  6555. export declare type Provider = TypeProvider | ValueProvider | ClassProvider | ConstructorProvider | ExistingProvider | FactoryProvider | any[];
  6556. /**
  6557. * @description
  6558. *
  6559. * Token that can be used to retrieve an instance from an injector or through a query.
  6560. *
  6561. * @publicApi
  6562. */
  6563. export declare type ProviderToken<T> = Type<T> | AbstractType<T> | InjectionToken<T>;
  6564. /**
  6565. * Provides `NgZone`-based change detection for the application bootstrapped using
  6566. * `bootstrapApplication`.
  6567. *
  6568. * `NgZone` is already provided in applications by default. This provider allows you to configure
  6569. * options like `eventCoalescing` in the `NgZone`.
  6570. * This provider is not available for `platformBrowser().bootstrapModule`, which uses
  6571. * `BootstrapOptions` instead.
  6572. *
  6573. * @usageNotes
  6574. * ```typescript=
  6575. * bootstrapApplication(MyApp, {providers: [
  6576. * provideZoneChangeDetection({eventCoalescing: true}),
  6577. * ]});
  6578. * ```
  6579. *
  6580. * @publicApi
  6581. * @see {@link bootstrapApplication}
  6582. * @see {@link NgZoneOptions}
  6583. */
  6584. export declare function provideZoneChangeDetection(options?: NgZoneOptions): EnvironmentProviders;
  6585. /**
  6586. * Testability API.
  6587. * `declare` keyword causes tsickle to generate externs, so these methods are
  6588. * not renamed by Closure Compiler.
  6589. * @publicApi
  6590. */
  6591. declare interface PublicTestability {
  6592. isStable(): boolean;
  6593. whenStable(callback: Function, timeout?: number, updateCallback?: Function): void;
  6594. findProviders(using: any, provider: string, exactMatch: boolean): any[];
  6595. }
  6596. declare const QUERIES = 18;
  6597. /**
  6598. * Type of the Query metadata.
  6599. *
  6600. * @publicApi
  6601. */
  6602. export declare interface Query {
  6603. descendants: boolean;
  6604. emitDistinctChangesOnly: boolean;
  6605. first: boolean;
  6606. read: any;
  6607. isViewQuery: boolean;
  6608. selector: any;
  6609. static?: boolean;
  6610. }
  6611. /**
  6612. * Base class for query metadata.
  6613. *
  6614. * @see {@link ContentChildren}
  6615. * @see {@link ContentChild}
  6616. * @see {@link ViewChildren}
  6617. * @see {@link ViewChild}
  6618. *
  6619. * @publicApi
  6620. */
  6621. export declare abstract class Query {
  6622. }
  6623. /**
  6624. * A set of flags to be used with Queries.
  6625. *
  6626. * NOTE: Ensure changes here are reflected in `packages/compiler/src/render3/view/compiler.ts`
  6627. */
  6628. declare const enum QueryFlags {
  6629. /**
  6630. * No flags
  6631. */
  6632. none = 0,
  6633. /**
  6634. * Whether or not the query should descend into children.
  6635. */
  6636. descendants = 1,
  6637. /**
  6638. * The query can be computed statically and hence can be assigned eagerly.
  6639. *
  6640. * NOTE: Backwards compatibility with ViewEngine.
  6641. */
  6642. isStatic = 2,
  6643. /**
  6644. * If the `QueryList` should fire change event only if actual change to query was computed (vs old
  6645. * behavior where the change was fired whenever the query was recomputed, even if the recomputed
  6646. * query resulted in the same list.)
  6647. */
  6648. emitDistinctChangesOnly = 4
  6649. }
  6650. /**
  6651. * An unmodifiable list of items that Angular keeps up to date when the state
  6652. * of the application changes.
  6653. *
  6654. * The type of object that {@link ViewChildren}, {@link ContentChildren}, and {@link QueryList}
  6655. * provide.
  6656. *
  6657. * Implements an iterable interface, therefore it can be used in both ES6
  6658. * javascript `for (var i of items)` loops as well as in Angular templates with
  6659. * `*ngFor="let i of myList"`.
  6660. *
  6661. * Changes can be observed by subscribing to the changes `Observable`.
  6662. *
  6663. * NOTE: In the future this class will implement an `Observable` interface.
  6664. *
  6665. * @usageNotes
  6666. * ### Example
  6667. * ```typescript
  6668. * @Component({...})
  6669. * class Container {
  6670. * @ViewChildren(Item) items:QueryList<Item>;
  6671. * }
  6672. * ```
  6673. *
  6674. * @publicApi
  6675. */
  6676. export declare class QueryList<T> implements Iterable<T> {
  6677. private _emitDistinctChangesOnly;
  6678. readonly dirty = true;
  6679. private _results;
  6680. private _changesDetected;
  6681. private _changes;
  6682. readonly length: number;
  6683. readonly first: T;
  6684. readonly last: T;
  6685. /**
  6686. * Returns `Observable` of `QueryList` notifying the subscriber of changes.
  6687. */
  6688. get changes(): Observable<any>;
  6689. /**
  6690. * @param emitDistinctChangesOnly Whether `QueryList.changes` should fire only when actual change
  6691. * has occurred. Or if it should fire when query is recomputed. (recomputing could resolve in
  6692. * the same result)
  6693. */
  6694. constructor(_emitDistinctChangesOnly?: boolean);
  6695. /**
  6696. * Returns the QueryList entry at `index`.
  6697. */
  6698. get(index: number): T | undefined;
  6699. /**
  6700. * See
  6701. * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)
  6702. */
  6703. map<U>(fn: (item: T, index: number, array: T[]) => U): U[];
  6704. /**
  6705. * See
  6706. * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
  6707. */
  6708. filter<S extends T>(predicate: (value: T, index: number, array: readonly T[]) => value is S): S[];
  6709. filter(predicate: (value: T, index: number, array: readonly T[]) => unknown): T[];
  6710. /**
  6711. * See
  6712. * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)
  6713. */
  6714. find(fn: (item: T, index: number, array: T[]) => boolean): T | undefined;
  6715. /**
  6716. * See
  6717. * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)
  6718. */
  6719. reduce<U>(fn: (prevValue: U, curValue: T, curIndex: number, array: T[]) => U, init: U): U;
  6720. /**
  6721. * See
  6722. * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)
  6723. */
  6724. forEach(fn: (item: T, index: number, array: T[]) => void): void;
  6725. /**
  6726. * See
  6727. * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)
  6728. */
  6729. some(fn: (value: T, index: number, array: T[]) => boolean): boolean;
  6730. /**
  6731. * Returns a copy of the internal results list as an Array.
  6732. */
  6733. toArray(): T[];
  6734. toString(): string;
  6735. /**
  6736. * Updates the stored data of the query list, and resets the `dirty` flag to `false`, so that
  6737. * on change detection, it will not notify of changes to the queries, unless a new change
  6738. * occurs.
  6739. *
  6740. * @param resultsTree The query results to store
  6741. * @param identityAccessor Optional function for extracting stable object identity from a value
  6742. * in the array. This function is executed for each element of the query result list while
  6743. * comparing current query list with the new one (provided as a first argument of the `reset`
  6744. * function) to detect if the lists are different. If the function is not provided, elements
  6745. * are compared as is (without any pre-processing).
  6746. */
  6747. reset(resultsTree: Array<T | any[]>, identityAccessor?: (value: T) => unknown): void;
  6748. /**
  6749. * Triggers a change event by emitting on the `changes` {@link EventEmitter}.
  6750. */
  6751. notifyOnChanges(): void;
  6752. /** internal */
  6753. setDirty(): void;
  6754. /** internal */
  6755. destroy(): void;
  6756. [Symbol.iterator]: () => Iterator<T>;
  6757. }
  6758. declare interface R3DeclareComponentFacade extends R3DeclareDirectiveFacade {
  6759. template: string;
  6760. isInline?: boolean;
  6761. styles?: string[];
  6762. dependencies?: R3DeclareTemplateDependencyFacade[];
  6763. components?: R3DeclareDirectiveDependencyFacade[];
  6764. directives?: R3DeclareDirectiveDependencyFacade[];
  6765. pipes?: {
  6766. [pipeName: string]: OpaqueValue | (() => OpaqueValue);
  6767. };
  6768. viewProviders?: OpaqueValue;
  6769. animations?: OpaqueValue;
  6770. changeDetection?: ChangeDetectionStrategy_2;
  6771. encapsulation?: ViewEncapsulation_2;
  6772. interpolation?: [string, string];
  6773. preserveWhitespaces?: boolean;
  6774. }
  6775. declare interface R3DeclareDependencyMetadataFacade {
  6776. token: OpaqueValue;
  6777. attribute?: boolean;
  6778. host?: boolean;
  6779. optional?: boolean;
  6780. self?: boolean;
  6781. skipSelf?: boolean;
  6782. }
  6783. declare interface R3DeclareDirectiveDependencyFacade {
  6784. kind?: 'directive' | 'component';
  6785. selector: string;
  6786. type: OpaqueValue | (() => OpaqueValue);
  6787. inputs?: string[];
  6788. outputs?: string[];
  6789. exportAs?: string[];
  6790. }
  6791. declare interface R3DeclareDirectiveFacade {
  6792. selector?: string;
  6793. type: Type_2;
  6794. inputs?: {
  6795. [classPropertyName: string]: string | [
  6796. bindingPropertyName: string,
  6797. classPropertyName: string,
  6798. transformFunction?: InputTransformFunction_2
  6799. ];
  6800. };
  6801. outputs?: {
  6802. [classPropertyName: string]: string;
  6803. };
  6804. host?: {
  6805. attributes?: {
  6806. [key: string]: OpaqueValue;
  6807. };
  6808. listeners?: {
  6809. [key: string]: string;
  6810. };
  6811. properties?: {
  6812. [key: string]: string;
  6813. };
  6814. classAttribute?: string;
  6815. styleAttribute?: string;
  6816. };
  6817. queries?: R3DeclareQueryMetadataFacade[];
  6818. viewQueries?: R3DeclareQueryMetadataFacade[];
  6819. providers?: OpaqueValue;
  6820. exportAs?: string[];
  6821. usesInheritance?: boolean;
  6822. usesOnChanges?: boolean;
  6823. isStandalone?: boolean;
  6824. hostDirectives?: R3HostDirectiveMetadataFacade[] | null;
  6825. isSignal?: boolean;
  6826. }
  6827. declare interface R3DeclareFactoryFacade {
  6828. type: Type_2;
  6829. deps: R3DeclareDependencyMetadataFacade[] | 'invalid' | null;
  6830. target: ɵɵFactoryTarget;
  6831. }
  6832. declare interface R3DeclareInjectableFacade {
  6833. type: Type_2;
  6834. providedIn?: Type_2 | 'root' | 'platform' | 'any' | null;
  6835. useClass?: OpaqueValue;
  6836. useFactory?: OpaqueValue;
  6837. useExisting?: OpaqueValue;
  6838. useValue?: OpaqueValue;
  6839. deps?: R3DeclareDependencyMetadataFacade[];
  6840. }
  6841. declare interface R3DeclareInjectorFacade {
  6842. type: Type_2;
  6843. imports?: OpaqueValue[];
  6844. providers?: OpaqueValue[];
  6845. }
  6846. declare interface R3DeclareNgModuleDependencyFacade {
  6847. kind: 'ngmodule';
  6848. type: OpaqueValue | (() => OpaqueValue);
  6849. }
  6850. declare interface R3DeclareNgModuleFacade {
  6851. type: Type_2;
  6852. bootstrap?: OpaqueValue[] | (() => OpaqueValue[]);
  6853. declarations?: OpaqueValue[] | (() => OpaqueValue[]);
  6854. imports?: OpaqueValue[] | (() => OpaqueValue[]);
  6855. exports?: OpaqueValue[] | (() => OpaqueValue[]);
  6856. schemas?: OpaqueValue[];
  6857. id?: OpaqueValue;
  6858. }
  6859. declare interface R3DeclarePipeDependencyFacade {
  6860. kind?: 'pipe';
  6861. name: string;
  6862. type: OpaqueValue | (() => OpaqueValue);
  6863. }
  6864. declare interface R3DeclarePipeFacade {
  6865. type: Type_2;
  6866. name: string;
  6867. pure?: boolean;
  6868. isStandalone?: boolean;
  6869. }
  6870. declare interface R3DeclareQueryMetadataFacade {
  6871. propertyName: string;
  6872. first?: boolean;
  6873. predicate: OpaqueValue | string[];
  6874. descendants?: boolean;
  6875. read?: OpaqueValue;
  6876. static?: boolean;
  6877. emitDistinctChangesOnly?: boolean;
  6878. }
  6879. declare type R3DeclareTemplateDependencyFacade = {
  6880. kind: string;
  6881. } & (R3DeclareDirectiveDependencyFacade | R3DeclarePipeDependencyFacade | R3DeclareNgModuleDependencyFacade);
  6882. declare interface R3HostDirectiveMetadataFacade {
  6883. directive: Type_2;
  6884. inputs?: string[];
  6885. outputs?: string[];
  6886. }
  6887. declare class R3Injector extends EnvironmentInjector {
  6888. readonly parent: Injector;
  6889. readonly source: string | null;
  6890. readonly scopes: Set<InjectorScope>;
  6891. /**
  6892. * Map of tokens to records which contain the instances of those tokens.
  6893. * - `null` value implies that we don't have the record. Used by tree-shakable injectors
  6894. * to prevent further searches.
  6895. */
  6896. private records;
  6897. /**
  6898. * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.
  6899. */
  6900. private _ngOnDestroyHooks;
  6901. private _onDestroyHooks;
  6902. /**
  6903. * Flag indicating that this injector was previously destroyed.
  6904. */
  6905. get destroyed(): boolean;
  6906. private _destroyed;
  6907. private injectorDefTypes;
  6908. constructor(providers: Array<Provider | EnvironmentProviders>, parent: Injector, source: string | null, scopes: Set<InjectorScope>);
  6909. /**
  6910. * Destroy the injector and release references to every instance or provider associated with it.
  6911. *
  6912. * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a
  6913. * hook was found.
  6914. */
  6915. destroy(): void;
  6916. onDestroy(callback: () => void): () => void;
  6917. runInContext<ReturnT>(fn: () => ReturnT): ReturnT;
  6918. get<T>(token: ProviderToken<T>, notFoundValue?: any, flags?: InjectFlags | InjectOptions): T;
  6919. toString(): string;
  6920. assertNotDestroyed(): void;
  6921. /**
  6922. * Process a `SingleProvider` and add it.
  6923. */
  6924. private processProvider;
  6925. private hydrate;
  6926. private injectableDefInScope;
  6927. private removeOnDestroy;
  6928. }
  6929. declare interface RComment extends RNode {
  6930. textContent: string | null;
  6931. }
  6932. declare interface RCssStyleDeclaration {
  6933. removeProperty(propertyName: string): string;
  6934. setProperty(propertyName: string, value: string | null, priority?: string): void;
  6935. }
  6936. declare interface RDomTokenList {
  6937. add(token: string): void;
  6938. remove(token: string): void;
  6939. }
  6940. declare const REACTIVE_HOST_BINDING_CONSUMER = 24;
  6941. declare const REACTIVE_TEMPLATE_CONSUMER = 23;
  6942. declare interface ReactiveLViewConsumer extends ReactiveNode {
  6943. lView: LView | null;
  6944. }
  6945. /**
  6946. * A producer and/or consumer which participates in the reactive graph.
  6947. *
  6948. * Producer `ReactiveNode`s which are accessed when a consumer `ReactiveNode` is the
  6949. * `activeConsumer` are tracked as dependencies of that consumer.
  6950. *
  6951. * Certain consumers are also tracked as "live" consumers and create edges in the other direction,
  6952. * from producer to consumer. These edges are used to propagate change notifications when a
  6953. * producer's value is updated.
  6954. *
  6955. * A `ReactiveNode` may be both a producer and consumer.
  6956. */
  6957. declare interface ReactiveNode {
  6958. /**
  6959. * Version of the value that this node produces.
  6960. *
  6961. * This is incremented whenever a new value is produced by this node which is not equal to the
  6962. * previous value (by whatever definition of equality is in use).
  6963. */
  6964. version: Version_2;
  6965. /**
  6966. * Whether this node (in its consumer capacity) is dirty.
  6967. *
  6968. * Only live consumers become dirty, when receiving a change notification from a dependency
  6969. * producer.
  6970. */
  6971. dirty: boolean;
  6972. /**
  6973. * Producers which are dependencies of this consumer.
  6974. *
  6975. * Uses the same indices as the `producerLastReadVersion` and `producerIndexOfThis` arrays.
  6976. */
  6977. producerNode: ReactiveNode[] | undefined;
  6978. /**
  6979. * `Version` of the value last read by a given producer.
  6980. *
  6981. * Uses the same indices as the `producerNode` and `producerIndexOfThis` arrays.
  6982. */
  6983. producerLastReadVersion: Version_2[] | undefined;
  6984. /**
  6985. * Index of `this` (consumer) in each producer's `liveConsumers` array.
  6986. *
  6987. * This value is only meaningful if this node is live (`liveConsumers.length > 0`). Otherwise
  6988. * these indices are stale.
  6989. *
  6990. * Uses the same indices as the `producerNode` and `producerLastReadVersion` arrays.
  6991. */
  6992. producerIndexOfThis: number[] | undefined;
  6993. /**
  6994. * Index into the producer arrays that the next dependency of this node as a consumer will use.
  6995. *
  6996. * This index is zeroed before this node as a consumer begins executing. When a producer is read,
  6997. * it gets inserted into the producers arrays at this index. There may be an existing dependency
  6998. * in this location which may or may not match the incoming producer, depending on whether the
  6999. * same producers were read in the same order as the last computation.
  7000. */
  7001. nextProducerIndex: number;
  7002. /**
  7003. * Array of consumers of this producer that are "live" (they require push notifications).
  7004. *
  7005. * `liveConsumerNode.length` is effectively our reference count for this node.
  7006. */
  7007. liveConsumerNode: ReactiveNode[] | undefined;
  7008. /**
  7009. * Index of `this` (producer) in each consumer's `producerNode` array.
  7010. *
  7011. * Uses the same indices as the `liveConsumerNode` array.
  7012. */
  7013. liveConsumerIndexOfThis: number[] | undefined;
  7014. /**
  7015. * Whether writes to signals are allowed when this consumer is the `activeConsumer`.
  7016. *
  7017. * This is used to enforce guardrails such as preventing writes to writable signals in the
  7018. * computation function of computed signals, which is supposed to be pure.
  7019. */
  7020. consumerAllowSignalWrites: boolean;
  7021. readonly consumerIsAlwaysLive: boolean;
  7022. /**
  7023. * Tracks whether producers need to recompute their value independently of the reactive graph (for
  7024. * example, if no initial value has been computed).
  7025. */
  7026. producerMustRecompute(node: unknown): boolean;
  7027. producerRecomputeValue(node: unknown): void;
  7028. consumerMarkedDirty(node: unknown): void;
  7029. }
  7030. /**
  7031. * Creates an object that allows to retrieve component metadata.
  7032. *
  7033. * @usageNotes
  7034. *
  7035. * The example below demonstrates how to use the function and how the fields
  7036. * of the returned object map to the component metadata.
  7037. *
  7038. * ```typescript
  7039. * @Component({
  7040. * standalone: true,
  7041. * selector: 'foo-component',
  7042. * template: `
  7043. * <ng-content></ng-content>
  7044. * <ng-content select="content-selector-a"></ng-content>
  7045. * `,
  7046. * })
  7047. * class FooComponent {
  7048. * @Input('inputName') inputPropName: string;
  7049. * @Output('outputName') outputPropName = new EventEmitter<void>();
  7050. * }
  7051. *
  7052. * const mirror = reflectComponentType(FooComponent);
  7053. * expect(mirror.type).toBe(FooComponent);
  7054. * expect(mirror.selector).toBe('foo-component');
  7055. * expect(mirror.isStandalone).toBe(true);
  7056. * expect(mirror.inputs).toEqual([{propName: 'inputName', templateName: 'inputPropName'}]);
  7057. * expect(mirror.outputs).toEqual([{propName: 'outputName', templateName: 'outputPropName'}]);
  7058. * expect(mirror.ngContentSelectors).toEqual([
  7059. * '*', // first `<ng-content>` in a template, the selector defaults to `*`
  7060. * 'content-selector-a' // second `<ng-content>` in a template
  7061. * ]);
  7062. * ```
  7063. *
  7064. * @param component Component class reference.
  7065. * @returns An object that allows to retrieve component metadata.
  7066. *
  7067. * @publicApi
  7068. */
  7069. export declare function reflectComponentType<C>(component: Type<C>): ComponentMirror<C> | null;
  7070. /**
  7071. * Subset of API needed for writing attributes, properties, and setting up
  7072. * listeners on Element.
  7073. */
  7074. declare interface RElement extends RNode {
  7075. firstChild: RNode | null;
  7076. style: RCssStyleDeclaration;
  7077. classList: RDomTokenList;
  7078. className: string;
  7079. tagName: string;
  7080. textContent: string | null;
  7081. hasAttribute(name: string): boolean;
  7082. getAttribute(name: string): string | null;
  7083. setAttribute(name: string, value: string | TrustedHTML | TrustedScript | TrustedScriptURL): void;
  7084. removeAttribute(name: string): void;
  7085. setAttributeNS(namespaceURI: string, qualifiedName: string, value: string | TrustedHTML | TrustedScript | TrustedScriptURL): void;
  7086. addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;
  7087. removeEventListener(type: string, listener?: EventListener, options?: boolean): void;
  7088. setProperty?(name: string, value: any): void;
  7089. }
  7090. declare const RENDERER = 11;
  7091. /**
  7092. * Procedural style of API needed to create elements and text nodes.
  7093. *
  7094. * In non-native browser environments (e.g. platforms such as web-workers), this is the
  7095. * facade that enables element manipulation. In practice, this is implemented by `Renderer2`.
  7096. */
  7097. declare interface Renderer {
  7098. destroy(): void;
  7099. createComment(value: string): RComment;
  7100. createElement(name: string, namespace?: string | null): RElement;
  7101. createText(value: string): RText;
  7102. /**
  7103. * This property is allowed to be null / undefined,
  7104. * in which case the view engine won't call it.
  7105. * This is used as a performance optimization for production mode.
  7106. */
  7107. destroyNode?: ((node: RNode) => void) | null;
  7108. appendChild(parent: RElement, newChild: RNode): void;
  7109. insertBefore(parent: RNode, newChild: RNode, refChild: RNode | null, isMove?: boolean): void;
  7110. removeChild(parent: RElement, oldChild: RNode, isHostElement?: boolean): void;
  7111. selectRootElement(selectorOrNode: string | any, preserveContent?: boolean): RElement;
  7112. parentNode(node: RNode): RElement | null;
  7113. nextSibling(node: RNode): RNode | null;
  7114. setAttribute(el: RElement, name: string, value: string | TrustedHTML | TrustedScript | TrustedScriptURL, namespace?: string | null): void;
  7115. removeAttribute(el: RElement, name: string, namespace?: string | null): void;
  7116. addClass(el: RElement, name: string): void;
  7117. removeClass(el: RElement, name: string): void;
  7118. setStyle(el: RElement, style: string, value: any, flags?: RendererStyleFlags2): void;
  7119. removeStyle(el: RElement, style: string, flags?: RendererStyleFlags2): void;
  7120. setProperty(el: RElement, name: string, value: any): void;
  7121. setValue(node: RText | RComment, value: string): void;
  7122. listen(target: GlobalTargetName | RNode, eventName: string, callback: (event: any) => boolean | void): () => void;
  7123. }
  7124. /**
  7125. * Extend this base class to implement custom rendering. By default, Angular
  7126. * renders a template into DOM. You can use custom rendering to intercept
  7127. * rendering calls, or to render to something other than DOM.
  7128. *
  7129. * Create your custom renderer using `RendererFactory2`.
  7130. *
  7131. * Use a custom renderer to bypass Angular's templating and
  7132. * make custom UI changes that can't be expressed declaratively.
  7133. * For example if you need to set a property or an attribute whose name is
  7134. * not statically known, use the `setProperty()` or
  7135. * `setAttribute()` method.
  7136. *
  7137. * @publicApi
  7138. */
  7139. export declare abstract class Renderer2 {
  7140. /**
  7141. * Use to store arbitrary developer-defined data on a renderer instance,
  7142. * as an object containing key-value pairs.
  7143. * This is useful for renderers that delegate to other renderers.
  7144. */
  7145. abstract get data(): {
  7146. [key: string]: any;
  7147. };
  7148. /**
  7149. * Implement this callback to destroy the renderer or the host element.
  7150. */
  7151. abstract destroy(): void;
  7152. /**
  7153. * Implement this callback to create an instance of the host element.
  7154. * @param name An identifying name for the new element, unique within the namespace.
  7155. * @param namespace The namespace for the new element.
  7156. * @returns The new element.
  7157. */
  7158. abstract createElement(name: string, namespace?: string | null): any;
  7159. /**
  7160. * Implement this callback to add a comment to the DOM of the host element.
  7161. * @param value The comment text.
  7162. * @returns The modified element.
  7163. */
  7164. abstract createComment(value: string): any;
  7165. /**
  7166. * Implement this callback to add text to the DOM of the host element.
  7167. * @param value The text string.
  7168. * @returns The modified element.
  7169. */
  7170. abstract createText(value: string): any;
  7171. /**
  7172. * If null or undefined, the view engine won't call it.
  7173. * This is used as a performance optimization for production mode.
  7174. */
  7175. destroyNode: ((node: any) => void) | null;
  7176. /**
  7177. * Appends a child to a given parent node in the host element DOM.
  7178. * @param parent The parent node.
  7179. * @param newChild The new child node.
  7180. */
  7181. abstract appendChild(parent: any, newChild: any): void;
  7182. /**
  7183. * Implement this callback to insert a child node at a given position in a parent node
  7184. * in the host element DOM.
  7185. * @param parent The parent node.
  7186. * @param newChild The new child nodes.
  7187. * @param refChild The existing child node before which `newChild` is inserted.
  7188. * @param isMove Optional argument which signifies if the current `insertBefore` is a result of a
  7189. * move. Animation uses this information to trigger move animations. In the past the Animation
  7190. * would always assume that any `insertBefore` is a move. This is not strictly true because
  7191. * with runtime i18n it is possible to invoke `insertBefore` as a result of i18n and it should
  7192. * not trigger an animation move.
  7193. */
  7194. abstract insertBefore(parent: any, newChild: any, refChild: any, isMove?: boolean): void;
  7195. /**
  7196. * Implement this callback to remove a child node from the host element's DOM.
  7197. * @param parent The parent node.
  7198. * @param oldChild The child node to remove.
  7199. * @param isHostElement Optionally signal to the renderer whether this element is a host element
  7200. * or not
  7201. */
  7202. abstract removeChild(parent: any, oldChild: any, isHostElement?: boolean): void;
  7203. /**
  7204. * Implement this callback to prepare an element to be bootstrapped
  7205. * as a root element, and return the element instance.
  7206. * @param selectorOrNode The DOM element.
  7207. * @param preserveContent Whether the contents of the root element
  7208. * should be preserved, or cleared upon bootstrap (default behavior).
  7209. * Use with `ViewEncapsulation.ShadowDom` to allow simple native
  7210. * content projection via `<slot>` elements.
  7211. * @returns The root element.
  7212. */
  7213. abstract selectRootElement(selectorOrNode: string | any, preserveContent?: boolean): any;
  7214. /**
  7215. * Implement this callback to get the parent of a given node
  7216. * in the host element's DOM.
  7217. * @param node The child node to query.
  7218. * @returns The parent node, or null if there is no parent.
  7219. * This is because the check is synchronous,
  7220. * and the caller can't rely on checking for null.
  7221. */
  7222. abstract parentNode(node: any): any;
  7223. /**
  7224. * Implement this callback to get the next sibling node of a given node
  7225. * in the host element's DOM.
  7226. * @returns The sibling node, or null if there is no sibling.
  7227. * This is because the check is synchronous,
  7228. * and the caller can't rely on checking for null.
  7229. */
  7230. abstract nextSibling(node: any): any;
  7231. /**
  7232. * Implement this callback to set an attribute value for an element in the DOM.
  7233. * @param el The element.
  7234. * @param name The attribute name.
  7235. * @param value The new value.
  7236. * @param namespace The namespace.
  7237. */
  7238. abstract setAttribute(el: any, name: string, value: string, namespace?: string | null): void;
  7239. /**
  7240. * Implement this callback to remove an attribute from an element in the DOM.
  7241. * @param el The element.
  7242. * @param name The attribute name.
  7243. * @param namespace The namespace.
  7244. */
  7245. abstract removeAttribute(el: any, name: string, namespace?: string | null): void;
  7246. /**
  7247. * Implement this callback to add a class to an element in the DOM.
  7248. * @param el The element.
  7249. * @param name The class name.
  7250. */
  7251. abstract addClass(el: any, name: string): void;
  7252. /**
  7253. * Implement this callback to remove a class from an element in the DOM.
  7254. * @param el The element.
  7255. * @param name The class name.
  7256. */
  7257. abstract removeClass(el: any, name: string): void;
  7258. /**
  7259. * Implement this callback to set a CSS style for an element in the DOM.
  7260. * @param el The element.
  7261. * @param style The name of the style.
  7262. * @param value The new value.
  7263. * @param flags Flags for style variations. No flags are set by default.
  7264. */
  7265. abstract setStyle(el: any, style: string, value: any, flags?: RendererStyleFlags2): void;
  7266. /**
  7267. * Implement this callback to remove the value from a CSS style for an element in the DOM.
  7268. * @param el The element.
  7269. * @param style The name of the style.
  7270. * @param flags Flags for style variations to remove, if set. ???
  7271. */
  7272. abstract removeStyle(el: any, style: string, flags?: RendererStyleFlags2): void;
  7273. /**
  7274. * Implement this callback to set the value of a property of an element in the DOM.
  7275. * @param el The element.
  7276. * @param name The property name.
  7277. * @param value The new value.
  7278. */
  7279. abstract setProperty(el: any, name: string, value: any): void;
  7280. /**
  7281. * Implement this callback to set the value of a node in the host element.
  7282. * @param node The node.
  7283. * @param value The new value.
  7284. */
  7285. abstract setValue(node: any, value: string): void;
  7286. /**
  7287. * Implement this callback to start an event listener.
  7288. * @param target The context in which to listen for events. Can be
  7289. * the entire window or document, the body of the document, or a specific
  7290. * DOM element.
  7291. * @param eventName The event to listen for.
  7292. * @param callback A handler function to invoke when the event occurs.
  7293. * @returns An "unlisten" function for disposing of this handler.
  7294. */
  7295. abstract listen(target: 'window' | 'document' | 'body' | any, eventName: string, callback: (event: any) => boolean | void): () => void;
  7296. }
  7297. declare interface RendererFactory {
  7298. createRenderer(hostElement: RElement | null, rendererType: RendererType2 | null): Renderer;
  7299. begin?(): void;
  7300. end?(): void;
  7301. }
  7302. /**
  7303. * Creates and initializes a custom renderer that implements the `Renderer2` base class.
  7304. *
  7305. * @publicApi
  7306. */
  7307. export declare abstract class RendererFactory2 {
  7308. /**
  7309. * Creates and initializes a custom renderer for a host DOM element.
  7310. * @param hostElement The element to render.
  7311. * @param type The base class to implement.
  7312. * @returns The new custom renderer instance.
  7313. */
  7314. abstract createRenderer(hostElement: any, type: RendererType2 | null): Renderer2;
  7315. /**
  7316. * A callback invoked when rendering has begun.
  7317. */
  7318. abstract begin?(): void;
  7319. /**
  7320. * A callback invoked when rendering has completed.
  7321. */
  7322. abstract end?(): void;
  7323. /**
  7324. * Use with animations test-only mode. Notifies the test when rendering has completed.
  7325. * @returns The asynchronous result of the developer-defined function.
  7326. */
  7327. abstract whenRenderingDone?(): Promise<any>;
  7328. }
  7329. /**
  7330. * Flags for renderer-specific style modifiers.
  7331. * @publicApi
  7332. */
  7333. export declare enum RendererStyleFlags2 {
  7334. /**
  7335. * Marks a style as important.
  7336. */
  7337. Important = 1,
  7338. /**
  7339. * Marks a style as using dash case naming (this-is-dash-case).
  7340. */
  7341. DashCase = 2
  7342. }
  7343. /**
  7344. * Used by `RendererFactory2` to associate custom rendering data and styles
  7345. * with a rendering implementation.
  7346. * @publicApi
  7347. */
  7348. export declare interface RendererType2 {
  7349. /**
  7350. * A unique identifying string for the new renderer, used when creating
  7351. * unique styles for encapsulation.
  7352. */
  7353. id: string;
  7354. /**
  7355. * The view encapsulation type, which determines how styles are applied to
  7356. * DOM elements. One of
  7357. * - `Emulated` (default): Emulate native scoping of styles.
  7358. * - `Native`: Use the native encapsulation mechanism of the renderer.
  7359. * - `ShadowDom`: Use modern [Shadow
  7360. * DOM](https://w3c.github.io/webcomponents/spec/shadow/) and
  7361. * create a ShadowRoot for component's host element.
  7362. * - `None`: Do not provide any template or style encapsulation.
  7363. */
  7364. encapsulation: ViewEncapsulation;
  7365. /**
  7366. * Defines CSS styles to be stored on a renderer instance.
  7367. */
  7368. styles: string[];
  7369. /**
  7370. * Defines arbitrary developer-defined data to be stored on a renderer instance.
  7371. * This is useful for renderers that delegate to other renderers.
  7372. */
  7373. data: {
  7374. [kind: string]: any;
  7375. };
  7376. }
  7377. /**
  7378. * Lazily retrieves the reference value from a forwardRef.
  7379. *
  7380. * Acts as the identity function when given a non-forward-ref value.
  7381. *
  7382. * @usageNotes
  7383. * ### Example
  7384. *
  7385. * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}
  7386. *
  7387. * @see {@link forwardRef}
  7388. * @publicApi
  7389. */
  7390. export declare function resolveForwardRef<T>(type: T): T;
  7391. /**
  7392. * The goal here is to make sure that the browser DOM API is the Renderer.
  7393. * We do this by defining a subset of DOM API to be the renderer and then
  7394. * use that at runtime for rendering.
  7395. *
  7396. * At runtime we can then use the DOM api directly, in server or web-worker
  7397. * it will be easy to implement such API.
  7398. */
  7399. /** Subset of API needed for appending elements and text nodes. */
  7400. declare interface RNode {
  7401. /**
  7402. * Returns the parent Element, Document, or DocumentFragment
  7403. */
  7404. parentNode: RNode | null;
  7405. /**
  7406. * Returns the parent Element if there is one
  7407. */
  7408. parentElement: RElement | null;
  7409. /**
  7410. * Gets the Node immediately following this one in the parent's childNodes
  7411. */
  7412. nextSibling: RNode | null;
  7413. /**
  7414. * Removes a child from the current node and returns the removed node
  7415. * @param oldChild the child node to remove
  7416. */
  7417. removeChild(oldChild: RNode): RNode;
  7418. /**
  7419. * Insert a child node.
  7420. *
  7421. * Used exclusively for adding View root nodes into ViewAnchor location.
  7422. */
  7423. insertBefore(newChild: RNode, refChild: RNode | null, isViewRoot: boolean): void;
  7424. /**
  7425. * Append a child node.
  7426. *
  7427. * Used exclusively for building up DOM which are static (ie not View roots)
  7428. */
  7429. appendChild(newChild: RNode): RNode;
  7430. }
  7431. declare interface RText extends RNode {
  7432. textContent: string | null;
  7433. }
  7434. /**
  7435. * Runs the given function in the [context](guide/dependency-injection-context) of the given
  7436. * `Injector`.
  7437. *
  7438. * Within the function's stack frame, [`inject`](api/core/inject) can be used to inject dependencies
  7439. * from the given `Injector`. Note that `inject` is only usable synchronously, and cannot be used in
  7440. * any asynchronous callbacks or after any `await` points.
  7441. *
  7442. * @param injector the injector which will satisfy calls to [`inject`](api/core/inject) while `fn`
  7443. * is executing
  7444. * @param fn the closure to be run in the context of `injector`
  7445. * @returns the return value of the function, if any
  7446. * @publicApi
  7447. */
  7448. export declare function runInInjectionContext<ReturnT>(injector: Injector, fn: () => ReturnT): ReturnT;
  7449. /**
  7450. * The list of error codes used in runtime code of the `core` package.
  7451. * Reserved error code range: 100-999.
  7452. *
  7453. * Note: the minus sign denotes the fact that a particular code has a detailed guide on
  7454. * angular.io. This extra annotation is needed to avoid introducing a separate set to store
  7455. * error codes which have guides, which might leak into runtime code.
  7456. *
  7457. * Full list of available error guides can be found at https://angular.io/errors.
  7458. *
  7459. * Error code ranges per package:
  7460. * - core (this package): 100-999
  7461. * - forms: 1000-1999
  7462. * - common: 2000-2999
  7463. * - animations: 3000-3999
  7464. * - router: 4000-4999
  7465. * - platform-browser: 5000-5500
  7466. */
  7467. declare const enum RuntimeErrorCode {
  7468. EXPRESSION_CHANGED_AFTER_CHECKED = -100,
  7469. RECURSIVE_APPLICATION_REF_TICK = 101,
  7470. RECURSIVE_APPLICATION_RENDER = 102,
  7471. CYCLIC_DI_DEPENDENCY = -200,
  7472. PROVIDER_NOT_FOUND = -201,
  7473. INVALID_FACTORY_DEPENDENCY = 202,
  7474. MISSING_INJECTION_CONTEXT = -203,
  7475. INVALID_INJECTION_TOKEN = 204,
  7476. INJECTOR_ALREADY_DESTROYED = 205,
  7477. PROVIDER_IN_WRONG_CONTEXT = 207,
  7478. MISSING_INJECTION_TOKEN = 208,
  7479. INVALID_MULTI_PROVIDER = -209,
  7480. MISSING_DOCUMENT = 210,
  7481. MULTIPLE_COMPONENTS_MATCH = -300,
  7482. EXPORT_NOT_FOUND = -301,
  7483. PIPE_NOT_FOUND = -302,
  7484. UNKNOWN_BINDING = 303,
  7485. UNKNOWN_ELEMENT = 304,
  7486. TEMPLATE_STRUCTURE_ERROR = 305,
  7487. INVALID_EVENT_BINDING = 306,
  7488. HOST_DIRECTIVE_UNRESOLVABLE = 307,
  7489. HOST_DIRECTIVE_NOT_STANDALONE = 308,
  7490. DUPLICATE_DIRECTITVE = 309,
  7491. HOST_DIRECTIVE_COMPONENT = 310,
  7492. HOST_DIRECTIVE_UNDEFINED_BINDING = 311,
  7493. HOST_DIRECTIVE_CONFLICTING_ALIAS = 312,
  7494. MULTIPLE_MATCHING_PIPES = 313,
  7495. MULTIPLE_PLATFORMS = 400,
  7496. PLATFORM_NOT_FOUND = 401,
  7497. MISSING_REQUIRED_INJECTABLE_IN_BOOTSTRAP = 402,
  7498. BOOTSTRAP_COMPONENTS_NOT_FOUND = -403,
  7499. PLATFORM_ALREADY_DESTROYED = 404,
  7500. ASYNC_INITIALIZERS_STILL_RUNNING = 405,
  7501. APPLICATION_REF_ALREADY_DESTROYED = 406,
  7502. RENDERER_NOT_FOUND = 407,
  7503. HYDRATION_NODE_MISMATCH = -500,
  7504. HYDRATION_MISSING_SIBLINGS = -501,
  7505. HYDRATION_MISSING_NODE = -502,
  7506. UNSUPPORTED_PROJECTION_DOM_NODES = -503,
  7507. INVALID_SKIP_HYDRATION_HOST = -504,
  7508. MISSING_HYDRATION_ANNOTATIONS = -505,
  7509. HYDRATION_STABLE_TIMEDOUT = -506,
  7510. MISSING_SSR_CONTENT_INTEGRITY_MARKER = -507,
  7511. SIGNAL_WRITE_FROM_ILLEGAL_CONTEXT = 600,
  7512. REQUIRE_SYNC_WITHOUT_SYNC_EMIT = 601,
  7513. INVALID_I18N_STRUCTURE = 700,
  7514. MISSING_LOCALE_DATA = 701,
  7515. IMPORT_PROVIDERS_FROM_STANDALONE = 800,
  7516. INVALID_DIFFER_INPUT = 900,
  7517. NO_SUPPORTING_DIFFER_FACTORY = 901,
  7518. VIEW_ALREADY_ATTACHED = 902,
  7519. INVALID_INHERITANCE = 903,
  7520. UNSAFE_VALUE_IN_RESOURCE_URL = 904,
  7521. UNSAFE_VALUE_IN_SCRIPT = 905,
  7522. MISSING_GENERATED_DEF = 906,
  7523. TYPE_IS_NOT_STANDALONE = 907,
  7524. MISSING_ZONEJS = 908,
  7525. UNEXPECTED_ZONE_STATE = 909,
  7526. UNSAFE_IFRAME_ATTRS = -910,
  7527. VIEW_ALREADY_DESTROYED = 911,
  7528. COMPONENT_ID_COLLISION = -912,
  7529. RUNTIME_DEPS_INVALID_IMPORTED_TYPE = 1000
  7530. }
  7531. /**
  7532. * Sanitizer is used by the views to sanitize potentially dangerous values.
  7533. *
  7534. * @publicApi
  7535. */
  7536. export declare abstract class Sanitizer {
  7537. abstract sanitize(context: SecurityContext, value: {} | string | null): string | null;
  7538. /** @nocollapse */
  7539. static ɵprov: unknown;
  7540. }
  7541. /**
  7542. * Function used to sanitize the value before writing it into the renderer.
  7543. */
  7544. declare type SanitizerFn = (value: any, tagName?: string, propName?: string) => string | TrustedHTML | TrustedScript | TrustedScriptURL;
  7545. /**
  7546. * A schema definition associated with an NgModule.
  7547. *
  7548. * @see {@link NgModule}
  7549. * @see {@link CUSTOM_ELEMENTS_SCHEMA}
  7550. * @see {@link NO_ERRORS_SCHEMA}
  7551. *
  7552. * @param name The name of a defined schema.
  7553. *
  7554. * @publicApi
  7555. */
  7556. export declare interface SchemaMetadata {
  7557. name: string;
  7558. }
  7559. /**
  7560. * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property
  7561. * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly
  7562. * handled.
  7563. *
  7564. * See DomSanitizer for more details on security in Angular applications.
  7565. *
  7566. * @publicApi
  7567. */
  7568. export declare enum SecurityContext {
  7569. NONE = 0,
  7570. HTML = 1,
  7571. STYLE = 2,
  7572. SCRIPT = 3,
  7573. URL = 4,
  7574. RESOURCE_URL = 5
  7575. }
  7576. /** Flags used to build up CssSelectors */
  7577. declare const enum SelectorFlags {
  7578. /** Indicates this is the beginning of a new negative selector */
  7579. NOT = 1,
  7580. /** Mode for matching attributes */
  7581. ATTRIBUTE = 2,
  7582. /** Mode for matching tag names */
  7583. ELEMENT = 4,
  7584. /** Mode for matching class names */
  7585. CLASS = 8
  7586. }
  7587. /**
  7588. * Type of the Self metadata.
  7589. *
  7590. * @publicApi
  7591. */
  7592. export declare interface Self {
  7593. }
  7594. /**
  7595. * Self decorator and metadata.
  7596. *
  7597. * @Annotation
  7598. * @publicApi
  7599. */
  7600. export declare const Self: SelfDecorator;
  7601. /**
  7602. * Type of the Self decorator / constructor function.
  7603. *
  7604. * @publicApi
  7605. */
  7606. export declare interface SelfDecorator {
  7607. /**
  7608. * Parameter decorator to be used on constructor parameters,
  7609. * which tells the DI framework to start dependency resolution from the local injector.
  7610. *
  7611. * Resolution works upward through the injector hierarchy, so the children
  7612. * of this class must configure their own providers or be prepared for a `null` result.
  7613. *
  7614. * @usageNotes
  7615. *
  7616. * In the following example, the dependency can be resolved
  7617. * by the local injector when instantiating the class itself, but not
  7618. * when instantiating a child.
  7619. *
  7620. * <code-example path="core/di/ts/metadata_spec.ts" region="Self">
  7621. * </code-example>
  7622. *
  7623. * @see {@link SkipSelf}
  7624. * @see {@link Optional}
  7625. *
  7626. */
  7627. (): any;
  7628. new (): Self;
  7629. }
  7630. /**
  7631. * Serialized data structure that contains relevant hydration
  7632. * annotation information about a view that is a part of a
  7633. * ViewContainer collection.
  7634. */
  7635. declare interface SerializedContainerView extends SerializedView {
  7636. /**
  7637. * Unique id that represents a TView that was used to create
  7638. * a given instance of a view:
  7639. * - TViewType.Embedded: a unique id generated during serialization on the server
  7640. * - TViewType.Component: an id generated based on component properties
  7641. * (see `getComponentId` function for details)
  7642. */
  7643. [TEMPLATE_ID]: string;
  7644. /**
  7645. * Number of root nodes that belong to this view.
  7646. * This information is needed to effectively traverse the DOM tree
  7647. * and identify segments that belong to different views.
  7648. */
  7649. [NUM_ROOT_NODES]: number;
  7650. /**
  7651. * Number of times this view is repeated.
  7652. * This is used to avoid serializing and sending the same hydration
  7653. * information about similar views (for example, produced by *ngFor).
  7654. */
  7655. [MULTIPLIER]?: number;
  7656. }
  7657. /**
  7658. * Represents element containers within this view, stored as key-value pairs
  7659. * where key is an index of a container in an LView (also used in the
  7660. * `elementContainerStart` instruction), the value is the number of root nodes
  7661. * in this container. This information is needed to locate an anchor comment
  7662. * node that goes after all container nodes.
  7663. */
  7664. declare interface SerializedElementContainers {
  7665. [key: number]: number;
  7666. }
  7667. /**
  7668. * Serialized data structure that contains relevant hydration
  7669. * annotation information that describes a given hydration boundary
  7670. * (e.g. a component).
  7671. */
  7672. declare interface SerializedView {
  7673. /**
  7674. * Serialized information about <ng-container>s.
  7675. */
  7676. [ELEMENT_CONTAINERS]?: SerializedElementContainers;
  7677. /**
  7678. * Serialized information about templates.
  7679. * Key-value pairs where a key is an index of the corresponding
  7680. * `template` instruction and the value is a unique id that can
  7681. * be used during hydration to identify that template.
  7682. */
  7683. [TEMPLATES]?: Record<number, string>;
  7684. /**
  7685. * Serialized information about view containers.
  7686. * Key-value pairs where a key is an index of the corresponding
  7687. * LContainer entry within an LView, and the value is a list
  7688. * of serialized information about views within this container.
  7689. */
  7690. [CONTAINERS]?: Record<number, SerializedContainerView[]>;
  7691. /**
  7692. * Serialized information about nodes in a template.
  7693. * Key-value pairs where a key is an index of the corresponding
  7694. * DOM node in an LView and the value is a path that describes
  7695. * the location of this node (as a set of navigation instructions).
  7696. */
  7697. [NODES]?: Record<number, string>;
  7698. /**
  7699. * A list of ids which represents a set of nodes disconnected
  7700. * from the DOM tree at the serialization time, but otherwise
  7701. * present in the internal data structures.
  7702. *
  7703. * This information is used to avoid triggering the hydration
  7704. * logic for such nodes and instead use a regular "creation mode".
  7705. */
  7706. [DISCONNECTED_NODES]?: number[];
  7707. }
  7708. /**
  7709. * Set the {@link GetTestability} implementation used by the Angular testing framework.
  7710. * @publicApi
  7711. */
  7712. export declare function setTestabilityGetter(getter: GetTestability): void;
  7713. /**
  7714. * Symbol used to tell `Signal`s apart from other functions.
  7715. *
  7716. * This can be used to auto-unwrap signals in various cases, or to auto-wrap non-signal values.
  7717. */
  7718. declare const SIGNAL: unique symbol;
  7719. /**
  7720. * A reactive value which notifies consumers of any changes.
  7721. *
  7722. * Signals are functions which returns their current value. To access the current value of a signal,
  7723. * call it.
  7724. *
  7725. * Ordinary values can be turned into `Signal`s with the `signal` function.
  7726. *
  7727. * @developerPreview
  7728. */
  7729. export declare type Signal<T> = (() => T) & {
  7730. [SIGNAL]: unknown;
  7731. };
  7732. /**
  7733. * Create a `Signal` that can be set or updated directly.
  7734. *
  7735. * @developerPreview
  7736. */
  7737. export declare function signal<T>(initialValue: T, options?: CreateSignalOptions<T>): WritableSignal<T>;
  7738. /**
  7739. * Represents a basic change from a previous to a new value for a single
  7740. * property on a directive instance. Passed as a value in a
  7741. * {@link SimpleChanges} object to the `ngOnChanges` hook.
  7742. *
  7743. * @see {@link OnChanges}
  7744. *
  7745. * @publicApi
  7746. */
  7747. export declare class SimpleChange {
  7748. previousValue: any;
  7749. currentValue: any;
  7750. firstChange: boolean;
  7751. constructor(previousValue: any, currentValue: any, firstChange: boolean);
  7752. /**
  7753. * Check whether the new value is the first value assigned.
  7754. */
  7755. isFirstChange(): boolean;
  7756. }
  7757. /**
  7758. * A hashtable of changes represented by {@link SimpleChange} objects stored
  7759. * at the declared property name they belong to on a Directive or Component. This is
  7760. * the type passed to the `ngOnChanges` hook.
  7761. *
  7762. * @see {@link OnChanges}
  7763. *
  7764. * @publicApi
  7765. */
  7766. export declare interface SimpleChanges {
  7767. [propName: string]: SimpleChange;
  7768. }
  7769. /**
  7770. * Type of the `SkipSelf` metadata.
  7771. *
  7772. * @publicApi
  7773. */
  7774. export declare interface SkipSelf {
  7775. }
  7776. /**
  7777. * `SkipSelf` decorator and metadata.
  7778. *
  7779. * @Annotation
  7780. * @publicApi
  7781. */
  7782. export declare const SkipSelf: SkipSelfDecorator;
  7783. /**
  7784. * Type of the `SkipSelf` decorator / constructor function.
  7785. *
  7786. * @publicApi
  7787. */
  7788. export declare interface SkipSelfDecorator {
  7789. /**
  7790. * Parameter decorator to be used on constructor parameters,
  7791. * which tells the DI framework to start dependency resolution from the parent injector.
  7792. * Resolution works upward through the injector hierarchy, so the local injector
  7793. * is not checked for a provider.
  7794. *
  7795. * @usageNotes
  7796. *
  7797. * In the following example, the dependency can be resolved when
  7798. * instantiating a child, but not when instantiating the class itself.
  7799. *
  7800. * <code-example path="core/di/ts/metadata_spec.ts" region="SkipSelf">
  7801. * </code-example>
  7802. *
  7803. * @see [Dependency Injection guide](guide/dependency-injection-in-action#skip).
  7804. * @see {@link Self}
  7805. * @see {@link Optional}
  7806. *
  7807. */
  7808. (): any;
  7809. new (): SkipSelf;
  7810. }
  7811. /**
  7812. * A type-safe key to use with `TransferState`.
  7813. *
  7814. * Example:
  7815. *
  7816. * ```
  7817. * const COUNTER_KEY = makeStateKey<number>('counter');
  7818. * let value = 10;
  7819. *
  7820. * transferState.set(COUNTER_KEY, value);
  7821. * ```
  7822. *
  7823. * @publicApi
  7824. */
  7825. export declare type StateKey<T> = string & {
  7826. __not_a_string: never;
  7827. __value_type?: T;
  7828. };
  7829. /**
  7830. * Configures the `Injector` to return an instance of `useClass` for a token.
  7831. * @see ["Dependency Injection Guide"](guide/dependency-injection).
  7832. *
  7833. * @usageNotes
  7834. *
  7835. * {@example core/di/ts/provider_spec.ts region='StaticClassProvider'}
  7836. *
  7837. * Note that following two providers are not equal:
  7838. *
  7839. * {@example core/di/ts/provider_spec.ts region='StaticClassProviderDifference'}
  7840. *
  7841. * ### Multi-value example
  7842. *
  7843. * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
  7844. *
  7845. * @publicApi
  7846. */
  7847. export declare interface StaticClassProvider extends StaticClassSansProvider {
  7848. /**
  7849. * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
  7850. */
  7851. provide: any;
  7852. /**
  7853. * When true, injector returns an array of instances. This is useful to allow multiple
  7854. * providers spread across many files to provide configuration information to a common token.
  7855. */
  7856. multi?: boolean;
  7857. }
  7858. /**
  7859. * Configures the `Injector` to return an instance of `useClass` for a token.
  7860. * Base for `StaticClassProvider` decorator.
  7861. *
  7862. * @publicApi
  7863. */
  7864. export declare interface StaticClassSansProvider {
  7865. /**
  7866. * An optional class to instantiate for the `token`. By default, the `provide`
  7867. * class is instantiated.
  7868. */
  7869. useClass: Type<any>;
  7870. /**
  7871. * A list of `token`s to be resolved by the injector. The list of values is then
  7872. * used as arguments to the `useClass` constructor.
  7873. */
  7874. deps: any[];
  7875. }
  7876. /**
  7877. * Describes how an `Injector` should be configured as static (that is, without reflection).
  7878. * A static provider provides tokens to an injector for various types of dependencies.
  7879. *
  7880. * @see {@link Injector.create()}
  7881. * @see ["Dependency Injection Guide"](guide/dependency-injection-providers).
  7882. *
  7883. * @publicApi
  7884. */
  7885. export declare type StaticProvider = ValueProvider | ExistingProvider | StaticClassProvider | ConstructorProvider | FactoryProvider | any[];
  7886. declare const T_HOST = 6;
  7887. /**
  7888. * A combination of:
  7889. * - Attribute names and values.
  7890. * - Special markers acting as flags to alter attributes processing.
  7891. * - Parsed ngProjectAs selectors.
  7892. */
  7893. declare type TAttributes = (string | ɵAttributeMarker | CssSelector)[];
  7894. /**
  7895. * Constants that are associated with a view. Includes:
  7896. * - Attribute arrays.
  7897. * - Local definition arrays.
  7898. * - Translated messages (i18n).
  7899. */
  7900. declare type TConstants = (TAttributes | string)[];
  7901. /**
  7902. * Factory function that returns an array of consts. Consts can be represented as a function in
  7903. * case any additional statements are required to define consts in the list. An example is i18n
  7904. * where additional i18n calls are generated, which should be executed when consts are requested
  7905. * for the first time.
  7906. */
  7907. declare type TConstantsFactory = () => TConstants;
  7908. /**
  7909. * TConstants type that describes how the `consts` field is generated on ComponentDef: it can be
  7910. * either an array or a factory function that returns that array.
  7911. */
  7912. declare type TConstantsOrFactory = TConstants | TConstantsFactory;
  7913. /** Static data for an LContainer */
  7914. declare interface TContainerNode extends TNode {
  7915. /**
  7916. * Index in the data[] array.
  7917. *
  7918. * If it's -1, this is a dynamically created container node that isn't stored in
  7919. * data[] (e.g. when you inject ViewContainerRef) .
  7920. */
  7921. index: number;
  7922. child: null;
  7923. /**
  7924. * Container nodes will have parents unless:
  7925. *
  7926. * - They are the first node of a component or embedded view
  7927. * - They are dynamically created
  7928. */
  7929. parent: TElementNode | TElementContainerNode | null;
  7930. tView: TView | null;
  7931. projection: null;
  7932. value: null;
  7933. }
  7934. /**
  7935. * Static data that corresponds to the instance-specific data array on an LView.
  7936. *
  7937. * Each node's static data is stored in tData at the same index that it's stored
  7938. * in the data array. Any nodes that do not have static data store a null value in
  7939. * tData to avoid a sparse array.
  7940. *
  7941. * Each pipe's definition is stored here at the same index as its pipe instance in
  7942. * the data array.
  7943. *
  7944. * Each host property's name is stored here at the same index as its value in the
  7945. * data array.
  7946. *
  7947. * Each property binding name is stored here at the same index as its value in
  7948. * the data array. If the binding is an interpolation, the static string values
  7949. * are stored parallel to the dynamic values. Example:
  7950. *
  7951. * id="prefix {{ v0 }} a {{ v1 }} b {{ v2 }} suffix"
  7952. *
  7953. * LView | TView.data
  7954. *------------------------
  7955. * v0 value | 'a'
  7956. * v1 value | 'b'
  7957. * v2 value | id � prefix � suffix
  7958. *
  7959. * Injector bloom filters are also stored here.
  7960. */
  7961. declare type TData = (TNode | ɵPipeDef<any> | ɵDirectiveDef<any> | ɵComponentDef<any> | number | TStylingRange | TStylingKey | ProviderToken<any> | TI18n | I18nUpdateOpCodes | TIcu | null | string)[];
  7962. /** Static data for an <ng-container> */
  7963. declare interface TElementContainerNode extends TNode {
  7964. /** Index in the LView[] array. */
  7965. index: number;
  7966. child: TElementNode | TTextNode | TContainerNode | TElementContainerNode | TProjectionNode | null;
  7967. parent: TElementNode | TElementContainerNode | null;
  7968. tView: null;
  7969. projection: null;
  7970. }
  7971. /** Static data for an element */
  7972. declare interface TElementNode extends TNode {
  7973. /** Index in the data[] array */
  7974. index: number;
  7975. child: TElementNode | TTextNode | TElementContainerNode | TContainerNode | TProjectionNode | null;
  7976. /**
  7977. * Element nodes will have parents unless they are the first node of a component or
  7978. * embedded view (which means their parent is in a different view and must be
  7979. * retrieved using viewData[HOST_NODE]).
  7980. */
  7981. parent: TElementNode | TElementContainerNode | null;
  7982. tView: null;
  7983. /**
  7984. * If this is a component TNode with projection, this will be an array of projected
  7985. * TNodes or native nodes (see TNode.projection for more info). If it's a regular element node
  7986. * or a component without projection, it will be null.
  7987. */
  7988. projection: (TNode | RNode[])[] | null;
  7989. /**
  7990. * Stores TagName
  7991. */
  7992. value: string;
  7993. }
  7994. declare const TEMPLATE_ID = "i";
  7995. /**
  7996. * Represents an embedded template that can be used to instantiate embedded views.
  7997. * To instantiate embedded views based on a template, use the `ViewContainerRef`
  7998. * method `createEmbeddedView()`.
  7999. *
  8000. * Access a `TemplateRef` instance by placing a directive on an `<ng-template>`
  8001. * element (or directive prefixed with `*`). The `TemplateRef` for the embedded view
  8002. * is injected into the constructor of the directive,
  8003. * using the `TemplateRef` token.
  8004. *
  8005. * You can also use a `Query` to find a `TemplateRef` associated with
  8006. * a component or a directive.
  8007. *
  8008. * @see {@link ViewContainerRef}
  8009. * @see [Navigate the Component Tree with DI](guide/dependency-injection-navtree)
  8010. *
  8011. * @publicApi
  8012. */
  8013. export declare abstract class TemplateRef<C> {
  8014. /**
  8015. * The anchor element in the parent view for this embedded view.
  8016. *
  8017. * The data-binding and [injection contexts](guide/dependency-injection-context) of embedded views
  8018. * created from this `TemplateRef` inherit from the contexts of this location.
  8019. *
  8020. * Typically new embedded views are attached to the view container of this location, but in
  8021. * advanced use-cases, the view can be attached to a different container while keeping the
  8022. * data-binding and injection context from the original location.
  8023. *
  8024. */
  8025. abstract readonly elementRef: ElementRef;
  8026. /**
  8027. * Instantiates an unattached embedded view based on this template.
  8028. * @param context The data-binding context of the embedded view, as declared
  8029. * in the `<ng-template>` usage.
  8030. * @param injector Injector to be used within the embedded view.
  8031. * @returns The new embedded view object.
  8032. */
  8033. abstract createEmbeddedView(context: C, injector?: Injector): EmbeddedViewRef<C>;
  8034. }
  8035. declare const TEMPLATES = "t";
  8036. /**
  8037. * The Testability service provides testing hooks that can be accessed from
  8038. * the browser.
  8039. *
  8040. * Angular applications bootstrapped using an NgModule (via `@NgModule.bootstrap` field) will also
  8041. * instantiate Testability by default (in both development and production modes).
  8042. *
  8043. * For applications bootstrapped using the `bootstrapApplication` function, Testability is not
  8044. * included by default. You can include it into your applications by getting the list of necessary
  8045. * providers using the `provideProtractorTestingSupport()` function and adding them into the
  8046. * `options.providers` array. Example:
  8047. *
  8048. * ```typescript
  8049. * import {provideProtractorTestingSupport} from '@angular/platform-browser';
  8050. *
  8051. * await bootstrapApplication(RootComponent, providers: [provideProtractorTestingSupport()]);
  8052. * ```
  8053. *
  8054. * @publicApi
  8055. */
  8056. export declare class Testability implements PublicTestability {
  8057. private _ngZone;
  8058. private registry;
  8059. private _pendingCount;
  8060. private _isZoneStable;
  8061. private _callbacks;
  8062. private taskTrackingZone;
  8063. constructor(_ngZone: NgZone, registry: TestabilityRegistry, testabilityGetter: GetTestability);
  8064. private _watchAngularEvents;
  8065. /**
  8066. * Increases the number of pending request
  8067. * @deprecated pending requests are now tracked with zones.
  8068. */
  8069. increasePendingRequestCount(): number;
  8070. /**
  8071. * Decreases the number of pending request
  8072. * @deprecated pending requests are now tracked with zones
  8073. */
  8074. decreasePendingRequestCount(): number;
  8075. /**
  8076. * Whether an associated application is stable
  8077. */
  8078. isStable(): boolean;
  8079. private _runCallbacksIfReady;
  8080. private getPendingTasks;
  8081. private addCallback;
  8082. /**
  8083. * Wait for the application to be stable with a timeout. If the timeout is reached before that
  8084. * happens, the callback receives a list of the macro tasks that were pending, otherwise null.
  8085. *
  8086. * @param doneCb The callback to invoke when Angular is stable or the timeout expires
  8087. * whichever comes first.
  8088. * @param timeout Optional. The maximum time to wait for Angular to become stable. If not
  8089. * specified, whenStable() will wait forever.
  8090. * @param updateCb Optional. If specified, this callback will be invoked whenever the set of
  8091. * pending macrotasks changes. If this callback returns true doneCb will not be invoked
  8092. * and no further updates will be issued.
  8093. */
  8094. whenStable(doneCb: Function, timeout?: number, updateCb?: Function): void;
  8095. /**
  8096. * Get the number of pending requests
  8097. * @deprecated pending requests are now tracked with zones
  8098. */
  8099. getPendingRequestCount(): number;
  8100. /**
  8101. * Find providers by name
  8102. * @param using The root element to search from
  8103. * @param provider The name of binding variable
  8104. * @param exactMatch Whether using exactMatch
  8105. */
  8106. findProviders(using: any, provider: string, exactMatch: boolean): any[];
  8107. static ɵfac: i0.ɵɵFactoryDeclaration<Testability, never>;
  8108. static ɵprov: i0.ɵɵInjectableDeclaration<Testability>;
  8109. }
  8110. /**
  8111. * A global registry of {@link Testability} instances for specific elements.
  8112. * @publicApi
  8113. */
  8114. export declare class TestabilityRegistry {
  8115. /**
  8116. * Registers an application with a testability hook so that it can be tracked
  8117. * @param token token of application, root element
  8118. * @param testability Testability hook
  8119. */
  8120. registerApplication(token: any, testability: Testability): void;
  8121. /**
  8122. * Unregisters an application.
  8123. * @param token token of application, root element
  8124. */
  8125. unregisterApplication(token: any): void;
  8126. /**
  8127. * Unregisters all applications
  8128. */
  8129. unregisterAllApplications(): void;
  8130. /**
  8131. * Get a testability hook associated with the application
  8132. * @param elem root element
  8133. */
  8134. getTestability(elem: any): Testability | null;
  8135. /**
  8136. * Get all registered testabilities
  8137. */
  8138. getAllTestabilities(): Testability[];
  8139. /**
  8140. * Get all registered applications(root elements)
  8141. */
  8142. getAllRootElements(): any[];
  8143. /**
  8144. * Find testability of a node in the Tree
  8145. * @param elem node
  8146. * @param findInAncestors whether finding testability in ancestors if testability was not found in
  8147. * current node
  8148. */
  8149. findTestabilityInTree(elem: Node, findInAncestors?: boolean): Testability | null;
  8150. static ɵfac: i0.ɵɵFactoryDeclaration<TestabilityRegistry, never>;
  8151. static ɵprov: i0.ɵɵInjectableDeclaration<TestabilityRegistry>;
  8152. }
  8153. /**
  8154. * Store information for the i18n translation block.
  8155. */
  8156. declare interface TI18n {
  8157. /**
  8158. * A set of OpCodes which will create the Text Nodes and ICU anchors for the translation blocks.
  8159. *
  8160. * NOTE: The ICU anchors are filled in with ICU Update OpCode.
  8161. */
  8162. create: I18nCreateOpCodes;
  8163. /**
  8164. * A set of OpCodes which will be executed on each change detection to determine if any changes to
  8165. * DOM are required.
  8166. */
  8167. update: I18nUpdateOpCodes;
  8168. }
  8169. declare interface TIcu {
  8170. /**
  8171. * Defines the ICU type of `select` or `plural`
  8172. */
  8173. type: IcuType;
  8174. /**
  8175. * Index in `LView` where the anchor node is stored. `<!-- ICU 0:0 -->`
  8176. */
  8177. anchorIdx: number;
  8178. /**
  8179. * Currently selected ICU case pointer.
  8180. *
  8181. * `lView[currentCaseLViewIndex]` stores the currently selected case. This is needed to know how
  8182. * to clean up the current case when transitioning no the new case.
  8183. *
  8184. * If the value stored is:
  8185. * `null`: No current case selected.
  8186. * `<0`: A flag which means that the ICU just switched and that `icuUpdate` must be executed
  8187. * regardless of the `mask`. (After the execution the flag is cleared)
  8188. * `>=0` A currently selected case index.
  8189. */
  8190. currentCaseLViewIndex: number;
  8191. /**
  8192. * A list of case values which the current ICU will try to match.
  8193. *
  8194. * The last value is `other`
  8195. */
  8196. cases: any[];
  8197. /**
  8198. * A set of OpCodes to apply in order to build up the DOM render tree for the ICU
  8199. */
  8200. create: IcuCreateOpCodes[];
  8201. /**
  8202. * A set of OpCodes to apply in order to destroy the DOM render tree for the ICU.
  8203. */
  8204. remove: I18nRemoveOpCodes[];
  8205. /**
  8206. * A set of OpCodes to apply in order to update the DOM render tree for the ICU bindings.
  8207. */
  8208. update: I18nUpdateOpCodes[];
  8209. }
  8210. /**
  8211. * Binding data (flyweight) for a particular node that is shared between all templates
  8212. * of a specific type.
  8213. *
  8214. * If a property is:
  8215. * - PropertyAliases: that property's data was generated and this is it
  8216. * - Null: that property's data was already generated and nothing was found.
  8217. * - Undefined: that property's data has not yet been generated
  8218. *
  8219. * see: https://en.wikipedia.org/wiki/Flyweight_pattern for more on the Flyweight pattern
  8220. */
  8221. declare interface TNode {
  8222. /** The type of the TNode. See TNodeType. */
  8223. type: TNodeType;
  8224. /**
  8225. * Index of the TNode in TView.data and corresponding native element in LView.
  8226. *
  8227. * This is necessary to get from any TNode to its corresponding native element when
  8228. * traversing the node tree.
  8229. *
  8230. * If index is -1, this is a dynamically created container node or embedded view node.
  8231. */
  8232. index: number;
  8233. /**
  8234. * Insert before existing DOM node index.
  8235. *
  8236. * When DOM nodes are being inserted, normally they are being appended as they are created.
  8237. * Under i18n case, the translated text nodes are created ahead of time as part of the
  8238. * `ɵɵi18nStart` instruction which means that this `TNode` can't just be appended and instead
  8239. * needs to be inserted using `insertBeforeIndex` semantics.
  8240. *
  8241. * Additionally sometimes it is necessary to insert new text nodes as a child of this `TNode`. In
  8242. * such a case the value stores an array of text nodes to insert.
  8243. *
  8244. * Example:
  8245. * ```
  8246. * <div i18n>
  8247. * Hello <span>World</span>!
  8248. * </div>
  8249. * ```
  8250. * In the above example the `ɵɵi18nStart` instruction can create `Hello `, `World` and `!` text
  8251. * nodes. It can also insert `Hello ` and `!` text node as a child of `<div>`, but it can't
  8252. * insert `World` because the `<span>` node has not yet been created. In such a case the
  8253. * `<span>` `TNode` will have an array which will direct the `<span>` to not only insert
  8254. * itself in front of `!` but also to insert the `World` (created by `ɵɵi18nStart`) into
  8255. * `<span>` itself.
  8256. *
  8257. * Pseudo code:
  8258. * ```
  8259. * if (insertBeforeIndex === null) {
  8260. * // append as normal
  8261. * } else if (Array.isArray(insertBeforeIndex)) {
  8262. * // First insert current `TNode` at correct location
  8263. * const currentNode = lView[this.index];
  8264. * parentNode.insertBefore(currentNode, lView[this.insertBeforeIndex[0]]);
  8265. * // Now append all of the children
  8266. * for(let i=1; i<this.insertBeforeIndex; i++) {
  8267. * currentNode.appendChild(lView[this.insertBeforeIndex[i]]);
  8268. * }
  8269. * } else {
  8270. * parentNode.insertBefore(lView[this.index], lView[this.insertBeforeIndex])
  8271. * }
  8272. * ```
  8273. * - null: Append as normal using `parentNode.appendChild`
  8274. * - `number`: Append using
  8275. * `parentNode.insertBefore(lView[this.index], lView[this.insertBeforeIndex])`
  8276. *
  8277. * *Initialization*
  8278. *
  8279. * Because `ɵɵi18nStart` executes before nodes are created, on `TView.firstCreatePass` it is not
  8280. * possible for `ɵɵi18nStart` to set the `insertBeforeIndex` value as the corresponding `TNode`
  8281. * has not yet been created. For this reason the `ɵɵi18nStart` creates a `TNodeType.Placeholder`
  8282. * `TNode` at that location. See `TNodeType.Placeholder` for more information.
  8283. */
  8284. insertBeforeIndex: InsertBeforeIndex;
  8285. /**
  8286. * The index of the closest injector in this node's LView.
  8287. *
  8288. * If the index === -1, there is no injector on this node or any ancestor node in this view.
  8289. *
  8290. * If the index !== -1, it is the index of this node's injector OR the index of a parent
  8291. * injector in the same view. We pass the parent injector index down the node tree of a view so
  8292. * it's possible to find the parent injector without walking a potentially deep node tree.
  8293. * Injector indices are not set across view boundaries because there could be multiple component
  8294. * hosts.
  8295. *
  8296. * If tNode.injectorIndex === tNode.parent.injectorIndex, then the index belongs to a parent
  8297. * injector.
  8298. */
  8299. injectorIndex: number;
  8300. /** Stores starting index of the directives. */
  8301. directiveStart: number;
  8302. /**
  8303. * Stores final exclusive index of the directives.
  8304. *
  8305. * The area right behind the `directiveStart-directiveEnd` range is used to allocate the
  8306. * `HostBindingFunction` `vars` (or null if no bindings.) Therefore `directiveEnd` is used to set
  8307. * `LFrame.bindingRootIndex` before `HostBindingFunction` is executed.
  8308. */
  8309. directiveEnd: number;
  8310. /**
  8311. * Offset from the `directiveStart` at which the component (one at most) of the node is stored.
  8312. * Set to -1 if no components have been applied to the node. Component index can be found using
  8313. * `directiveStart + componentOffset`.
  8314. */
  8315. componentOffset: number;
  8316. /**
  8317. * Stores the last directive which had a styling instruction.
  8318. *
  8319. * Initial value of this is `-1` which means that no `hostBindings` styling instruction has
  8320. * executed. As `hostBindings` instructions execute they set the value to the index of the
  8321. * `DirectiveDef` which contained the last `hostBindings` styling instruction.
  8322. *
  8323. * Valid values are:
  8324. * - `-1` No `hostBindings` instruction has executed.
  8325. * - `directiveStart <= directiveStylingLast < directiveEnd`: Points to the `DirectiveDef` of
  8326. * the last styling instruction which executed in the `hostBindings`.
  8327. *
  8328. * This data is needed so that styling instructions know which static styling data needs to be
  8329. * collected from the `DirectiveDef.hostAttrs`. A styling instruction needs to collect all data
  8330. * since last styling instruction.
  8331. */
  8332. directiveStylingLast: number;
  8333. /**
  8334. * Stores indexes of property bindings. This field is only set in the ngDevMode and holds
  8335. * indexes of property bindings so TestBed can get bound property metadata for a given node.
  8336. */
  8337. propertyBindings: number[] | null;
  8338. /**
  8339. * Stores if Node isComponent, isProjected, hasContentQuery, hasClassInput and hasStyleInput
  8340. * etc.
  8341. */
  8342. flags: TNodeFlags;
  8343. /**
  8344. * This number stores two values using its bits:
  8345. *
  8346. * - the index of the first provider on that node (first 16 bits)
  8347. * - the count of view providers from the component on this node (last 16 bits)
  8348. */
  8349. providerIndexes: TNodeProviderIndexes;
  8350. /**
  8351. * The value name associated with this node.
  8352. * if type:
  8353. * `TNodeType.Text`: text value
  8354. * `TNodeType.Element`: tag name
  8355. * `TNodeType.ICUContainer`: `TIcu`
  8356. */
  8357. value: any;
  8358. /**
  8359. * Attributes associated with an element. We need to store attributes to support various
  8360. * use-cases (attribute injection, content projection with selectors, directives matching).
  8361. * Attributes are stored statically because reading them from the DOM would be way too slow for
  8362. * content projection and queries.
  8363. *
  8364. * Since attrs will always be calculated first, they will never need to be marked undefined by
  8365. * other instructions.
  8366. *
  8367. * For regular attributes a name of an attribute and its value alternate in the array.
  8368. * e.g. ['role', 'checkbox']
  8369. * This array can contain flags that will indicate "special attributes" (attributes with
  8370. * namespaces, attributes extracted from bindings and outputs).
  8371. */
  8372. attrs: TAttributes | null;
  8373. /**
  8374. * Same as `TNode.attrs` but contains merged data across all directive host bindings.
  8375. *
  8376. * We need to keep `attrs` as unmerged so that it can be used for attribute selectors.
  8377. * We merge attrs here so that it can be used in a performant way for initial rendering.
  8378. *
  8379. * The `attrs` are merged in first pass in following order:
  8380. * - Component's `hostAttrs`
  8381. * - Directives' `hostAttrs`
  8382. * - Template `TNode.attrs` associated with the current `TNode`.
  8383. */
  8384. mergedAttrs: TAttributes | null;
  8385. /**
  8386. * A set of local names under which a given element is exported in a template and
  8387. * visible to queries. An entry in this array can be created for different reasons:
  8388. * - an element itself is referenced, ex.: `<div #foo>`
  8389. * - a component is referenced, ex.: `<my-cmpt #foo>`
  8390. * - a directive is referenced, ex.: `<my-cmpt #foo="directiveExportAs">`.
  8391. *
  8392. * A given element might have different local names and those names can be associated
  8393. * with a directive. We store local names at even indexes while odd indexes are reserved
  8394. * for directive index in a view (or `-1` if there is no associated directive).
  8395. *
  8396. * Some examples:
  8397. * - `<div #foo>` => `["foo", -1]`
  8398. * - `<my-cmpt #foo>` => `["foo", myCmptIdx]`
  8399. * - `<my-cmpt #foo #bar="directiveExportAs">` => `["foo", myCmptIdx, "bar", directiveIdx]`
  8400. * - `<div #foo #bar="directiveExportAs">` => `["foo", -1, "bar", directiveIdx]`
  8401. */
  8402. localNames: (string | number)[] | null;
  8403. /** Information about input properties that need to be set once from attribute data. */
  8404. initialInputs: InitialInputData | null | undefined;
  8405. /**
  8406. * Input data for all directives on this node. `null` means that there are no directives with
  8407. * inputs on this node.
  8408. */
  8409. inputs: PropertyAliases | null;
  8410. /**
  8411. * Output data for all directives on this node. `null` means that there are no directives with
  8412. * outputs on this node.
  8413. */
  8414. outputs: PropertyAliases | null;
  8415. /**
  8416. * The TView attached to this node.
  8417. *
  8418. * If this TNode corresponds to an LContainer with a template (e.g. structural
  8419. * directive), the template's TView will be stored here.
  8420. *
  8421. * If this TNode corresponds to an element, tView will be `null`.
  8422. */
  8423. tView: TView | null;
  8424. /**
  8425. * The next sibling node. Necessary so we can propagate through the root nodes of a view
  8426. * to insert them or remove them from the DOM.
  8427. */
  8428. next: TNode | null;
  8429. /**
  8430. * The previous sibling node.
  8431. * This simplifies operations when we need a pointer to the previous node.
  8432. */
  8433. prev: TNode | null;
  8434. /**
  8435. * The next projected sibling. Since in Angular content projection works on the node-by-node
  8436. * basis the act of projecting nodes might change nodes relationship at the insertion point
  8437. * (target view). At the same time we need to keep initial relationship between nodes as
  8438. * expressed in content view.
  8439. */
  8440. projectionNext: TNode | null;
  8441. /**
  8442. * First child of the current node.
  8443. *
  8444. * For component nodes, the child will always be a ContentChild (in same view).
  8445. * For embedded view nodes, the child will be in their child view.
  8446. */
  8447. child: TNode | null;
  8448. /**
  8449. * Parent node (in the same view only).
  8450. *
  8451. * We need a reference to a node's parent so we can append the node to its parent's native
  8452. * element at the appropriate time.
  8453. *
  8454. * If the parent would be in a different view (e.g. component host), this property will be null.
  8455. * It's important that we don't try to cross component boundaries when retrieving the parent
  8456. * because the parent will change (e.g. index, attrs) depending on where the component was
  8457. * used (and thus shouldn't be stored on TNode). In these cases, we retrieve the parent through
  8458. * LView.node instead (which will be instance-specific).
  8459. *
  8460. * If this is an inline view node (V), the parent will be its container.
  8461. */
  8462. parent: TElementNode | TContainerNode | null;
  8463. /**
  8464. * List of projected TNodes for a given component host element OR index into the said nodes.
  8465. *
  8466. * For easier discussion assume this example:
  8467. * `<parent>`'s view definition:
  8468. * ```
  8469. * <child id="c1">content1</child>
  8470. * <child id="c2"><span>content2</span></child>
  8471. * ```
  8472. * `<child>`'s view definition:
  8473. * ```
  8474. * <ng-content id="cont1"></ng-content>
  8475. * ```
  8476. *
  8477. * If `Array.isArray(projection)` then `TNode` is a host element:
  8478. * - `projection` stores the content nodes which are to be projected.
  8479. * - The nodes represent categories defined by the selector: For example:
  8480. * `<ng-content/><ng-content select="abc"/>` would represent the heads for `<ng-content/>`
  8481. * and `<ng-content select="abc"/>` respectively.
  8482. * - The nodes we store in `projection` are heads only, we used `.next` to get their
  8483. * siblings.
  8484. * - The nodes `.next` is sorted/rewritten as part of the projection setup.
  8485. * - `projection` size is equal to the number of projections `<ng-content>`. The size of
  8486. * `c1` will be `1` because `<child>` has only one `<ng-content>`.
  8487. * - we store `projection` with the host (`c1`, `c2`) rather than the `<ng-content>` (`cont1`)
  8488. * because the same component (`<child>`) can be used in multiple locations (`c1`, `c2`) and
  8489. * as a result have different set of nodes to project.
  8490. * - without `projection` it would be difficult to efficiently traverse nodes to be projected.
  8491. *
  8492. * If `typeof projection == 'number'` then `TNode` is a `<ng-content>` element:
  8493. * - `projection` is an index of the host's `projection`Nodes.
  8494. * - This would return the first head node to project:
  8495. * `getHost(currentTNode).projection[currentTNode.projection]`.
  8496. * - When projecting nodes the parent node retrieved may be a `<ng-content>` node, in which case
  8497. * the process is recursive in nature.
  8498. *
  8499. * If `projection` is of type `RNode[][]` than we have a collection of native nodes passed as
  8500. * projectable nodes during dynamic component creation.
  8501. */
  8502. projection: (TNode | RNode[])[] | number | null;
  8503. /**
  8504. * A collection of all `style` static values for an element (including from host).
  8505. *
  8506. * This field will be populated if and when:
  8507. *
  8508. * - There are one or more initial `style`s on an element (e.g. `<div style="width:200px;">`)
  8509. * - There are one or more initial `style`s on a directive/component host
  8510. * (e.g. `@Directive({host: {style: "width:200px;" } }`)
  8511. */
  8512. styles: string | null;
  8513. /**
  8514. * A collection of all `style` static values for an element excluding host sources.
  8515. *
  8516. * Populated when there are one or more initial `style`s on an element
  8517. * (e.g. `<div style="width:200px;">`)
  8518. * Must be stored separately from `tNode.styles` to facilitate setting directive
  8519. * inputs that shadow the `style` property. If we used `tNode.styles` as is for shadowed inputs,
  8520. * we would feed host styles back into directives as "inputs". If we used `tNode.attrs`, we
  8521. * would have to concatenate the attributes on every template pass. Instead, we process once on
  8522. * first create pass and store here.
  8523. */
  8524. stylesWithoutHost: string | null;
  8525. /**
  8526. * A `KeyValueArray` version of residual `styles`.
  8527. *
  8528. * When there are styling instructions than each instruction stores the static styling
  8529. * which is of lower priority than itself. This means that there may be a higher priority
  8530. * styling than the instruction.
  8531. *
  8532. * Imagine:
  8533. * ```
  8534. * <div style="color: highest;" my-dir>
  8535. *
  8536. * @Directive({
  8537. * host: {
  8538. * style: 'color: lowest; ',
  8539. * '[styles.color]': 'exp' // ɵɵstyleProp('color', ctx.exp);
  8540. * }
  8541. * })
  8542. * ```
  8543. *
  8544. * In the above case:
  8545. * - `color: lowest` is stored with `ɵɵstyleProp('color', ctx.exp);` instruction
  8546. * - `color: highest` is the residual and is stored here.
  8547. *
  8548. * - `undefined': not initialized.
  8549. * - `null`: initialized but `styles` is `null`
  8550. * - `KeyValueArray`: parsed version of `styles`.
  8551. */
  8552. residualStyles: KeyValueArray<any> | undefined | null;
  8553. /**
  8554. * A collection of all class static values for an element (including from host).
  8555. *
  8556. * This field will be populated if and when:
  8557. *
  8558. * - There are one or more initial classes on an element (e.g. `<div class="one two three">`)
  8559. * - There are one or more initial classes on an directive/component host
  8560. * (e.g. `@Directive({host: {class: "SOME_CLASS" } }`)
  8561. */
  8562. classes: string | null;
  8563. /**
  8564. * A collection of all class static values for an element excluding host sources.
  8565. *
  8566. * Populated when there are one or more initial classes on an element
  8567. * (e.g. `<div class="SOME_CLASS">`)
  8568. * Must be stored separately from `tNode.classes` to facilitate setting directive
  8569. * inputs that shadow the `class` property. If we used `tNode.classes` as is for shadowed
  8570. * inputs, we would feed host classes back into directives as "inputs". If we used
  8571. * `tNode.attrs`, we would have to concatenate the attributes on every template pass. Instead,
  8572. * we process once on first create pass and store here.
  8573. */
  8574. classesWithoutHost: string | null;
  8575. /**
  8576. * A `KeyValueArray` version of residual `classes`.
  8577. *
  8578. * Same as `TNode.residualStyles` but for classes.
  8579. *
  8580. * - `undefined': not initialized.
  8581. * - `null`: initialized but `classes` is `null`
  8582. * - `KeyValueArray`: parsed version of `classes`.
  8583. */
  8584. residualClasses: KeyValueArray<any> | undefined | null;
  8585. /**
  8586. * Stores the head/tail index of the class bindings.
  8587. *
  8588. * - If no bindings, the head and tail will both be 0.
  8589. * - If there are template bindings, stores the head/tail of the class bindings in the template.
  8590. * - If no template bindings but there are host bindings, the head value will point to the last
  8591. * host binding for "class" (not the head of the linked list), tail will be 0.
  8592. *
  8593. * See: `style_binding_list.ts` for details.
  8594. *
  8595. * This is used by `insertTStylingBinding` to know where the next styling binding should be
  8596. * inserted so that they can be sorted in priority order.
  8597. */
  8598. classBindings: TStylingRange;
  8599. /**
  8600. * Stores the head/tail index of the class bindings.
  8601. *
  8602. * - If no bindings, the head and tail will both be 0.
  8603. * - If there are template bindings, stores the head/tail of the style bindings in the template.
  8604. * - If no template bindings but there are host bindings, the head value will point to the last
  8605. * host binding for "style" (not the head of the linked list), tail will be 0.
  8606. *
  8607. * See: `style_binding_list.ts` for details.
  8608. *
  8609. * This is used by `insertTStylingBinding` to know where the next styling binding should be
  8610. * inserted so that they can be sorted in priority order.
  8611. */
  8612. styleBindings: TStylingRange;
  8613. }
  8614. /**
  8615. * Corresponds to the TNode.flags property.
  8616. */
  8617. declare const enum TNodeFlags {
  8618. /** Bit #1 - This bit is set if the node is a host for any directive (including a component) */
  8619. isDirectiveHost = 1,
  8620. /** Bit #2 - This bit is set if the node has been projected */
  8621. isProjected = 2,
  8622. /** Bit #3 - This bit is set if any directive on this node has content queries */
  8623. hasContentQuery = 4,
  8624. /** Bit #4 - This bit is set if the node has any "class" inputs */
  8625. hasClassInput = 8,
  8626. /** Bit #5 - This bit is set if the node has any "style" inputs */
  8627. hasStyleInput = 16,
  8628. /** Bit #6 - This bit is set if the node has been detached by i18n */
  8629. isDetached = 32,
  8630. /**
  8631. * Bit #7 - This bit is set if the node has directives with host bindings.
  8632. *
  8633. * This flags allows us to guard host-binding logic and invoke it only on nodes
  8634. * that actually have directives with host bindings.
  8635. */
  8636. hasHostBindings = 64,
  8637. /**
  8638. * Bit #8 - This bit is set if the node is a located inside skip hydration block.
  8639. */
  8640. inSkipHydrationBlock = 128
  8641. }
  8642. /**
  8643. * Corresponds to the TNode.providerIndexes property.
  8644. */
  8645. declare const enum TNodeProviderIndexes {
  8646. /** The index of the first provider on this node is encoded on the least significant bits. */
  8647. ProvidersStartIndexMask = 1048575,
  8648. /**
  8649. * The count of view providers from the component on this node is
  8650. * encoded on the 20 most significant bits.
  8651. */
  8652. CptViewProvidersCountShift = 20,
  8653. CptViewProvidersCountShifter = 1048576
  8654. }
  8655. /**
  8656. * TNodeType corresponds to the {@link TNode} `type` property.
  8657. *
  8658. * NOTE: type IDs are such that we use each bit to denote a type. This is done so that we can easily
  8659. * check if the `TNode` is of more than one type.
  8660. *
  8661. * `if (tNode.type === TNodeType.Text || tNode.type === TNode.Element)`
  8662. * can be written as:
  8663. * `if (tNode.type & (TNodeType.Text | TNodeType.Element))`
  8664. *
  8665. * However any given `TNode` can only be of one type.
  8666. */
  8667. declare const enum TNodeType {
  8668. /**
  8669. * The TNode contains information about a DOM element aka {@link RText}.
  8670. */
  8671. Text = 1,
  8672. /**
  8673. * The TNode contains information about a DOM element aka {@link RElement}.
  8674. */
  8675. Element = 2,
  8676. /**
  8677. * The TNode contains information about an {@link LContainer} for embedded views.
  8678. */
  8679. Container = 4,
  8680. /**
  8681. * The TNode contains information about an `<ng-container>` element {@link RNode}.
  8682. */
  8683. ElementContainer = 8,
  8684. /**
  8685. * The TNode contains information about an `<ng-content>` projection
  8686. */
  8687. Projection = 16,
  8688. /**
  8689. * The TNode contains information about an ICU comment used in `i18n`.
  8690. */
  8691. Icu = 32,
  8692. /**
  8693. * Special node type representing a placeholder for future `TNode` at this location.
  8694. *
  8695. * I18n translation blocks are created before the element nodes which they contain. (I18n blocks
  8696. * can span over many elements.) Because i18n `TNode`s (representing text) are created first they
  8697. * often may need to point to element `TNode`s which are not yet created. In such a case we create
  8698. * a `Placeholder` `TNode`. This allows the i18n to structurally link the `TNode`s together
  8699. * without knowing any information about the future nodes which will be at that location.
  8700. *
  8701. * On `firstCreatePass` When element instruction executes it will try to create a `TNode` at that
  8702. * location. Seeing a `Placeholder` `TNode` already there tells the system that it should reuse
  8703. * existing `TNode` (rather than create a new one) and just update the missing information.
  8704. */
  8705. Placeholder = 64,
  8706. AnyRNode = 3,
  8707. AnyContainer = 12
  8708. }
  8709. /**
  8710. * Type representing a set of TNodes that can have local refs (`#foo`) placed on them.
  8711. */
  8712. declare type TNodeWithLocalRefs = TContainerNode | TElementNode | TElementContainerNode;
  8713. /** Static data for an LProjectionNode */
  8714. declare interface TProjectionNode extends TNode {
  8715. /** Index in the data[] array */
  8716. child: null;
  8717. /**
  8718. * Projection nodes will have parents unless they are the first node of a component
  8719. * or embedded view (which means their parent is in a different view and must be
  8720. * retrieved using LView.node).
  8721. */
  8722. parent: TElementNode | TElementContainerNode | null;
  8723. tView: null;
  8724. /** Index of the projection node. (See TNode.projection for more info.) */
  8725. projection: number;
  8726. value: null;
  8727. }
  8728. /**
  8729. * TQueries represent a collection of individual TQuery objects tracked in a given view. Most of the
  8730. * methods on this interface are simple proxy methods to the corresponding functionality on TQuery.
  8731. */
  8732. declare interface TQueries {
  8733. /**
  8734. * Adds a new TQuery to a collection of queries tracked in a given view.
  8735. * @param tQuery
  8736. */
  8737. track(tQuery: TQuery): void;
  8738. /**
  8739. * Returns a TQuery instance for at the given index in the queries array.
  8740. * @param index
  8741. */
  8742. getByIndex(index: number): TQuery;
  8743. /**
  8744. * Returns the number of queries tracked in a given view.
  8745. */
  8746. length: number;
  8747. /**
  8748. * A proxy method that iterates over all the TQueries in a given TView and calls the corresponding
  8749. * `elementStart` on each and every TQuery.
  8750. * @param tView
  8751. * @param tNode
  8752. */
  8753. elementStart(tView: TView, tNode: TNode): void;
  8754. /**
  8755. * A proxy method that iterates over all the TQueries in a given TView and calls the corresponding
  8756. * `elementEnd` on each and every TQuery.
  8757. * @param tNode
  8758. */
  8759. elementEnd(tNode: TNode): void;
  8760. /**
  8761. * A proxy method that iterates over all the TQueries in a given TView and calls the corresponding
  8762. * `template` on each and every TQuery.
  8763. * @param tView
  8764. * @param tNode
  8765. */
  8766. template(tView: TView, tNode: TNode): void;
  8767. /**
  8768. * A proxy method that iterates over all the TQueries in a given TView and calls the corresponding
  8769. * `embeddedTView` on each and every TQuery.
  8770. * @param tNode
  8771. */
  8772. embeddedTView(tNode: TNode): TQueries | null;
  8773. }
  8774. /**
  8775. * TQuery objects represent all the query-related data that remain the same from one view instance
  8776. * to another and can be determined on the very first template pass. Most notably TQuery holds all
  8777. * the matches for a given view.
  8778. */
  8779. declare interface TQuery {
  8780. /**
  8781. * Query metadata extracted from query annotations.
  8782. */
  8783. metadata: TQueryMetadata;
  8784. /**
  8785. * Index of a query in a declaration view in case of queries propagated to en embedded view, -1
  8786. * for queries declared in a given view. We are storing this index so we can find a parent query
  8787. * to clone for an embedded view (when an embedded view is created).
  8788. */
  8789. indexInDeclarationView: number;
  8790. /**
  8791. * Matches collected on the first template pass. Each match is a pair of:
  8792. * - TNode index;
  8793. * - match index;
  8794. *
  8795. * A TNode index can be either:
  8796. * - a positive number (the most common case) to indicate a matching TNode;
  8797. * - a negative number to indicate that a given query is crossing a <ng-template> element and
  8798. * results from views created based on TemplateRef should be inserted at this place.
  8799. *
  8800. * A match index is a number used to find an actual value (for a given node) when query results
  8801. * are materialized. This index can have one of the following values:
  8802. * - -2 - indicates that we need to read a special token (TemplateRef, ViewContainerRef etc.);
  8803. * - -1 - indicates that we need to read a default value based on the node type (TemplateRef for
  8804. * ng-template and ElementRef for other elements);
  8805. * - a positive number - index of an injectable to be read from the element injector.
  8806. */
  8807. matches: number[] | null;
  8808. /**
  8809. * A flag indicating if a given query crosses an <ng-template> element. This flag exists for
  8810. * performance reasons: we can notice that queries not crossing any <ng-template> elements will
  8811. * have matches from a given view only (and adapt processing accordingly).
  8812. */
  8813. crossesNgTemplate: boolean;
  8814. /**
  8815. * A method call when a given query is crossing an element (or element container). This is where a
  8816. * given TNode is matched against a query predicate.
  8817. * @param tView
  8818. * @param tNode
  8819. */
  8820. elementStart(tView: TView, tNode: TNode): void;
  8821. /**
  8822. * A method called when processing the elementEnd instruction - this is mostly useful to determine
  8823. * if a given content query should match any nodes past this point.
  8824. * @param tNode
  8825. */
  8826. elementEnd(tNode: TNode): void;
  8827. /**
  8828. * A method called when processing the template instruction. This is where a
  8829. * given TContainerNode is matched against a query predicate.
  8830. * @param tView
  8831. * @param tNode
  8832. */
  8833. template(tView: TView, tNode: TNode): void;
  8834. /**
  8835. * A query-related method called when an embedded TView is created based on the content of a
  8836. * <ng-template> element. We call this method to determine if a given query should be propagated
  8837. * to the embedded view and if so - return a cloned TQuery for this embedded view.
  8838. * @param tNode
  8839. * @param childQueryIndex
  8840. */
  8841. embeddedTView(tNode: TNode, childQueryIndex: number): TQuery | null;
  8842. }
  8843. /**
  8844. * An object representing query metadata extracted from query annotations.
  8845. */
  8846. declare interface TQueryMetadata {
  8847. predicate: ProviderToken<unknown> | string[];
  8848. read: any;
  8849. flags: QueryFlags;
  8850. }
  8851. /**
  8852. * A function optionally passed into the `NgForOf` directive to customize how `NgForOf` uniquely
  8853. * identifies items in an iterable.
  8854. *
  8855. * `NgForOf` needs to uniquely identify items in the iterable to correctly perform DOM updates
  8856. * when items in the iterable are reordered, new items are added, or existing items are removed.
  8857. *
  8858. *
  8859. * In all of these scenarios it is usually desirable to only update the DOM elements associated
  8860. * with the items affected by the change. This behavior is important to:
  8861. *
  8862. * - preserve any DOM-specific UI state (like cursor position, focus, text selection) when the
  8863. * iterable is modified
  8864. * - enable animation of item addition, removal, and iterable reordering
  8865. * - preserve the value of the `<select>` element when nested `<option>` elements are dynamically
  8866. * populated using `NgForOf` and the bound iterable is updated
  8867. *
  8868. * A common use for custom `trackBy` functions is when the model that `NgForOf` iterates over
  8869. * contains a property with a unique identifier. For example, given a model:
  8870. *
  8871. * ```ts
  8872. * class User {
  8873. * id: number;
  8874. * name: string;
  8875. * ...
  8876. * }
  8877. * ```
  8878. * a custom `trackBy` function could look like the following:
  8879. * ```ts
  8880. * function userTrackBy(index, user) {
  8881. * return user.id;
  8882. * }
  8883. * ```
  8884. *
  8885. * A custom `trackBy` function must have several properties:
  8886. *
  8887. * - be [idempotent](https://en.wikipedia.org/wiki/Idempotence) (be without side effects, and always
  8888. * return the same value for a given input)
  8889. * - return unique value for all unique inputs
  8890. * - be fast
  8891. *
  8892. * @see [`NgForOf#ngForTrackBy`](api/common/NgForOf#ngForTrackBy)
  8893. * @publicApi
  8894. */
  8895. export declare interface TrackByFunction<T> {
  8896. /**
  8897. * @param index The index of the item within the iterable.
  8898. * @param item The item in the iterable.
  8899. */
  8900. <U extends T>(index: number, item: T & U): any;
  8901. }
  8902. /**
  8903. * A key value store that is transferred from the application on the server side to the application
  8904. * on the client side.
  8905. *
  8906. * The `TransferState` is available as an injectable token.
  8907. * On the client, just inject this token using DI and use it, it will be lazily initialized.
  8908. * On the server it's already included if `renderApplication` function is used. Otherwise, import
  8909. * the `ServerTransferStateModule` module to make the `TransferState` available.
  8910. *
  8911. * The values in the store are serialized/deserialized using JSON.stringify/JSON.parse. So only
  8912. * boolean, number, string, null and non-class objects will be serialized and deserialized in a
  8913. * non-lossy manner.
  8914. *
  8915. * @publicApi
  8916. */
  8917. export declare class TransferState {
  8918. /** @nocollapse */
  8919. static ɵprov: unknown;
  8920. private onSerializeCallbacks;
  8921. /**
  8922. * Get the value corresponding to a key. Return `defaultValue` if key is not found.
  8923. */
  8924. get<T>(key: StateKey<T>, defaultValue: T): T;
  8925. /**
  8926. * Set the value corresponding to a key.
  8927. */
  8928. set<T>(key: StateKey<T>, value: T): void;
  8929. /**
  8930. * Remove a key from the store.
  8931. */
  8932. remove<T>(key: StateKey<T>): void;
  8933. /**
  8934. * Test whether a key exists in the store.
  8935. */
  8936. hasKey<T>(key: StateKey<T>): boolean;
  8937. /**
  8938. * Indicates whether the state is empty.
  8939. */
  8940. get isEmpty(): boolean;
  8941. /**
  8942. * Register a callback to provide the value for a key when `toJson` is called.
  8943. */
  8944. onSerialize<T>(key: StateKey<T>, callback: () => T): void;
  8945. /**
  8946. * Serialize the current state of the store to JSON.
  8947. */
  8948. toJson(): string;
  8949. }
  8950. /**
  8951. * Use this token at bootstrap to provide the content of your translation file (`xtb`,
  8952. * `xlf` or `xlf2`) when you want to translate your application in another language.
  8953. *
  8954. * See the [i18n guide](guide/i18n-common-merge) for more information.
  8955. *
  8956. * @usageNotes
  8957. * ### Example
  8958. *
  8959. * ```typescript
  8960. * import { TRANSLATIONS } from '@angular/core';
  8961. * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
  8962. * import { AppModule } from './app/app.module';
  8963. *
  8964. * // content of your translation file
  8965. * const translations = '....';
  8966. *
  8967. * platformBrowserDynamic().bootstrapModule(AppModule, {
  8968. * providers: [{provide: TRANSLATIONS, useValue: translations }]
  8969. * });
  8970. * ```
  8971. *
  8972. * @publicApi
  8973. */
  8974. export declare const TRANSLATIONS: InjectionToken<string>;
  8975. /**
  8976. * Provide this token at bootstrap to set the format of your {@link TRANSLATIONS}: `xtb`,
  8977. * `xlf` or `xlf2`.
  8978. *
  8979. * See the [i18n guide](guide/i18n-common-merge) for more information.
  8980. *
  8981. * @usageNotes
  8982. * ### Example
  8983. *
  8984. * ```typescript
  8985. * import { TRANSLATIONS_FORMAT } from '@angular/core';
  8986. * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
  8987. * import { AppModule } from './app/app.module';
  8988. *
  8989. * platformBrowserDynamic().bootstrapModule(AppModule, {
  8990. * providers: [{provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }]
  8991. * });
  8992. * ```
  8993. *
  8994. * @publicApi
  8995. */
  8996. export declare const TRANSLATIONS_FORMAT: InjectionToken<string>;
  8997. /**
  8998. * @fileoverview
  8999. * While Angular only uses Trusted Types internally for the time being,
  9000. * references to Trusted Types could leak into our core.d.ts, which would force
  9001. * anyone compiling against @angular/core to provide the @types/trusted-types
  9002. * package in their compilation unit.
  9003. *
  9004. * Until https://github.com/microsoft/TypeScript/issues/30024 is resolved, we
  9005. * will keep Angular's public API surface free of references to Trusted Types.
  9006. * For internal and semi-private APIs that need to reference Trusted Types, the
  9007. * minimal type definitions for the Trusted Types API provided by this module
  9008. * should be used instead. They are marked as "declare" to prevent them from
  9009. * being renamed by compiler optimization.
  9010. *
  9011. * Adapted from
  9012. * https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/trusted-types/index.d.ts
  9013. * but restricted to the API surface used within Angular.
  9014. */
  9015. declare type TrustedHTML = string & {
  9016. __brand__: 'TrustedHTML';
  9017. };
  9018. declare type TrustedScript = string & {
  9019. __brand__: 'TrustedScript';
  9020. };
  9021. declare type TrustedScriptURL = string & {
  9022. __brand__: 'TrustedScriptURL';
  9023. };
  9024. /**
  9025. * Value stored in the `TData` which is needed to re-concatenate the styling.
  9026. *
  9027. * See: `TStylingKeyPrimitive` and `TStylingStatic`
  9028. */
  9029. declare type TStylingKey = TStylingKeyPrimitive | TStylingStatic;
  9030. /**
  9031. * The primitive portion (`TStylingStatic` removed) of the value stored in the `TData` which is
  9032. * needed to re-concatenate the styling.
  9033. *
  9034. * - `string`: Stores the property name. Used with `ɵɵstyleProp`/`ɵɵclassProp` instruction.
  9035. * - `null`: Represents map, so there is no name. Used with `ɵɵstyleMap`/`ɵɵclassMap`.
  9036. * - `false`: Represents an ignore case. This happens when `ɵɵstyleProp`/`ɵɵclassProp` instruction
  9037. * is combined with directive which shadows its input `@Input('class')`. That way the binding
  9038. * should not participate in the styling resolution.
  9039. */
  9040. declare type TStylingKeyPrimitive = string | null | false;
  9041. /**
  9042. * This is a branded number which contains previous and next index.
  9043. *
  9044. * When we come across styling instructions we need to store the `TStylingKey` in the correct
  9045. * order so that we can re-concatenate the styling value in the desired priority.
  9046. *
  9047. * The insertion can happen either at the:
  9048. * - end of template as in the case of coming across additional styling instruction in the template
  9049. * - in front of the template in the case of coming across additional instruction in the
  9050. * `hostBindings`.
  9051. *
  9052. * We use `TStylingRange` to store the previous and next index into the `TData` where the template
  9053. * bindings can be found.
  9054. *
  9055. * - bit 0 is used to mark that the previous index has a duplicate for current value.
  9056. * - bit 1 is used to mark that the next index has a duplicate for the current value.
  9057. * - bits 2-16 are used to encode the next/tail of the template.
  9058. * - bits 17-32 are used to encode the previous/head of template.
  9059. *
  9060. * NODE: *duplicate* false implies that it is statically known that this binding will not collide
  9061. * with other bindings and therefore there is no need to check other bindings. For example the
  9062. * bindings in `<div [style.color]="exp" [style.width]="exp">` will never collide and will have
  9063. * their bits set accordingly. Previous duplicate means that we may need to check previous if the
  9064. * current binding is `null`. Next duplicate means that we may need to check next bindings if the
  9065. * current binding is not `null`.
  9066. *
  9067. * NOTE: `0` has special significance and represents `null` as in no additional pointer.
  9068. */
  9069. declare type TStylingRange = number & {
  9070. __brand__: 'TStylingRange';
  9071. };
  9072. /**
  9073. * Store the static values for the styling binding.
  9074. *
  9075. * The `TStylingStatic` is just `KeyValueArray` where key `""` (stored at location 0) contains the
  9076. * `TStylingKey` (stored at location 1). In other words this wraps the `TStylingKey` such that the
  9077. * `""` contains the wrapped value.
  9078. *
  9079. * When instructions are resolving styling they may need to look forward or backwards in the linked
  9080. * list to resolve the value. For this reason we have to make sure that he linked list also contains
  9081. * the static values. However the list only has space for one item per styling instruction. For this
  9082. * reason we store the static values here as part of the `TStylingKey`. This means that the
  9083. * resolution function when looking for a value needs to first look at the binding value, and than
  9084. * at `TStylingKey` (if it exists).
  9085. *
  9086. * Imagine we have:
  9087. *
  9088. * ```
  9089. * <div class="TEMPLATE" my-dir>
  9090. *
  9091. * @Directive({
  9092. * host: {
  9093. * class: 'DIR',
  9094. * '[class.dynamic]': 'exp' // ɵɵclassProp('dynamic', ctx.exp);
  9095. * }
  9096. * })
  9097. * ```
  9098. *
  9099. * In the above case the linked list will contain one item:
  9100. *
  9101. * ```
  9102. * // assume binding location: 10 for `ɵɵclassProp('dynamic', ctx.exp);`
  9103. * tData[10] = <TStylingStatic>[
  9104. * '': 'dynamic', // This is the wrapped value of `TStylingKey`
  9105. * 'DIR': true, // This is the default static value of directive binding.
  9106. * ];
  9107. * tData[10 + 1] = 0; // We don't have prev/next.
  9108. *
  9109. * lView[10] = undefined; // assume `ctx.exp` is `undefined`
  9110. * lView[10 + 1] = undefined; // Just normalized `lView[10]`
  9111. * ```
  9112. *
  9113. * So when the function is resolving styling value, it first needs to look into the linked list
  9114. * (there is none) and than into the static `TStylingStatic` too see if there is a default value for
  9115. * `dynamic` (there is not). Therefore it is safe to remove it.
  9116. *
  9117. * If setting `true` case:
  9118. * ```
  9119. * lView[10] = true; // assume `ctx.exp` is `true`
  9120. * lView[10 + 1] = true; // Just normalized `lView[10]`
  9121. * ```
  9122. * So when the function is resolving styling value, it first needs to look into the linked list
  9123. * (there is none) and than into `TNode.residualClass` (TNode.residualStyle) which contains
  9124. * ```
  9125. * tNode.residualClass = [
  9126. * 'TEMPLATE': true,
  9127. * ];
  9128. * ```
  9129. *
  9130. * This means that it is safe to add class.
  9131. */
  9132. declare interface TStylingStatic extends KeyValueArray<any> {
  9133. }
  9134. /** Static data for a text node */
  9135. declare interface TTextNode extends TNode {
  9136. /** Index in the data[] array */
  9137. index: number;
  9138. child: null;
  9139. /**
  9140. * Text nodes will have parents unless they are the first node of a component or
  9141. * embedded view (which means their parent is in a different view and must be
  9142. * retrieved using LView.node).
  9143. */
  9144. parent: TElementNode | TElementContainerNode | null;
  9145. tView: null;
  9146. projection: null;
  9147. }
  9148. declare const TVIEW = 1;
  9149. /**
  9150. * The static data for an LView (shared between all templates of a
  9151. * given type).
  9152. *
  9153. * Stored on the `ComponentDef.tView`.
  9154. */
  9155. declare interface TView {
  9156. /**
  9157. * Type of `TView` (`Root`|`Component`|`Embedded`).
  9158. */
  9159. type: TViewType;
  9160. /**
  9161. * This is a blueprint used to generate LView instances for this TView. Copying this
  9162. * blueprint is faster than creating a new LView from scratch.
  9163. */
  9164. blueprint: LView;
  9165. /**
  9166. * The template function used to refresh the view of dynamically created views
  9167. * and components. Will be null for inline views.
  9168. */
  9169. template: ComponentTemplate<{}> | null;
  9170. /**
  9171. * A function containing query-related instructions.
  9172. */
  9173. viewQuery: ViewQueriesFunction<{}> | null;
  9174. /**
  9175. * A `TNode` representing the declaration location of this `TView` (not part of this TView).
  9176. */
  9177. declTNode: TNode | null;
  9178. /** Whether or not this template has been processed in creation mode. */
  9179. firstCreatePass: boolean;
  9180. /**
  9181. * Whether or not this template has been processed in update mode (e.g. change detected)
  9182. *
  9183. * `firstUpdatePass` is used by styling to set up `TData` to contain metadata about the styling
  9184. * instructions. (Mainly to build up a linked list of styling priority order.)
  9185. *
  9186. * Typically this function gets cleared after first execution. If exception is thrown then this
  9187. * flag can remain turned un until there is first successful (no exception) pass. This means that
  9188. * individual styling instructions keep track of if they have already been added to the linked
  9189. * list to prevent double adding.
  9190. */
  9191. firstUpdatePass: boolean;
  9192. /** Static data equivalent of LView.data[]. Contains TNodes, PipeDefInternal or TI18n. */
  9193. data: TData;
  9194. /**
  9195. * The binding start index is the index at which the data array
  9196. * starts to store bindings only. Saving this value ensures that we
  9197. * will begin reading bindings at the correct point in the array when
  9198. * we are in update mode.
  9199. *
  9200. * -1 means that it has not been initialized.
  9201. */
  9202. bindingStartIndex: number;
  9203. /**
  9204. * The index where the "expando" section of `LView` begins. The expando
  9205. * section contains injectors, directive instances, and host binding values.
  9206. * Unlike the "decls" and "vars" sections of `LView`, the length of this
  9207. * section cannot be calculated at compile-time because directives are matched
  9208. * at runtime to preserve locality.
  9209. *
  9210. * We store this start index so we know where to start checking host bindings
  9211. * in `setHostBindings`.
  9212. */
  9213. expandoStartIndex: number;
  9214. /**
  9215. * Whether or not there are any static view queries tracked on this view.
  9216. *
  9217. * We store this so we know whether or not we should do a view query
  9218. * refresh after creation mode to collect static query results.
  9219. */
  9220. staticViewQueries: boolean;
  9221. /**
  9222. * Whether or not there are any static content queries tracked on this view.
  9223. *
  9224. * We store this so we know whether or not we should do a content query
  9225. * refresh after creation mode to collect static query results.
  9226. */
  9227. staticContentQueries: boolean;
  9228. /**
  9229. * A reference to the first child node located in the view.
  9230. */
  9231. firstChild: TNode | null;
  9232. /**
  9233. * Stores the OpCodes to be replayed during change-detection to process the `HostBindings`
  9234. *
  9235. * See `HostBindingOpCodes` for encoding details.
  9236. */
  9237. hostBindingOpCodes: HostBindingOpCodes | null;
  9238. /**
  9239. * Full registry of directives and components that may be found in this view.
  9240. *
  9241. * It's necessary to keep a copy of the full def list on the TView so it's possible
  9242. * to render template functions without a host component.
  9243. */
  9244. directiveRegistry: DirectiveDefList | null;
  9245. /**
  9246. * Full registry of pipes that may be found in this view.
  9247. *
  9248. * The property is either an array of `PipeDefs`s or a function which returns the array of
  9249. * `PipeDefs`s. The function is necessary to be able to support forward declarations.
  9250. *
  9251. * It's necessary to keep a copy of the full def list on the TView so it's possible
  9252. * to render template functions without a host component.
  9253. */
  9254. pipeRegistry: PipeDefList | null;
  9255. /**
  9256. * Array of ngOnInit, ngOnChanges and ngDoCheck hooks that should be executed for this view in
  9257. * creation mode.
  9258. *
  9259. * This array has a flat structure and contains TNode indices, directive indices (where an
  9260. * instance can be found in `LView`) and hook functions. TNode index is followed by the directive
  9261. * index and a hook function. If there are multiple hooks for a given TNode, the TNode index is
  9262. * not repeated and the next lifecycle hook information is stored right after the previous hook
  9263. * function. This is done so that at runtime the system can efficiently iterate over all of the
  9264. * functions to invoke without having to make any decisions/lookups.
  9265. */
  9266. preOrderHooks: HookData | null;
  9267. /**
  9268. * Array of ngOnChanges and ngDoCheck hooks that should be executed for this view in update mode.
  9269. *
  9270. * This array has the same structure as the `preOrderHooks` one.
  9271. */
  9272. preOrderCheckHooks: HookData | null;
  9273. /**
  9274. * Array of ngAfterContentInit and ngAfterContentChecked hooks that should be executed
  9275. * for this view in creation mode.
  9276. *
  9277. * Even indices: Directive index
  9278. * Odd indices: Hook function
  9279. */
  9280. contentHooks: HookData | null;
  9281. /**
  9282. * Array of ngAfterContentChecked hooks that should be executed for this view in update
  9283. * mode.
  9284. *
  9285. * Even indices: Directive index
  9286. * Odd indices: Hook function
  9287. */
  9288. contentCheckHooks: HookData | null;
  9289. /**
  9290. * Array of ngAfterViewInit and ngAfterViewChecked hooks that should be executed for
  9291. * this view in creation mode.
  9292. *
  9293. * Even indices: Directive index
  9294. * Odd indices: Hook function
  9295. */
  9296. viewHooks: HookData | null;
  9297. /**
  9298. * Array of ngAfterViewChecked hooks that should be executed for this view in
  9299. * update mode.
  9300. *
  9301. * Even indices: Directive index
  9302. * Odd indices: Hook function
  9303. */
  9304. viewCheckHooks: HookData | null;
  9305. /**
  9306. * Array of ngOnDestroy hooks that should be executed when this view is destroyed.
  9307. *
  9308. * Even indices: Directive index
  9309. * Odd indices: Hook function
  9310. */
  9311. destroyHooks: DestroyHookData | null;
  9312. /**
  9313. * When a view is destroyed, listeners need to be released and outputs need to be
  9314. * unsubscribed. This cleanup array stores both listener data (in chunks of 4)
  9315. * and output data (in chunks of 2) for a particular view. Combining the arrays
  9316. * saves on memory (70 bytes per array) and on a few bytes of code size (for two
  9317. * separate for loops).
  9318. *
  9319. * If it's a native DOM listener or output subscription being stored:
  9320. * 1st index is: event name `name = tView.cleanup[i+0]`
  9321. * 2nd index is: index of native element or a function that retrieves global target (window,
  9322. * document or body) reference based on the native element:
  9323. * `typeof idxOrTargetGetter === 'function'`: global target getter function
  9324. * `typeof idxOrTargetGetter === 'number'`: index of native element
  9325. *
  9326. * 3rd index is: index of listener function `listener = lView[CLEANUP][tView.cleanup[i+2]]`
  9327. * 4th index is: `useCaptureOrIndx = tView.cleanup[i+3]`
  9328. * `typeof useCaptureOrIndx == 'boolean' : useCapture boolean
  9329. * `typeof useCaptureOrIndx == 'number':
  9330. * `useCaptureOrIndx >= 0` `removeListener = LView[CLEANUP][useCaptureOrIndx]`
  9331. * `useCaptureOrIndx < 0` `subscription = LView[CLEANUP][-useCaptureOrIndx]`
  9332. *
  9333. * If it's an output subscription or query list destroy hook:
  9334. * 1st index is: output unsubscribe function / query list destroy function
  9335. * 2nd index is: index of function context in LView.cleanupInstances[]
  9336. * `tView.cleanup[i+0].call(lView[CLEANUP][tView.cleanup[i+1]])`
  9337. */
  9338. cleanup: any[] | null;
  9339. /**
  9340. * A list of element indices for child components that will need to be
  9341. * refreshed when the current view has finished its check. These indices have
  9342. * already been adjusted for the HEADER_OFFSET.
  9343. *
  9344. */
  9345. components: number[] | null;
  9346. /**
  9347. * A collection of queries tracked in a given view.
  9348. */
  9349. queries: TQueries | null;
  9350. /**
  9351. * An array of indices pointing to directives with content queries alongside with the
  9352. * corresponding query index. Each entry in this array is a tuple of:
  9353. * - index of the first content query index declared by a given directive;
  9354. * - index of a directive.
  9355. *
  9356. * We are storing those indexes so we can refresh content queries as part of a view refresh
  9357. * process.
  9358. */
  9359. contentQueries: number[] | null;
  9360. /**
  9361. * Set of schemas that declare elements to be allowed inside the view.
  9362. */
  9363. schemas: SchemaMetadata[] | null;
  9364. /**
  9365. * Array of constants for the view. Includes attribute arrays, local definition arrays etc.
  9366. * Used for directive matching, attribute bindings, local definitions and more.
  9367. */
  9368. consts: TConstants | null;
  9369. /**
  9370. * Indicates that there was an error before we managed to complete the first create pass of the
  9371. * view. This means that the view is likely corrupted and we should try to recover it.
  9372. */
  9373. incompleteFirstPass: boolean;
  9374. /**
  9375. * Unique id of this TView for hydration purposes:
  9376. * - TViewType.Embedded: a unique id generated during serialization on the server
  9377. * - TViewType.Component: an id generated based on component properties
  9378. * (see `getComponentId` function for details)
  9379. */
  9380. ssrId: string | null;
  9381. }
  9382. /**
  9383. * Explicitly marks `TView` as a specific type in `ngDevMode`
  9384. *
  9385. * It is useful to know conceptually what time of `TView` we are dealing with when
  9386. * debugging an application (even if the runtime does not need it.) For this reason
  9387. * we store this information in the `ngDevMode` `TView` and than use it for
  9388. * better debugging experience.
  9389. */
  9390. declare const enum TViewType {
  9391. /**
  9392. * Root `TView` is the used to bootstrap components into. It is used in conjunction with
  9393. * `LView` which takes an existing DOM node not owned by Angular and wraps it in `TView`/`LView`
  9394. * so that other components can be loaded into it.
  9395. */
  9396. Root = 0,
  9397. /**
  9398. * `TView` associated with a Component. This would be the `TView` directly associated with the
  9399. * component view (as opposed an `Embedded` `TView` which would be a child of `Component` `TView`)
  9400. */
  9401. Component = 1,
  9402. /**
  9403. * `TView` associated with a template. Such as `*ngIf`, `<ng-template>` etc... A `Component`
  9404. * can have zero or more `Embedded` `TView`s.
  9405. */
  9406. Embedded = 2
  9407. }
  9408. /**
  9409. * Special location which allows easy identification of type. If we have an array which was
  9410. * retrieved from the `LView` and that array has `true` at `TYPE` location, we know it is
  9411. * `LContainer`.
  9412. */
  9413. declare const TYPE = 1;
  9414. /**
  9415. * @description
  9416. *
  9417. * Represents a type that a Component or other object is instances of.
  9418. *
  9419. * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is represented by
  9420. * the `MyCustomComponent` constructor function.
  9421. *
  9422. * @publicApi
  9423. */
  9424. export declare const Type: FunctionConstructor;
  9425. export declare interface Type<T> extends Function {
  9426. new (...args: any[]): T;
  9427. }
  9428. declare type Type_2 = Function;
  9429. /**
  9430. * An interface implemented by all Angular type decorators, which allows them to be used as
  9431. * decorators as well as Angular syntax.
  9432. *
  9433. * ```
  9434. * @ng.Component({...})
  9435. * class MyClass {...}
  9436. * ```
  9437. *
  9438. * @publicApi
  9439. */
  9440. export declare interface TypeDecorator {
  9441. /**
  9442. * Invoke as decorator.
  9443. */
  9444. <T extends Type<any>>(type: T): T;
  9445. (target: Object, propertyKey?: string | symbol, parameterIndex?: number): void;
  9446. (target: unknown, context: unknown): void;
  9447. }
  9448. declare type TypeOrFactory<T> = T | (() => T);
  9449. /**
  9450. * Configures the `Injector` to return an instance of `Type` when `Type' is used as the token.
  9451. *
  9452. * Create an instance by invoking the `new` operator and supplying additional arguments.
  9453. * This form is a short form of `TypeProvider`;
  9454. *
  9455. * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
  9456. *
  9457. * @usageNotes
  9458. *
  9459. * {@example core/di/ts/provider_spec.ts region='TypeProvider'}
  9460. *
  9461. * @publicApi
  9462. */
  9463. export declare interface TypeProvider extends Type<any> {
  9464. }
  9465. /**
  9466. * Execute an arbitrary function in a non-reactive (non-tracking) context. The executed function
  9467. * can, optionally, return a value.
  9468. *
  9469. * @developerPreview
  9470. */
  9471. export declare function untracked<T>(nonReactiveReadsFn: () => T): T;
  9472. /**
  9473. * A comparison function which can determine if two values are equal.
  9474. *
  9475. * @developerPreview
  9476. */
  9477. export declare type ValueEqualityFn<T> = (a: T, b: T) => boolean;
  9478. /**
  9479. * Configures the `Injector` to return a value for a token.
  9480. * @see ["Dependency Injection Guide"](guide/dependency-injection).
  9481. *
  9482. * @usageNotes
  9483. *
  9484. * ### Example
  9485. *
  9486. * {@example core/di/ts/provider_spec.ts region='ValueProvider'}
  9487. *
  9488. * ### Multi-value example
  9489. *
  9490. * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
  9491. *
  9492. * @publicApi
  9493. */
  9494. export declare interface ValueProvider extends ValueSansProvider {
  9495. /**
  9496. * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
  9497. */
  9498. provide: any;
  9499. /**
  9500. * When true, injector returns an array of instances. This is useful to allow multiple
  9501. * providers spread across many files to provide configuration information to a common token.
  9502. */
  9503. multi?: boolean;
  9504. }
  9505. /**
  9506. * Configures the `Injector` to return a value for a token.
  9507. * Base for `ValueProvider` decorator.
  9508. *
  9509. * @publicApi
  9510. */
  9511. export declare interface ValueSansProvider {
  9512. /**
  9513. * The value to inject.
  9514. */
  9515. useValue: any;
  9516. }
  9517. /**
  9518. * @publicApi
  9519. */
  9520. export declare const VERSION: Version;
  9521. /**
  9522. * @description Represents the version of Angular
  9523. *
  9524. * @publicApi
  9525. */
  9526. export declare class Version {
  9527. full: string;
  9528. readonly major: string;
  9529. readonly minor: string;
  9530. readonly patch: string;
  9531. constructor(full: string);
  9532. }
  9533. declare type Version_2 = number & {
  9534. __brand: 'Version';
  9535. };
  9536. declare const VIEW_REFS = 8;
  9537. /**
  9538. * Type of the ViewChild metadata.
  9539. *
  9540. * @publicApi
  9541. */
  9542. export declare type ViewChild = Query;
  9543. /**
  9544. * ViewChild decorator and metadata.
  9545. *
  9546. * @Annotation
  9547. * @publicApi
  9548. */
  9549. export declare const ViewChild: ViewChildDecorator;
  9550. /**
  9551. * Type of the ViewChild decorator / constructor function.
  9552. *
  9553. * @see {@link ViewChild}
  9554. * @publicApi
  9555. */
  9556. export declare interface ViewChildDecorator {
  9557. /**
  9558. * @description
  9559. * Property decorator that configures a view query.
  9560. * The change detector looks for the first element or the directive matching the selector
  9561. * in the view DOM. If the view DOM changes, and a new child matches the selector,
  9562. * the property is updated.
  9563. *
  9564. * View queries are set before the `ngAfterViewInit` callback is called.
  9565. *
  9566. * **Metadata Properties**:
  9567. *
  9568. * * **selector** - The directive type or the name used for querying.
  9569. * * **read** - Used to read a different token from the queried elements.
  9570. * * **static** - True to resolve query results before change detection runs,
  9571. * false to resolve after change detection. Defaults to false.
  9572. *
  9573. *
  9574. * The following selectors are supported.
  9575. * * Any class with the `@Component` or `@Directive` decorator
  9576. * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`
  9577. * with `@ViewChild('cmp')`)
  9578. * * Any provider defined in the child component tree of the current component (e.g.
  9579. * `@ViewChild(SomeService) someService: SomeService`)
  9580. * * Any provider defined through a string token (e.g. `@ViewChild('someToken') someTokenVal:
  9581. * any`)
  9582. * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ViewChild(TemplateRef)
  9583. * template;`)
  9584. *
  9585. * The following values are supported by `read`:
  9586. * * Any class with the `@Component` or `@Directive` decorator
  9587. * * Any provider defined on the injector of the component that is matched by the `selector` of
  9588. * this query
  9589. * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)
  9590. * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`
  9591. *
  9592. * @usageNotes
  9593. *
  9594. * {@example core/di/ts/viewChild/view_child_example.ts region='Component'}
  9595. *
  9596. * ### Example 2
  9597. *
  9598. * {@example core/di/ts/viewChild/view_child_howto.ts region='HowTo'}
  9599. *
  9600. * @Annotation
  9601. */
  9602. (selector: ProviderToken<unknown> | Function | string, opts?: {
  9603. read?: any;
  9604. static?: boolean;
  9605. }): any;
  9606. new (selector: ProviderToken<unknown> | Function | string, opts?: {
  9607. read?: any;
  9608. static?: boolean;
  9609. }): ViewChild;
  9610. }
  9611. /**
  9612. * Type of the ViewChildren metadata.
  9613. *
  9614. * @publicApi
  9615. */
  9616. export declare type ViewChildren = Query;
  9617. /**
  9618. * ViewChildren decorator and metadata.
  9619. *
  9620. * @Annotation
  9621. * @publicApi
  9622. */
  9623. export declare const ViewChildren: ViewChildrenDecorator;
  9624. /**
  9625. * Type of the ViewChildren decorator / constructor function.
  9626. *
  9627. * @see {@link ViewChildren}
  9628. *
  9629. * @publicApi
  9630. */
  9631. export declare interface ViewChildrenDecorator {
  9632. /**
  9633. * @description
  9634. * Property decorator that configures a view query.
  9635. *
  9636. * Use to get the `QueryList` of elements or directives from the view DOM.
  9637. * Any time a child element is added, removed, or moved, the query list will be updated,
  9638. * and the changes observable of the query list will emit a new value.
  9639. *
  9640. * View queries are set before the `ngAfterViewInit` callback is called.
  9641. *
  9642. * **Metadata Properties**:
  9643. *
  9644. * * **selector** - The directive type or the name used for querying.
  9645. * * **read** - Used to read a different token from the queried elements.
  9646. * * **emitDistinctChangesOnly** - The ` QueryList#changes` observable will emit new values only
  9647. * if the QueryList result has changed. When `false` the `changes` observable might emit even
  9648. * if the QueryList has not changed.
  9649. * ** Note: *** This config option is **deprecated**, it will be permanently set to `true` and
  9650. * removed in future versions of Angular.
  9651. *
  9652. * The following selectors are supported.
  9653. * * Any class with the `@Component` or `@Directive` decorator
  9654. * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`
  9655. * with `@ViewChildren('cmp')`)
  9656. * * Any provider defined in the child component tree of the current component (e.g.
  9657. * `@ViewChildren(SomeService) someService!: SomeService`)
  9658. * * Any provider defined through a string token (e.g. `@ViewChildren('someToken')
  9659. * someTokenVal!: any`)
  9660. * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ViewChildren(TemplateRef)
  9661. * template;`)
  9662. *
  9663. * In addition, multiple string selectors can be separated with a comma (e.g.
  9664. * `@ViewChildren('cmp1,cmp2')`)
  9665. *
  9666. * The following values are supported by `read`:
  9667. * * Any class with the `@Component` or `@Directive` decorator
  9668. * * Any provider defined on the injector of the component that is matched by the `selector` of
  9669. * this query
  9670. * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)
  9671. * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`
  9672. *
  9673. * @usageNotes
  9674. *
  9675. * {@example core/di/ts/viewChildren/view_children_howto.ts region='HowTo'}
  9676. *
  9677. * ### Another example
  9678. *
  9679. * {@example core/di/ts/viewChildren/view_children_example.ts region='Component'}
  9680. *
  9681. * @Annotation
  9682. */
  9683. (selector: ProviderToken<unknown> | Function | string, opts?: {
  9684. read?: any;
  9685. emitDistinctChangesOnly?: boolean;
  9686. }): any;
  9687. new (selector: ProviderToken<unknown> | Function | string, opts?: {
  9688. read?: any;
  9689. emitDistinctChangesOnly?: boolean;
  9690. }): ViewChildren;
  9691. }
  9692. /**
  9693. * Represents a container where one or more views can be attached to a component.
  9694. *
  9695. * Can contain *host views* (created by instantiating a
  9696. * component with the `createComponent()` method), and *embedded views*
  9697. * (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method).
  9698. *
  9699. * A view container instance can contain other view containers,
  9700. * creating a [view hierarchy](guide/glossary#view-hierarchy).
  9701. *
  9702. * @usageNotes
  9703. *
  9704. * The example below demonstrates how the `createComponent` function can be used
  9705. * to create an instance of a ComponentRef dynamically and attach it to an ApplicationRef,
  9706. * so that it gets included into change detection cycles.
  9707. *
  9708. * Note: the example uses standalone components, but the function can also be used for
  9709. * non-standalone components (declared in an NgModule) as well.
  9710. *
  9711. * ```typescript
  9712. * @Component({
  9713. * standalone: true,
  9714. * selector: 'dynamic',
  9715. * template: `<span>This is a content of a dynamic component.</span>`,
  9716. * })
  9717. * class DynamicComponent {
  9718. * vcr = inject(ViewContainerRef);
  9719. * }
  9720. *
  9721. * @Component({
  9722. * standalone: true,
  9723. * selector: 'app',
  9724. * template: `<main>Hi! This is the main content.</main>`,
  9725. * })
  9726. * class AppComponent {
  9727. * vcr = inject(ViewContainerRef);
  9728. *
  9729. * ngAfterViewInit() {
  9730. * const compRef = this.vcr.createComponent(DynamicComponent);
  9731. * compRef.changeDetectorRef.detectChanges();
  9732. * }
  9733. * }
  9734. * ```
  9735. *
  9736. * @see {@link ComponentRef}
  9737. * @see {@link EmbeddedViewRef}
  9738. *
  9739. * @publicApi
  9740. */
  9741. export declare abstract class ViewContainerRef {
  9742. /**
  9743. * Anchor element that specifies the location of this container in the containing view.
  9744. * Each view container can have only one anchor element, and each anchor element
  9745. * can have only a single view container.
  9746. *
  9747. * Root elements of views attached to this container become siblings of the anchor element in
  9748. * the rendered view.
  9749. *
  9750. * Access the `ViewContainerRef` of an element by placing a `Directive` injected
  9751. * with `ViewContainerRef` on the element, or use a `ViewChild` query.
  9752. *
  9753. * <!-- TODO: rename to anchorElement -->
  9754. */
  9755. abstract get element(): ElementRef;
  9756. /**
  9757. * The [dependency injector](guide/glossary#injector) for this view container.
  9758. */
  9759. abstract get injector(): Injector;
  9760. /** @deprecated No replacement */
  9761. abstract get parentInjector(): Injector;
  9762. /**
  9763. * Destroys all views in this container.
  9764. */
  9765. abstract clear(): void;
  9766. /**
  9767. * Retrieves a view from this container.
  9768. * @param index The 0-based index of the view to retrieve.
  9769. * @returns The `ViewRef` instance, or null if the index is out of range.
  9770. */
  9771. abstract get(index: number): ViewRef | null;
  9772. /**
  9773. * Reports how many views are currently attached to this container.
  9774. * @returns The number of views.
  9775. */
  9776. abstract get length(): number;
  9777. /**
  9778. * Instantiates an embedded view and inserts it
  9779. * into this container.
  9780. * @param templateRef The HTML template that defines the view.
  9781. * @param context The data-binding context of the embedded view, as declared
  9782. * in the `<ng-template>` usage.
  9783. * @param options Extra configuration for the created view. Includes:
  9784. * * index: The 0-based index at which to insert the new view into this container.
  9785. * If not specified, appends the new view as the last entry.
  9786. * * injector: Injector to be used within the embedded view.
  9787. *
  9788. * @returns The `ViewRef` instance for the newly created view.
  9789. */
  9790. abstract createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, options?: {
  9791. index?: number;
  9792. injector?: Injector;
  9793. }): EmbeddedViewRef<C>;
  9794. /**
  9795. * Instantiates an embedded view and inserts it
  9796. * into this container.
  9797. * @param templateRef The HTML template that defines the view.
  9798. * @param context The data-binding context of the embedded view, as declared
  9799. * in the `<ng-template>` usage.
  9800. * @param index The 0-based index at which to insert the new view into this container.
  9801. * If not specified, appends the new view as the last entry.
  9802. *
  9803. * @returns The `ViewRef` instance for the newly created view.
  9804. */
  9805. abstract createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, index?: number): EmbeddedViewRef<C>;
  9806. /**
  9807. * Instantiates a single component and inserts its host view into this container.
  9808. *
  9809. * @param componentType Component Type to use.
  9810. * @param options An object that contains extra parameters:
  9811. * * index: the index at which to insert the new component's host view into this container.
  9812. * If not specified, appends the new view as the last entry.
  9813. * * injector: the injector to use as the parent for the new component.
  9814. * * ngModuleRef: an NgModuleRef of the component's NgModule, you should almost always provide
  9815. * this to ensure that all expected providers are available for the component
  9816. * instantiation.
  9817. * * environmentInjector: an EnvironmentInjector which will provide the component's environment.
  9818. * you should almost always provide this to ensure that all expected providers
  9819. * are available for the component instantiation. This option is intended to
  9820. * replace the `ngModuleRef` parameter.
  9821. * * projectableNodes: list of DOM nodes that should be projected through
  9822. * [`<ng-content>`](api/core/ng-content) of the new component instance.
  9823. *
  9824. * @returns The new `ComponentRef` which contains the component instance and the host view.
  9825. */
  9826. abstract createComponent<C>(componentType: Type<C>, options?: {
  9827. index?: number;
  9828. injector?: Injector;
  9829. ngModuleRef?: NgModuleRef<unknown>;
  9830. environmentInjector?: EnvironmentInjector | NgModuleRef<unknown>;
  9831. projectableNodes?: Node[][];
  9832. }): ComponentRef<C>;
  9833. /**
  9834. * Instantiates a single component and inserts its host view into this container.
  9835. *
  9836. * @param componentFactory Component factory to use.
  9837. * @param index The index at which to insert the new component's host view into this container.
  9838. * If not specified, appends the new view as the last entry.
  9839. * @param injector The injector to use as the parent for the new component.
  9840. * @param projectableNodes List of DOM nodes that should be projected through
  9841. * [`<ng-content>`](api/core/ng-content) of the new component instance.
  9842. * @param ngModuleRef An instance of the NgModuleRef that represent an NgModule.
  9843. * This information is used to retrieve corresponding NgModule injector.
  9844. *
  9845. * @returns The new `ComponentRef` which contains the component instance and the host view.
  9846. *
  9847. * @deprecated Angular no longer requires component factories to dynamically create components.
  9848. * Use different signature of the `createComponent` method, which allows passing
  9849. * Component class directly.
  9850. */
  9851. abstract createComponent<C>(componentFactory: ComponentFactory<C>, index?: number, injector?: Injector, projectableNodes?: any[][], environmentInjector?: EnvironmentInjector | NgModuleRef<any>): ComponentRef<C>;
  9852. /**
  9853. * Inserts a view into this container.
  9854. * @param viewRef The view to insert.
  9855. * @param index The 0-based index at which to insert the view.
  9856. * If not specified, appends the new view as the last entry.
  9857. * @returns The inserted `ViewRef` instance.
  9858. *
  9859. */
  9860. abstract insert(viewRef: ViewRef, index?: number): ViewRef;
  9861. /**
  9862. * Moves a view to a new location in this container.
  9863. * @param viewRef The view to move.
  9864. * @param index The 0-based index of the new location.
  9865. * @returns The moved `ViewRef` instance.
  9866. */
  9867. abstract move(viewRef: ViewRef, currentIndex: number): ViewRef;
  9868. /**
  9869. * Returns the index of a view within the current container.
  9870. * @param viewRef The view to query.
  9871. * @returns The 0-based index of the view's position in this container,
  9872. * or `-1` if this container doesn't contain the view.
  9873. */
  9874. abstract indexOf(viewRef: ViewRef): number;
  9875. /**
  9876. * Destroys a view attached to this container
  9877. * @param index The 0-based index of the view to destroy.
  9878. * If not specified, the last view in the container is removed.
  9879. */
  9880. abstract remove(index?: number): void;
  9881. /**
  9882. * Detaches a view from this container without destroying it.
  9883. * Use along with `insert()` to move a view within the current container.
  9884. * @param index The 0-based index of the view to detach.
  9885. * If not specified, the last view in the container is detached.
  9886. */
  9887. abstract detach(index?: number): ViewRef | null;
  9888. }
  9889. /**
  9890. * Defines the CSS styles encapsulation policies for the {@link Component} decorator's
  9891. * `encapsulation` option.
  9892. *
  9893. * See {@link Component#encapsulation encapsulation}.
  9894. *
  9895. * @usageNotes
  9896. * ### Example
  9897. *
  9898. * {@example core/ts/metadata/encapsulation.ts region='longform'}
  9899. *
  9900. * @publicApi
  9901. */
  9902. export declare enum ViewEncapsulation {
  9903. /**
  9904. * Emulates a native Shadow DOM encapsulation behavior by adding a specific attribute to the
  9905. * component's host element and applying the same attribute to all the CSS selectors provided
  9906. * via {@link Component#styles styles} or {@link Component#styleUrls styleUrls}.
  9907. *
  9908. * This is the default option.
  9909. */
  9910. Emulated = 0,
  9911. /**
  9912. * Doesn't provide any sort of CSS style encapsulation, meaning that all the styles provided
  9913. * via {@link Component#styles styles} or {@link Component#styleUrls styleUrls} are applicable
  9914. * to any HTML element of the application regardless of their host Component.
  9915. */
  9916. None = 2,
  9917. /**
  9918. * Uses the browser's native Shadow DOM API to encapsulate CSS styles, meaning that it creates
  9919. * a ShadowRoot for the component's host element which is then used to encapsulate
  9920. * all the Component's styling.
  9921. */
  9922. ShadowDom = 3
  9923. }
  9924. declare enum ViewEncapsulation_2 {
  9925. Emulated = 0,
  9926. None = 2,
  9927. ShadowDom = 3
  9928. }
  9929. /**
  9930. * Definition of what a view queries function should look like.
  9931. */
  9932. declare type ViewQueriesFunction<T> = <U extends T>(rf: ɵRenderFlags, ctx: U) => void;
  9933. /**
  9934. * Represents an Angular [view](guide/glossary#view "Definition").
  9935. *
  9936. * @see {@link ChangeDetectorRef#usage-notes Change detection usage}
  9937. *
  9938. * @publicApi
  9939. */
  9940. export declare abstract class ViewRef extends ChangeDetectorRef {
  9941. /**
  9942. * Destroys this view and all of the data structures associated with it.
  9943. */
  9944. abstract destroy(): void;
  9945. /**
  9946. * Reports whether this view has been destroyed.
  9947. * @returns True after the `destroy()` method has been called, false otherwise.
  9948. */
  9949. abstract get destroyed(): boolean;
  9950. /**
  9951. * A lifecycle hook that provides additional developer-defined cleanup
  9952. * functionality for views.
  9953. * @param callback A handler function that cleans up developer-defined data
  9954. * associated with a view. Called when the `destroy()` method is invoked.
  9955. */
  9956. abstract onDestroy(callback: Function): void;
  9957. }
  9958. /**
  9959. * Interface for tracking root `ViewRef`s in `ApplicationRef`.
  9960. *
  9961. * NOTE: Importing `ApplicationRef` here directly creates circular dependency, which is why we have
  9962. * a subset of the `ApplicationRef` interface `ViewRefTracker` here.
  9963. */
  9964. declare interface ViewRefTracker {
  9965. detachView(viewRef: ViewRef): void;
  9966. }
  9967. /**
  9968. * A `Signal` with a value that can be mutated via a setter interface.
  9969. *
  9970. * @developerPreview
  9971. */
  9972. export declare interface WritableSignal<T> extends Signal<T> {
  9973. /**
  9974. * Directly set the signal to a new value, and notify any dependents.
  9975. */
  9976. set(value: T): void;
  9977. /**
  9978. * Update the value of the signal based on its current value, and
  9979. * notify any dependents.
  9980. */
  9981. update(updateFn: (value: T) => T): void;
  9982. /**
  9983. * Update the current value by mutating it in-place, and
  9984. * notify any dependents.
  9985. */
  9986. mutate(mutatorFn: (value: T) => void): void;
  9987. /**
  9988. * Returns a readonly version of this signal. Readonly signals can be accessed to read their value
  9989. * but can't be changed using set, update or mutate methods. The readonly signals do _not_ have
  9990. * any built-in mechanism that would prevent deep-mutation of their value.
  9991. */
  9992. asReadonly(): Signal<T>;
  9993. }
  9994. /**
  9995. * Sanitizes the given unsafe, untrusted HTML fragment, and returns HTML text that is safe to add to
  9996. * the DOM in a browser environment.
  9997. */
  9998. export declare function ɵ_sanitizeHtml(defaultDoc: any, unsafeHtmlInput: string): TrustedHTML | string;
  9999. export declare function ɵ_sanitizeUrl(url: string): string;
  10000. /**
  10001. * Implements core timing for `afterRender` and `afterNextRender` events.
  10002. * Delegates to an optional `AfterRenderCallbackHandler` for implementation.
  10003. */
  10004. export declare class ɵAfterRenderEventManager {
  10005. private renderDepth;
  10006. /**
  10007. * Mark the beginning of a render operation (i.e. CD cycle).
  10008. * Throws if called while executing callbacks.
  10009. */
  10010. begin(): void;
  10011. /**
  10012. * Mark the end of a render operation. Callbacks will be
  10013. * executed if there are no more pending operations.
  10014. */
  10015. end(): void;
  10016. ngOnDestroy(): void;
  10017. /** @nocollapse */
  10018. static ɵprov: unknown;
  10019. }
  10020. /**
  10021. * Internal token to indicate whether having multiple bootstrapped platform should be allowed (only
  10022. * one bootstrapped platform is allowed by default). This token helps to support SSR scenarios.
  10023. */
  10024. export declare const ɵALLOW_MULTIPLE_PLATFORMS: InjectionToken<boolean>;
  10025. export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType.Html): value is ɵSafeHtml;
  10026. export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType.ResourceUrl): value is ɵSafeResourceUrl;
  10027. export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType.Script): value is ɵSafeScript;
  10028. export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType.Style): value is ɵSafeStyle;
  10029. export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType.Url): value is ɵSafeUrl;
  10030. export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType): boolean;
  10031. /**
  10032. * Annotates all components bootstrapped in a given ApplicationRef
  10033. * with info needed for hydration.
  10034. *
  10035. * @param appRef An instance of an ApplicationRef.
  10036. * @param doc A reference to the current Document instance.
  10037. */
  10038. export declare function ɵannotateForHydration(appRef: ApplicationRef, doc: Document): void;
  10039. /**
  10040. * A set of marker values to be used in the attributes arrays. These markers indicate that some
  10041. * items are not regular attributes and the processing should be adapted accordingly.
  10042. */
  10043. export declare const enum ɵAttributeMarker {
  10044. /**
  10045. * An implicit marker which indicates that the value in the array are of `attributeKey`,
  10046. * `attributeValue` format.
  10047. *
  10048. * NOTE: This is implicit as it is the type when no marker is present in array. We indicate that
  10049. * it should not be present at runtime by the negative number.
  10050. */
  10051. ImplicitAttributes = -1,
  10052. /**
  10053. * Marker indicates that the following 3 values in the attributes array are:
  10054. * namespaceUri, attributeName, attributeValue
  10055. * in that order.
  10056. */
  10057. NamespaceURI = 0,
  10058. /**
  10059. * Signals class declaration.
  10060. *
  10061. * Each value following `Classes` designates a class name to include on the element.
  10062. * ## Example:
  10063. *
  10064. * Given:
  10065. * ```
  10066. * <div class="foo bar baz">...<d/vi>
  10067. * ```
  10068. *
  10069. * the generated code is:
  10070. * ```
  10071. * var _c1 = [AttributeMarker.Classes, 'foo', 'bar', 'baz'];
  10072. * ```
  10073. */
  10074. Classes = 1,
  10075. /**
  10076. * Signals style declaration.
  10077. *
  10078. * Each pair of values following `Styles` designates a style name and value to include on the
  10079. * element.
  10080. * ## Example:
  10081. *
  10082. * Given:
  10083. * ```
  10084. * <div style="width:100px; height:200px; color:red">...</div>
  10085. * ```
  10086. *
  10087. * the generated code is:
  10088. * ```
  10089. * var _c1 = [AttributeMarker.Styles, 'width', '100px', 'height'. '200px', 'color', 'red'];
  10090. * ```
  10091. */
  10092. Styles = 2,
  10093. /**
  10094. * Signals that the following attribute names were extracted from input or output bindings.
  10095. *
  10096. * For example, given the following HTML:
  10097. *
  10098. * ```
  10099. * <div moo="car" [foo]="exp" (bar)="doSth()">
  10100. * ```
  10101. *
  10102. * the generated code is:
  10103. *
  10104. * ```
  10105. * var _c1 = ['moo', 'car', AttributeMarker.Bindings, 'foo', 'bar'];
  10106. * ```
  10107. */
  10108. Bindings = 3,
  10109. /**
  10110. * Signals that the following attribute names were hoisted from an inline-template declaration.
  10111. *
  10112. * For example, given the following HTML:
  10113. *
  10114. * ```
  10115. * <div *ngFor="let value of values; trackBy:trackBy" dirA [dirB]="value">
  10116. * ```
  10117. *
  10118. * the generated code for the `template()` instruction would include:
  10119. *
  10120. * ```
  10121. * ['dirA', '', AttributeMarker.Bindings, 'dirB', AttributeMarker.Template, 'ngFor', 'ngForOf',
  10122. * 'ngForTrackBy', 'let-value']
  10123. * ```
  10124. *
  10125. * while the generated code for the `element()` instruction inside the template function would
  10126. * include:
  10127. *
  10128. * ```
  10129. * ['dirA', '', AttributeMarker.Bindings, 'dirB']
  10130. * ```
  10131. */
  10132. Template = 4,
  10133. /**
  10134. * Signals that the following attribute is `ngProjectAs` and its value is a parsed
  10135. * `CssSelector`.
  10136. *
  10137. * For example, given the following HTML:
  10138. *
  10139. * ```
  10140. * <h1 attr="value" ngProjectAs="[title]">
  10141. * ```
  10142. *
  10143. * the generated code for the `element()` instruction would include:
  10144. *
  10145. * ```
  10146. * ['attr', 'value', AttributeMarker.ProjectAs, ['', 'title', '']]
  10147. * ```
  10148. */
  10149. ProjectAs = 5,
  10150. /**
  10151. * Signals that the following attribute will be translated by runtime i18n
  10152. *
  10153. * For example, given the following HTML:
  10154. *
  10155. * ```
  10156. * <div moo="car" foo="value" i18n-foo [bar]="binding" i18n-bar>
  10157. * ```
  10158. *
  10159. * the generated code is:
  10160. *
  10161. * ```
  10162. * var _c1 = ['moo', 'car', AttributeMarker.I18n, 'foo', 'bar'];
  10163. */
  10164. I18n = 6
  10165. }
  10166. /**
  10167. * Mark `html` string as trusted.
  10168. *
  10169. * This function wraps the trusted string in `String` and brands it in a way which makes it
  10170. * recognizable to {@link htmlSanitizer} to be trusted implicitly.
  10171. *
  10172. * @param trustedHtml `html` string which needs to be implicitly trusted.
  10173. * @returns a `html` which has been branded to be implicitly trusted.
  10174. */
  10175. export declare function ɵbypassSanitizationTrustHtml(trustedHtml: string): ɵSafeHtml;
  10176. /**
  10177. * Mark `url` string as trusted.
  10178. *
  10179. * This function wraps the trusted string in `String` and brands it in a way which makes it
  10180. * recognizable to {@link resourceUrlSanitizer} to be trusted implicitly.
  10181. *
  10182. * @param trustedResourceUrl `url` string which needs to be implicitly trusted.
  10183. * @returns a `url` which has been branded to be implicitly trusted.
  10184. */
  10185. export declare function ɵbypassSanitizationTrustResourceUrl(trustedResourceUrl: string): ɵSafeResourceUrl;
  10186. /**
  10187. * Mark `script` string as trusted.
  10188. *
  10189. * This function wraps the trusted string in `String` and brands it in a way which makes it
  10190. * recognizable to {@link scriptSanitizer} to be trusted implicitly.
  10191. *
  10192. * @param trustedScript `script` string which needs to be implicitly trusted.
  10193. * @returns a `script` which has been branded to be implicitly trusted.
  10194. */
  10195. export declare function ɵbypassSanitizationTrustScript(trustedScript: string): ɵSafeScript;
  10196. /**
  10197. * Mark `style` string as trusted.
  10198. *
  10199. * This function wraps the trusted string in `String` and brands it in a way which makes it
  10200. * recognizable to {@link styleSanitizer} to be trusted implicitly.
  10201. *
  10202. * @param trustedStyle `style` string which needs to be implicitly trusted.
  10203. * @returns a `style` hich has been branded to be implicitly trusted.
  10204. */
  10205. export declare function ɵbypassSanitizationTrustStyle(trustedStyle: string): ɵSafeStyle;
  10206. /**
  10207. * Mark `url` string as trusted.
  10208. *
  10209. * This function wraps the trusted string in `String` and brands it in a way which makes it
  10210. * recognizable to {@link urlSanitizer} to be trusted implicitly.
  10211. *
  10212. * @param trustedUrl `url` string which needs to be implicitly trusted.
  10213. * @returns a `url` which has been branded to be implicitly trusted.
  10214. */
  10215. export declare function ɵbypassSanitizationTrustUrl(trustedUrl: string): ɵSafeUrl;
  10216. export declare const enum ɵBypassType {
  10217. Url = "URL",
  10218. Html = "HTML",
  10219. ResourceUrl = "ResourceURL",
  10220. Script = "Script",
  10221. Style = "Style"
  10222. }
  10223. export declare function ɵclearResolutionOfComponentResourcesQueue(): Map<Type<any>, Component>;
  10224. /**
  10225. * Compile an Angular component according to its decorator metadata, and patch the resulting
  10226. * component def (ɵcmp) onto the component type.
  10227. *
  10228. * Compilation may be asynchronous (due to the need to resolve URLs for the component template or
  10229. * other resources, for example). In the event that compilation is not immediate, `compileComponent`
  10230. * will enqueue resource resolution into a global queue and will fail to return the `ɵcmp`
  10231. * until the global queue has been resolved with a call to `resolveComponentResources`.
  10232. */
  10233. export declare function ɵcompileComponent(type: Type<any>, metadata: Component): void;
  10234. /**
  10235. * Compile an Angular directive according to its decorator metadata, and patch the resulting
  10236. * directive def onto the component type.
  10237. *
  10238. * In the event that compilation is not immediate, `compileDirective` will return a `Promise` which
  10239. * will resolve when compilation completes and the directive becomes usable.
  10240. */
  10241. export declare function ɵcompileDirective(type: Type<any>, directive: Directive | null): void;
  10242. /**
  10243. * Compiles a module in JIT mode.
  10244. *
  10245. * This function automatically gets called when a class has a `@NgModule` decorator.
  10246. */
  10247. export declare function ɵcompileNgModule(moduleType: Type<any>, ngModule?: NgModule): void;
  10248. /**
  10249. * Compiles and adds the `ɵmod`, `ɵfac` and `ɵinj` properties to the module class.
  10250. *
  10251. * It's possible to compile a module via this API which will allow duplicate declarations in its
  10252. * root.
  10253. */
  10254. export declare function ɵcompileNgModuleDefs(moduleType: ɵNgModuleType, ngModule: NgModule, allowDuplicateDeclarationsInRoot?: boolean): void;
  10255. export declare function ɵcompileNgModuleFactory<M>(injector: Injector, options: CompilerOptions, moduleType: Type<M>): Promise<NgModuleFactory<M>>;
  10256. export declare function ɵcompilePipe(type: Type<any>, meta: Pipe): void;
  10257. /**
  10258. * Runtime link information for Components.
  10259. *
  10260. * This is an internal data structure used by the render to link
  10261. * components into templates.
  10262. *
  10263. * NOTE: Always use `defineComponent` function to create this object,
  10264. * never create the object directly since the shape of this object
  10265. * can change between versions.
  10266. *
  10267. * See: {@link defineComponent}
  10268. */
  10269. export declare interface ɵComponentDef<T> extends ɵDirectiveDef<T> {
  10270. /**
  10271. * Unique ID for the component. Used in view encapsulation and
  10272. * to keep track of the injector in standalone components.
  10273. */
  10274. readonly id: string;
  10275. /**
  10276. * The View template of the component.
  10277. */
  10278. readonly template: ComponentTemplate<T>;
  10279. /** Constants associated with the component's view. */
  10280. readonly consts: TConstantsOrFactory | null;
  10281. /**
  10282. * An array of `ngContent[selector]` values that were found in the template.
  10283. */
  10284. readonly ngContentSelectors?: string[];
  10285. /**
  10286. * A set of styles that the component needs to be present for component to render correctly.
  10287. */
  10288. readonly styles: string[];
  10289. /**
  10290. * The number of nodes, local refs, and pipes in this component template.
  10291. *
  10292. * Used to calculate the length of the component's LView array, so we
  10293. * can pre-fill the array and set the binding start index.
  10294. */
  10295. readonly decls: number;
  10296. /**
  10297. * The number of bindings in this component template (including pure fn bindings).
  10298. *
  10299. * Used to calculate the length of the component's LView array, so we
  10300. * can pre-fill the array and set the host binding start index.
  10301. */
  10302. readonly vars: number;
  10303. /**
  10304. * Query-related instructions for a component.
  10305. */
  10306. viewQuery: ViewQueriesFunction<T> | null;
  10307. /**
  10308. * The view encapsulation type, which determines how styles are applied to
  10309. * DOM elements. One of
  10310. * - `Emulated` (default): Emulate native scoping of styles.
  10311. * - `Native`: Use the native encapsulation mechanism of the renderer.
  10312. * - `ShadowDom`: Use modern [ShadowDOM](https://w3c.github.io/webcomponents/spec/shadow/) and
  10313. * create a ShadowRoot for component's host element.
  10314. * - `None`: Do not provide any template or style encapsulation.
  10315. */
  10316. readonly encapsulation: ViewEncapsulation;
  10317. /**
  10318. * Defines arbitrary developer-defined data to be stored on a renderer instance.
  10319. * This is useful for renderers that delegate to other renderers.
  10320. */
  10321. readonly data: {
  10322. [kind: string]: any;
  10323. };
  10324. /** Whether or not this component's ChangeDetectionStrategy is OnPush */
  10325. readonly onPush: boolean;
  10326. /** Whether or not this component is signal-based. */
  10327. readonly signals: boolean;
  10328. /**
  10329. * Registry of directives and components that may be found in this view.
  10330. *
  10331. * The property is either an array of `DirectiveDef`s or a function which returns the array of
  10332. * `DirectiveDef`s. The function is necessary to be able to support forward declarations.
  10333. */
  10334. directiveDefs: DirectiveDefListOrFactory | null;
  10335. /**
  10336. * Registry of pipes that may be found in this view.
  10337. *
  10338. * The property is either an array of `PipeDefs`s or a function which returns the array of
  10339. * `PipeDefs`s. The function is necessary to be able to support forward declarations.
  10340. */
  10341. pipeDefs: PipeDefListOrFactory | null;
  10342. /**
  10343. * Unfiltered list of all dependencies of a component, or `null` if none.
  10344. */
  10345. dependencies: TypeOrFactory<DependencyTypeList> | null;
  10346. /**
  10347. * The set of schemas that declare elements to be allowed in the component's template.
  10348. */
  10349. schemas: SchemaMetadata[] | null;
  10350. /**
  10351. * Ivy runtime uses this place to store the computed tView for the component. This gets filled on
  10352. * the first run of component.
  10353. */
  10354. tView: TView | null;
  10355. /**
  10356. * A function added by the {@link ɵɵStandaloneFeature} and used by the framework to create
  10357. * standalone injectors.
  10358. */
  10359. getStandaloneInjector: ((parentInjector: EnvironmentInjector) => EnvironmentInjector | null) | null;
  10360. /**
  10361. * Used to store the result of `noSideEffects` function so that it is not removed by closure
  10362. * compiler. The property should never be read.
  10363. */
  10364. readonly _?: unknown;
  10365. }
  10366. /**
  10367. * A subclass of `Type` which has a static `ɵcmp`:`ComponentDef` field making it
  10368. * consumable for rendering.
  10369. */
  10370. export declare interface ɵComponentType<T> extends Type<T> {
  10371. ɵcmp: unknown;
  10372. }
  10373. export declare class ɵConsole {
  10374. log(message: string): void;
  10375. warn(message: string): void;
  10376. static ɵfac: i0.ɵɵFactoryDeclaration<ɵConsole, never>;
  10377. static ɵprov: i0.ɵɵInjectableDeclaration<ɵConsole>;
  10378. }
  10379. export declare function ɵconvertToBitFlags(flags: InjectOptions | InjectFlags | undefined): InjectFlags | undefined;
  10380. /**
  10381. * Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.
  10382. */
  10383. export declare function ɵcreateInjector(defType: any, parent?: Injector | null, additionalProviders?: Array<Provider | StaticProvider> | null, name?: string): Injector;
  10384. /**
  10385. * A list of CssSelectors.
  10386. *
  10387. * A directive or component can have multiple selectors. This type is used for
  10388. * directive defs so any of the selectors in the list will match that directive.
  10389. *
  10390. * Original: 'form, [ngForm]'
  10391. * Parsed: [['form'], ['', 'ngForm', '']]
  10392. */
  10393. export declare type ɵCssSelectorList = CssSelector[];
  10394. /**
  10395. * Index of each value in currency data (used to describe CURRENCIES_EN in currencies.ts)
  10396. */
  10397. export declare const enum ɵCurrencyIndex {
  10398. Symbol = 0,
  10399. SymbolNarrow = 1,
  10400. NbOfDigits = 2
  10401. }
  10402. /**
  10403. * The locale id that the application is using by default (for translations and ICU expressions).
  10404. */
  10405. export declare const ɵDEFAULT_LOCALE_ID = "en-US";
  10406. export declare const ɵdefaultIterableDiffers: IterableDiffers;
  10407. export declare const ɵdefaultKeyValueDiffers: KeyValueDiffers;
  10408. /**
  10409. * Synchronously perform change detection on a component (and possibly its sub-components).
  10410. *
  10411. * This function triggers change detection in a synchronous way on a component.
  10412. *
  10413. * @param component The component which the change detection should be performed on.
  10414. */
  10415. export declare function ɵdetectChanges(component: {}): void;
  10416. export declare function ɵdevModeEqual(a: any, b: any): boolean;
  10417. /**
  10418. * Runtime link information for Directives.
  10419. *
  10420. * This is an internal data structure used by the render to link
  10421. * directives into templates.
  10422. *
  10423. * NOTE: Always use `defineDirective` function to create this object,
  10424. * never create the object directly since the shape of this object
  10425. * can change between versions.
  10426. *
  10427. * @param Selector type metadata specifying the selector of the directive or component
  10428. *
  10429. * See: {@link defineDirective}
  10430. */
  10431. export declare interface ɵDirectiveDef<T> {
  10432. /**
  10433. * A dictionary mapping the inputs' minified property names to their public API names, which
  10434. * are their aliases if any, or their original unminified property names
  10435. * (as in `@Input('alias') propertyName: any;`).
  10436. */
  10437. readonly inputs: {
  10438. [P in keyof T]: string;
  10439. };
  10440. /**
  10441. * A dictionary mapping the private names of inputs to their transformation functions.
  10442. * Note: the private names are used for the keys, rather than the public ones, because public
  10443. * names can be re-aliased in host directives which would invalidate the lookup.
  10444. */
  10445. readonly inputTransforms: {
  10446. [classPropertyName: string]: InputTransformFunction;
  10447. } | null;
  10448. /**
  10449. * Contains the raw input information produced by the compiler. Can be
  10450. * used to do further processing after the `inputs` have been inverted.
  10451. */
  10452. readonly inputConfig: {
  10453. [classPropertyName: string]: string | [string, string, InputTransformFunction?];
  10454. };
  10455. /**
  10456. * @deprecated This is only here because `NgOnChanges` incorrectly uses declared name instead of
  10457. * public or minified name.
  10458. */
  10459. readonly declaredInputs: {
  10460. [P in keyof T]: string;
  10461. };
  10462. /**
  10463. * A dictionary mapping the outputs' minified property names to their public API names, which
  10464. * are their aliases if any, or their original unminified property names
  10465. * (as in `@Output('alias') propertyName: any;`).
  10466. */
  10467. readonly outputs: {
  10468. [P in keyof T]: string;
  10469. };
  10470. /**
  10471. * Function to create and refresh content queries associated with a given directive.
  10472. */
  10473. contentQueries: ContentQueriesFunction<T> | null;
  10474. /**
  10475. * Query-related instructions for a directive. Note that while directives don't have a
  10476. * view and as such view queries won't necessarily do anything, there might be
  10477. * components that extend the directive.
  10478. */
  10479. viewQuery: ViewQueriesFunction<T> | null;
  10480. /**
  10481. * Refreshes host bindings on the associated directive.
  10482. */
  10483. readonly hostBindings: HostBindingsFunction<T> | null;
  10484. /**
  10485. * The number of bindings in this directive `hostBindings` (including pure fn bindings).
  10486. *
  10487. * Used to calculate the length of the component's LView array, so we
  10488. * can pre-fill the array and set the host binding start index.
  10489. */
  10490. readonly hostVars: number;
  10491. /**
  10492. * Assign static attribute values to a host element.
  10493. *
  10494. * This property will assign static attribute values as well as class and style
  10495. * values to a host element. Since attribute values can consist of different types of values, the
  10496. * `hostAttrs` array must include the values in the following format:
  10497. *
  10498. * attrs = [
  10499. * // static attributes (like `title`, `name`, `id`...)
  10500. * attr1, value1, attr2, value,
  10501. *
  10502. * // a single namespace value (like `x:id`)
  10503. * NAMESPACE_MARKER, namespaceUri1, name1, value1,
  10504. *
  10505. * // another single namespace value (like `x:name`)
  10506. * NAMESPACE_MARKER, namespaceUri2, name2, value2,
  10507. *
  10508. * // a series of CSS classes that will be applied to the element (no spaces)
  10509. * CLASSES_MARKER, class1, class2, class3,
  10510. *
  10511. * // a series of CSS styles (property + value) that will be applied to the element
  10512. * STYLES_MARKER, prop1, value1, prop2, value2
  10513. * ]
  10514. *
  10515. * All non-class and non-style attributes must be defined at the start of the list
  10516. * first before all class and style values are set. When there is a change in value
  10517. * type (like when classes and styles are introduced) a marker must be used to separate
  10518. * the entries. The marker values themselves are set via entries found in the
  10519. * [AttributeMarker] enum.
  10520. */
  10521. readonly hostAttrs: TAttributes | null;
  10522. /** Token representing the directive. Used by DI. */
  10523. readonly type: Type<T>;
  10524. /** Function that resolves providers and publishes them into the DI system. */
  10525. providersResolver: (<U extends T>(def: ɵDirectiveDef<U>, processProvidersFn?: ProcessProvidersFunction) => void) | null;
  10526. /** The selectors that will be used to match nodes to this directive. */
  10527. readonly selectors: ɵCssSelectorList;
  10528. /**
  10529. * Name under which the directive is exported (for use with local references in template)
  10530. */
  10531. readonly exportAs: string[] | null;
  10532. /**
  10533. * Whether this directive (or component) is standalone.
  10534. */
  10535. readonly standalone: boolean;
  10536. /**
  10537. * Whether this directive (or component) uses the signals authoring experience.
  10538. */
  10539. readonly signals: boolean;
  10540. /**
  10541. * Factory function used to create a new directive instance. Will be null initially.
  10542. * Populated when the factory is first requested by directive instantiation logic.
  10543. */
  10544. readonly factory: FactoryFn<T> | null;
  10545. /**
  10546. * The features applied to this directive
  10547. */
  10548. readonly features: DirectiveDefFeature[] | null;
  10549. /**
  10550. * Function that will add the host directives to the list of matches during directive matching.
  10551. * Patched onto the definition by the `HostDirectivesFeature`.
  10552. * @param currentDef Definition that has been matched.
  10553. * @param matchedDefs List of all matches for a specified node. Will be mutated to include the
  10554. * host directives.
  10555. * @param hostDirectiveDefs Mapping of directive definitions to their host directive
  10556. * configuration. Host directives will be added to the map as they're being matched to the node.
  10557. */
  10558. findHostDirectiveDefs: ((currentDef: ɵDirectiveDef<unknown>, matchedDefs: ɵDirectiveDef<unknown>[], hostDirectiveDefs: HostDirectiveDefs) => void) | null;
  10559. /** Additional directives to be applied whenever the directive has been matched. */
  10560. hostDirectives: HostDirectiveDef[] | null;
  10561. setInput: (<U extends T>(this: ɵDirectiveDef<U>, instance: U, value: any, publicName: string, privateName: string) => void) | null;
  10562. }
  10563. /**
  10564. * A subclass of `Type` which has a static `ɵdir`:`DirectiveDef` field making it
  10565. * consumable for rendering.
  10566. */
  10567. export declare interface ɵDirectiveType<T> extends Type<T> {
  10568. ɵdir: unknown;
  10569. ɵfac: unknown;
  10570. }
  10571. /**
  10572. * Internal token to collect all SSR-related features enabled for this application.
  10573. *
  10574. * Note: the token is in `core` to let other packages register features (the `core`
  10575. * package is imported in other packages).
  10576. */
  10577. export declare const ɵENABLED_SSR_FEATURES: InjectionToken<Set<string>>;
  10578. /**
  10579. * Index of each type of locale data from the extra locale data array
  10580. */
  10581. export declare const enum ɵExtraLocaleDataIndex {
  10582. ExtraDayPeriodFormats = 0,
  10583. ExtraDayPeriodStandalone = 1,
  10584. ExtraDayPeriodsRules = 2
  10585. }
  10586. /**
  10587. * Finds the locale data for a given locale.
  10588. *
  10589. * @param locale The locale code.
  10590. * @returns The locale data.
  10591. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
  10592. */
  10593. export declare function ɵfindLocaleData(locale: string): any;
  10594. /**
  10595. * Loops over queued module definitions, if a given module definition has all of its
  10596. * declarations resolved, it dequeues that module definition and sets the scope on
  10597. * its declarations.
  10598. */
  10599. export declare function ɵflushModuleScopingQueueAsMuchAsPossible(): void;
  10600. /**
  10601. * Called to format a runtime error.
  10602. * See additional info on the `message` argument type in the `RuntimeError` class description.
  10603. */
  10604. export declare function ɵformatRuntimeError<T extends number = RuntimeErrorCode>(code: T, message: null | false | string): string;
  10605. /**
  10606. * Retrieves directive instances associated with a given DOM node. Does not include
  10607. * component instances.
  10608. *
  10609. * @usageNotes
  10610. * Given the following DOM structure:
  10611. *
  10612. * ```html
  10613. * <app-root>
  10614. * <button my-button></button>
  10615. * <my-comp></my-comp>
  10616. * </app-root>
  10617. * ```
  10618. *
  10619. * Calling `getDirectives` on `<button>` will return an array with an instance of the `MyButton`
  10620. * directive that is associated with the DOM node.
  10621. *
  10622. * Calling `getDirectives` on `<my-comp>` will return an empty array.
  10623. *
  10624. * @param node DOM node for which to get the directives.
  10625. * @returns Array of directives associated with the node.
  10626. *
  10627. * @publicApi
  10628. * @globalApi ng
  10629. */
  10630. export declare function ɵgetDirectives(node: Node): {}[];
  10631. /**
  10632. * Retrieves the host element of a component or directive instance.
  10633. * The host element is the DOM element that matched the selector of the directive.
  10634. *
  10635. * @param componentOrDirective Component or directive instance for which the host
  10636. * element should be retrieved.
  10637. * @returns Host element of the target.
  10638. *
  10639. * @publicApi
  10640. * @globalApi ng
  10641. */
  10642. export declare function ɵgetHostElement(componentOrDirective: {}): Element;
  10643. /**
  10644. * Read the injectable def (`ɵprov`) for `type` in a way which is immune to accidentally reading
  10645. * inherited value.
  10646. *
  10647. * @param type A type which may have its own (non-inherited) `ɵprov`.
  10648. */
  10649. export declare function ɵgetInjectableDef<T>(type: any): ɵɵInjectableDeclaration<T> | null;
  10650. /**
  10651. * Returns the matching `LContext` data for a given DOM node, directive or component instance.
  10652. *
  10653. * This function will examine the provided DOM element, component, or directive instance\'s
  10654. * monkey-patched property to derive the `LContext` data. Once called then the monkey-patched
  10655. * value will be that of the newly created `LContext`.
  10656. *
  10657. * If the monkey-patched value is the `LView` instance then the context value for that
  10658. * target will be created and the monkey-patch reference will be updated. Therefore when this
  10659. * function is called it may mutate the provided element\'s, component\'s or any of the associated
  10660. * directive\'s monkey-patch values.
  10661. *
  10662. * If the monkey-patch value is not detected then the code will walk up the DOM until an element
  10663. * is found which contains a monkey-patch reference. When that occurs then the provided element
  10664. * will be updated with a new context (which is then returned). If the monkey-patch value is not
  10665. * detected for a component/directive instance then it will throw an error (all components and
  10666. * directives should be automatically monkey-patched by ivy).
  10667. *
  10668. * @param target Component, Directive or DOM Node.
  10669. */
  10670. export declare function ɵgetLContext(target: any): ɵLContext | null;
  10671. /**
  10672. * Retrieves the default currency code for the given locale.
  10673. *
  10674. * The default is defined as the first currency which is still in use.
  10675. *
  10676. * @param locale The code of the locale whose currency code we want.
  10677. * @returns The code of the default currency for the given locale.
  10678. *
  10679. */
  10680. export declare function ɵgetLocaleCurrencyCode(locale: string): string | null;
  10681. /**
  10682. * Retrieves the plural function used by ICU expressions to determine the plural case to use
  10683. * for a given locale.
  10684. * @param locale A locale code for the locale format rules to use.
  10685. * @returns The plural function for the locale.
  10686. * @see {@link NgPlural}
  10687. * @see [Internationalization (i18n) Guide](/guide/i18n-overview)
  10688. */
  10689. export declare function ɵgetLocalePluralCase(locale: string): (value: number) => number;
  10690. export declare function ɵgetSanitizationBypassType(value: any): ɵBypassType | null;
  10691. /**
  10692. * Gets the current value of the strict mode.
  10693. */
  10694. export declare function ɵgetUnknownElementStrictMode(): boolean;
  10695. /**
  10696. * Gets the current value of the strict mode.
  10697. */
  10698. export declare function ɵgetUnknownPropertyStrictMode(): boolean;
  10699. export declare const ɵglobal: any;
  10700. /**
  10701. * *Internal* service that keeps track of pending tasks happening in the system
  10702. * during the initial rendering. No tasks are tracked after an initial
  10703. * rendering.
  10704. *
  10705. * This information is needed to make sure that the serialization on the server
  10706. * is delayed until all tasks in the queue (such as an initial navigation or a
  10707. * pending HTTP request) are completed.
  10708. */
  10709. export declare class ɵInitialRenderPendingTasks implements OnDestroy {
  10710. private taskId;
  10711. private pendingTasks;
  10712. hasPendingTasks: BehaviorSubject<boolean>;
  10713. add(): number;
  10714. remove(taskId: number): void;
  10715. ngOnDestroy(): void;
  10716. static ɵfac: i0.ɵɵFactoryDeclaration<ɵInitialRenderPendingTasks, never>;
  10717. static ɵprov: i0.ɵɵInjectableDeclaration<ɵInitialRenderPendingTasks>;
  10718. }
  10719. /** Returns a ChangeDetectorRef (a.k.a. a ViewRef) */
  10720. export declare function ɵinjectChangeDetectorRef(flags: InjectFlags): ChangeDetectorRef;
  10721. /**
  10722. * An internal token whose presence in an injector indicates that the injector should treat itself
  10723. * as a root scoped injector when processing requests for unknown tokens which may indicate
  10724. * they are provided in the root scope.
  10725. */
  10726. export declare const ɵINJECTOR_SCOPE: InjectionToken<InjectorScope | null>;
  10727. /**
  10728. * An object that defines an injection context for the injector profiler.
  10729. */
  10730. export declare interface ɵInjectorProfilerContext {
  10731. /**
  10732. * The Injector that service is being injected into.
  10733. * - Example: if ModuleA --provides--> ServiceA --injects--> ServiceB
  10734. * then inject(ServiceB) in ServiceA has ModuleA as an injector context
  10735. */
  10736. injector: Injector;
  10737. /**
  10738. * The class where the constructor that is calling `inject` is located
  10739. * - Example: if ModuleA --provides--> ServiceA --injects--> ServiceB
  10740. * then inject(ServiceB) in ServiceA has ServiceA as a construction context
  10741. */
  10742. token: Type<unknown> | null;
  10743. }
  10744. /**
  10745. * Internal create application API that implements the core application creation logic and optional
  10746. * bootstrap logic.
  10747. *
  10748. * Platforms (such as `platform-browser`) may require different set of application and platform
  10749. * providers for an application to function correctly. As a result, platforms may use this function
  10750. * internally and supply the necessary providers during the bootstrap, while exposing
  10751. * platform-specific APIs as a part of their public API.
  10752. *
  10753. * @returns A promise that returns an `ApplicationRef` instance once resolved.
  10754. */
  10755. export declare function ɵinternalCreateApplication(config: {
  10756. rootComponent?: Type<unknown>;
  10757. appProviders?: Array<Provider | EnvironmentProviders>;
  10758. platformProviders?: Provider[];
  10759. }): Promise<ApplicationRef>;
  10760. export declare interface ɵInternalEnvironmentProviders extends EnvironmentProviders {
  10761. ɵproviders: (Provider | EnvironmentProviders)[];
  10762. /**
  10763. * If present, indicates that the `EnvironmentProviders` were derived from NgModule providers.
  10764. *
  10765. * This is used to produce clearer error messages.
  10766. */
  10767. ɵfromNgModule?: true;
  10768. }
  10769. /**
  10770. * Internal token that specifies whether DOM reuse logic
  10771. * during hydration is enabled.
  10772. */
  10773. export declare const ɵIS_HYDRATION_DOM_REUSE_ENABLED: InjectionToken<boolean>;
  10774. export declare function ɵisBoundToModule<C>(cf: ComponentFactory<C>): boolean;
  10775. export declare function ɵisEnvironmentProviders(value: Provider | EnvironmentProviders | ɵInternalEnvironmentProviders): value is ɵInternalEnvironmentProviders;
  10776. export declare function ɵisInjectable(type: any): boolean;
  10777. export declare function ɵisNgModule<T>(value: Type<T>): value is Type<T> & {
  10778. ɵmod: ɵNgModuleDef<T>;
  10779. };
  10780. /**
  10781. * Determine if the argument is shaped like a Promise
  10782. */
  10783. export declare function ɵisPromise<T = any>(obj: any): obj is Promise<T>;
  10784. /**
  10785. * Determine if the argument is a Subscribable
  10786. */
  10787. export declare function ɵisSubscribable<T>(obj: any | Subscribable<T>): obj is Subscribable<T>;
  10788. /**
  10789. * The internal view context which is specific to a given DOM element, directive or
  10790. * component instance. Each value in here (besides the LView and element node details)
  10791. * can be present, null or undefined. If undefined then it implies the value has not been
  10792. * looked up yet, otherwise, if null, then a lookup was executed and nothing was found.
  10793. *
  10794. * Each value will get filled when the respective value is examined within the getContext
  10795. * function. The component, element and each directive instance will share the same instance
  10796. * of the context.
  10797. */
  10798. export declare class ɵLContext {
  10799. /**
  10800. * ID of the component's parent view data.
  10801. */
  10802. private lViewId;
  10803. /**
  10804. * The index instance of the node.
  10805. */
  10806. nodeIndex: number;
  10807. /**
  10808. * The instance of the DOM node that is attached to the lNode.
  10809. */
  10810. native: RNode;
  10811. /**
  10812. * The instance of the Component node.
  10813. */
  10814. component: {} | null | undefined;
  10815. /**
  10816. * The list of active directives that exist on this element.
  10817. */
  10818. directives: any[] | null | undefined;
  10819. /**
  10820. * The map of local references (local reference name => element or directive instance) that
  10821. * exist on this element.
  10822. */
  10823. localRefs: {
  10824. [key: string]: any;
  10825. } | null | undefined;
  10826. /** Component's parent view data. */
  10827. get lView(): LView | null;
  10828. constructor(
  10829. /**
  10830. * ID of the component's parent view data.
  10831. */
  10832. lViewId: number,
  10833. /**
  10834. * The index instance of the node.
  10835. */
  10836. nodeIndex: number,
  10837. /**
  10838. * The instance of the DOM node that is attached to the lNode.
  10839. */
  10840. native: RNode);
  10841. }
  10842. /**
  10843. * Used to enable lifecycle hooks on the root component.
  10844. *
  10845. * Include this feature when calling `renderComponent` if the root component
  10846. * you are rendering has lifecycle hooks defined. Otherwise, the hooks won't
  10847. * be called properly.
  10848. *
  10849. * Example:
  10850. *
  10851. * ```
  10852. * renderComponent(AppComponent, {hostFeatures: [LifecycleHooksFeature]});
  10853. * ```
  10854. */
  10855. export declare function ɵLifecycleHooksFeature(): void;
  10856. /**
  10857. * Index of each type of locale data from the locale data array
  10858. */
  10859. export declare enum ɵLocaleDataIndex {
  10860. LocaleId = 0,
  10861. DayPeriodsFormat = 1,
  10862. DayPeriodsStandalone = 2,
  10863. DaysFormat = 3,
  10864. DaysStandalone = 4,
  10865. MonthsFormat = 5,
  10866. MonthsStandalone = 6,
  10867. Eras = 7,
  10868. FirstDayOfWeek = 8,
  10869. WeekendRange = 9,
  10870. DateFormat = 10,
  10871. TimeFormat = 11,
  10872. DateTimeFormat = 12,
  10873. NumberSymbols = 13,
  10874. NumberFormats = 14,
  10875. CurrencyCode = 15,
  10876. CurrencySymbol = 16,
  10877. CurrencyName = 17,
  10878. Currencies = 18,
  10879. Directionality = 19,
  10880. PluralCase = 20,
  10881. ExtraData = 21
  10882. }
  10883. export declare const ɵNG_COMP_DEF: string;
  10884. export declare const ɵNG_DIR_DEF: string;
  10885. /**
  10886. * If a directive is diPublic, bloomAdd sets a property on the type with this constant as
  10887. * the key and the directive's unique ID as the value. This allows us to map directives to their
  10888. * bloom filter bit for DI.
  10889. */
  10890. export declare const ɵNG_ELEMENT_ID: string;
  10891. export declare const ɵNG_INJ_DEF: string;
  10892. export declare const ɵNG_MOD_DEF: string;
  10893. export declare const ɵNG_PIPE_DEF: string;
  10894. export declare const ɵNG_PROV_DEF: string;
  10895. /**
  10896. * Runtime link information for NgModules.
  10897. *
  10898. * This is the internal data structure used by the runtime to assemble components, directives,
  10899. * pipes, and injectors.
  10900. *
  10901. * NOTE: Always use `ɵɵdefineNgModule` function to create this object,
  10902. * never create the object directly since the shape of this object
  10903. * can change between versions.
  10904. */
  10905. export declare interface ɵNgModuleDef<T> {
  10906. /** Token representing the module. Used by DI. */
  10907. type: T;
  10908. /** List of components to bootstrap. */
  10909. bootstrap: Type<any>[] | (() => Type<any>[]);
  10910. /** List of components, directives, and pipes declared by this module. */
  10911. declarations: Type<any>[] | (() => Type<any>[]);
  10912. /** List of modules or `ModuleWithProviders` imported by this module. */
  10913. imports: Type<any>[] | (() => Type<any>[]);
  10914. /**
  10915. * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this
  10916. * module.
  10917. */
  10918. exports: Type<any>[] | (() => Type<any>[]);
  10919. /**
  10920. * Cached value of computed `transitiveCompileScopes` for this module.
  10921. *
  10922. * This should never be read directly, but accessed via `transitiveScopesFor`.
  10923. */
  10924. transitiveCompileScopes: ɵNgModuleTransitiveScopes | null;
  10925. /** The set of schemas that declare elements to be allowed in the NgModule. */
  10926. schemas: SchemaMetadata[] | null;
  10927. /** Unique ID for the module with which it should be registered. */
  10928. id: string | null;
  10929. }
  10930. export declare class ɵNgModuleFactory<T> extends NgModuleFactory<T> {
  10931. moduleType: Type<T>;
  10932. constructor(moduleType: Type<T>);
  10933. create(parentInjector: Injector | null): NgModuleRef<T>;
  10934. }
  10935. /**
  10936. * Represents the expansion of an `NgModule` into its scopes.
  10937. *
  10938. * A scope is a set of directives and pipes that are visible in a particular context. Each
  10939. * `NgModule` has two scopes. The `compilation` scope is the set of directives and pipes that will
  10940. * be recognized in the templates of components declared by the module. The `exported` scope is the
  10941. * set of directives and pipes exported by a module (that is, module B's exported scope gets added
  10942. * to module A's compilation scope when module A imports B).
  10943. */
  10944. export declare interface ɵNgModuleTransitiveScopes {
  10945. compilation: {
  10946. directives: Set<any>;
  10947. pipes: Set<any>;
  10948. };
  10949. exported: {
  10950. directives: Set<any>;
  10951. pipes: Set<any>;
  10952. };
  10953. schemas: SchemaMetadata[] | null;
  10954. }
  10955. export declare interface ɵNgModuleType<T = any> extends Type<T> {
  10956. ɵmod: ɵNgModuleDef<T>;
  10957. }
  10958. export declare interface ɵNO_CHANGE {
  10959. __brand__: 'NO_CHANGE';
  10960. }
  10961. /** A special value which designates that a value has not changed. */
  10962. export declare const ɵNO_CHANGE: ɵNO_CHANGE;
  10963. /**
  10964. * Provides a noop implementation of `NgZone` which does nothing. This zone requires explicit calls
  10965. * to framework to perform rendering.
  10966. */
  10967. export declare class ɵNoopNgZone implements NgZone {
  10968. readonly hasPendingMicrotasks = false;
  10969. readonly hasPendingMacrotasks = false;
  10970. readonly isStable = true;
  10971. readonly onUnstable: EventEmitter<any>;
  10972. readonly onMicrotaskEmpty: EventEmitter<any>;
  10973. readonly onStable: EventEmitter<any>;
  10974. readonly onError: EventEmitter<any>;
  10975. run<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any): T;
  10976. runGuarded<T>(fn: (...args: any[]) => any, applyThis?: any, applyArgs?: any): T;
  10977. runOutsideAngular<T>(fn: (...args: any[]) => T): T;
  10978. runTask<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any, name?: string): T;
  10979. }
  10980. /**
  10981. * Convince closure compiler that the wrapped function has no side-effects.
  10982. *
  10983. * Closure compiler always assumes that `toString` has no side-effects. We use this quirk to
  10984. * allow us to execute a function but have closure compiler mark the call as no-side-effects.
  10985. * It is important that the return value for the `noSideEffects` function be assigned
  10986. * to something which is retained otherwise the call to `noSideEffects` will be removed by closure
  10987. * compiler.
  10988. */
  10989. export declare function ɵnoSideEffects<T>(fn: () => T): T;
  10990. export declare const ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR: {};
  10991. /**
  10992. * Patch the definition of a component with directives and pipes from the compilation scope of
  10993. * a given module.
  10994. */
  10995. export declare function ɵpatchComponentDefWithScope<C>(componentDef: ɵComponentDef<C>, transitiveScopes: ɵNgModuleTransitiveScopes): void;
  10996. /**
  10997. * Runtime link information for Pipes.
  10998. *
  10999. * This is an internal data structure used by the renderer to link
  11000. * pipes into templates.
  11001. *
  11002. * NOTE: Always use `definePipe` function to create this object,
  11003. * never create the object directly since the shape of this object
  11004. * can change between versions.
  11005. *
  11006. * See: {@link definePipe}
  11007. */
  11008. export declare interface ɵPipeDef<T> {
  11009. /** Token representing the pipe. */
  11010. type: Type<T>;
  11011. /**
  11012. * Pipe name.
  11013. *
  11014. * Used to resolve pipe in templates.
  11015. */
  11016. readonly name: string;
  11017. /**
  11018. * Factory function used to create a new pipe instance. Will be null initially.
  11019. * Populated when the factory is first requested by pipe instantiation logic.
  11020. */
  11021. factory: FactoryFn<T> | null;
  11022. /**
  11023. * Whether or not the pipe is pure.
  11024. *
  11025. * Pure pipes result only depends on the pipe input and not on internal
  11026. * state of the pipe.
  11027. */
  11028. readonly pure: boolean;
  11029. /**
  11030. * Whether this pipe is standalone.
  11031. */
  11032. readonly standalone: boolean;
  11033. onDestroy: (() => void) | null;
  11034. }
  11035. /**
  11036. * Profiler function which the runtime will invoke before and after user code.
  11037. */
  11038. export declare interface ɵProfiler {
  11039. (event: ɵProfilerEvent, instance: {} | null, hookOrListener?: (e?: any) => any): void;
  11040. }
  11041. /**
  11042. * Profiler events is an enum used by the profiler to distinguish between different calls of user
  11043. * code invoked throughout the application lifecycle.
  11044. */
  11045. export declare const enum ɵProfilerEvent {
  11046. /**
  11047. * Corresponds to the point in time before the runtime has called the template function of a
  11048. * component with `RenderFlags.Create`.
  11049. */
  11050. TemplateCreateStart = 0,
  11051. /**
  11052. * Corresponds to the point in time after the runtime has called the template function of a
  11053. * component with `RenderFlags.Create`.
  11054. */
  11055. TemplateCreateEnd = 1,
  11056. /**
  11057. * Corresponds to the point in time before the runtime has called the template function of a
  11058. * component with `RenderFlags.Update`.
  11059. */
  11060. TemplateUpdateStart = 2,
  11061. /**
  11062. * Corresponds to the point in time after the runtime has called the template function of a
  11063. * component with `RenderFlags.Update`.
  11064. */
  11065. TemplateUpdateEnd = 3,
  11066. /**
  11067. * Corresponds to the point in time before the runtime has called a lifecycle hook of a component
  11068. * or directive.
  11069. */
  11070. LifecycleHookStart = 4,
  11071. /**
  11072. * Corresponds to the point in time after the runtime has called a lifecycle hook of a component
  11073. * or directive.
  11074. */
  11075. LifecycleHookEnd = 5,
  11076. /**
  11077. * Corresponds to the point in time before the runtime has evaluated an expression associated with
  11078. * an event or an output.
  11079. */
  11080. OutputStart = 6,
  11081. /**
  11082. * Corresponds to the point in time after the runtime has evaluated an expression associated with
  11083. * an event or an output.
  11084. */
  11085. OutputEnd = 7
  11086. }
  11087. /**
  11088. * Publishes a collection of default debug tools onto`window.ng`.
  11089. *
  11090. * These functions are available globally when Angular is in development
  11091. * mode and are automatically stripped away from prod mode is on.
  11092. */
  11093. export declare function ɵpublishDefaultGlobalUtils(): void;
  11094. /**
  11095. * Publishes the given function to `window.ng` so that it can be
  11096. * used from the browser console when an application is not in production.
  11097. */
  11098. export declare function ɵpublishGlobalUtil(name: string, fn: Function): void;
  11099. export declare class ɵReflectionCapabilities implements PlatformReflectionCapabilities {
  11100. private _reflect;
  11101. constructor(reflect?: any);
  11102. factory<T>(t: Type<T>): (args: any[]) => T;
  11103. private _ownParameters;
  11104. parameters(type: Type<any>): any[][];
  11105. private _ownAnnotations;
  11106. annotations(typeOrFunc: Type<any>): any[];
  11107. private _ownPropMetadata;
  11108. propMetadata(typeOrFunc: any): {
  11109. [key: string]: any[];
  11110. };
  11111. ownPropMetadata(typeOrFunc: any): {
  11112. [key: string]: any[];
  11113. };
  11114. hasLifecycleHook(type: any, lcProperty: string): boolean;
  11115. }
  11116. /**
  11117. * Register locale data to be used internally by Angular. See the
  11118. * ["I18n guide"](guide/i18n-common-format-data-locale) to know how to import additional locale
  11119. * data.
  11120. *
  11121. * The signature `registerLocaleData(data: any, extraData?: any)` is deprecated since v5.1
  11122. */
  11123. export declare function ɵregisterLocaleData(data: any, localeId?: string | any, extraData?: any): void;
  11124. /**
  11125. * ComponentFactory interface implementation.
  11126. */
  11127. export declare class ɵRender3ComponentFactory<T> extends ComponentFactory<T> {
  11128. private componentDef;
  11129. private ngModule?;
  11130. selector: string;
  11131. componentType: Type<any>;
  11132. ngContentSelectors: string[];
  11133. isBoundToModule: boolean;
  11134. get inputs(): {
  11135. propName: string;
  11136. templateName: string;
  11137. transform?: (value: any) => any;
  11138. }[];
  11139. get outputs(): {
  11140. propName: string;
  11141. templateName: string;
  11142. }[];
  11143. /**
  11144. * @param componentDef The component definition.
  11145. * @param ngModule The NgModuleRef to which the factory is bound.
  11146. */
  11147. constructor(componentDef: ɵComponentDef<any>, ngModule?: NgModuleRef<any> | undefined);
  11148. create(injector: Injector, projectableNodes?: any[][] | undefined, rootSelectorOrNode?: any, environmentInjector?: NgModuleRef<any> | EnvironmentInjector | undefined): ComponentRef<T>;
  11149. }
  11150. /**
  11151. * Represents an instance of a Component created via a {@link ComponentFactory}.
  11152. *
  11153. * `ComponentRef` provides access to the Component Instance as well other objects related to this
  11154. * Component Instance and allows you to destroy the Component Instance via the {@link #destroy}
  11155. * method.
  11156. *
  11157. */
  11158. export declare class ɵRender3ComponentRef<T> extends ComponentRef<T> {
  11159. location: ElementRef;
  11160. private _rootLView;
  11161. private _tNode;
  11162. instance: T;
  11163. hostView: ɵViewRef<T>;
  11164. changeDetectorRef: ChangeDetectorRef;
  11165. componentType: Type<T>;
  11166. private previousInputValues;
  11167. constructor(componentType: Type<T>, instance: T, location: ElementRef, _rootLView: LView, _tNode: TElementNode | TContainerNode | TElementContainerNode);
  11168. setInput(name: string, value: unknown): void;
  11169. get injector(): Injector;
  11170. destroy(): void;
  11171. onDestroy(callback: () => void): void;
  11172. }
  11173. export declare class ɵRender3NgModuleRef<T> extends NgModuleRef<T> implements InternalNgModuleRef<T> {
  11174. _parent: Injector | null;
  11175. _bootstrapComponents: Type<any>[];
  11176. _r3Injector: R3Injector;
  11177. instance: T;
  11178. destroyCbs: (() => void)[] | null;
  11179. readonly componentFactoryResolver: ComponentFactoryResolver_2;
  11180. constructor(ngModuleType: Type<T>, _parent: Injector | null, additionalProviders: StaticProvider[]);
  11181. get injector(): EnvironmentInjector;
  11182. destroy(): void;
  11183. onDestroy(callback: () => void): void;
  11184. }
  11185. /**
  11186. * Flags passed into template functions to determine which blocks (i.e. creation, update)
  11187. * should be executed.
  11188. *
  11189. * Typically, a template runs both the creation block and the update block on initialization and
  11190. * subsequent runs only execute the update block. However, dynamically created views require that
  11191. * the creation block be executed separately from the update block (for backwards compat).
  11192. */
  11193. export declare const enum ɵRenderFlags {
  11194. Create = 1,
  11195. Update = 2
  11196. }
  11197. export declare function ɵresetCompiledComponents(): void;
  11198. export declare function ɵresetJitOptions(): void;
  11199. /**
  11200. * Used to resolve resource URLs on `@Component` when used with JIT compilation.
  11201. *
  11202. * Example:
  11203. * ```
  11204. * @Component({
  11205. * selector: 'my-comp',
  11206. * templateUrl: 'my-comp.html', // This requires asynchronous resolution
  11207. * })
  11208. * class MyComponent{
  11209. * }
  11210. *
  11211. * // Calling `renderComponent` will fail because `renderComponent` is a synchronous process
  11212. * // and `MyComponent`'s `@Component.templateUrl` needs to be resolved asynchronously.
  11213. *
  11214. * // Calling `resolveComponentResources()` will resolve `@Component.templateUrl` into
  11215. * // `@Component.template`, which allows `renderComponent` to proceed in a synchronous manner.
  11216. *
  11217. * // Use browser's `fetch()` function as the default resource resolution strategy.
  11218. * resolveComponentResources(fetch).then(() => {
  11219. * // After resolution all URLs have been converted into `template` strings.
  11220. * renderComponent(MyComponent);
  11221. * });
  11222. *
  11223. * ```
  11224. *
  11225. * NOTE: In AOT the resolution happens during compilation, and so there should be no need
  11226. * to call this method outside JIT mode.
  11227. *
  11228. * @param resourceResolver a function which is responsible for returning a `Promise` to the
  11229. * contents of the resolved URL. Browser's `fetch()` method is a good default implementation.
  11230. */
  11231. export declare function ɵresolveComponentResources(resourceResolver: (url: string) => (Promise<string | {
  11232. text(): Promise<string>;
  11233. }>)): Promise<void>;
  11234. /**
  11235. * Class that represents a runtime error.
  11236. * Formats and outputs the error message in a consistent way.
  11237. *
  11238. * Example:
  11239. * ```
  11240. * throw new RuntimeError(
  11241. * RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED,
  11242. * ngDevMode && 'Injector has already been destroyed.');
  11243. * ```
  11244. *
  11245. * Note: the `message` argument contains a descriptive error message as a string in development
  11246. * mode (when the `ngDevMode` is defined). In production mode (after tree-shaking pass), the
  11247. * `message` argument becomes `false`, thus we account for it in the typings and the runtime
  11248. * logic.
  11249. */
  11250. export declare class ɵRuntimeError<T extends number = RuntimeErrorCode> extends Error {
  11251. code: T;
  11252. constructor(code: T, message: null | false | string);
  11253. }
  11254. /**
  11255. * Marker interface for a value that's safe to use as HTML.
  11256. *
  11257. * @publicApi
  11258. */
  11259. export declare interface ɵSafeHtml extends ɵSafeValue {
  11260. }
  11261. /**
  11262. * Marker interface for a value that's safe to use as a URL to load executable code from.
  11263. *
  11264. * @publicApi
  11265. */
  11266. export declare interface ɵSafeResourceUrl extends ɵSafeValue {
  11267. }
  11268. /**
  11269. * Marker interface for a value that's safe to use as JavaScript.
  11270. *
  11271. * @publicApi
  11272. */
  11273. export declare interface ɵSafeScript extends ɵSafeValue {
  11274. }
  11275. /**
  11276. * Marker interface for a value that's safe to use as style (CSS).
  11277. *
  11278. * @publicApi
  11279. */
  11280. export declare interface ɵSafeStyle extends ɵSafeValue {
  11281. }
  11282. /**
  11283. * Marker interface for a value that's safe to use as a URL linking to a document.
  11284. *
  11285. * @publicApi
  11286. */
  11287. export declare interface ɵSafeUrl extends ɵSafeValue {
  11288. }
  11289. /**
  11290. * Marker interface for a value that's safe to use in a particular context.
  11291. *
  11292. * @publicApi
  11293. */
  11294. export declare interface ɵSafeValue {
  11295. }
  11296. /**
  11297. * Control whether the NgModule registration system enforces that each NgModule type registered has
  11298. * a unique id.
  11299. *
  11300. * This is useful for testing as the NgModule registry cannot be properly reset between tests with
  11301. * Angular's current API.
  11302. */
  11303. export declare function ɵsetAllowDuplicateNgModuleIdsForTest(allowDuplicates: boolean): void;
  11304. export declare function ɵsetAlternateWeakRefImpl(impl: unknown): void;
  11305. /**
  11306. * Adds decorator, constructor, and property metadata to a given type via static metadata fields
  11307. * on the type.
  11308. *
  11309. * These metadata fields can later be read with Angular's `ReflectionCapabilities` API.
  11310. *
  11311. * Calls to `setClassMetadata` can be guarded by ngDevMode, resulting in the metadata assignments
  11312. * being tree-shaken away during production builds.
  11313. */
  11314. export declare function ɵsetClassMetadata(type: Type<any>, decorators: any[] | null, ctorParameters: (() => any[]) | null, propDecorators: {
  11315. [field: string]: any;
  11316. } | null): void;
  11317. export declare function ɵsetCurrentInjector(injector: Injector | null | undefined): Injector | undefined | null;
  11318. /**
  11319. * Tell ivy what the `document` is for this platform.
  11320. *
  11321. * It is only necessary to call this if the current platform is not a browser.
  11322. *
  11323. * @param document The object representing the global `document` in this environment.
  11324. */
  11325. export declare function ɵsetDocument(document: Document | undefined): void;
  11326. export declare function ɵsetInjectorProfilerContext(context: ɵInjectorProfilerContext): ɵInjectorProfilerContext;
  11327. /**
  11328. * Sets the locale id that will be used for translations and ICU expressions.
  11329. * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine
  11330. * but is now defined as a global value.
  11331. *
  11332. * @param localeId
  11333. */
  11334. export declare function ɵsetLocaleId(localeId: string): void;
  11335. /**
  11336. * Sets a strict mode for JIT-compiled components to throw an error on unknown elements,
  11337. * instead of just logging the error.
  11338. * (for AOT-compiled ones this check happens at build time).
  11339. */
  11340. export declare function ɵsetUnknownElementStrictMode(shouldThrow: boolean): void;
  11341. /**
  11342. * Sets a strict mode for JIT-compiled components to throw an error on unknown properties,
  11343. * instead of just logging the error.
  11344. * (for AOT-compiled ones this check happens at build time).
  11345. */
  11346. export declare function ɵsetUnknownPropertyStrictMode(shouldThrow: boolean): void;
  11347. /**
  11348. * Marker used in a comment node to ensure hydration content integrity
  11349. */
  11350. export declare const ɵSSR_CONTENT_INTEGRITY_MARKER = "nghm";
  11351. /** Store a value in the `data` at a given `index`. */
  11352. export declare function ɵstore<T>(tView: TView, lView: LView, index: number, value: T): void;
  11353. export declare function ɵstringify(token: any): string;
  11354. /**
  11355. * Internal injection token that can used to access an instance of a Testability class.
  11356. *
  11357. * This token acts as a bridge between the core bootstrap code and the `Testability` class. This is
  11358. * needed to ensure that there are no direct references to the `Testability` class, so it can be
  11359. * tree-shaken away (if not referenced). For the environments/setups when the `Testability` class
  11360. * should be available, this token is used to add a provider that references the `Testability`
  11361. * class. Otherwise, only this token is retained in a bundle, but the `Testability` class is not.
  11362. */
  11363. export declare const ɵTESTABILITY: InjectionToken<Testability>;
  11364. /**
  11365. * Internal injection token to retrieve Testability getter class instance.
  11366. */
  11367. export declare const ɵTESTABILITY_GETTER: InjectionToken<GetTestability>;
  11368. /**
  11369. * Compute the pair of transitive scopes (compilation scope and exported scope) for a given type
  11370. * (either a NgModule or a standalone component / directive / pipe).
  11371. */
  11372. export declare function ɵtransitiveScopesFor<T>(type: Type<T>): ɵNgModuleTransitiveScopes;
  11373. /**
  11374. * Helper function to remove all the locale data from `LOCALE_DATA`.
  11375. */
  11376. export declare function ɵunregisterLocaleData(): void;
  11377. export declare function ɵunwrapSafeValue(value: ɵSafeValue): string;
  11378. export declare function ɵunwrapSafeValue<T>(value: T): T;
  11379. export declare class ɵViewRef<T> implements EmbeddedViewRef<T>, InternalViewRef, ChangeDetectorRefInterface {
  11380. /**
  11381. * This represents the `LView` associated with the point where `ChangeDetectorRef` was
  11382. * requested.
  11383. *
  11384. * This may be different from `_lView` if the `_cdRefInjectingView` is an embedded view.
  11385. */
  11386. private _cdRefInjectingView?;
  11387. private _appRef;
  11388. private _attachedToViewContainer;
  11389. get rootNodes(): any[];
  11390. constructor(
  11391. /**
  11392. * This represents `LView` associated with the component when ViewRef is a ChangeDetectorRef.
  11393. *
  11394. * When ViewRef is created for a dynamic component, this also represents the `LView` for the
  11395. * component.
  11396. *
  11397. * For a "regular" ViewRef created for an embedded view, this is the `LView` for the embedded
  11398. * view.
  11399. *
  11400. * @internal
  11401. */
  11402. _lView: LView,
  11403. /**
  11404. * This represents the `LView` associated with the point where `ChangeDetectorRef` was
  11405. * requested.
  11406. *
  11407. * This may be different from `_lView` if the `_cdRefInjectingView` is an embedded view.
  11408. */
  11409. _cdRefInjectingView?: LView<unknown> | undefined);
  11410. get context(): T;
  11411. set context(value: T);
  11412. get destroyed(): boolean;
  11413. destroy(): void;
  11414. onDestroy(callback: Function): void;
  11415. /**
  11416. * Marks a view and all of its ancestors dirty.
  11417. *
  11418. * This can be used to ensure an {@link ChangeDetectionStrategy#OnPush} component is
  11419. * checked when it needs to be re-rendered but the two normal triggers haven't marked it
  11420. * dirty (i.e. inputs haven't changed and events haven't fired in the view).
  11421. *
  11422. * <!-- TODO: Add a link to a chapter on OnPush components -->
  11423. *
  11424. * @usageNotes
  11425. * ### Example
  11426. *
  11427. * ```typescript
  11428. * @Component({
  11429. * selector: 'app-root',
  11430. * template: `Number of ticks: {{numberOfTicks}}`
  11431. * changeDetection: ChangeDetectionStrategy.OnPush,
  11432. * })
  11433. * class AppComponent {
  11434. * numberOfTicks = 0;
  11435. *
  11436. * constructor(private ref: ChangeDetectorRef) {
  11437. * setInterval(() => {
  11438. * this.numberOfTicks++;
  11439. * // the following is required, otherwise the view will not be updated
  11440. * this.ref.markForCheck();
  11441. * }, 1000);
  11442. * }
  11443. * }
  11444. * ```
  11445. */
  11446. markForCheck(): void;
  11447. /**
  11448. * Detaches the view from the change detection tree.
  11449. *
  11450. * Detached views will not be checked during change detection runs until they are
  11451. * re-attached, even if they are dirty. `detach` can be used in combination with
  11452. * {@link ChangeDetectorRef#detectChanges} to implement local change
  11453. * detection checks.
  11454. *
  11455. * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
  11456. * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
  11457. *
  11458. * @usageNotes
  11459. * ### Example
  11460. *
  11461. * The following example defines a component with a large list of readonly data.
  11462. * Imagine the data changes constantly, many times per second. For performance reasons,
  11463. * we want to check and update the list every five seconds. We can do that by detaching
  11464. * the component's change detector and doing a local check every five seconds.
  11465. *
  11466. * ```typescript
  11467. * class DataProvider {
  11468. * // in a real application the returned data will be different every time
  11469. * get data() {
  11470. * return [1,2,3,4,5];
  11471. * }
  11472. * }
  11473. *
  11474. * @Component({
  11475. * selector: 'giant-list',
  11476. * template: `
  11477. * <li *ngFor="let d of dataProvider.data">Data {{d}}</li>
  11478. * `,
  11479. * })
  11480. * class GiantList {
  11481. * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {
  11482. * ref.detach();
  11483. * setInterval(() => {
  11484. * this.ref.detectChanges();
  11485. * }, 5000);
  11486. * }
  11487. * }
  11488. *
  11489. * @Component({
  11490. * selector: 'app',
  11491. * providers: [DataProvider],
  11492. * template: `
  11493. * <giant-list><giant-list>
  11494. * `,
  11495. * })
  11496. * class App {
  11497. * }
  11498. * ```
  11499. */
  11500. detach(): void;
  11501. /**
  11502. * Re-attaches a view to the change detection tree.
  11503. *
  11504. * This can be used to re-attach views that were previously detached from the tree
  11505. * using {@link ChangeDetectorRef#detach}. Views are attached to the tree by default.
  11506. *
  11507. * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
  11508. *
  11509. * @usageNotes
  11510. * ### Example
  11511. *
  11512. * The following example creates a component displaying `live` data. The component will detach
  11513. * its change detector from the main change detector tree when the component's live property
  11514. * is set to false.
  11515. *
  11516. * ```typescript
  11517. * class DataProvider {
  11518. * data = 1;
  11519. *
  11520. * constructor() {
  11521. * setInterval(() => {
  11522. * this.data = this.data * 2;
  11523. * }, 500);
  11524. * }
  11525. * }
  11526. *
  11527. * @Component({
  11528. * selector: 'live-data',
  11529. * inputs: ['live'],
  11530. * template: 'Data: {{dataProvider.data}}'
  11531. * })
  11532. * class LiveData {
  11533. * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}
  11534. *
  11535. * set live(value) {
  11536. * if (value) {
  11537. * this.ref.reattach();
  11538. * } else {
  11539. * this.ref.detach();
  11540. * }
  11541. * }
  11542. * }
  11543. *
  11544. * @Component({
  11545. * selector: 'app-root',
  11546. * providers: [DataProvider],
  11547. * template: `
  11548. * Live Update: <input type="checkbox" [(ngModel)]="live">
  11549. * <live-data [live]="live"><live-data>
  11550. * `,
  11551. * })
  11552. * class AppComponent {
  11553. * live = true;
  11554. * }
  11555. * ```
  11556. */
  11557. reattach(): void;
  11558. /**
  11559. * Checks the view and its children.
  11560. *
  11561. * This can also be used in combination with {@link ChangeDetectorRef#detach} to implement
  11562. * local change detection checks.
  11563. *
  11564. * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
  11565. * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
  11566. *
  11567. * @usageNotes
  11568. * ### Example
  11569. *
  11570. * The following example defines a component with a large list of readonly data.
  11571. * Imagine, the data changes constantly, many times per second. For performance reasons,
  11572. * we want to check and update the list every five seconds.
  11573. *
  11574. * We can do that by detaching the component's change detector and doing a local change detection
  11575. * check every five seconds.
  11576. *
  11577. * See {@link ChangeDetectorRef#detach} for more information.
  11578. */
  11579. detectChanges(): void;
  11580. /**
  11581. * Checks the change detector and its children, and throws if any changes are detected.
  11582. *
  11583. * This is used in development mode to verify that running change detection doesn't
  11584. * introduce other changes.
  11585. */
  11586. checkNoChanges(): void;
  11587. attachToViewContainerRef(): void;
  11588. detachFromAppRef(): void;
  11589. attachToAppRef(appRef: ViewRefTracker): void;
  11590. }
  11591. /**
  11592. * Returns a set of providers required to setup hydration support
  11593. * for an application that is server side rendered. This function is
  11594. * included into the `provideClientHydration` public API function from
  11595. * the `platform-browser` package.
  11596. *
  11597. * The function sets up an internal flag that would be recognized during
  11598. * the server side rendering time as well, so there is no need to
  11599. * configure or change anything in NgUniversal to enable the feature.
  11600. */
  11601. export declare function ɵwithDomHydration(): EnvironmentProviders;
  11602. /**
  11603. * URL for the XSS security documentation.
  11604. */
  11605. export declare const ɵXSS_SECURITY_URL = "https://g.co/ng/security#xss";
  11606. /**
  11607. * Advances to an element for later binding instructions.
  11608. *
  11609. * Used in conjunction with instructions like {@link property} to act on elements with specified
  11610. * indices, for example those created with {@link element} or {@link elementStart}.
  11611. *
  11612. * ```ts
  11613. * (rf: RenderFlags, ctx: any) => {
  11614. * if (rf & 1) {
  11615. * text(0, 'Hello');
  11616. * text(1, 'Goodbye')
  11617. * element(2, 'div');
  11618. * }
  11619. * if (rf & 2) {
  11620. * advance(2); // Advance twice to the <div>.
  11621. * property('title', 'test');
  11622. * }
  11623. * }
  11624. * ```
  11625. * @param delta Number of elements to advance forwards by.
  11626. *
  11627. * @codeGenApi
  11628. */
  11629. export declare function ɵɵadvance(delta: number): void;
  11630. /**
  11631. * Updates the value of or removes a bound attribute on an Element.
  11632. *
  11633. * Used in the case of `[attr.title]="value"`
  11634. *
  11635. * @param name name The name of the attribute.
  11636. * @param value value The attribute is removed when value is `null` or `undefined`.
  11637. * Otherwise the attribute value is set to the stringified value.
  11638. * @param sanitizer An optional function used to sanitize the value.
  11639. * @param namespace Optional namespace to use when setting the attribute.
  11640. *
  11641. * @codeGenApi
  11642. */
  11643. export declare function ɵɵattribute(name: string, value: any, sanitizer?: SanitizerFn | null, namespace?: string): typeof ɵɵattribute;
  11644. /**
  11645. *
  11646. * Update an interpolated attribute on an element with single bound value surrounded by text.
  11647. *
  11648. * Used when the value passed to a property has 1 interpolated value in it:
  11649. *
  11650. * ```html
  11651. * <div attr.title="prefix{{v0}}suffix"></div>
  11652. * ```
  11653. *
  11654. * Its compiled representation is::
  11655. *
  11656. * ```ts
  11657. * ɵɵattributeInterpolate1('title', 'prefix', v0, 'suffix');
  11658. * ```
  11659. *
  11660. * @param attrName The name of the attribute to update
  11661. * @param prefix Static value used for concatenation only.
  11662. * @param v0 Value checked for change.
  11663. * @param suffix Static value used for concatenation only.
  11664. * @param sanitizer An optional sanitizer function
  11665. * @returns itself, so that it may be chained.
  11666. * @codeGenApi
  11667. */
  11668. export declare function ɵɵattributeInterpolate1(attrName: string, prefix: string, v0: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate1;
  11669. /**
  11670. *
  11671. * Update an interpolated attribute on an element with 2 bound values surrounded by text.
  11672. *
  11673. * Used when the value passed to a property has 2 interpolated values in it:
  11674. *
  11675. * ```html
  11676. * <div attr.title="prefix{{v0}}-{{v1}}suffix"></div>
  11677. * ```
  11678. *
  11679. * Its compiled representation is::
  11680. *
  11681. * ```ts
  11682. * ɵɵattributeInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');
  11683. * ```
  11684. *
  11685. * @param attrName The name of the attribute to update
  11686. * @param prefix Static value used for concatenation only.
  11687. * @param v0 Value checked for change.
  11688. * @param i0 Static value used for concatenation only.
  11689. * @param v1 Value checked for change.
  11690. * @param suffix Static value used for concatenation only.
  11691. * @param sanitizer An optional sanitizer function
  11692. * @returns itself, so that it may be chained.
  11693. * @codeGenApi
  11694. */
  11695. export declare function ɵɵattributeInterpolate2(attrName: string, prefix: string, v0: any, i0: string, v1: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate2;
  11696. /**
  11697. *
  11698. * Update an interpolated attribute on an element with 3 bound values surrounded by text.
  11699. *
  11700. * Used when the value passed to a property has 3 interpolated values in it:
  11701. *
  11702. * ```html
  11703. * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>
  11704. * ```
  11705. *
  11706. * Its compiled representation is::
  11707. *
  11708. * ```ts
  11709. * ɵɵattributeInterpolate3(
  11710. * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');
  11711. * ```
  11712. *
  11713. * @param attrName The name of the attribute to update
  11714. * @param prefix Static value used for concatenation only.
  11715. * @param v0 Value checked for change.
  11716. * @param i0 Static value used for concatenation only.
  11717. * @param v1 Value checked for change.
  11718. * @param i1 Static value used for concatenation only.
  11719. * @param v2 Value checked for change.
  11720. * @param suffix Static value used for concatenation only.
  11721. * @param sanitizer An optional sanitizer function
  11722. * @returns itself, so that it may be chained.
  11723. * @codeGenApi
  11724. */
  11725. export declare function ɵɵattributeInterpolate3(attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate3;
  11726. /**
  11727. *
  11728. * Update an interpolated attribute on an element with 4 bound values surrounded by text.
  11729. *
  11730. * Used when the value passed to a property has 4 interpolated values in it:
  11731. *
  11732. * ```html
  11733. * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>
  11734. * ```
  11735. *
  11736. * Its compiled representation is::
  11737. *
  11738. * ```ts
  11739. * ɵɵattributeInterpolate4(
  11740. * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
  11741. * ```
  11742. *
  11743. * @param attrName The name of the attribute to update
  11744. * @param prefix Static value used for concatenation only.
  11745. * @param v0 Value checked for change.
  11746. * @param i0 Static value used for concatenation only.
  11747. * @param v1 Value checked for change.
  11748. * @param i1 Static value used for concatenation only.
  11749. * @param v2 Value checked for change.
  11750. * @param i2 Static value used for concatenation only.
  11751. * @param v3 Value checked for change.
  11752. * @param suffix Static value used for concatenation only.
  11753. * @param sanitizer An optional sanitizer function
  11754. * @returns itself, so that it may be chained.
  11755. * @codeGenApi
  11756. */
  11757. export declare function ɵɵattributeInterpolate4(attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate4;
  11758. /**
  11759. *
  11760. * Update an interpolated attribute on an element with 5 bound values surrounded by text.
  11761. *
  11762. * Used when the value passed to a property has 5 interpolated values in it:
  11763. *
  11764. * ```html
  11765. * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>
  11766. * ```
  11767. *
  11768. * Its compiled representation is::
  11769. *
  11770. * ```ts
  11771. * ɵɵattributeInterpolate5(
  11772. * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
  11773. * ```
  11774. *
  11775. * @param attrName The name of the attribute to update
  11776. * @param prefix Static value used for concatenation only.
  11777. * @param v0 Value checked for change.
  11778. * @param i0 Static value used for concatenation only.
  11779. * @param v1 Value checked for change.
  11780. * @param i1 Static value used for concatenation only.
  11781. * @param v2 Value checked for change.
  11782. * @param i2 Static value used for concatenation only.
  11783. * @param v3 Value checked for change.
  11784. * @param i3 Static value used for concatenation only.
  11785. * @param v4 Value checked for change.
  11786. * @param suffix Static value used for concatenation only.
  11787. * @param sanitizer An optional sanitizer function
  11788. * @returns itself, so that it may be chained.
  11789. * @codeGenApi
  11790. */
  11791. export declare function ɵɵattributeInterpolate5(attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate5;
  11792. /**
  11793. *
  11794. * Update an interpolated attribute on an element with 6 bound values surrounded by text.
  11795. *
  11796. * Used when the value passed to a property has 6 interpolated values in it:
  11797. *
  11798. * ```html
  11799. * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>
  11800. * ```
  11801. *
  11802. * Its compiled representation is::
  11803. *
  11804. * ```ts
  11805. * ɵɵattributeInterpolate6(
  11806. * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
  11807. * ```
  11808. *
  11809. * @param attrName The name of the attribute to update
  11810. * @param prefix Static value used for concatenation only.
  11811. * @param v0 Value checked for change.
  11812. * @param i0 Static value used for concatenation only.
  11813. * @param v1 Value checked for change.
  11814. * @param i1 Static value used for concatenation only.
  11815. * @param v2 Value checked for change.
  11816. * @param i2 Static value used for concatenation only.
  11817. * @param v3 Value checked for change.
  11818. * @param i3 Static value used for concatenation only.
  11819. * @param v4 Value checked for change.
  11820. * @param i4 Static value used for concatenation only.
  11821. * @param v5 Value checked for change.
  11822. * @param suffix Static value used for concatenation only.
  11823. * @param sanitizer An optional sanitizer function
  11824. * @returns itself, so that it may be chained.
  11825. * @codeGenApi
  11826. */
  11827. export declare function ɵɵattributeInterpolate6(attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate6;
  11828. /**
  11829. *
  11830. * Update an interpolated attribute on an element with 7 bound values surrounded by text.
  11831. *
  11832. * Used when the value passed to a property has 7 interpolated values in it:
  11833. *
  11834. * ```html
  11835. * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>
  11836. * ```
  11837. *
  11838. * Its compiled representation is::
  11839. *
  11840. * ```ts
  11841. * ɵɵattributeInterpolate7(
  11842. * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
  11843. * ```
  11844. *
  11845. * @param attrName The name of the attribute to update
  11846. * @param prefix Static value used for concatenation only.
  11847. * @param v0 Value checked for change.
  11848. * @param i0 Static value used for concatenation only.
  11849. * @param v1 Value checked for change.
  11850. * @param i1 Static value used for concatenation only.
  11851. * @param v2 Value checked for change.
  11852. * @param i2 Static value used for concatenation only.
  11853. * @param v3 Value checked for change.
  11854. * @param i3 Static value used for concatenation only.
  11855. * @param v4 Value checked for change.
  11856. * @param i4 Static value used for concatenation only.
  11857. * @param v5 Value checked for change.
  11858. * @param i5 Static value used for concatenation only.
  11859. * @param v6 Value checked for change.
  11860. * @param suffix Static value used for concatenation only.
  11861. * @param sanitizer An optional sanitizer function
  11862. * @returns itself, so that it may be chained.
  11863. * @codeGenApi
  11864. */
  11865. export declare function ɵɵattributeInterpolate7(attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate7;
  11866. /**
  11867. *
  11868. * Update an interpolated attribute on an element with 8 bound values surrounded by text.
  11869. *
  11870. * Used when the value passed to a property has 8 interpolated values in it:
  11871. *
  11872. * ```html
  11873. * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>
  11874. * ```
  11875. *
  11876. * Its compiled representation is::
  11877. *
  11878. * ```ts
  11879. * ɵɵattributeInterpolate8(
  11880. * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
  11881. * ```
  11882. *
  11883. * @param attrName The name of the attribute to update
  11884. * @param prefix Static value used for concatenation only.
  11885. * @param v0 Value checked for change.
  11886. * @param i0 Static value used for concatenation only.
  11887. * @param v1 Value checked for change.
  11888. * @param i1 Static value used for concatenation only.
  11889. * @param v2 Value checked for change.
  11890. * @param i2 Static value used for concatenation only.
  11891. * @param v3 Value checked for change.
  11892. * @param i3 Static value used for concatenation only.
  11893. * @param v4 Value checked for change.
  11894. * @param i4 Static value used for concatenation only.
  11895. * @param v5 Value checked for change.
  11896. * @param i5 Static value used for concatenation only.
  11897. * @param v6 Value checked for change.
  11898. * @param i6 Static value used for concatenation only.
  11899. * @param v7 Value checked for change.
  11900. * @param suffix Static value used for concatenation only.
  11901. * @param sanitizer An optional sanitizer function
  11902. * @returns itself, so that it may be chained.
  11903. * @codeGenApi
  11904. */
  11905. export declare function ɵɵattributeInterpolate8(attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate8;
  11906. /**
  11907. * Update an interpolated attribute on an element with 9 or more bound values surrounded by text.
  11908. *
  11909. * Used when the number of interpolated values exceeds 8.
  11910. *
  11911. * ```html
  11912. * <div
  11913. * title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"></div>
  11914. * ```
  11915. *
  11916. * Its compiled representation is::
  11917. *
  11918. * ```ts
  11919. * ɵɵattributeInterpolateV(
  11920. * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
  11921. * 'suffix']);
  11922. * ```
  11923. *
  11924. * @param attrName The name of the attribute to update.
  11925. * @param values The collection of values and the strings in-between those values, beginning with
  11926. * a string prefix and ending with a string suffix.
  11927. * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
  11928. * @param sanitizer An optional sanitizer function
  11929. * @returns itself, so that it may be chained.
  11930. * @codeGenApi
  11931. */
  11932. export declare function ɵɵattributeInterpolateV(attrName: string, values: any[], sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolateV;
  11933. /**
  11934. * Update class bindings using an object literal or class-string on an element.
  11935. *
  11936. * This instruction is meant to apply styling via the `[class]="exp"` template bindings.
  11937. * When classes are applied to the element they will then be updated with
  11938. * respect to any styles/classes set via `classProp`. If any
  11939. * classes are set to falsy then they will be removed from the element.
  11940. *
  11941. * Note that the styling instruction will not be applied until `stylingApply` is called.
  11942. * Note that this will the provided classMap value to the host element if this function is called
  11943. * within a host binding.
  11944. *
  11945. * @param classes A key/value map or string of CSS classes that will be added to the
  11946. * given element. Any missing classes (that have already been applied to the element
  11947. * beforehand) will be removed (unset) from the element's list of CSS classes.
  11948. *
  11949. * @codeGenApi
  11950. */
  11951. export declare function ɵɵclassMap(classes: {
  11952. [className: string]: boolean | undefined | null;
  11953. } | string | undefined | null): void;
  11954. /**
  11955. *
  11956. * Update an interpolated class on an element with single bound value surrounded by text.
  11957. *
  11958. * Used when the value passed to a property has 1 interpolated value in it:
  11959. *
  11960. * ```html
  11961. * <div class="prefix{{v0}}suffix"></div>
  11962. * ```
  11963. *
  11964. * Its compiled representation is:
  11965. *
  11966. * ```ts
  11967. * ɵɵclassMapInterpolate1('prefix', v0, 'suffix');
  11968. * ```
  11969. *
  11970. * @param prefix Static value used for concatenation only.
  11971. * @param v0 Value checked for change.
  11972. * @param suffix Static value used for concatenation only.
  11973. * @codeGenApi
  11974. */
  11975. export declare function ɵɵclassMapInterpolate1(prefix: string, v0: any, suffix: string): void;
  11976. /**
  11977. *
  11978. * Update an interpolated class on an element with 2 bound values surrounded by text.
  11979. *
  11980. * Used when the value passed to a property has 2 interpolated values in it:
  11981. *
  11982. * ```html
  11983. * <div class="prefix{{v0}}-{{v1}}suffix"></div>
  11984. * ```
  11985. *
  11986. * Its compiled representation is:
  11987. *
  11988. * ```ts
  11989. * ɵɵclassMapInterpolate2('prefix', v0, '-', v1, 'suffix');
  11990. * ```
  11991. *
  11992. * @param prefix Static value used for concatenation only.
  11993. * @param v0 Value checked for change.
  11994. * @param i0 Static value used for concatenation only.
  11995. * @param v1 Value checked for change.
  11996. * @param suffix Static value used for concatenation only.
  11997. * @codeGenApi
  11998. */
  11999. export declare function ɵɵclassMapInterpolate2(prefix: string, v0: any, i0: string, v1: any, suffix: string): void;
  12000. /**
  12001. *
  12002. * Update an interpolated class on an element with 3 bound values surrounded by text.
  12003. *
  12004. * Used when the value passed to a property has 3 interpolated values in it:
  12005. *
  12006. * ```html
  12007. * <div class="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>
  12008. * ```
  12009. *
  12010. * Its compiled representation is:
  12011. *
  12012. * ```ts
  12013. * ɵɵclassMapInterpolate3(
  12014. * 'prefix', v0, '-', v1, '-', v2, 'suffix');
  12015. * ```
  12016. *
  12017. * @param prefix Static value used for concatenation only.
  12018. * @param v0 Value checked for change.
  12019. * @param i0 Static value used for concatenation only.
  12020. * @param v1 Value checked for change.
  12021. * @param i1 Static value used for concatenation only.
  12022. * @param v2 Value checked for change.
  12023. * @param suffix Static value used for concatenation only.
  12024. * @codeGenApi
  12025. */
  12026. export declare function ɵɵclassMapInterpolate3(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): void;
  12027. /**
  12028. *
  12029. * Update an interpolated class on an element with 4 bound values surrounded by text.
  12030. *
  12031. * Used when the value passed to a property has 4 interpolated values in it:
  12032. *
  12033. * ```html
  12034. * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>
  12035. * ```
  12036. *
  12037. * Its compiled representation is:
  12038. *
  12039. * ```ts
  12040. * ɵɵclassMapInterpolate4(
  12041. * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
  12042. * ```
  12043. *
  12044. * @param prefix Static value used for concatenation only.
  12045. * @param v0 Value checked for change.
  12046. * @param i0 Static value used for concatenation only.
  12047. * @param v1 Value checked for change.
  12048. * @param i1 Static value used for concatenation only.
  12049. * @param v2 Value checked for change.
  12050. * @param i2 Static value used for concatenation only.
  12051. * @param v3 Value checked for change.
  12052. * @param suffix Static value used for concatenation only.
  12053. * @codeGenApi
  12054. */
  12055. export declare function ɵɵclassMapInterpolate4(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string): void;
  12056. /**
  12057. *
  12058. * Update an interpolated class on an element with 5 bound values surrounded by text.
  12059. *
  12060. * Used when the value passed to a property has 5 interpolated values in it:
  12061. *
  12062. * ```html
  12063. * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>
  12064. * ```
  12065. *
  12066. * Its compiled representation is:
  12067. *
  12068. * ```ts
  12069. * ɵɵclassMapInterpolate5(
  12070. * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
  12071. * ```
  12072. *
  12073. * @param prefix Static value used for concatenation only.
  12074. * @param v0 Value checked for change.
  12075. * @param i0 Static value used for concatenation only.
  12076. * @param v1 Value checked for change.
  12077. * @param i1 Static value used for concatenation only.
  12078. * @param v2 Value checked for change.
  12079. * @param i2 Static value used for concatenation only.
  12080. * @param v3 Value checked for change.
  12081. * @param i3 Static value used for concatenation only.
  12082. * @param v4 Value checked for change.
  12083. * @param suffix Static value used for concatenation only.
  12084. * @codeGenApi
  12085. */
  12086. export declare function ɵɵclassMapInterpolate5(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, suffix: string): void;
  12087. /**
  12088. *
  12089. * Update an interpolated class on an element with 6 bound values surrounded by text.
  12090. *
  12091. * Used when the value passed to a property has 6 interpolated values in it:
  12092. *
  12093. * ```html
  12094. * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>
  12095. * ```
  12096. *
  12097. * Its compiled representation is:
  12098. *
  12099. * ```ts
  12100. * ɵɵclassMapInterpolate6(
  12101. * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
  12102. * ```
  12103. *
  12104. * @param prefix Static value used for concatenation only.
  12105. * @param v0 Value checked for change.
  12106. * @param i0 Static value used for concatenation only.
  12107. * @param v1 Value checked for change.
  12108. * @param i1 Static value used for concatenation only.
  12109. * @param v2 Value checked for change.
  12110. * @param i2 Static value used for concatenation only.
  12111. * @param v3 Value checked for change.
  12112. * @param i3 Static value used for concatenation only.
  12113. * @param v4 Value checked for change.
  12114. * @param i4 Static value used for concatenation only.
  12115. * @param v5 Value checked for change.
  12116. * @param suffix Static value used for concatenation only.
  12117. * @codeGenApi
  12118. */
  12119. export declare function ɵɵclassMapInterpolate6(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string): void;
  12120. /**
  12121. *
  12122. * Update an interpolated class on an element with 7 bound values surrounded by text.
  12123. *
  12124. * Used when the value passed to a property has 7 interpolated values in it:
  12125. *
  12126. * ```html
  12127. * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>
  12128. * ```
  12129. *
  12130. * Its compiled representation is:
  12131. *
  12132. * ```ts
  12133. * ɵɵclassMapInterpolate7(
  12134. * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
  12135. * ```
  12136. *
  12137. * @param prefix Static value used for concatenation only.
  12138. * @param v0 Value checked for change.
  12139. * @param i0 Static value used for concatenation only.
  12140. * @param v1 Value checked for change.
  12141. * @param i1 Static value used for concatenation only.
  12142. * @param v2 Value checked for change.
  12143. * @param i2 Static value used for concatenation only.
  12144. * @param v3 Value checked for change.
  12145. * @param i3 Static value used for concatenation only.
  12146. * @param v4 Value checked for change.
  12147. * @param i4 Static value used for concatenation only.
  12148. * @param v5 Value checked for change.
  12149. * @param i5 Static value used for concatenation only.
  12150. * @param v6 Value checked for change.
  12151. * @param suffix Static value used for concatenation only.
  12152. * @codeGenApi
  12153. */
  12154. export declare function ɵɵclassMapInterpolate7(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string): void;
  12155. /**
  12156. *
  12157. * Update an interpolated class on an element with 8 bound values surrounded by text.
  12158. *
  12159. * Used when the value passed to a property has 8 interpolated values in it:
  12160. *
  12161. * ```html
  12162. * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>
  12163. * ```
  12164. *
  12165. * Its compiled representation is:
  12166. *
  12167. * ```ts
  12168. * ɵɵclassMapInterpolate8(
  12169. * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
  12170. * ```
  12171. *
  12172. * @param prefix Static value used for concatenation only.
  12173. * @param v0 Value checked for change.
  12174. * @param i0 Static value used for concatenation only.
  12175. * @param v1 Value checked for change.
  12176. * @param i1 Static value used for concatenation only.
  12177. * @param v2 Value checked for change.
  12178. * @param i2 Static value used for concatenation only.
  12179. * @param v3 Value checked for change.
  12180. * @param i3 Static value used for concatenation only.
  12181. * @param v4 Value checked for change.
  12182. * @param i4 Static value used for concatenation only.
  12183. * @param v5 Value checked for change.
  12184. * @param i5 Static value used for concatenation only.
  12185. * @param v6 Value checked for change.
  12186. * @param i6 Static value used for concatenation only.
  12187. * @param v7 Value checked for change.
  12188. * @param suffix Static value used for concatenation only.
  12189. * @codeGenApi
  12190. */
  12191. export declare function ɵɵclassMapInterpolate8(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any, suffix: string): void;
  12192. /**
  12193. * Update an interpolated class on an element with 9 or more bound values surrounded by text.
  12194. *
  12195. * Used when the number of interpolated values exceeds 8.
  12196. *
  12197. * ```html
  12198. * <div
  12199. * class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"></div>
  12200. * ```
  12201. *
  12202. * Its compiled representation is:
  12203. *
  12204. * ```ts
  12205. * ɵɵclassMapInterpolateV(
  12206. * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
  12207. * 'suffix']);
  12208. * ```
  12209. *.
  12210. * @param values The collection of values and the strings in-between those values, beginning with
  12211. * a string prefix and ending with a string suffix.
  12212. * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
  12213. * @codeGenApi
  12214. */
  12215. export declare function ɵɵclassMapInterpolateV(values: any[]): void;
  12216. /**
  12217. * Update a class binding on an element with the provided value.
  12218. *
  12219. * This instruction is meant to handle the `[class.foo]="exp"` case and,
  12220. * therefore, the class binding itself must already be allocated using
  12221. * `styling` within the creation block.
  12222. *
  12223. * @param prop A valid CSS class (only one).
  12224. * @param value A true/false value which will turn the class on or off.
  12225. *
  12226. * Note that this will apply the provided class value to the host element if this function
  12227. * is called within a host binding function.
  12228. *
  12229. * @codeGenApi
  12230. */
  12231. export declare function ɵɵclassProp(className: string, value: boolean | undefined | null): typeof ɵɵclassProp;
  12232. /**
  12233. * @publicApi
  12234. */
  12235. export declare type ɵɵComponentDeclaration<T, Selector extends String, ExportAs extends string[], InputMap extends {
  12236. [key: string]: string | {
  12237. alias: string | null;
  12238. required: boolean;
  12239. };
  12240. }, OutputMap extends {
  12241. [key: string]: string;
  12242. }, QueryFields extends string[], NgContentSelectors extends string[], IsStandalone extends boolean = false, HostDirectives = never, IsSignal extends boolean = false> = unknown;
  12243. /**
  12244. * Registers a QueryList, associated with a content query, for later refresh (part of a view
  12245. * refresh).
  12246. *
  12247. * @param directiveIndex Current directive index
  12248. * @param predicate The type for which the query will search
  12249. * @param flags Flags associated with the query
  12250. * @param read What to save in the query
  12251. * @returns QueryList<T>
  12252. *
  12253. * @codeGenApi
  12254. */
  12255. export declare function ɵɵcontentQuery<T>(directiveIndex: number, predicate: ProviderToken<unknown> | string[], flags: QueryFlags, read?: any): void;
  12256. /**
  12257. * Copies the fields not handled by the `ɵɵInheritDefinitionFeature` from the supertype of a
  12258. * definition.
  12259. *
  12260. * This exists primarily to support ngcc migration of an existing View Engine pattern, where an
  12261. * entire decorator is inherited from a parent to a child class. When ngcc detects this case, it
  12262. * generates a skeleton definition on the child class, and applies this feature.
  12263. *
  12264. * The `ɵɵCopyDefinitionFeature` then copies any needed fields from the parent class' definition,
  12265. * including things like the component template function.
  12266. *
  12267. * @param definition The definition of a child class which inherits from a parent class with its
  12268. * own definition.
  12269. *
  12270. * @codeGenApi
  12271. */
  12272. export declare function ɵɵCopyDefinitionFeature(definition: ɵDirectiveDef<any> | ɵComponentDef<any>): void;
  12273. /**
  12274. * Creates runtime data structures for `{#defer}` blocks.
  12275. *
  12276. * @param index The index of the defer block in the data array
  12277. * @param deferredDepsFn Function that contains dependencies for this defer block
  12278. *
  12279. * @codeGenApi
  12280. */
  12281. export declare function ɵɵdefer(index: number, deferredDepsFn: DeferredDepsFn | null): void;
  12282. /**
  12283. * Create a component definition object.
  12284. *
  12285. *
  12286. * # Example
  12287. * ```
  12288. * class MyComponent {
  12289. * // Generated by Angular Template Compiler
  12290. * // [Symbol] syntax will not be supported by TypeScript until v2.7
  12291. * static ɵcmp = defineComponent({
  12292. * ...
  12293. * });
  12294. * }
  12295. * ```
  12296. * @codeGenApi
  12297. */
  12298. export declare function ɵɵdefineComponent<T>(componentDefinition: ComponentDefinition<T>): Mutable<ɵComponentDef<any>, keyof ɵComponentDef<any>>;
  12299. /**
  12300. * Create a directive definition object.
  12301. *
  12302. * # Example
  12303. * ```ts
  12304. * class MyDirective {
  12305. * // Generated by Angular Template Compiler
  12306. * // [Symbol] syntax will not be supported by TypeScript until v2.7
  12307. * static ɵdir = ɵɵdefineDirective({
  12308. * ...
  12309. * });
  12310. * }
  12311. * ```
  12312. *
  12313. * @codeGenApi
  12314. */
  12315. export declare function ɵɵdefineDirective<T>(directiveDefinition: DirectiveDefinition<T>): Mutable<ɵDirectiveDef<any>, keyof ɵDirectiveDef<any>>;
  12316. /**
  12317. * Construct an injectable definition which defines how a token will be constructed by the DI
  12318. * system, and in which injectors (if any) it will be available.
  12319. *
  12320. * This should be assigned to a static `ɵprov` field on a type, which will then be an
  12321. * `InjectableType`.
  12322. *
  12323. * Options:
  12324. * * `providedIn` determines which injectors will include the injectable, by either associating it
  12325. * with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be
  12326. * provided in the `'root'` injector, which will be the application-level injector in most apps.
  12327. * * `factory` gives the zero argument function which will create an instance of the injectable.
  12328. * The factory can call [`inject`](api/core/inject) to access the `Injector` and request injection
  12329. * of dependencies.
  12330. *
  12331. * @codeGenApi
  12332. * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.
  12333. */
  12334. export declare function ɵɵdefineInjectable<T>(opts: {
  12335. token: unknown;
  12336. providedIn?: Type<any> | 'root' | 'platform' | 'any' | 'environment' | null;
  12337. factory: () => T;
  12338. }): unknown;
  12339. /**
  12340. * Construct an `InjectorDef` which configures an injector.
  12341. *
  12342. * This should be assigned to a static injector def (`ɵinj`) field on a type, which will then be an
  12343. * `InjectorType`.
  12344. *
  12345. * Options:
  12346. *
  12347. * * `providers`: an optional array of providers to add to the injector. Each provider must
  12348. * either have a factory or point to a type which has a `ɵprov` static property (the
  12349. * type must be an `InjectableType`).
  12350. * * `imports`: an optional array of imports of other `InjectorType`s or `InjectorTypeWithModule`s
  12351. * whose providers will also be added to the injector. Locally provided types will override
  12352. * providers from imports.
  12353. *
  12354. * @codeGenApi
  12355. */
  12356. export declare function ɵɵdefineInjector(options: {
  12357. providers?: any[];
  12358. imports?: any[];
  12359. }): unknown;
  12360. /**
  12361. * @codeGenApi
  12362. */
  12363. export declare function ɵɵdefineNgModule<T>(def: {
  12364. /** Token representing the module. Used by DI. */
  12365. type: T;
  12366. /** List of components to bootstrap. */
  12367. bootstrap?: Type<any>[] | (() => Type<any>[]);
  12368. /** List of components, directives, and pipes declared by this module. */
  12369. declarations?: Type<any>[] | (() => Type<any>[]);
  12370. /** List of modules or `ModuleWithProviders` imported by this module. */
  12371. imports?: Type<any>[] | (() => Type<any>[]);
  12372. /**
  12373. * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this
  12374. * module.
  12375. */
  12376. exports?: Type<any>[] | (() => Type<any>[]);
  12377. /** The set of schemas that declare elements to be allowed in the NgModule. */
  12378. schemas?: SchemaMetadata[] | null;
  12379. /** Unique ID for the module that is used with `getModuleFactory`. */
  12380. id?: string | null;
  12381. }): unknown;
  12382. /**
  12383. * Create a pipe definition object.
  12384. *
  12385. * # Example
  12386. * ```
  12387. * class MyPipe implements PipeTransform {
  12388. * // Generated by Angular Template Compiler
  12389. * static ɵpipe = definePipe({
  12390. * ...
  12391. * });
  12392. * }
  12393. * ```
  12394. * @param pipeDef Pipe definition generated by the compiler
  12395. *
  12396. * @codeGenApi
  12397. */
  12398. export declare function ɵɵdefinePipe<T>(pipeDef: {
  12399. /** Name of the pipe. Used for matching pipes in template to pipe defs. */
  12400. name: string;
  12401. /** Pipe class reference. Needed to extract pipe lifecycle hooks. */
  12402. type: Type<T>;
  12403. /** Whether the pipe is pure. */
  12404. pure?: boolean;
  12405. /**
  12406. * Whether the pipe is standalone.
  12407. */
  12408. standalone?: boolean;
  12409. }): unknown;
  12410. /**
  12411. * @publicApi
  12412. */
  12413. export declare type ɵɵDirectiveDeclaration<T, Selector extends string, ExportAs extends string[], InputMap extends {
  12414. [key: string]: string | {
  12415. alias: string | null;
  12416. required: boolean;
  12417. };
  12418. }, OutputMap extends {
  12419. [key: string]: string;
  12420. }, QueryFields extends string[], NgContentSelectors extends never = never, IsStandalone extends boolean = false, HostDirectives = never, IsSignal extends boolean = false> = unknown;
  12421. /**
  12422. * Returns the value associated to the given token from the injectors.
  12423. *
  12424. * `directiveInject` is intended to be used for directive, component and pipe factories.
  12425. * All other injection use `inject` which does not walk the node injector tree.
  12426. *
  12427. * Usage example (in factory function):
  12428. *
  12429. * ```ts
  12430. * class SomeDirective {
  12431. * constructor(directive: DirectiveA) {}
  12432. *
  12433. * static ɵdir = ɵɵdefineDirective({
  12434. * type: SomeDirective,
  12435. * factory: () => new SomeDirective(ɵɵdirectiveInject(DirectiveA))
  12436. * });
  12437. * }
  12438. * ```
  12439. * @param token the type or token to inject
  12440. * @param flags Injection flags
  12441. * @returns the value from the injector or `null` when not found
  12442. *
  12443. * @codeGenApi
  12444. */
  12445. export declare function ɵɵdirectiveInject<T>(token: ProviderToken<T>): T;
  12446. export declare function ɵɵdirectiveInject<T>(token: ProviderToken<T>, flags: InjectFlags): T;
  12447. /**
  12448. * Disables directive matching on element.
  12449. *
  12450. * * Example:
  12451. * ```
  12452. * <my-comp my-directive>
  12453. * Should match component / directive.
  12454. * </my-comp>
  12455. * <div ngNonBindable>
  12456. * <!-- ɵɵdisableBindings() -->
  12457. * <my-comp my-directive>
  12458. * Should not match component / directive because we are in ngNonBindable.
  12459. * </my-comp>
  12460. * <!-- ɵɵenableBindings() -->
  12461. * </div>
  12462. * ```
  12463. *
  12464. * @codeGenApi
  12465. */
  12466. export declare function ɵɵdisableBindings(): void;
  12467. /**
  12468. * Creates an empty element using {@link elementStart} and {@link elementEnd}
  12469. *
  12470. * @param index Index of the element in the data array
  12471. * @param name Name of the DOM Node
  12472. * @param attrsIndex Index of the element's attributes in the `consts` array.
  12473. * @param localRefsIndex Index of the element's local references in the `consts` array.
  12474. * @returns This function returns itself so that it may be chained.
  12475. *
  12476. * @codeGenApi
  12477. */
  12478. export declare function ɵɵelement(index: number, name: string, attrsIndex?: number | null, localRefsIndex?: number): typeof ɵɵelement;
  12479. /**
  12480. * Creates an empty logical container using {@link elementContainerStart}
  12481. * and {@link elementContainerEnd}
  12482. *
  12483. * @param index Index of the element in the LView array
  12484. * @param attrsIndex Index of the container attributes in the `consts` array.
  12485. * @param localRefsIndex Index of the container's local references in the `consts` array.
  12486. * @returns This function returns itself so that it may be chained.
  12487. *
  12488. * @codeGenApi
  12489. */
  12490. export declare function ɵɵelementContainer(index: number, attrsIndex?: number | null, localRefsIndex?: number): typeof ɵɵelementContainer;
  12491. /**
  12492. * Mark the end of the <ng-container>.
  12493. * @returns This function returns itself so that it may be chained.
  12494. *
  12495. * @codeGenApi
  12496. */
  12497. export declare function ɵɵelementContainerEnd(): typeof ɵɵelementContainerEnd;
  12498. /**
  12499. * Creates a logical container for other nodes (<ng-container>) backed by a comment node in the DOM.
  12500. * The instruction must later be followed by `elementContainerEnd()` call.
  12501. *
  12502. * @param index Index of the element in the LView array
  12503. * @param attrsIndex Index of the container attributes in the `consts` array.
  12504. * @param localRefsIndex Index of the container's local references in the `consts` array.
  12505. * @returns This function returns itself so that it may be chained.
  12506. *
  12507. * Even if this instruction accepts a set of attributes no actual attribute values are propagated to
  12508. * the DOM (as a comment node can't have attributes). Attributes are here only for directive
  12509. * matching purposes and setting initial inputs of directives.
  12510. *
  12511. * @codeGenApi
  12512. */
  12513. export declare function ɵɵelementContainerStart(index: number, attrsIndex?: number | null, localRefsIndex?: number): typeof ɵɵelementContainerStart;
  12514. /**
  12515. * Mark the end of the element.
  12516. * @returns This function returns itself so that it may be chained.
  12517. *
  12518. * @codeGenApi
  12519. */
  12520. export declare function ɵɵelementEnd(): typeof ɵɵelementEnd;
  12521. /**
  12522. * Create DOM element. The instruction must later be followed by `elementEnd()` call.
  12523. *
  12524. * @param index Index of the element in the LView array
  12525. * @param name Name of the DOM Node
  12526. * @param attrsIndex Index of the element's attributes in the `consts` array.
  12527. * @param localRefsIndex Index of the element's local references in the `consts` array.
  12528. * @returns This function returns itself so that it may be chained.
  12529. *
  12530. * Attributes and localRefs are passed as an array of strings where elements with an even index
  12531. * hold an attribute name and elements with an odd index hold an attribute value, ex.:
  12532. * ['id', 'warning5', 'class', 'alert']
  12533. *
  12534. * @codeGenApi
  12535. */
  12536. export declare function ɵɵelementStart(index: number, name: string, attrsIndex?: number | null, localRefsIndex?: number): typeof ɵɵelementStart;
  12537. /**
  12538. * Enables directive matching on elements.
  12539. *
  12540. * * Example:
  12541. * ```
  12542. * <my-comp my-directive>
  12543. * Should match component / directive.
  12544. * </my-comp>
  12545. * <div ngNonBindable>
  12546. * <!-- ɵɵdisableBindings() -->
  12547. * <my-comp my-directive>
  12548. * Should not match component / directive because we are in ngNonBindable.
  12549. * </my-comp>
  12550. * <!-- ɵɵenableBindings() -->
  12551. * </div>
  12552. * ```
  12553. *
  12554. * @codeGenApi
  12555. */
  12556. export declare function ɵɵenableBindings(): void;
  12557. /**
  12558. * @publicApi
  12559. */
  12560. export declare type ɵɵFactoryDeclaration<T, CtorDependencies extends CtorDependency[]> = unknown;
  12561. export declare enum ɵɵFactoryTarget {
  12562. Directive = 0,
  12563. Component = 1,
  12564. Injectable = 2,
  12565. Pipe = 3,
  12566. NgModule = 4
  12567. }
  12568. /**
  12569. * Returns the current OpaqueViewState instance.
  12570. *
  12571. * Used in conjunction with the restoreView() instruction to save a snapshot
  12572. * of the current view and restore it when listeners are invoked. This allows
  12573. * walking the declaration view tree in listeners to get vars from parent views.
  12574. *
  12575. * @codeGenApi
  12576. */
  12577. export declare function ɵɵgetCurrentView(): OpaqueViewState;
  12578. /**
  12579. * @codeGenApi
  12580. */
  12581. export declare function ɵɵgetInheritedFactory<T>(type: Type<any>): (type: Type<T>) => T;
  12582. /**
  12583. * This feature adds the host directives behavior to a directive definition by patching a
  12584. * function onto it. The expectation is that the runtime will invoke the function during
  12585. * directive matching.
  12586. *
  12587. * For example:
  12588. * ```ts
  12589. * class ComponentWithHostDirective {
  12590. * static ɵcmp = defineComponent({
  12591. * type: ComponentWithHostDirective,
  12592. * features: [ɵɵHostDirectivesFeature([
  12593. * SimpleHostDirective,
  12594. * {directive: AdvancedHostDirective, inputs: ['foo: alias'], outputs: ['bar']},
  12595. * ])]
  12596. * });
  12597. * }
  12598. * ```
  12599. *
  12600. * @codeGenApi
  12601. */
  12602. export declare function ɵɵHostDirectivesFeature(rawHostDirectives: HostDirectiveConfig[] | (() => HostDirectiveConfig[])): (definition: ɵDirectiveDef<unknown>) => void;
  12603. /**
  12604. * Update a property on a host element. Only applies to native node properties, not inputs.
  12605. *
  12606. * Operates on the element selected by index via the {@link select} instruction.
  12607. *
  12608. * @param propName Name of property. Because it is going to DOM, this is not subject to
  12609. * renaming as part of minification.
  12610. * @param value New value to write.
  12611. * @param sanitizer An optional function used to sanitize the value.
  12612. * @returns This function returns itself so that it may be chained
  12613. * (e.g. `property('name', ctx.name)('title', ctx.title)`)
  12614. *
  12615. * @codeGenApi
  12616. */
  12617. export declare function ɵɵhostProperty<T>(propName: string, value: T, sanitizer?: SanitizerFn | null): typeof ɵɵhostProperty;
  12618. /**
  12619. *
  12620. * Use this instruction to create a translation block that doesn't contain any placeholder.
  12621. * It calls both {@link i18nStart} and {@link i18nEnd} in one instruction.
  12622. *
  12623. * The translation `message` is the value which is locale specific. The translation string may
  12624. * contain placeholders which associate inner elements and sub-templates within the translation.
  12625. *
  12626. * The translation `message` placeholders are:
  12627. * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be
  12628. * interpolated into. The placeholder `index` points to the expression binding index. An optional
  12629. * `block` that matches the sub-template in which it was declared.
  12630. * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning
  12631. * and end of DOM element that were embedded in the original translation block. The placeholder
  12632. * `index` points to the element index in the template instructions set. An optional `block` that
  12633. * matches the sub-template in which it was declared.
  12634. * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be
  12635. * split up and translated separately in each angular template function. The `index` points to the
  12636. * `template` instruction index. A `block` that matches the sub-template in which it was declared.
  12637. *
  12638. * @param index A unique index of the translation in the static block.
  12639. * @param messageIndex An index of the translation message from the `def.consts` array.
  12640. * @param subTemplateIndex Optional sub-template index in the `message`.
  12641. *
  12642. * @codeGenApi
  12643. */
  12644. export declare function ɵɵi18n(index: number, messageIndex: number, subTemplateIndex?: number): void;
  12645. /**
  12646. * Updates a translation block or an i18n attribute when the bindings have changed.
  12647. *
  12648. * @param index Index of either {@link i18nStart} (translation block) or {@link i18nAttributes}
  12649. * (i18n attribute) on which it should update the content.
  12650. *
  12651. * @codeGenApi
  12652. */
  12653. export declare function ɵɵi18nApply(index: number): void;
  12654. /**
  12655. * Marks a list of attributes as translatable.
  12656. *
  12657. * @param index A unique index in the static block
  12658. * @param values
  12659. *
  12660. * @codeGenApi
  12661. */
  12662. export declare function ɵɵi18nAttributes(index: number, attrsIndex: number): void;
  12663. /**
  12664. * Translates a translation block marked by `i18nStart` and `i18nEnd`. It inserts the text/ICU nodes
  12665. * into the render tree, moves the placeholder nodes and removes the deleted nodes.
  12666. *
  12667. * @codeGenApi
  12668. */
  12669. export declare function ɵɵi18nEnd(): void;
  12670. /**
  12671. * Stores the values of the bindings during each update cycle in order to determine if we need to
  12672. * update the translated nodes.
  12673. *
  12674. * @param value The binding's value
  12675. * @returns This function returns itself so that it may be chained
  12676. * (e.g. `i18nExp(ctx.name)(ctx.title)`)
  12677. *
  12678. * @codeGenApi
  12679. */
  12680. export declare function ɵɵi18nExp<T>(value: T): typeof ɵɵi18nExp;
  12681. /**
  12682. * Handles message string post-processing for internationalization.
  12683. *
  12684. * Handles message string post-processing by transforming it from intermediate
  12685. * format (that might contain some markers that we need to replace) to the final
  12686. * form, consumable by i18nStart instruction. Post processing steps include:
  12687. *
  12688. * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�])
  12689. * 2. Replace all ICU vars (like "VAR_PLURAL")
  12690. * 3. Replace all placeholders used inside ICUs in a form of {PLACEHOLDER}
  12691. * 4. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�)
  12692. * in case multiple ICUs have the same placeholder name
  12693. *
  12694. * @param message Raw translation string for post processing
  12695. * @param replacements Set of replacements that should be applied
  12696. *
  12697. * @returns Transformed string that can be consumed by i18nStart instruction
  12698. *
  12699. * @codeGenApi
  12700. */
  12701. export declare function ɵɵi18nPostprocess(message: string, replacements?: {
  12702. [key: string]: (string | string[]);
  12703. }): string;
  12704. /**
  12705. * Marks a block of text as translatable.
  12706. *
  12707. * The instructions `i18nStart` and `i18nEnd` mark the translation block in the template.
  12708. * The translation `message` is the value which is locale specific. The translation string may
  12709. * contain placeholders which associate inner elements and sub-templates within the translation.
  12710. *
  12711. * The translation `message` placeholders are:
  12712. * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be
  12713. * interpolated into. The placeholder `index` points to the expression binding index. An optional
  12714. * `block` that matches the sub-template in which it was declared.
  12715. * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning
  12716. * and end of DOM element that were embedded in the original translation block. The placeholder
  12717. * `index` points to the element index in the template instructions set. An optional `block` that
  12718. * matches the sub-template in which it was declared.
  12719. * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be
  12720. * split up and translated separately in each angular template function. The `index` points to the
  12721. * `template` instruction index. A `block` that matches the sub-template in which it was declared.
  12722. *
  12723. * @param index A unique index of the translation in the static block.
  12724. * @param messageIndex An index of the translation message from the `def.consts` array.
  12725. * @param subTemplateIndex Optional sub-template index in the `message`.
  12726. *
  12727. * @codeGenApi
  12728. */
  12729. export declare function ɵɵi18nStart(index: number, messageIndex: number, subTemplateIndex?: number): void;
  12730. /**
  12731. * Merges the definition from a super class to a sub class.
  12732. * @param definition The definition that is a SubClass of another directive of component
  12733. *
  12734. * @codeGenApi
  12735. */
  12736. export declare function ɵɵInheritDefinitionFeature(definition: ɵDirectiveDef<any> | ɵComponentDef<any>): void;
  12737. /**
  12738. * Generated instruction: injects a token from the currently active injector.
  12739. *
  12740. * (Additional documentation moved to `inject`, as it is the public API, and an alias for this
  12741. * instruction)
  12742. *
  12743. * @see inject
  12744. * @codeGenApi
  12745. * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.
  12746. */
  12747. export declare function ɵɵinject<T>(token: ProviderToken<T>): T;
  12748. export declare function ɵɵinject<T>(token: ProviderToken<T>, flags?: InjectFlags): T | null;
  12749. /**
  12750. * Information about how a type or `InjectionToken` interfaces with the DI system.
  12751. *
  12752. * At a minimum, this includes a `factory` which defines how to create the given type `T`, possibly
  12753. * requesting injection of other types if necessary.
  12754. *
  12755. * Optionally, a `providedIn` parameter specifies that the given type belongs to a particular
  12756. * `Injector`, `NgModule`, or a special scope (e.g. `'root'`). A value of `null` indicates
  12757. * that the injectable does not belong to any scope.
  12758. *
  12759. * @codeGenApi
  12760. * @publicApi The ViewEngine compiler emits code with this type for injectables. This code is
  12761. * deployed to npm, and should be treated as public api.
  12762. */
  12763. export declare interface ɵɵInjectableDeclaration<T> {
  12764. /**
  12765. * Specifies that the given type belongs to a particular injector:
  12766. * - `InjectorType` such as `NgModule`,
  12767. * - `'root'` the root injector
  12768. * - `'any'` all injectors.
  12769. * - `null`, does not belong to any injector. Must be explicitly listed in the injector
  12770. * `providers`.
  12771. */
  12772. providedIn: InjectorType<any> | 'root' | 'platform' | 'any' | 'environment' | null;
  12773. /**
  12774. * The token to which this definition belongs.
  12775. *
  12776. * Note that this may not be the same as the type that the `factory` will create.
  12777. */
  12778. token: unknown;
  12779. /**
  12780. * Factory method to execute to create an instance of the injectable.
  12781. */
  12782. factory: (t?: Type<any>) => T;
  12783. /**
  12784. * In a case of no explicit injector, a location where the instance of the injectable is stored.
  12785. */
  12786. value: T | undefined;
  12787. }
  12788. /**
  12789. * Facade for the attribute injection from DI.
  12790. *
  12791. * @codeGenApi
  12792. */
  12793. export declare function ɵɵinjectAttribute(attrNameToInject: string): string | null;
  12794. /**
  12795. * @publicApi
  12796. */
  12797. export declare type ɵɵInjectorDeclaration<T> = unknown;
  12798. /**
  12799. * Information about the providers to be included in an `Injector` as well as how the given type
  12800. * which carries the information should be created by the DI system.
  12801. *
  12802. * An `InjectorDef` can import other types which have `InjectorDefs`, forming a deep nested
  12803. * structure of providers with a defined priority (identically to how `NgModule`s also have
  12804. * an import/dependency structure).
  12805. *
  12806. * NOTE: This is a private type and should not be exported
  12807. *
  12808. * @codeGenApi
  12809. */
  12810. export declare interface ɵɵInjectorDef<T> {
  12811. providers: (Type<any> | ValueProvider | ExistingProvider | FactoryProvider | ConstructorProvider | StaticClassProvider | ClassProvider | EnvironmentProviders | any[])[];
  12812. imports: (InjectorType<any> | InjectorTypeWithProviders<any>)[];
  12813. }
  12814. /**
  12815. * Decorates the directive definition with support for input transform functions.
  12816. *
  12817. * If the directive uses inheritance, the feature should be included before the
  12818. * `InheritDefinitionFeature` to ensure that the `inputTransforms` field is populated.
  12819. *
  12820. * @codeGenApi
  12821. */
  12822. export declare function ɵɵInputTransformsFeature(definition: ɵDirectiveDef<unknown>): void;
  12823. /**
  12824. * Throws an error indicating that a factory function could not be generated by the compiler for a
  12825. * particular class.
  12826. *
  12827. * This instruction allows the actual error message to be optimized away when ngDevMode is turned
  12828. * off, saving bytes of generated code while still providing a good experience in dev mode.
  12829. *
  12830. * The name of the class is not mentioned here, but will be in the generated factory function name
  12831. * and thus in the stack trace.
  12832. *
  12833. * @codeGenApi
  12834. */
  12835. export declare function ɵɵinvalidFactory(): never;
  12836. /**
  12837. * Throws an error indicating that a factory function could not be generated by the compiler for a
  12838. * particular class.
  12839. *
  12840. * The name of the class is not mentioned here, but will be in the generated factory function name
  12841. * and thus in the stack trace.
  12842. *
  12843. * @codeGenApi
  12844. */
  12845. export declare function ɵɵinvalidFactoryDep(index: number): never;
  12846. /**
  12847. * Adds an event listener to the current node.
  12848. *
  12849. * If an output exists on one of the node's directives, it also subscribes to the output
  12850. * and saves the subscription for later cleanup.
  12851. *
  12852. * @param eventName Name of the event
  12853. * @param listenerFn The function to be called when event emits
  12854. * @param useCapture Whether or not to use capture in event listener - this argument is a reminder
  12855. * from the Renderer3 infrastructure and should be removed from the instruction arguments
  12856. * @param eventTargetResolver Function that returns global target information in case this listener
  12857. * should be attached to a global object like window, document or body
  12858. *
  12859. * @codeGenApi
  12860. */
  12861. export declare function ɵɵlistener(eventName: string, listenerFn: (e?: any) => any, useCapture?: boolean, eventTargetResolver?: GlobalTargetResolver): typeof ɵɵlistener;
  12862. /**
  12863. * Loads a QueryList corresponding to the current view or content query.
  12864. *
  12865. * @codeGenApi
  12866. */
  12867. export declare function ɵɵloadQuery<T>(): QueryList<T>;
  12868. /**
  12869. * Sets the namespace used to create elements to `null`, which forces element creation to use
  12870. * `createElement` rather than `createElementNS`.
  12871. *
  12872. * @codeGenApi
  12873. */
  12874. export declare function ɵɵnamespaceHTML(): void;
  12875. /**
  12876. * Sets the namespace used to create elements to `'http://www.w3.org/1998/MathML/'` in global state.
  12877. *
  12878. * @codeGenApi
  12879. */
  12880. export declare function ɵɵnamespaceMathML(): void;
  12881. /**
  12882. * Sets the namespace used to create elements to `'http://www.w3.org/2000/svg'` in global state.
  12883. *
  12884. * @codeGenApi
  12885. */
  12886. export declare function ɵɵnamespaceSVG(): void;
  12887. /**
  12888. * Retrieves a context at the level specified and saves it as the global, contextViewData.
  12889. * Will get the next level up if level is not specified.
  12890. *
  12891. * This is used to save contexts of parent views so they can be bound in embedded views, or
  12892. * in conjunction with reference() to bind a ref from a parent view.
  12893. *
  12894. * @param level The relative level of the view from which to grab context compared to contextVewData
  12895. * @returns context
  12896. *
  12897. * @codeGenApi
  12898. */
  12899. export declare function ɵɵnextContext<T = any>(level?: number): T;
  12900. /**
  12901. * Evaluates the class metadata declaration.
  12902. *
  12903. * @codeGenApi
  12904. */
  12905. export declare function ɵɵngDeclareClassMetadata(decl: {
  12906. type: Type<any>;
  12907. decorators: any[];
  12908. ctorParameters?: () => any[];
  12909. propDecorators?: {
  12910. [field: string]: any;
  12911. };
  12912. }): void;
  12913. /**
  12914. * Compiles a partial component declaration object into a full component definition object.
  12915. *
  12916. * @codeGenApi
  12917. */
  12918. export declare function ɵɵngDeclareComponent(decl: R3DeclareComponentFacade): unknown;
  12919. /**
  12920. * Compiles a partial directive declaration object into a full directive definition object.
  12921. *
  12922. * @codeGenApi
  12923. */
  12924. export declare function ɵɵngDeclareDirective(decl: R3DeclareDirectiveFacade): unknown;
  12925. /**
  12926. * Compiles a partial pipe declaration object into a full pipe definition object.
  12927. *
  12928. * @codeGenApi
  12929. */
  12930. export declare function ɵɵngDeclareFactory(decl: R3DeclareFactoryFacade): unknown;
  12931. /**
  12932. * Compiles a partial injectable declaration object into a full injectable definition object.
  12933. *
  12934. * @codeGenApi
  12935. */
  12936. export declare function ɵɵngDeclareInjectable(decl: R3DeclareInjectableFacade): unknown;
  12937. /**
  12938. * Compiles a partial injector declaration object into a full injector definition object.
  12939. *
  12940. * @codeGenApi
  12941. */
  12942. export declare function ɵɵngDeclareInjector(decl: R3DeclareInjectorFacade): unknown;
  12943. /**
  12944. * Compiles a partial NgModule declaration object into a full NgModule definition object.
  12945. *
  12946. * @codeGenApi
  12947. */
  12948. export declare function ɵɵngDeclareNgModule(decl: R3DeclareNgModuleFacade): unknown;
  12949. /**
  12950. * Compiles a partial pipe declaration object into a full pipe definition object.
  12951. *
  12952. * @codeGenApi
  12953. */
  12954. export declare function ɵɵngDeclarePipe(decl: R3DeclarePipeFacade): unknown;
  12955. /**
  12956. * @publicApi
  12957. */
  12958. export declare type ɵɵNgModuleDeclaration<T, Declarations, Imports, Exports> = unknown;
  12959. /**
  12960. * The NgOnChangesFeature decorates a component with support for the ngOnChanges
  12961. * lifecycle hook, so it should be included in any component that implements
  12962. * that hook.
  12963. *
  12964. * If the component or directive uses inheritance, the NgOnChangesFeature MUST
  12965. * be included as a feature AFTER {@link InheritDefinitionFeature}, otherwise
  12966. * inherited properties will not be propagated to the ngOnChanges lifecycle
  12967. * hook.
  12968. *
  12969. * Example usage:
  12970. *
  12971. * ```
  12972. * static ɵcmp = defineComponent({
  12973. * ...
  12974. * inputs: {name: 'publicName'},
  12975. * features: [NgOnChangesFeature]
  12976. * });
  12977. * ```
  12978. *
  12979. * @codeGenApi
  12980. */
  12981. export declare function ɵɵNgOnChangesFeature<T>(): DirectiveDefFeature;
  12982. /**
  12983. * Create a pipe.
  12984. *
  12985. * @param index Pipe index where the pipe will be stored.
  12986. * @param pipeName The name of the pipe
  12987. * @returns T the instance of the pipe.
  12988. *
  12989. * @codeGenApi
  12990. */
  12991. export declare function ɵɵpipe(index: number, pipeName: string): any;
  12992. /**
  12993. * Invokes a pipe with 1 arguments.
  12994. *
  12995. * This instruction acts as a guard to {@link PipeTransform#transform} invoking
  12996. * the pipe only when an input to the pipe changes.
  12997. *
  12998. * @param index Pipe index where the pipe was stored on creation.
  12999. * @param slotOffset the offset in the reserved slot space
  13000. * @param v1 1st argument to {@link PipeTransform#transform}.
  13001. *
  13002. * @codeGenApi
  13003. */
  13004. export declare function ɵɵpipeBind1(index: number, slotOffset: number, v1: any): any;
  13005. /**
  13006. * Invokes a pipe with 2 arguments.
  13007. *
  13008. * This instruction acts as a guard to {@link PipeTransform#transform} invoking
  13009. * the pipe only when an input to the pipe changes.
  13010. *
  13011. * @param index Pipe index where the pipe was stored on creation.
  13012. * @param slotOffset the offset in the reserved slot space
  13013. * @param v1 1st argument to {@link PipeTransform#transform}.
  13014. * @param v2 2nd argument to {@link PipeTransform#transform}.
  13015. *
  13016. * @codeGenApi
  13017. */
  13018. export declare function ɵɵpipeBind2(index: number, slotOffset: number, v1: any, v2: any): any;
  13019. /**
  13020. * Invokes a pipe with 3 arguments.
  13021. *
  13022. * This instruction acts as a guard to {@link PipeTransform#transform} invoking
  13023. * the pipe only when an input to the pipe changes.
  13024. *
  13025. * @param index Pipe index where the pipe was stored on creation.
  13026. * @param slotOffset the offset in the reserved slot space
  13027. * @param v1 1st argument to {@link PipeTransform#transform}.
  13028. * @param v2 2nd argument to {@link PipeTransform#transform}.
  13029. * @param v3 4rd argument to {@link PipeTransform#transform}.
  13030. *
  13031. * @codeGenApi
  13032. */
  13033. export declare function ɵɵpipeBind3(index: number, slotOffset: number, v1: any, v2: any, v3: any): any;
  13034. /**
  13035. * Invokes a pipe with 4 arguments.
  13036. *
  13037. * This instruction acts as a guard to {@link PipeTransform#transform} invoking
  13038. * the pipe only when an input to the pipe changes.
  13039. *
  13040. * @param index Pipe index where the pipe was stored on creation.
  13041. * @param slotOffset the offset in the reserved slot space
  13042. * @param v1 1st argument to {@link PipeTransform#transform}.
  13043. * @param v2 2nd argument to {@link PipeTransform#transform}.
  13044. * @param v3 3rd argument to {@link PipeTransform#transform}.
  13045. * @param v4 4th argument to {@link PipeTransform#transform}.
  13046. *
  13047. * @codeGenApi
  13048. */
  13049. export declare function ɵɵpipeBind4(index: number, slotOffset: number, v1: any, v2: any, v3: any, v4: any): any;
  13050. /**
  13051. * Invokes a pipe with variable number of arguments.
  13052. *
  13053. * This instruction acts as a guard to {@link PipeTransform#transform} invoking
  13054. * the pipe only when an input to the pipe changes.
  13055. *
  13056. * @param index Pipe index where the pipe was stored on creation.
  13057. * @param slotOffset the offset in the reserved slot space
  13058. * @param values Array of arguments to pass to {@link PipeTransform#transform} method.
  13059. *
  13060. * @codeGenApi
  13061. */
  13062. export declare function ɵɵpipeBindV(index: number, slotOffset: number, values: [any, ...any[]]): any;
  13063. /**
  13064. * @publicApi
  13065. */
  13066. export declare type ɵɵPipeDeclaration<T, Name extends string, IsStandalone extends boolean = false> = unknown;
  13067. /**
  13068. * Inserts previously re-distributed projected nodes. This instruction must be preceded by a call
  13069. * to the projectionDef instruction.
  13070. *
  13071. * @param nodeIndex
  13072. * @param selectorIndex:
  13073. * - 0 when the selector is `*` (or unspecified as this is the default value),
  13074. * - 1 based index of the selector from the {@link projectionDef}
  13075. *
  13076. * @codeGenApi
  13077. */
  13078. export declare function ɵɵprojection(nodeIndex: number, selectorIndex?: number, attrs?: TAttributes): void;
  13079. /**
  13080. * Instruction to distribute projectable nodes among <ng-content> occurrences in a given template.
  13081. * It takes all the selectors from the entire component's template and decides where
  13082. * each projected node belongs (it re-distributes nodes among "buckets" where each "bucket" is
  13083. * backed by a selector).
  13084. *
  13085. * This function requires CSS selectors to be provided in 2 forms: parsed (by a compiler) and text,
  13086. * un-parsed form.
  13087. *
  13088. * The parsed form is needed for efficient matching of a node against a given CSS selector.
  13089. * The un-parsed, textual form is needed for support of the ngProjectAs attribute.
  13090. *
  13091. * Having a CSS selector in 2 different formats is not ideal, but alternatives have even more
  13092. * drawbacks:
  13093. * - having only a textual form would require runtime parsing of CSS selectors;
  13094. * - we can't have only a parsed as we can't re-construct textual form from it (as entered by a
  13095. * template author).
  13096. *
  13097. * @param projectionSlots? A collection of projection slots. A projection slot can be based
  13098. * on a parsed CSS selectors or set to the wildcard selector ("*") in order to match
  13099. * all nodes which do not match any selector. If not specified, a single wildcard
  13100. * selector projection slot will be defined.
  13101. *
  13102. * @codeGenApi
  13103. */
  13104. export declare function ɵɵprojectionDef(projectionSlots?: ProjectionSlots): void;
  13105. /**
  13106. * Update a property on a selected element.
  13107. *
  13108. * Operates on the element selected by index via the {@link select} instruction.
  13109. *
  13110. * If the property name also exists as an input property on one of the element's directives,
  13111. * the component property will be set instead of the element property. This check must
  13112. * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled
  13113. *
  13114. * @param propName Name of property. Because it is going to DOM, this is not subject to
  13115. * renaming as part of minification.
  13116. * @param value New value to write.
  13117. * @param sanitizer An optional function used to sanitize the value.
  13118. * @returns This function returns itself so that it may be chained
  13119. * (e.g. `property('name', ctx.name)('title', ctx.title)`)
  13120. *
  13121. * @codeGenApi
  13122. */
  13123. export declare function ɵɵproperty<T>(propName: string, value: T, sanitizer?: SanitizerFn | null): typeof ɵɵproperty;
  13124. /**
  13125. *
  13126. * Update an interpolated property on an element with a lone bound value
  13127. *
  13128. * Used when the value passed to a property has 1 interpolated value in it, an no additional text
  13129. * surrounds that interpolated value:
  13130. *
  13131. * ```html
  13132. * <div title="{{v0}}"></div>
  13133. * ```
  13134. *
  13135. * Its compiled representation is::
  13136. *
  13137. * ```ts
  13138. * ɵɵpropertyInterpolate('title', v0);
  13139. * ```
  13140. *
  13141. * If the property name also exists as an input property on one of the element's directives,
  13142. * the component property will be set instead of the element property. This check must
  13143. * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
  13144. *
  13145. * @param propName The name of the property to update
  13146. * @param prefix Static value used for concatenation only.
  13147. * @param v0 Value checked for change.
  13148. * @param suffix Static value used for concatenation only.
  13149. * @param sanitizer An optional sanitizer function
  13150. * @returns itself, so that it may be chained.
  13151. * @codeGenApi
  13152. */
  13153. export declare function ɵɵpropertyInterpolate(propName: string, v0: any, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate;
  13154. /**
  13155. *
  13156. * Update an interpolated property on an element with single bound value surrounded by text.
  13157. *
  13158. * Used when the value passed to a property has 1 interpolated value in it:
  13159. *
  13160. * ```html
  13161. * <div title="prefix{{v0}}suffix"></div>
  13162. * ```
  13163. *
  13164. * Its compiled representation is::
  13165. *
  13166. * ```ts
  13167. * ɵɵpropertyInterpolate1('title', 'prefix', v0, 'suffix');
  13168. * ```
  13169. *
  13170. * If the property name also exists as an input property on one of the element's directives,
  13171. * the component property will be set instead of the element property. This check must
  13172. * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
  13173. *
  13174. * @param propName The name of the property to update
  13175. * @param prefix Static value used for concatenation only.
  13176. * @param v0 Value checked for change.
  13177. * @param suffix Static value used for concatenation only.
  13178. * @param sanitizer An optional sanitizer function
  13179. * @returns itself, so that it may be chained.
  13180. * @codeGenApi
  13181. */
  13182. export declare function ɵɵpropertyInterpolate1(propName: string, prefix: string, v0: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate1;
  13183. /**
  13184. *
  13185. * Update an interpolated property on an element with 2 bound values surrounded by text.
  13186. *
  13187. * Used when the value passed to a property has 2 interpolated values in it:
  13188. *
  13189. * ```html
  13190. * <div title="prefix{{v0}}-{{v1}}suffix"></div>
  13191. * ```
  13192. *
  13193. * Its compiled representation is::
  13194. *
  13195. * ```ts
  13196. * ɵɵpropertyInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');
  13197. * ```
  13198. *
  13199. * If the property name also exists as an input property on one of the element's directives,
  13200. * the component property will be set instead of the element property. This check must
  13201. * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
  13202. *
  13203. * @param propName The name of the property to update
  13204. * @param prefix Static value used for concatenation only.
  13205. * @param v0 Value checked for change.
  13206. * @param i0 Static value used for concatenation only.
  13207. * @param v1 Value checked for change.
  13208. * @param suffix Static value used for concatenation only.
  13209. * @param sanitizer An optional sanitizer function
  13210. * @returns itself, so that it may be chained.
  13211. * @codeGenApi
  13212. */
  13213. export declare function ɵɵpropertyInterpolate2(propName: string, prefix: string, v0: any, i0: string, v1: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate2;
  13214. /**
  13215. *
  13216. * Update an interpolated property on an element with 3 bound values surrounded by text.
  13217. *
  13218. * Used when the value passed to a property has 3 interpolated values in it:
  13219. *
  13220. * ```html
  13221. * <div title="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>
  13222. * ```
  13223. *
  13224. * Its compiled representation is::
  13225. *
  13226. * ```ts
  13227. * ɵɵpropertyInterpolate3(
  13228. * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');
  13229. * ```
  13230. *
  13231. * If the property name also exists as an input property on one of the element's directives,
  13232. * the component property will be set instead of the element property. This check must
  13233. * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
  13234. *
  13235. * @param propName The name of the property to update
  13236. * @param prefix Static value used for concatenation only.
  13237. * @param v0 Value checked for change.
  13238. * @param i0 Static value used for concatenation only.
  13239. * @param v1 Value checked for change.
  13240. * @param i1 Static value used for concatenation only.
  13241. * @param v2 Value checked for change.
  13242. * @param suffix Static value used for concatenation only.
  13243. * @param sanitizer An optional sanitizer function
  13244. * @returns itself, so that it may be chained.
  13245. * @codeGenApi
  13246. */
  13247. export declare function ɵɵpropertyInterpolate3(propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate3;
  13248. /**
  13249. *
  13250. * Update an interpolated property on an element with 4 bound values surrounded by text.
  13251. *
  13252. * Used when the value passed to a property has 4 interpolated values in it:
  13253. *
  13254. * ```html
  13255. * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>
  13256. * ```
  13257. *
  13258. * Its compiled representation is::
  13259. *
  13260. * ```ts
  13261. * ɵɵpropertyInterpolate4(
  13262. * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
  13263. * ```
  13264. *
  13265. * If the property name also exists as an input property on one of the element's directives,
  13266. * the component property will be set instead of the element property. This check must
  13267. * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
  13268. *
  13269. * @param propName The name of the property to update
  13270. * @param prefix Static value used for concatenation only.
  13271. * @param v0 Value checked for change.
  13272. * @param i0 Static value used for concatenation only.
  13273. * @param v1 Value checked for change.
  13274. * @param i1 Static value used for concatenation only.
  13275. * @param v2 Value checked for change.
  13276. * @param i2 Static value used for concatenation only.
  13277. * @param v3 Value checked for change.
  13278. * @param suffix Static value used for concatenation only.
  13279. * @param sanitizer An optional sanitizer function
  13280. * @returns itself, so that it may be chained.
  13281. * @codeGenApi
  13282. */
  13283. export declare function ɵɵpropertyInterpolate4(propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate4;
  13284. /**
  13285. *
  13286. * Update an interpolated property on an element with 5 bound values surrounded by text.
  13287. *
  13288. * Used when the value passed to a property has 5 interpolated values in it:
  13289. *
  13290. * ```html
  13291. * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>
  13292. * ```
  13293. *
  13294. * Its compiled representation is::
  13295. *
  13296. * ```ts
  13297. * ɵɵpropertyInterpolate5(
  13298. * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
  13299. * ```
  13300. *
  13301. * If the property name also exists as an input property on one of the element's directives,
  13302. * the component property will be set instead of the element property. This check must
  13303. * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
  13304. *
  13305. * @param propName The name of the property to update
  13306. * @param prefix Static value used for concatenation only.
  13307. * @param v0 Value checked for change.
  13308. * @param i0 Static value used for concatenation only.
  13309. * @param v1 Value checked for change.
  13310. * @param i1 Static value used for concatenation only.
  13311. * @param v2 Value checked for change.
  13312. * @param i2 Static value used for concatenation only.
  13313. * @param v3 Value checked for change.
  13314. * @param i3 Static value used for concatenation only.
  13315. * @param v4 Value checked for change.
  13316. * @param suffix Static value used for concatenation only.
  13317. * @param sanitizer An optional sanitizer function
  13318. * @returns itself, so that it may be chained.
  13319. * @codeGenApi
  13320. */
  13321. export declare function ɵɵpropertyInterpolate5(propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate5;
  13322. /**
  13323. *
  13324. * Update an interpolated property on an element with 6 bound values surrounded by text.
  13325. *
  13326. * Used when the value passed to a property has 6 interpolated values in it:
  13327. *
  13328. * ```html
  13329. * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>
  13330. * ```
  13331. *
  13332. * Its compiled representation is::
  13333. *
  13334. * ```ts
  13335. * ɵɵpropertyInterpolate6(
  13336. * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
  13337. * ```
  13338. *
  13339. * If the property name also exists as an input property on one of the element's directives,
  13340. * the component property will be set instead of the element property. This check must
  13341. * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
  13342. *
  13343. * @param propName The name of the property to update
  13344. * @param prefix Static value used for concatenation only.
  13345. * @param v0 Value checked for change.
  13346. * @param i0 Static value used for concatenation only.
  13347. * @param v1 Value checked for change.
  13348. * @param i1 Static value used for concatenation only.
  13349. * @param v2 Value checked for change.
  13350. * @param i2 Static value used for concatenation only.
  13351. * @param v3 Value checked for change.
  13352. * @param i3 Static value used for concatenation only.
  13353. * @param v4 Value checked for change.
  13354. * @param i4 Static value used for concatenation only.
  13355. * @param v5 Value checked for change.
  13356. * @param suffix Static value used for concatenation only.
  13357. * @param sanitizer An optional sanitizer function
  13358. * @returns itself, so that it may be chained.
  13359. * @codeGenApi
  13360. */
  13361. export declare function ɵɵpropertyInterpolate6(propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate6;
  13362. /**
  13363. *
  13364. * Update an interpolated property on an element with 7 bound values surrounded by text.
  13365. *
  13366. * Used when the value passed to a property has 7 interpolated values in it:
  13367. *
  13368. * ```html
  13369. * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>
  13370. * ```
  13371. *
  13372. * Its compiled representation is::
  13373. *
  13374. * ```ts
  13375. * ɵɵpropertyInterpolate7(
  13376. * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
  13377. * ```
  13378. *
  13379. * If the property name also exists as an input property on one of the element's directives,
  13380. * the component property will be set instead of the element property. This check must
  13381. * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
  13382. *
  13383. * @param propName The name of the property to update
  13384. * @param prefix Static value used for concatenation only.
  13385. * @param v0 Value checked for change.
  13386. * @param i0 Static value used for concatenation only.
  13387. * @param v1 Value checked for change.
  13388. * @param i1 Static value used for concatenation only.
  13389. * @param v2 Value checked for change.
  13390. * @param i2 Static value used for concatenation only.
  13391. * @param v3 Value checked for change.
  13392. * @param i3 Static value used for concatenation only.
  13393. * @param v4 Value checked for change.
  13394. * @param i4 Static value used for concatenation only.
  13395. * @param v5 Value checked for change.
  13396. * @param i5 Static value used for concatenation only.
  13397. * @param v6 Value checked for change.
  13398. * @param suffix Static value used for concatenation only.
  13399. * @param sanitizer An optional sanitizer function
  13400. * @returns itself, so that it may be chained.
  13401. * @codeGenApi
  13402. */
  13403. export declare function ɵɵpropertyInterpolate7(propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate7;
  13404. /**
  13405. *
  13406. * Update an interpolated property on an element with 8 bound values surrounded by text.
  13407. *
  13408. * Used when the value passed to a property has 8 interpolated values in it:
  13409. *
  13410. * ```html
  13411. * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>
  13412. * ```
  13413. *
  13414. * Its compiled representation is::
  13415. *
  13416. * ```ts
  13417. * ɵɵpropertyInterpolate8(
  13418. * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
  13419. * ```
  13420. *
  13421. * If the property name also exists as an input property on one of the element's directives,
  13422. * the component property will be set instead of the element property. This check must
  13423. * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
  13424. *
  13425. * @param propName The name of the property to update
  13426. * @param prefix Static value used for concatenation only.
  13427. * @param v0 Value checked for change.
  13428. * @param i0 Static value used for concatenation only.
  13429. * @param v1 Value checked for change.
  13430. * @param i1 Static value used for concatenation only.
  13431. * @param v2 Value checked for change.
  13432. * @param i2 Static value used for concatenation only.
  13433. * @param v3 Value checked for change.
  13434. * @param i3 Static value used for concatenation only.
  13435. * @param v4 Value checked for change.
  13436. * @param i4 Static value used for concatenation only.
  13437. * @param v5 Value checked for change.
  13438. * @param i5 Static value used for concatenation only.
  13439. * @param v6 Value checked for change.
  13440. * @param i6 Static value used for concatenation only.
  13441. * @param v7 Value checked for change.
  13442. * @param suffix Static value used for concatenation only.
  13443. * @param sanitizer An optional sanitizer function
  13444. * @returns itself, so that it may be chained.
  13445. * @codeGenApi
  13446. */
  13447. export declare function ɵɵpropertyInterpolate8(propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate8;
  13448. /**
  13449. * Update an interpolated property on an element with 9 or more bound values surrounded by text.
  13450. *
  13451. * Used when the number of interpolated values exceeds 8.
  13452. *
  13453. * ```html
  13454. * <div
  13455. * title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"></div>
  13456. * ```
  13457. *
  13458. * Its compiled representation is::
  13459. *
  13460. * ```ts
  13461. * ɵɵpropertyInterpolateV(
  13462. * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
  13463. * 'suffix']);
  13464. * ```
  13465. *
  13466. * If the property name also exists as an input property on one of the element's directives,
  13467. * the component property will be set instead of the element property. This check must
  13468. * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
  13469. *
  13470. * @param propName The name of the property to update.
  13471. * @param values The collection of values and the strings in between those values, beginning with a
  13472. * string prefix and ending with a string suffix.
  13473. * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
  13474. * @param sanitizer An optional sanitizer function
  13475. * @returns itself, so that it may be chained.
  13476. * @codeGenApi
  13477. */
  13478. export declare function ɵɵpropertyInterpolateV(propName: string, values: any[], sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolateV;
  13479. /**
  13480. * This feature resolves the providers of a directive (or component),
  13481. * and publish them into the DI system, making it visible to others for injection.
  13482. *
  13483. * For example:
  13484. * ```ts
  13485. * class ComponentWithProviders {
  13486. * constructor(private greeter: GreeterDE) {}
  13487. *
  13488. * static ɵcmp = defineComponent({
  13489. * type: ComponentWithProviders,
  13490. * selectors: [['component-with-providers']],
  13491. * factory: () => new ComponentWithProviders(directiveInject(GreeterDE as any)),
  13492. * decls: 1,
  13493. * vars: 1,
  13494. * template: function(fs: RenderFlags, ctx: ComponentWithProviders) {
  13495. * if (fs & RenderFlags.Create) {
  13496. * ɵɵtext(0);
  13497. * }
  13498. * if (fs & RenderFlags.Update) {
  13499. * ɵɵtextInterpolate(ctx.greeter.greet());
  13500. * }
  13501. * },
  13502. * features: [ɵɵProvidersFeature([GreeterDE])]
  13503. * });
  13504. * }
  13505. * ```
  13506. *
  13507. * @param definition
  13508. *
  13509. * @codeGenApi
  13510. */
  13511. export declare function ɵɵProvidersFeature<T>(providers: Provider[], viewProviders?: Provider[]): (definition: ɵDirectiveDef<T>) => void;
  13512. /**
  13513. * Bindings for pure functions are stored after regular bindings.
  13514. *
  13515. * |-------decls------|---------vars---------| |----- hostVars (dir1) ------|
  13516. * ------------------------------------------------------------------------------------------
  13517. * | nodes/refs/pipes | bindings | fn slots | injector | dir1 | host bindings | host slots |
  13518. * ------------------------------------------------------------------------------------------
  13519. * ^ ^
  13520. * TView.bindingStartIndex TView.expandoStartIndex
  13521. *
  13522. * Pure function instructions are given an offset from the binding root. Adding the offset to the
  13523. * binding root gives the first index where the bindings are stored. In component views, the binding
  13524. * root is the bindingStartIndex. In host bindings, the binding root is the expandoStartIndex +
  13525. * any directive instances + any hostVars in directives evaluated before it.
  13526. *
  13527. * See VIEW_DATA.md for more information about host binding resolution.
  13528. */
  13529. /**
  13530. * If the value hasn't been saved, calls the pure function to store and return the
  13531. * value. If it has been saved, returns the saved value.
  13532. *
  13533. * @param slotOffset the offset from binding root to the reserved slot
  13534. * @param pureFn Function that returns a value
  13535. * @param thisArg Optional calling context of pureFn
  13536. * @returns value
  13537. *
  13538. * @codeGenApi
  13539. */
  13540. export declare function ɵɵpureFunction0<T>(slotOffset: number, pureFn: () => T, thisArg?: any): T;
  13541. /**
  13542. * If the value of the provided exp has changed, calls the pure function to return
  13543. * an updated value. Or if the value has not changed, returns cached value.
  13544. *
  13545. * @param slotOffset the offset from binding root to the reserved slot
  13546. * @param pureFn Function that returns an updated value
  13547. * @param exp Updated expression value
  13548. * @param thisArg Optional calling context of pureFn
  13549. * @returns Updated or cached value
  13550. *
  13551. * @codeGenApi
  13552. */
  13553. export declare function ɵɵpureFunction1(slotOffset: number, pureFn: (v: any) => any, exp: any, thisArg?: any): any;
  13554. /**
  13555. * If the value of any provided exp has changed, calls the pure function to return
  13556. * an updated value. Or if no values have changed, returns cached value.
  13557. *
  13558. * @param slotOffset the offset from binding root to the reserved slot
  13559. * @param pureFn
  13560. * @param exp1
  13561. * @param exp2
  13562. * @param thisArg Optional calling context of pureFn
  13563. * @returns Updated or cached value
  13564. *
  13565. * @codeGenApi
  13566. */
  13567. export declare function ɵɵpureFunction2(slotOffset: number, pureFn: (v1: any, v2: any) => any, exp1: any, exp2: any, thisArg?: any): any;
  13568. /**
  13569. * If the value of any provided exp has changed, calls the pure function to return
  13570. * an updated value. Or if no values have changed, returns cached value.
  13571. *
  13572. * @param slotOffset the offset from binding root to the reserved slot
  13573. * @param pureFn
  13574. * @param exp1
  13575. * @param exp2
  13576. * @param exp3
  13577. * @param thisArg Optional calling context of pureFn
  13578. * @returns Updated or cached value
  13579. *
  13580. * @codeGenApi
  13581. */
  13582. export declare function ɵɵpureFunction3(slotOffset: number, pureFn: (v1: any, v2: any, v3: any) => any, exp1: any, exp2: any, exp3: any, thisArg?: any): any;
  13583. /**
  13584. * If the value of any provided exp has changed, calls the pure function to return
  13585. * an updated value. Or if no values have changed, returns cached value.
  13586. *
  13587. * @param slotOffset the offset from binding root to the reserved slot
  13588. * @param pureFn
  13589. * @param exp1
  13590. * @param exp2
  13591. * @param exp3
  13592. * @param exp4
  13593. * @param thisArg Optional calling context of pureFn
  13594. * @returns Updated or cached value
  13595. *
  13596. * @codeGenApi
  13597. */
  13598. export declare function ɵɵpureFunction4(slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any) => any, exp1: any, exp2: any, exp3: any, exp4: any, thisArg?: any): any;
  13599. /**
  13600. * If the value of any provided exp has changed, calls the pure function to return
  13601. * an updated value. Or if no values have changed, returns cached value.
  13602. *
  13603. * @param slotOffset the offset from binding root to the reserved slot
  13604. * @param pureFn
  13605. * @param exp1
  13606. * @param exp2
  13607. * @param exp3
  13608. * @param exp4
  13609. * @param exp5
  13610. * @param thisArg Optional calling context of pureFn
  13611. * @returns Updated or cached value
  13612. *
  13613. * @codeGenApi
  13614. */
  13615. export declare function ɵɵpureFunction5(slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any) => any, exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, thisArg?: any): any;
  13616. /**
  13617. * If the value of any provided exp has changed, calls the pure function to return
  13618. * an updated value. Or if no values have changed, returns cached value.
  13619. *
  13620. * @param slotOffset the offset from binding root to the reserved slot
  13621. * @param pureFn
  13622. * @param exp1
  13623. * @param exp2
  13624. * @param exp3
  13625. * @param exp4
  13626. * @param exp5
  13627. * @param exp6
  13628. * @param thisArg Optional calling context of pureFn
  13629. * @returns Updated or cached value
  13630. *
  13631. * @codeGenApi
  13632. */
  13633. export declare function ɵɵpureFunction6(slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any) => any, exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, thisArg?: any): any;
  13634. /**
  13635. * If the value of any provided exp has changed, calls the pure function to return
  13636. * an updated value. Or if no values have changed, returns cached value.
  13637. *
  13638. * @param slotOffset the offset from binding root to the reserved slot
  13639. * @param pureFn
  13640. * @param exp1
  13641. * @param exp2
  13642. * @param exp3
  13643. * @param exp4
  13644. * @param exp5
  13645. * @param exp6
  13646. * @param exp7
  13647. * @param thisArg Optional calling context of pureFn
  13648. * @returns Updated or cached value
  13649. *
  13650. * @codeGenApi
  13651. */
  13652. export declare function ɵɵpureFunction7(slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any, v7: any) => any, exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, exp7: any, thisArg?: any): any;
  13653. /**
  13654. * If the value of any provided exp has changed, calls the pure function to return
  13655. * an updated value. Or if no values have changed, returns cached value.
  13656. *
  13657. * @param slotOffset the offset from binding root to the reserved slot
  13658. * @param pureFn
  13659. * @param exp1
  13660. * @param exp2
  13661. * @param exp3
  13662. * @param exp4
  13663. * @param exp5
  13664. * @param exp6
  13665. * @param exp7
  13666. * @param exp8
  13667. * @param thisArg Optional calling context of pureFn
  13668. * @returns Updated or cached value
  13669. *
  13670. * @codeGenApi
  13671. */
  13672. export declare function ɵɵpureFunction8(slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any, v7: any, v8: any) => any, exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, exp7: any, exp8: any, thisArg?: any): any;
  13673. /**
  13674. * pureFunction instruction that can support any number of bindings.
  13675. *
  13676. * If the value of any provided exp has changed, calls the pure function to return
  13677. * an updated value. Or if no values have changed, returns cached value.
  13678. *
  13679. * @param slotOffset the offset from binding root to the reserved slot
  13680. * @param pureFn A pure function that takes binding values and builds an object or array
  13681. * containing those values.
  13682. * @param exps An array of binding values
  13683. * @param thisArg Optional calling context of pureFn
  13684. * @returns Updated or cached value
  13685. *
  13686. * @codeGenApi
  13687. */
  13688. export declare function ɵɵpureFunctionV(slotOffset: number, pureFn: (...v: any[]) => any, exps: any[], thisArg?: any): any;
  13689. /**
  13690. * Refreshes a query by combining matches from all active views and removing matches from deleted
  13691. * views.
  13692. *
  13693. * @returns `true` if a query got dirty during change detection or if this is a static query
  13694. * resolving in creation mode, `false` otherwise.
  13695. *
  13696. * @codeGenApi
  13697. */
  13698. export declare function ɵɵqueryRefresh(queryList: QueryList<any>): boolean;
  13699. /**
  13700. * Retrieves a local reference from the current contextViewData.
  13701. *
  13702. * If the reference to retrieve is in a parent view, this instruction is used in conjunction
  13703. * with a nextContext() call, which walks up the tree and updates the contextViewData instance.
  13704. *
  13705. * @param index The index of the local ref in contextViewData.
  13706. *
  13707. * @codeGenApi
  13708. */
  13709. export declare function ɵɵreference<T>(index: number): T;
  13710. /**
  13711. * Adds the given NgModule type to Angular's NgModule registry.
  13712. *
  13713. * This is generated as a side-effect of NgModule compilation. Note that the `id` is passed in
  13714. * explicitly and not read from the NgModule definition. This is for two reasons: it avoids a
  13715. * megamorphic read, and in JIT there's a chicken-and-egg problem where the NgModule may not be
  13716. * fully resolved when it's registered.
  13717. *
  13718. * @codeGenApi
  13719. */
  13720. export declare function ɵɵregisterNgModuleType(ngModuleType: ɵNgModuleType, id: string): void;
  13721. /**
  13722. * Clears the view set in `ɵɵrestoreView` from memory. Returns the passed in
  13723. * value so that it can be used as a return value of an instruction.
  13724. *
  13725. * @codeGenApi
  13726. */
  13727. export declare function ɵɵresetView<T>(value?: T): T | undefined;
  13728. /**
  13729. *
  13730. * @codeGenApi
  13731. */
  13732. export declare function ɵɵresolveBody(element: RElement & {
  13733. ownerDocument: Document;
  13734. }): HTMLElement;
  13735. /**
  13736. *
  13737. * @codeGenApi
  13738. */
  13739. export declare function ɵɵresolveDocument(element: RElement & {
  13740. ownerDocument: Document;
  13741. }): Document;
  13742. /**
  13743. *
  13744. * @codeGenApi
  13745. */
  13746. export declare function ɵɵresolveWindow(element: RElement & {
  13747. ownerDocument: Document;
  13748. }): (Window & typeof globalThis) | null;
  13749. /**
  13750. * Restores `contextViewData` to the given OpaqueViewState instance.
  13751. *
  13752. * Used in conjunction with the getCurrentView() instruction to save a snapshot
  13753. * of the current view and restore it when listeners are invoked. This allows
  13754. * walking the declaration view tree in listeners to get vars from parent views.
  13755. *
  13756. * @param viewToRestore The OpaqueViewState instance to restore.
  13757. * @returns Context of the restored OpaqueViewState instance.
  13758. *
  13759. * @codeGenApi
  13760. */
  13761. export declare function ɵɵrestoreView<T = any>(viewToRestore: OpaqueViewState): T;
  13762. /**
  13763. * An `html` sanitizer which converts untrusted `html` **string** into trusted string by removing
  13764. * dangerous content.
  13765. *
  13766. * This method parses the `html` and locates potentially dangerous content (such as urls and
  13767. * javascript) and removes it.
  13768. *
  13769. * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustHtml}.
  13770. *
  13771. * @param unsafeHtml untrusted `html`, typically from the user.
  13772. * @returns `html` string which is safe to display to user, because all of the dangerous javascript
  13773. * and urls have been removed.
  13774. *
  13775. * @codeGenApi
  13776. */
  13777. export declare function ɵɵsanitizeHtml(unsafeHtml: any): TrustedHTML | string;
  13778. /**
  13779. * A `url` sanitizer which only lets trusted `url`s through.
  13780. *
  13781. * This passes only `url`s marked trusted by calling {@link bypassSanitizationTrustResourceUrl}.
  13782. *
  13783. * @param unsafeResourceUrl untrusted `url`, typically from the user.
  13784. * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because
  13785. * only trusted `url`s have been allowed to pass.
  13786. *
  13787. * @codeGenApi
  13788. */
  13789. export declare function ɵɵsanitizeResourceUrl(unsafeResourceUrl: any): TrustedScriptURL | string;
  13790. /**
  13791. * A `script` sanitizer which only lets trusted javascript through.
  13792. *
  13793. * This passes only `script`s marked trusted by calling {@link
  13794. * bypassSanitizationTrustScript}.
  13795. *
  13796. * @param unsafeScript untrusted `script`, typically from the user.
  13797. * @returns `url` string which is safe to bind to the `<script>` element such as `<img src>`,
  13798. * because only trusted `scripts` have been allowed to pass.
  13799. *
  13800. * @codeGenApi
  13801. */
  13802. export declare function ɵɵsanitizeScript(unsafeScript: any): TrustedScript | string;
  13803. /**
  13804. * A `style` sanitizer which converts untrusted `style` **string** into trusted string by removing
  13805. * dangerous content.
  13806. *
  13807. * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustStyle}.
  13808. *
  13809. * @param unsafeStyle untrusted `style`, typically from the user.
  13810. * @returns `style` string which is safe to bind to the `style` properties.
  13811. *
  13812. * @codeGenApi
  13813. */
  13814. export declare function ɵɵsanitizeStyle(unsafeStyle: any): string;
  13815. /**
  13816. * A `url` sanitizer which converts untrusted `url` **string** into trusted string by removing
  13817. * dangerous
  13818. * content.
  13819. *
  13820. * This method parses the `url` and locates potentially dangerous content (such as javascript) and
  13821. * removes it.
  13822. *
  13823. * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustUrl}.
  13824. *
  13825. * @param unsafeUrl untrusted `url`, typically from the user.
  13826. * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because
  13827. * all of the dangerous javascript has been removed.
  13828. *
  13829. * @codeGenApi
  13830. */
  13831. export declare function ɵɵsanitizeUrl(unsafeUrl: any): string;
  13832. /**
  13833. * Sanitizes URL, selecting sanitizer function based on tag and property names.
  13834. *
  13835. * This function is used in case we can't define security context at compile time, when only prop
  13836. * name is available. This happens when we generate host bindings for Directives/Components. The
  13837. * host element is unknown at compile time, so we defer calculation of specific sanitizer to
  13838. * runtime.
  13839. *
  13840. * @param unsafeUrl untrusted `url`, typically from the user.
  13841. * @param tag target element tag name.
  13842. * @param prop name of the property that contains the value.
  13843. * @returns `url` string which is safe to bind.
  13844. *
  13845. * @codeGenApi
  13846. */
  13847. export declare function ɵɵsanitizeUrlOrResourceUrl(unsafeUrl: any, tag: string, prop: string): any;
  13848. /**
  13849. * Generated next to NgModules to monkey-patch directive and pipe references onto a component's
  13850. * definition, when generating a direct reference in the component file would otherwise create an
  13851. * import cycle.
  13852. *
  13853. * See [this explanation](https://hackmd.io/Odw80D0pR6yfsOjg_7XCJg?view) for more details.
  13854. *
  13855. * @codeGenApi
  13856. */
  13857. export declare function ɵɵsetComponentScope(type: ɵComponentType<any>, directives: Type<any>[] | (() => Type<any>[]), pipes: Type<any>[] | (() => Type<any>[])): void;
  13858. /**
  13859. * Adds the module metadata that is necessary to compute the module's transitive scope to an
  13860. * existing module definition.
  13861. *
  13862. * Scope metadata of modules is not used in production builds, so calls to this function can be
  13863. * marked pure to tree-shake it from the bundle, allowing for all referenced declarations
  13864. * to become eligible for tree-shaking as well.
  13865. *
  13866. * @codeGenApi
  13867. */
  13868. export declare function ɵɵsetNgModuleScope(type: any, scope: NgModuleScopeInfoFromDecorator): unknown;
  13869. /**
  13870. * A feature that acts as a setup code for the {@link StandaloneService}.
  13871. *
  13872. * The most important responsibility of this feature is to expose the "getStandaloneInjector"
  13873. * function (an entry points to a standalone injector creation) on a component definition object. We
  13874. * go through the features infrastructure to make sure that the standalone injector creation logic
  13875. * is tree-shakable and not included in applications that don't use standalone components.
  13876. *
  13877. * @codeGenApi
  13878. */
  13879. export declare function ɵɵStandaloneFeature(definition: ɵComponentDef<unknown>): void;
  13880. /**
  13881. * Update style bindings using an object literal on an element.
  13882. *
  13883. * This instruction is meant to apply styling via the `[style]="exp"` template bindings.
  13884. * When styles are applied to the element they will then be updated with respect to
  13885. * any styles/classes set via `styleProp`. If any styles are set to falsy
  13886. * then they will be removed from the element.
  13887. *
  13888. * Note that the styling instruction will not be applied until `stylingApply` is called.
  13889. *
  13890. * @param styles A key/value style map of the styles that will be applied to the given element.
  13891. * Any missing styles (that have already been applied to the element beforehand) will be
  13892. * removed (unset) from the element's styling.
  13893. *
  13894. * Note that this will apply the provided styleMap value to the host element if this function
  13895. * is called within a host binding.
  13896. *
  13897. * @codeGenApi
  13898. */
  13899. export declare function ɵɵstyleMap(styles: {
  13900. [styleName: string]: any;
  13901. } | string | undefined | null): void;
  13902. /**
  13903. *
  13904. * Update an interpolated style on an element with single bound value surrounded by text.
  13905. *
  13906. * Used when the value passed to a property has 1 interpolated value in it:
  13907. *
  13908. * ```html
  13909. * <div style="key: {{v0}}suffix"></div>
  13910. * ```
  13911. *
  13912. * Its compiled representation is:
  13913. *
  13914. * ```ts
  13915. * ɵɵstyleMapInterpolate1('key: ', v0, 'suffix');
  13916. * ```
  13917. *
  13918. * @param prefix Static value used for concatenation only.
  13919. * @param v0 Value checked for change.
  13920. * @param suffix Static value used for concatenation only.
  13921. * @codeGenApi
  13922. */
  13923. export declare function ɵɵstyleMapInterpolate1(prefix: string, v0: any, suffix: string): void;
  13924. /**
  13925. *
  13926. * Update an interpolated style on an element with 2 bound values surrounded by text.
  13927. *
  13928. * Used when the value passed to a property has 2 interpolated values in it:
  13929. *
  13930. * ```html
  13931. * <div style="key: {{v0}}; key1: {{v1}}suffix"></div>
  13932. * ```
  13933. *
  13934. * Its compiled representation is:
  13935. *
  13936. * ```ts
  13937. * ɵɵstyleMapInterpolate2('key: ', v0, '; key1: ', v1, 'suffix');
  13938. * ```
  13939. *
  13940. * @param prefix Static value used for concatenation only.
  13941. * @param v0 Value checked for change.
  13942. * @param i0 Static value used for concatenation only.
  13943. * @param v1 Value checked for change.
  13944. * @param suffix Static value used for concatenation only.
  13945. * @codeGenApi
  13946. */
  13947. export declare function ɵɵstyleMapInterpolate2(prefix: string, v0: any, i0: string, v1: any, suffix: string): void;
  13948. /**
  13949. *
  13950. * Update an interpolated style on an element with 3 bound values surrounded by text.
  13951. *
  13952. * Used when the value passed to a property has 3 interpolated values in it:
  13953. *
  13954. * ```html
  13955. * <div style="key: {{v0}}; key2: {{v1}}; key2: {{v2}}suffix"></div>
  13956. * ```
  13957. *
  13958. * Its compiled representation is:
  13959. *
  13960. * ```ts
  13961. * ɵɵstyleMapInterpolate3(
  13962. * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, 'suffix');
  13963. * ```
  13964. *
  13965. * @param prefix Static value used for concatenation only.
  13966. * @param v0 Value checked for change.
  13967. * @param i0 Static value used for concatenation only.
  13968. * @param v1 Value checked for change.
  13969. * @param i1 Static value used for concatenation only.
  13970. * @param v2 Value checked for change.
  13971. * @param suffix Static value used for concatenation only.
  13972. * @codeGenApi
  13973. */
  13974. export declare function ɵɵstyleMapInterpolate3(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): void;
  13975. /**
  13976. *
  13977. * Update an interpolated style on an element with 4 bound values surrounded by text.
  13978. *
  13979. * Used when the value passed to a property has 4 interpolated values in it:
  13980. *
  13981. * ```html
  13982. * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}suffix"></div>
  13983. * ```
  13984. *
  13985. * Its compiled representation is:
  13986. *
  13987. * ```ts
  13988. * ɵɵstyleMapInterpolate4(
  13989. * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, 'suffix');
  13990. * ```
  13991. *
  13992. * @param prefix Static value used for concatenation only.
  13993. * @param v0 Value checked for change.
  13994. * @param i0 Static value used for concatenation only.
  13995. * @param v1 Value checked for change.
  13996. * @param i1 Static value used for concatenation only.
  13997. * @param v2 Value checked for change.
  13998. * @param i2 Static value used for concatenation only.
  13999. * @param v3 Value checked for change.
  14000. * @param suffix Static value used for concatenation only.
  14001. * @codeGenApi
  14002. */
  14003. export declare function ɵɵstyleMapInterpolate4(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string): void;
  14004. /**
  14005. *
  14006. * Update an interpolated style on an element with 5 bound values surrounded by text.
  14007. *
  14008. * Used when the value passed to a property has 5 interpolated values in it:
  14009. *
  14010. * ```html
  14011. * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}suffix"></div>
  14012. * ```
  14013. *
  14014. * Its compiled representation is:
  14015. *
  14016. * ```ts
  14017. * ɵɵstyleMapInterpolate5(
  14018. * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, 'suffix');
  14019. * ```
  14020. *
  14021. * @param prefix Static value used for concatenation only.
  14022. * @param v0 Value checked for change.
  14023. * @param i0 Static value used for concatenation only.
  14024. * @param v1 Value checked for change.
  14025. * @param i1 Static value used for concatenation only.
  14026. * @param v2 Value checked for change.
  14027. * @param i2 Static value used for concatenation only.
  14028. * @param v3 Value checked for change.
  14029. * @param i3 Static value used for concatenation only.
  14030. * @param v4 Value checked for change.
  14031. * @param suffix Static value used for concatenation only.
  14032. * @codeGenApi
  14033. */
  14034. export declare function ɵɵstyleMapInterpolate5(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, suffix: string): void;
  14035. /**
  14036. *
  14037. * Update an interpolated style on an element with 6 bound values surrounded by text.
  14038. *
  14039. * Used when the value passed to a property has 6 interpolated values in it:
  14040. *
  14041. * ```html
  14042. * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}};
  14043. * key5: {{v5}}suffix"></div>
  14044. * ```
  14045. *
  14046. * Its compiled representation is:
  14047. *
  14048. * ```ts
  14049. * ɵɵstyleMapInterpolate6(
  14050. * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,
  14051. * 'suffix');
  14052. * ```
  14053. *
  14054. * @param prefix Static value used for concatenation only.
  14055. * @param v0 Value checked for change.
  14056. * @param i0 Static value used for concatenation only.
  14057. * @param v1 Value checked for change.
  14058. * @param i1 Static value used for concatenation only.
  14059. * @param v2 Value checked for change.
  14060. * @param i2 Static value used for concatenation only.
  14061. * @param v3 Value checked for change.
  14062. * @param i3 Static value used for concatenation only.
  14063. * @param v4 Value checked for change.
  14064. * @param i4 Static value used for concatenation only.
  14065. * @param v5 Value checked for change.
  14066. * @param suffix Static value used for concatenation only.
  14067. * @codeGenApi
  14068. */
  14069. export declare function ɵɵstyleMapInterpolate6(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string): void;
  14070. /**
  14071. *
  14072. * Update an interpolated style on an element with 7 bound values surrounded by text.
  14073. *
  14074. * Used when the value passed to a property has 7 interpolated values in it:
  14075. *
  14076. * ```html
  14077. * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};
  14078. * key6: {{v6}}suffix"></div>
  14079. * ```
  14080. *
  14081. * Its compiled representation is:
  14082. *
  14083. * ```ts
  14084. * ɵɵstyleMapInterpolate7(
  14085. * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,
  14086. * '; key6: ', v6, 'suffix');
  14087. * ```
  14088. *
  14089. * @param prefix Static value used for concatenation only.
  14090. * @param v0 Value checked for change.
  14091. * @param i0 Static value used for concatenation only.
  14092. * @param v1 Value checked for change.
  14093. * @param i1 Static value used for concatenation only.
  14094. * @param v2 Value checked for change.
  14095. * @param i2 Static value used for concatenation only.
  14096. * @param v3 Value checked for change.
  14097. * @param i3 Static value used for concatenation only.
  14098. * @param v4 Value checked for change.
  14099. * @param i4 Static value used for concatenation only.
  14100. * @param v5 Value checked for change.
  14101. * @param i5 Static value used for concatenation only.
  14102. * @param v6 Value checked for change.
  14103. * @param suffix Static value used for concatenation only.
  14104. * @codeGenApi
  14105. */
  14106. export declare function ɵɵstyleMapInterpolate7(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string): void;
  14107. /**
  14108. *
  14109. * Update an interpolated style on an element with 8 bound values surrounded by text.
  14110. *
  14111. * Used when the value passed to a property has 8 interpolated values in it:
  14112. *
  14113. * ```html
  14114. * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};
  14115. * key6: {{v6}}; key7: {{v7}}suffix"></div>
  14116. * ```
  14117. *
  14118. * Its compiled representation is:
  14119. *
  14120. * ```ts
  14121. * ɵɵstyleMapInterpolate8(
  14122. * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,
  14123. * '; key6: ', v6, '; key7: ', v7, 'suffix');
  14124. * ```
  14125. *
  14126. * @param prefix Static value used for concatenation only.
  14127. * @param v0 Value checked for change.
  14128. * @param i0 Static value used for concatenation only.
  14129. * @param v1 Value checked for change.
  14130. * @param i1 Static value used for concatenation only.
  14131. * @param v2 Value checked for change.
  14132. * @param i2 Static value used for concatenation only.
  14133. * @param v3 Value checked for change.
  14134. * @param i3 Static value used for concatenation only.
  14135. * @param v4 Value checked for change.
  14136. * @param i4 Static value used for concatenation only.
  14137. * @param v5 Value checked for change.
  14138. * @param i5 Static value used for concatenation only.
  14139. * @param v6 Value checked for change.
  14140. * @param i6 Static value used for concatenation only.
  14141. * @param v7 Value checked for change.
  14142. * @param suffix Static value used for concatenation only.
  14143. * @codeGenApi
  14144. */
  14145. export declare function ɵɵstyleMapInterpolate8(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any, suffix: string): void;
  14146. /**
  14147. * Update an interpolated style on an element with 9 or more bound values surrounded by text.
  14148. *
  14149. * Used when the number of interpolated values exceeds 8.
  14150. *
  14151. * ```html
  14152. * <div
  14153. * class="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};
  14154. * key6: {{v6}}; key7: {{v7}}; key8: {{v8}}; key9: {{v9}}suffix"></div>
  14155. * ```
  14156. *
  14157. * Its compiled representation is:
  14158. *
  14159. * ```ts
  14160. * ɵɵstyleMapInterpolateV(
  14161. * ['key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,
  14162. * '; key6: ', v6, '; key7: ', v7, '; key8: ', v8, '; key9: ', v9, 'suffix']);
  14163. * ```
  14164. *.
  14165. * @param values The collection of values and the strings in-between those values, beginning with
  14166. * a string prefix and ending with a string suffix.
  14167. * (e.g. `['prefix', value0, '; key2: ', value1, '; key2: ', value2, ..., value99, 'suffix']`)
  14168. * @codeGenApi
  14169. */
  14170. export declare function ɵɵstyleMapInterpolateV(values: any[]): void;
  14171. /**
  14172. * Update a style binding on an element with the provided value.
  14173. *
  14174. * If the style value is falsy then it will be removed from the element
  14175. * (or assigned a different value depending if there are any styles placed
  14176. * on the element with `styleMap` or any static styles that are
  14177. * present from when the element was created with `styling`).
  14178. *
  14179. * Note that the styling element is updated as part of `stylingApply`.
  14180. *
  14181. * @param prop A valid CSS property.
  14182. * @param value New value to write (`null` or an empty string to remove).
  14183. * @param suffix Optional suffix. Used with scalar values to add unit such as `px`.
  14184. *
  14185. * Note that this will apply the provided style value to the host element if this function is called
  14186. * within a host binding function.
  14187. *
  14188. * @codeGenApi
  14189. */
  14190. export declare function ɵɵstyleProp(prop: string, value: string | number | ɵSafeValue | undefined | null, suffix?: string | null): typeof ɵɵstyleProp;
  14191. /**
  14192. *
  14193. * Update an interpolated style property on an element with single bound value surrounded by text.
  14194. *
  14195. * Used when the value passed to a property has 1 interpolated value in it:
  14196. *
  14197. * ```html
  14198. * <div style.color="prefix{{v0}}suffix"></div>
  14199. * ```
  14200. *
  14201. * Its compiled representation is:
  14202. *
  14203. * ```ts
  14204. * ɵɵstylePropInterpolate1(0, 'prefix', v0, 'suffix');
  14205. * ```
  14206. *
  14207. * @param styleIndex Index of style to update. This index value refers to the
  14208. * index of the style in the style bindings array that was passed into
  14209. * `styling`.
  14210. * @param prefix Static value used for concatenation only.
  14211. * @param v0 Value checked for change.
  14212. * @param suffix Static value used for concatenation only.
  14213. * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
  14214. * @returns itself, so that it may be chained.
  14215. * @codeGenApi
  14216. */
  14217. export declare function ɵɵstylePropInterpolate1(prop: string, prefix: string, v0: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate1;
  14218. /**
  14219. *
  14220. * Update an interpolated style property on an element with 2 bound values surrounded by text.
  14221. *
  14222. * Used when the value passed to a property has 2 interpolated values in it:
  14223. *
  14224. * ```html
  14225. * <div style.color="prefix{{v0}}-{{v1}}suffix"></div>
  14226. * ```
  14227. *
  14228. * Its compiled representation is:
  14229. *
  14230. * ```ts
  14231. * ɵɵstylePropInterpolate2(0, 'prefix', v0, '-', v1, 'suffix');
  14232. * ```
  14233. *
  14234. * @param styleIndex Index of style to update. This index value refers to the
  14235. * index of the style in the style bindings array that was passed into
  14236. * `styling`.
  14237. * @param prefix Static value used for concatenation only.
  14238. * @param v0 Value checked for change.
  14239. * @param i0 Static value used for concatenation only.
  14240. * @param v1 Value checked for change.
  14241. * @param suffix Static value used for concatenation only.
  14242. * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
  14243. * @returns itself, so that it may be chained.
  14244. * @codeGenApi
  14245. */
  14246. export declare function ɵɵstylePropInterpolate2(prop: string, prefix: string, v0: any, i0: string, v1: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate2;
  14247. /**
  14248. *
  14249. * Update an interpolated style property on an element with 3 bound values surrounded by text.
  14250. *
  14251. * Used when the value passed to a property has 3 interpolated values in it:
  14252. *
  14253. * ```html
  14254. * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>
  14255. * ```
  14256. *
  14257. * Its compiled representation is:
  14258. *
  14259. * ```ts
  14260. * ɵɵstylePropInterpolate3(0, 'prefix', v0, '-', v1, '-', v2, 'suffix');
  14261. * ```
  14262. *
  14263. * @param styleIndex Index of style to update. This index value refers to the
  14264. * index of the style in the style bindings array that was passed into
  14265. * `styling`.
  14266. * @param prefix Static value used for concatenation only.
  14267. * @param v0 Value checked for change.
  14268. * @param i0 Static value used for concatenation only.
  14269. * @param v1 Value checked for change.
  14270. * @param i1 Static value used for concatenation only.
  14271. * @param v2 Value checked for change.
  14272. * @param suffix Static value used for concatenation only.
  14273. * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
  14274. * @returns itself, so that it may be chained.
  14275. * @codeGenApi
  14276. */
  14277. export declare function ɵɵstylePropInterpolate3(prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate3;
  14278. /**
  14279. *
  14280. * Update an interpolated style property on an element with 4 bound values surrounded by text.
  14281. *
  14282. * Used when the value passed to a property has 4 interpolated values in it:
  14283. *
  14284. * ```html
  14285. * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>
  14286. * ```
  14287. *
  14288. * Its compiled representation is:
  14289. *
  14290. * ```ts
  14291. * ɵɵstylePropInterpolate4(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
  14292. * ```
  14293. *
  14294. * @param styleIndex Index of style to update. This index value refers to the
  14295. * index of the style in the style bindings array that was passed into
  14296. * `styling`.
  14297. * @param prefix Static value used for concatenation only.
  14298. * @param v0 Value checked for change.
  14299. * @param i0 Static value used for concatenation only.
  14300. * @param v1 Value checked for change.
  14301. * @param i1 Static value used for concatenation only.
  14302. * @param v2 Value checked for change.
  14303. * @param i2 Static value used for concatenation only.
  14304. * @param v3 Value checked for change.
  14305. * @param suffix Static value used for concatenation only.
  14306. * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
  14307. * @returns itself, so that it may be chained.
  14308. * @codeGenApi
  14309. */
  14310. export declare function ɵɵstylePropInterpolate4(prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate4;
  14311. /**
  14312. *
  14313. * Update an interpolated style property on an element with 5 bound values surrounded by text.
  14314. *
  14315. * Used when the value passed to a property has 5 interpolated values in it:
  14316. *
  14317. * ```html
  14318. * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>
  14319. * ```
  14320. *
  14321. * Its compiled representation is:
  14322. *
  14323. * ```ts
  14324. * ɵɵstylePropInterpolate5(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
  14325. * ```
  14326. *
  14327. * @param styleIndex Index of style to update. This index value refers to the
  14328. * index of the style in the style bindings array that was passed into
  14329. * `styling`.
  14330. * @param prefix Static value used for concatenation only.
  14331. * @param v0 Value checked for change.
  14332. * @param i0 Static value used for concatenation only.
  14333. * @param v1 Value checked for change.
  14334. * @param i1 Static value used for concatenation only.
  14335. * @param v2 Value checked for change.
  14336. * @param i2 Static value used for concatenation only.
  14337. * @param v3 Value checked for change.
  14338. * @param i3 Static value used for concatenation only.
  14339. * @param v4 Value checked for change.
  14340. * @param suffix Static value used for concatenation only.
  14341. * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
  14342. * @returns itself, so that it may be chained.
  14343. * @codeGenApi
  14344. */
  14345. export declare function ɵɵstylePropInterpolate5(prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate5;
  14346. /**
  14347. *
  14348. * Update an interpolated style property on an element with 6 bound values surrounded by text.
  14349. *
  14350. * Used when the value passed to a property has 6 interpolated values in it:
  14351. *
  14352. * ```html
  14353. * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>
  14354. * ```
  14355. *
  14356. * Its compiled representation is:
  14357. *
  14358. * ```ts
  14359. * ɵɵstylePropInterpolate6(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
  14360. * ```
  14361. *
  14362. * @param styleIndex Index of style to update. This index value refers to the
  14363. * index of the style in the style bindings array that was passed into
  14364. * `styling`.
  14365. * @param prefix Static value used for concatenation only.
  14366. * @param v0 Value checked for change.
  14367. * @param i0 Static value used for concatenation only.
  14368. * @param v1 Value checked for change.
  14369. * @param i1 Static value used for concatenation only.
  14370. * @param v2 Value checked for change.
  14371. * @param i2 Static value used for concatenation only.
  14372. * @param v3 Value checked for change.
  14373. * @param i3 Static value used for concatenation only.
  14374. * @param v4 Value checked for change.
  14375. * @param i4 Static value used for concatenation only.
  14376. * @param v5 Value checked for change.
  14377. * @param suffix Static value used for concatenation only.
  14378. * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
  14379. * @returns itself, so that it may be chained.
  14380. * @codeGenApi
  14381. */
  14382. export declare function ɵɵstylePropInterpolate6(prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate6;
  14383. /**
  14384. *
  14385. * Update an interpolated style property on an element with 7 bound values surrounded by text.
  14386. *
  14387. * Used when the value passed to a property has 7 interpolated values in it:
  14388. *
  14389. * ```html
  14390. * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>
  14391. * ```
  14392. *
  14393. * Its compiled representation is:
  14394. *
  14395. * ```ts
  14396. * ɵɵstylePropInterpolate7(
  14397. * 0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
  14398. * ```
  14399. *
  14400. * @param styleIndex Index of style to update. This index value refers to the
  14401. * index of the style in the style bindings array that was passed into
  14402. * `styling`.
  14403. * @param prefix Static value used for concatenation only.
  14404. * @param v0 Value checked for change.
  14405. * @param i0 Static value used for concatenation only.
  14406. * @param v1 Value checked for change.
  14407. * @param i1 Static value used for concatenation only.
  14408. * @param v2 Value checked for change.
  14409. * @param i2 Static value used for concatenation only.
  14410. * @param v3 Value checked for change.
  14411. * @param i3 Static value used for concatenation only.
  14412. * @param v4 Value checked for change.
  14413. * @param i4 Static value used for concatenation only.
  14414. * @param v5 Value checked for change.
  14415. * @param i5 Static value used for concatenation only.
  14416. * @param v6 Value checked for change.
  14417. * @param suffix Static value used for concatenation only.
  14418. * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
  14419. * @returns itself, so that it may be chained.
  14420. * @codeGenApi
  14421. */
  14422. export declare function ɵɵstylePropInterpolate7(prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate7;
  14423. /**
  14424. *
  14425. * Update an interpolated style property on an element with 8 bound values surrounded by text.
  14426. *
  14427. * Used when the value passed to a property has 8 interpolated values in it:
  14428. *
  14429. * ```html
  14430. * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>
  14431. * ```
  14432. *
  14433. * Its compiled representation is:
  14434. *
  14435. * ```ts
  14436. * ɵɵstylePropInterpolate8(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6,
  14437. * '-', v7, 'suffix');
  14438. * ```
  14439. *
  14440. * @param styleIndex Index of style to update. This index value refers to the
  14441. * index of the style in the style bindings array that was passed into
  14442. * `styling`.
  14443. * @param prefix Static value used for concatenation only.
  14444. * @param v0 Value checked for change.
  14445. * @param i0 Static value used for concatenation only.
  14446. * @param v1 Value checked for change.
  14447. * @param i1 Static value used for concatenation only.
  14448. * @param v2 Value checked for change.
  14449. * @param i2 Static value used for concatenation only.
  14450. * @param v3 Value checked for change.
  14451. * @param i3 Static value used for concatenation only.
  14452. * @param v4 Value checked for change.
  14453. * @param i4 Static value used for concatenation only.
  14454. * @param v5 Value checked for change.
  14455. * @param i5 Static value used for concatenation only.
  14456. * @param v6 Value checked for change.
  14457. * @param i6 Static value used for concatenation only.
  14458. * @param v7 Value checked for change.
  14459. * @param suffix Static value used for concatenation only.
  14460. * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
  14461. * @returns itself, so that it may be chained.
  14462. * @codeGenApi
  14463. */
  14464. export declare function ɵɵstylePropInterpolate8(prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate8;
  14465. /**
  14466. * Update an interpolated style property on an element with 9 or more bound values surrounded by
  14467. * text.
  14468. *
  14469. * Used when the number of interpolated values exceeds 8.
  14470. *
  14471. * ```html
  14472. * <div
  14473. * style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix">
  14474. * </div>
  14475. * ```
  14476. *
  14477. * Its compiled representation is:
  14478. *
  14479. * ```ts
  14480. * ɵɵstylePropInterpolateV(
  14481. * 0, ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
  14482. * 'suffix']);
  14483. * ```
  14484. *
  14485. * @param styleIndex Index of style to update. This index value refers to the
  14486. * index of the style in the style bindings array that was passed into
  14487. * `styling`..
  14488. * @param values The collection of values and the strings in-between those values, beginning with
  14489. * a string prefix and ending with a string suffix.
  14490. * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
  14491. * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
  14492. * @returns itself, so that it may be chained.
  14493. * @codeGenApi
  14494. */
  14495. export declare function ɵɵstylePropInterpolateV(prop: string, values: any[], valueSuffix?: string | null): typeof ɵɵstylePropInterpolateV;
  14496. /**
  14497. * Registers a synthetic host listener (e.g. `(@foo.start)`) on a component or directive.
  14498. *
  14499. * This instruction is for compatibility purposes and is designed to ensure that a
  14500. * synthetic host listener (e.g. `@HostListener('@foo.start')`) properly gets rendered
  14501. * in the component's renderer. Normally all host listeners are evaluated with the
  14502. * parent component's renderer, but, in the case of animation @triggers, they need
  14503. * to be evaluated with the sub component's renderer (because that's where the
  14504. * animation triggers are defined).
  14505. *
  14506. * Do not use this instruction as a replacement for `listener`. This instruction
  14507. * only exists to ensure compatibility with the ViewEngine's host binding behavior.
  14508. *
  14509. * @param eventName Name of the event
  14510. * @param listenerFn The function to be called when event emits
  14511. * @param useCapture Whether or not to use capture in event listener
  14512. * @param eventTargetResolver Function that returns global target information in case this listener
  14513. * should be attached to a global object like window, document or body
  14514. *
  14515. * @codeGenApi
  14516. */
  14517. export declare function ɵɵsyntheticHostListener(eventName: string, listenerFn: (e?: any) => any): typeof ɵɵsyntheticHostListener;
  14518. /**
  14519. * Updates a synthetic host binding (e.g. `[@foo]`) on a component or directive.
  14520. *
  14521. * This instruction is for compatibility purposes and is designed to ensure that a
  14522. * synthetic host binding (e.g. `@HostBinding('@foo')`) properly gets rendered in
  14523. * the component's renderer. Normally all host bindings are evaluated with the parent
  14524. * component's renderer, but, in the case of animation @triggers, they need to be
  14525. * evaluated with the sub component's renderer (because that's where the animation
  14526. * triggers are defined).
  14527. *
  14528. * Do not use this instruction as a replacement for `elementProperty`. This instruction
  14529. * only exists to ensure compatibility with the ViewEngine's host binding behavior.
  14530. *
  14531. * @param index The index of the element to update in the data array
  14532. * @param propName Name of property. Because it is going to DOM, this is not subject to
  14533. * renaming as part of minification.
  14534. * @param value New value to write.
  14535. * @param sanitizer An optional function used to sanitize the value.
  14536. *
  14537. * @codeGenApi
  14538. */
  14539. export declare function ɵɵsyntheticHostProperty<T>(propName: string, value: T | ɵNO_CHANGE, sanitizer?: SanitizerFn | null): typeof ɵɵsyntheticHostProperty;
  14540. /**
  14541. * Creates an LContainer for an ng-template (dynamically-inserted view), e.g.
  14542. *
  14543. * <ng-template #foo>
  14544. * <div></div>
  14545. * </ng-template>
  14546. *
  14547. * @param index The index of the container in the data array
  14548. * @param templateFn Inline template
  14549. * @param decls The number of nodes, local refs, and pipes for this template
  14550. * @param vars The number of bindings for this template
  14551. * @param tagName The name of the container element, if applicable
  14552. * @param attrsIndex Index of template attributes in the `consts` array.
  14553. * @param localRefs Index of the local references in the `consts` array.
  14554. * @param localRefExtractor A function which extracts local-refs values from the template.
  14555. * Defaults to the current element associated with the local-ref.
  14556. *
  14557. * @codeGenApi
  14558. */
  14559. export declare function ɵɵtemplate(index: number, templateFn: ComponentTemplate<any> | null, decls: number, vars: number, tagName?: string | null, attrsIndex?: number | null, localRefsIndex?: number | null, localRefExtractor?: LocalRefExtractor): void;
  14560. /**
  14561. * Retrieves `TemplateRef` instance from `Injector` when a local reference is placed on the
  14562. * `<ng-template>` element.
  14563. *
  14564. * @codeGenApi
  14565. */
  14566. export declare function ɵɵtemplateRefExtractor(tNode: TNode, lView: LView): TemplateRef<any> | null;
  14567. /**
  14568. * Create static text node
  14569. *
  14570. * @param index Index of the node in the data array
  14571. * @param value Static string value to write.
  14572. *
  14573. * @codeGenApi
  14574. */
  14575. export declare function ɵɵtext(index: number, value?: string): void;
  14576. /**
  14577. *
  14578. * Update text content with a lone bound value
  14579. *
  14580. * Used when a text node has 1 interpolated value in it, an no additional text
  14581. * surrounds that interpolated value:
  14582. *
  14583. * ```html
  14584. * <div>{{v0}}</div>
  14585. * ```
  14586. *
  14587. * Its compiled representation is:
  14588. *
  14589. * ```ts
  14590. * ɵɵtextInterpolate(v0);
  14591. * ```
  14592. * @returns itself, so that it may be chained.
  14593. * @see textInterpolateV
  14594. * @codeGenApi
  14595. */
  14596. export declare function ɵɵtextInterpolate(v0: any): typeof ɵɵtextInterpolate;
  14597. /**
  14598. *
  14599. * Update text content with single bound value surrounded by other text.
  14600. *
  14601. * Used when a text node has 1 interpolated value in it:
  14602. *
  14603. * ```html
  14604. * <div>prefix{{v0}}suffix</div>
  14605. * ```
  14606. *
  14607. * Its compiled representation is:
  14608. *
  14609. * ```ts
  14610. * ɵɵtextInterpolate1('prefix', v0, 'suffix');
  14611. * ```
  14612. * @returns itself, so that it may be chained.
  14613. * @see textInterpolateV
  14614. * @codeGenApi
  14615. */
  14616. export declare function ɵɵtextInterpolate1(prefix: string, v0: any, suffix: string): typeof ɵɵtextInterpolate1;
  14617. /**
  14618. *
  14619. * Update text content with 2 bound values surrounded by other text.
  14620. *
  14621. * Used when a text node has 2 interpolated values in it:
  14622. *
  14623. * ```html
  14624. * <div>prefix{{v0}}-{{v1}}suffix</div>
  14625. * ```
  14626. *
  14627. * Its compiled representation is:
  14628. *
  14629. * ```ts
  14630. * ɵɵtextInterpolate2('prefix', v0, '-', v1, 'suffix');
  14631. * ```
  14632. * @returns itself, so that it may be chained.
  14633. * @see textInterpolateV
  14634. * @codeGenApi
  14635. */
  14636. export declare function ɵɵtextInterpolate2(prefix: string, v0: any, i0: string, v1: any, suffix: string): typeof ɵɵtextInterpolate2;
  14637. /**
  14638. *
  14639. * Update text content with 3 bound values surrounded by other text.
  14640. *
  14641. * Used when a text node has 3 interpolated values in it:
  14642. *
  14643. * ```html
  14644. * <div>prefix{{v0}}-{{v1}}-{{v2}}suffix</div>
  14645. * ```
  14646. *
  14647. * Its compiled representation is:
  14648. *
  14649. * ```ts
  14650. * ɵɵtextInterpolate3(
  14651. * 'prefix', v0, '-', v1, '-', v2, 'suffix');
  14652. * ```
  14653. * @returns itself, so that it may be chained.
  14654. * @see textInterpolateV
  14655. * @codeGenApi
  14656. */
  14657. export declare function ɵɵtextInterpolate3(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): typeof ɵɵtextInterpolate3;
  14658. /**
  14659. *
  14660. * Update text content with 4 bound values surrounded by other text.
  14661. *
  14662. * Used when a text node has 4 interpolated values in it:
  14663. *
  14664. * ```html
  14665. * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix</div>
  14666. * ```
  14667. *
  14668. * Its compiled representation is:
  14669. *
  14670. * ```ts
  14671. * ɵɵtextInterpolate4(
  14672. * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
  14673. * ```
  14674. * @returns itself, so that it may be chained.
  14675. * @see ɵɵtextInterpolateV
  14676. * @codeGenApi
  14677. */
  14678. export declare function ɵɵtextInterpolate4(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string): typeof ɵɵtextInterpolate4;
  14679. /**
  14680. *
  14681. * Update text content with 5 bound values surrounded by other text.
  14682. *
  14683. * Used when a text node has 5 interpolated values in it:
  14684. *
  14685. * ```html
  14686. * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix</div>
  14687. * ```
  14688. *
  14689. * Its compiled representation is:
  14690. *
  14691. * ```ts
  14692. * ɵɵtextInterpolate5(
  14693. * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
  14694. * ```
  14695. * @returns itself, so that it may be chained.
  14696. * @see textInterpolateV
  14697. * @codeGenApi
  14698. */
  14699. export declare function ɵɵtextInterpolate5(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, suffix: string): typeof ɵɵtextInterpolate5;
  14700. /**
  14701. *
  14702. * Update text content with 6 bound values surrounded by other text.
  14703. *
  14704. * Used when a text node has 6 interpolated values in it:
  14705. *
  14706. * ```html
  14707. * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix</div>
  14708. * ```
  14709. *
  14710. * Its compiled representation is:
  14711. *
  14712. * ```ts
  14713. * ɵɵtextInterpolate6(
  14714. * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
  14715. * ```
  14716. *
  14717. * @param i4 Static value used for concatenation only.
  14718. * @param v5 Value checked for change. @returns itself, so that it may be chained.
  14719. * @see textInterpolateV
  14720. * @codeGenApi
  14721. */
  14722. export declare function ɵɵtextInterpolate6(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string): typeof ɵɵtextInterpolate6;
  14723. /**
  14724. *
  14725. * Update text content with 7 bound values surrounded by other text.
  14726. *
  14727. * Used when a text node has 7 interpolated values in it:
  14728. *
  14729. * ```html
  14730. * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix</div>
  14731. * ```
  14732. *
  14733. * Its compiled representation is:
  14734. *
  14735. * ```ts
  14736. * ɵɵtextInterpolate7(
  14737. * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
  14738. * ```
  14739. * @returns itself, so that it may be chained.
  14740. * @see textInterpolateV
  14741. * @codeGenApi
  14742. */
  14743. export declare function ɵɵtextInterpolate7(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string): typeof ɵɵtextInterpolate7;
  14744. /**
  14745. *
  14746. * Update text content with 8 bound values surrounded by other text.
  14747. *
  14748. * Used when a text node has 8 interpolated values in it:
  14749. *
  14750. * ```html
  14751. * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix</div>
  14752. * ```
  14753. *
  14754. * Its compiled representation is:
  14755. *
  14756. * ```ts
  14757. * ɵɵtextInterpolate8(
  14758. * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
  14759. * ```
  14760. * @returns itself, so that it may be chained.
  14761. * @see textInterpolateV
  14762. * @codeGenApi
  14763. */
  14764. export declare function ɵɵtextInterpolate8(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any, suffix: string): typeof ɵɵtextInterpolate8;
  14765. /**
  14766. * Update text content with 9 or more bound values other surrounded by text.
  14767. *
  14768. * Used when the number of interpolated values exceeds 8.
  14769. *
  14770. * ```html
  14771. * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix</div>
  14772. * ```
  14773. *
  14774. * Its compiled representation is:
  14775. *
  14776. * ```ts
  14777. * ɵɵtextInterpolateV(
  14778. * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
  14779. * 'suffix']);
  14780. * ```
  14781. *.
  14782. * @param values The collection of values and the strings in between those values, beginning with
  14783. * a string prefix and ending with a string suffix.
  14784. * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
  14785. *
  14786. * @returns itself, so that it may be chained.
  14787. * @codeGenApi
  14788. */
  14789. export declare function ɵɵtextInterpolateV(values: any[]): typeof ɵɵtextInterpolateV;
  14790. /**
  14791. * A template tag function for promoting the associated constant literal to a
  14792. * TrustedHTML. Interpolation is explicitly not allowed.
  14793. *
  14794. * @param html constant template literal containing trusted HTML.
  14795. * @returns TrustedHTML wrapping `html`.
  14796. *
  14797. * @security This is a security-sensitive function and should only be used to
  14798. * convert constant values of attributes and properties found in
  14799. * application-provided Angular templates to TrustedHTML.
  14800. *
  14801. * @codeGenApi
  14802. */
  14803. export declare function ɵɵtrustConstantHtml(html: TemplateStringsArray): TrustedHTML | string;
  14804. /**
  14805. * A template tag function for promoting the associated constant literal to a
  14806. * TrustedScriptURL. Interpolation is explicitly not allowed.
  14807. *
  14808. * @param url constant template literal containing a trusted script URL.
  14809. * @returns TrustedScriptURL wrapping `url`.
  14810. *
  14811. * @security This is a security-sensitive function and should only be used to
  14812. * convert constant values of attributes and properties found in
  14813. * application-provided Angular templates to TrustedScriptURL.
  14814. *
  14815. * @codeGenApi
  14816. */
  14817. export declare function ɵɵtrustConstantResourceUrl(url: TemplateStringsArray): TrustedScriptURL | string;
  14818. /**
  14819. * Validation function invoked at runtime for each binding that might potentially
  14820. * represent a security-sensitive attribute of an <iframe>.
  14821. * See `IFRAME_SECURITY_SENSITIVE_ATTRS` in the
  14822. * `packages/compiler/src/schema/dom_security_schema.ts` script for the full list
  14823. * of such attributes.
  14824. *
  14825. * @codeGenApi
  14826. */
  14827. export declare function ɵɵvalidateIframeAttribute(attrValue: any, tagName: string, attrName: string): any;
  14828. /**
  14829. * Creates new QueryList, stores the reference in LView and returns QueryList.
  14830. *
  14831. * @param predicate The type for which the query will search
  14832. * @param flags Flags associated with the query
  14833. * @param read What to save in the query
  14834. *
  14835. * @codeGenApi
  14836. */
  14837. export declare function ɵɵviewQuery<T>(predicate: ProviderToken<unknown> | string[], flags: QueryFlags, read?: any): void;
  14838. export { }