core.d.ts 477 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063
  1. /**
  2. * @license Angular v8.1.0
  3. * (c) 2010-2019 Google LLC. https://angular.io/
  4. * License: MIT
  5. */
  6. import { Observable } from 'rxjs';
  7. import { Subject } from 'rxjs';
  8. import { Subscription } from 'rxjs';
  9. /**
  10. * @description
  11. *
  12. * Represents an abstract class `T`, if applied to a concrete class it would stop being
  13. * instantiatable.
  14. *
  15. * @publicApi
  16. */
  17. export declare interface AbstractType<T> extends Function {
  18. prototype: T;
  19. }
  20. /**
  21. * Below are constants for LContainer indices to help us look up LContainer members
  22. * without having to remember the specific indices.
  23. * Uglify will inline these when minifying so there shouldn't be a cost.
  24. */
  25. declare const ACTIVE_INDEX = 2;
  26. /**
  27. * @description
  28. * A lifecycle hook that is called after the default change detector has
  29. * completed checking all content of a directive.
  30. *
  31. * @see `AfterViewChecked`
  32. * @see [Lifecycle Hooks](guide/lifecycle-hooks#onchanges) guide
  33. *
  34. * @usageNotes
  35. * The following snippet shows how a component can implement this interface to
  36. * define its own after-check functionality.
  37. *
  38. * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterContentChecked'}
  39. *
  40. * @publicApi
  41. */
  42. export declare interface AfterContentChecked {
  43. /**
  44. * A callback method that is invoked immediately after the
  45. * default change detector has completed checking all of the directive's
  46. * content.
  47. */
  48. ngAfterContentChecked(): void;
  49. }
  50. /**
  51. * @description
  52. * A lifecycle hook that is called after Angular has fully initialized
  53. * all content of a directive.
  54. * Define an `ngAfterContentInit()` method to handle any additional initialization tasks.
  55. *
  56. * @see `OnInit`
  57. * @see `AfterViewInit`
  58. * @see [Lifecycle Hooks](guide/lifecycle-hooks#onchanges) guide
  59. *
  60. * @usageNotes
  61. * The following snippet shows how a component can implement this interface to
  62. * define its own content initialization method.
  63. *
  64. * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterContentInit'}
  65. *
  66. * @publicApi
  67. */
  68. export declare interface AfterContentInit {
  69. /**
  70. * A callback method that is invoked immediately after
  71. * Angular has completed initialization of all of the directive's
  72. * content.
  73. * It is invoked only once when the directive is instantiated.
  74. */
  75. ngAfterContentInit(): void;
  76. }
  77. /**
  78. * @description
  79. * A lifecycle hook that is called after the default change detector has
  80. * completed checking a component's view for changes.
  81. *
  82. * @see `AfterContentChecked`
  83. * @see [Lifecycle Hooks](guide/lifecycle-hooks#onchanges) guide
  84. *
  85. * @usageNotes
  86. * The following snippet shows how a component can implement this interface to
  87. * define its own after-check functionality.
  88. *
  89. * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterViewChecked'}
  90. *
  91. * @publicApi
  92. */
  93. export declare interface AfterViewChecked {
  94. /**
  95. * A callback method that is invoked immediately after the
  96. * default change detector has completed one change-check cycle
  97. * for a component's view.
  98. */
  99. ngAfterViewChecked(): void;
  100. }
  101. /**
  102. * @description
  103. * A lifecycle hook that is called after Angular has fully initialized
  104. * a component's view.
  105. * Define an `ngAfterViewInit()` method to handle any additional initialization tasks.
  106. *
  107. * @see `OnInit`
  108. * @see `AfterContentInit`
  109. * @see [Lifecycle Hooks](guide/lifecycle-hooks#onchanges) guide
  110. *
  111. * @usageNotes
  112. * The following snippet shows how a component can implement this interface to
  113. * define its own view initialization method.
  114. *
  115. * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterViewInit'}
  116. *
  117. * @publicApi
  118. */
  119. export declare interface AfterViewInit {
  120. /**
  121. * A callback method that is invoked immediately after
  122. * Angular has completed initialization of a component's view.
  123. * It is invoked only once when the view is instantiated.
  124. *
  125. */
  126. ngAfterViewInit(): void;
  127. }
  128. /**
  129. * A DI token that you can use to create a virtual [provider](guide/glossary#provider)
  130. * that will populate the `entryComponents` field of components and NgModules
  131. * based on its `useValue` property value.
  132. * All components that are referenced in the `useValue` value (either directly
  133. * or in a nested array or map) are added to the `entryComponents` property.
  134. *
  135. * @usageNotes
  136. *
  137. * The following example shows how the router can populate the `entryComponents`
  138. * field of an NgModule based on a router configuration that refers
  139. * to components.
  140. *
  141. * ```typescript
  142. * // helper function inside the router
  143. * function provideRoutes(routes) {
  144. * return [
  145. * {provide: ROUTES, useValue: routes},
  146. * {provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: routes, multi: true}
  147. * ];
  148. * }
  149. *
  150. * // user code
  151. * let routes = [
  152. * {path: '/root', component: RootComp},
  153. * {path: '/teams', component: TeamsComp}
  154. * ];
  155. *
  156. * @NgModule({
  157. * providers: [provideRoutes(routes)]
  158. * })
  159. * class ModuleWithRoutes {}
  160. * ```
  161. *
  162. * @publicApi
  163. */
  164. export declare const ANALYZE_FOR_ENTRY_COMPONENTS: InjectionToken<any>;
  165. /**
  166. * All callbacks provided via this token will be called for every component that is bootstrapped.
  167. * Signature of the callback:
  168. *
  169. * `(componentRef: ComponentRef) => void`.
  170. *
  171. * @publicApi
  172. */
  173. export declare const APP_BOOTSTRAP_LISTENER: InjectionToken<((compRef: ComponentRef<any>) => void)[]>;
  174. /**
  175. * A DI Token representing a unique string id assigned to the application by Angular and used
  176. * primarily for prefixing application attributes and CSS styles when
  177. * {@link ViewEncapsulation#Emulated ViewEncapsulation.Emulated} is being used.
  178. *
  179. * If you need to avoid randomly generated value to be used as an application id, you can provide
  180. * a custom value via a DI provider <!-- TODO: provider --> configuring the root {@link Injector}
  181. * using this token.
  182. * @publicApi
  183. */
  184. export declare const APP_ID: InjectionToken<string>;
  185. /**
  186. * A function that will be executed when an application is initialized.
  187. *
  188. * @publicApi
  189. */
  190. export declare const APP_INITIALIZER: InjectionToken<(() => void)[]>;
  191. /**
  192. * A class that reflects the state of running {@link APP_INITIALIZER}s.
  193. *
  194. * @publicApi
  195. */
  196. export declare class ApplicationInitStatus {
  197. private appInits;
  198. private resolve;
  199. private reject;
  200. private initialized;
  201. readonly donePromise: Promise<any>;
  202. readonly done = false;
  203. constructor(appInits: (() => any)[]);
  204. }
  205. /**
  206. * Configures the root injector for an app with
  207. * providers of `@angular/core` dependencies that `ApplicationRef` needs
  208. * to bootstrap components.
  209. *
  210. * Re-exported by `BrowserModule`, which is included automatically in the root
  211. * `AppModule` when you create a new app with the CLI `new` command.
  212. *
  213. * @publicApi
  214. */
  215. export declare class ApplicationModule {
  216. constructor(appRef: ApplicationRef);
  217. }
  218. /**
  219. * A reference to an Angular application running on a page.
  220. *
  221. * @usageNotes
  222. *
  223. * {@a is-stable-examples}
  224. * ### isStable examples and caveats
  225. *
  226. * Note two important points about `isStable`, demonstrated in the examples below:
  227. * - the application will never be stable if you start any kind
  228. * of recurrent asynchronous task when the application starts
  229. * (for example for a polling process, started with a `setInterval`, a `setTimeout`
  230. * or using RxJS operators like `interval`);
  231. * - the `isStable` Observable runs outside of the Angular zone.
  232. *
  233. * Let's imagine that you start a recurrent task
  234. * (here incrementing a counter, using RxJS `interval`),
  235. * and at the same time subscribe to `isStable`.
  236. *
  237. * ```
  238. * constructor(appRef: ApplicationRef) {
  239. * appRef.isStable.pipe(
  240. * filter(stable => stable)
  241. * ).subscribe(() => console.log('App is stable now');
  242. * interval(1000).subscribe(counter => console.log(counter));
  243. * }
  244. * ```
  245. * In this example, `isStable` will never emit `true`,
  246. * and the trace "App is stable now" will never get logged.
  247. *
  248. * If you want to execute something when the app is stable,
  249. * you have to wait for the application to be stable
  250. * before starting your polling process.
  251. *
  252. * ```
  253. * constructor(appRef: ApplicationRef) {
  254. * appRef.isStable.pipe(
  255. * first(stable => stable),
  256. * tap(stable => console.log('App is stable now')),
  257. * switchMap(() => interval(1000))
  258. * ).subscribe(counter => console.log(counter));
  259. * }
  260. * ```
  261. * In this example, the trace "App is stable now" will be logged
  262. * and then the counter starts incrementing every second.
  263. *
  264. * Note also that this Observable runs outside of the Angular zone,
  265. * which means that the code in the subscription
  266. * to this Observable will not trigger the change detection.
  267. *
  268. * Let's imagine that instead of logging the counter value,
  269. * you update a field of your component
  270. * and display it in its template.
  271. *
  272. * ```
  273. * constructor(appRef: ApplicationRef) {
  274. * appRef.isStable.pipe(
  275. * first(stable => stable),
  276. * switchMap(() => interval(1000))
  277. * ).subscribe(counter => this.value = counter);
  278. * }
  279. * ```
  280. * As the `isStable` Observable runs outside the zone,
  281. * the `value` field will be updated properly,
  282. * but the template will not be refreshed!
  283. *
  284. * You'll have to manually trigger the change detection to update the template.
  285. *
  286. * ```
  287. * constructor(appRef: ApplicationRef, cd: ChangeDetectorRef) {
  288. * appRef.isStable.pipe(
  289. * first(stable => stable),
  290. * switchMap(() => interval(1000))
  291. * ).subscribe(counter => {
  292. * this.value = counter;
  293. * cd.detectChanges();
  294. * });
  295. * }
  296. * ```
  297. *
  298. * Or make the subscription callback run inside the zone.
  299. *
  300. * ```
  301. * constructor(appRef: ApplicationRef, zone: NgZone) {
  302. * appRef.isStable.pipe(
  303. * first(stable => stable),
  304. * switchMap(() => interval(1000))
  305. * ).subscribe(counter => zone.run(() => this.value = counter));
  306. * }
  307. * ```
  308. *
  309. * @publicApi
  310. */
  311. export declare class ApplicationRef {
  312. private _zone;
  313. private _console;
  314. private _injector;
  315. private _exceptionHandler;
  316. private _componentFactoryResolver;
  317. private _initStatus;
  318. private _bootstrapListeners;
  319. private _views;
  320. private _runningTick;
  321. private _enforceNoNewChanges;
  322. private _stable;
  323. /**
  324. * Get a list of component types registered to this application.
  325. * This list is populated even before the component is created.
  326. */
  327. readonly componentTypes: Type<any>[];
  328. /**
  329. * Get a list of components registered to this application.
  330. */
  331. readonly components: ComponentRef<any>[];
  332. /**
  333. * Returns an Observable that indicates when the application is stable or unstable.
  334. *
  335. * @see [Usage notes](#is-stable-examples) for examples and caveats when using this API.
  336. */
  337. readonly isStable: Observable<boolean>;
  338. /**
  339. * Bootstrap a new component at the root level of the application.
  340. *
  341. * @usageNotes
  342. * ### Bootstrap process
  343. *
  344. * When bootstrapping a new root component into an application, Angular mounts the
  345. * specified application component onto DOM elements identified by the componentType's
  346. * selector and kicks off automatic change detection to finish initializing the component.
  347. *
  348. * Optionally, a component can be mounted onto a DOM element that does not match the
  349. * componentType's selector.
  350. *
  351. * ### Example
  352. * {@example core/ts/platform/platform.ts region='longform'}
  353. */
  354. bootstrap<C>(componentOrFactory: ComponentFactory<C> | Type<C>, rootSelectorOrNode?: string | any): ComponentRef<C>;
  355. /**
  356. * Invoke this method to explicitly process change detection and its side-effects.
  357. *
  358. * In development mode, `tick()` also performs a second change detection cycle to ensure that no
  359. * further changes are detected. If additional changes are picked up during this second cycle,
  360. * bindings in the app have side-effects that cannot be resolved in a single change detection
  361. * pass.
  362. * In this case, Angular throws an error, since an Angular application can only have one change
  363. * detection pass during which all change detection must complete.
  364. */
  365. tick(): void;
  366. /**
  367. * Attaches a view so that it will be dirty checked.
  368. * The view will be automatically detached when it is destroyed.
  369. * This will throw if the view is already attached to a ViewContainer.
  370. */
  371. attachView(viewRef: ViewRef): void;
  372. /**
  373. * Detaches a view from dirty checking again.
  374. */
  375. detachView(viewRef: ViewRef): void;
  376. private _loadComponent;
  377. private _unloadComponent;
  378. /**
  379. * Returns the number of attached views.
  380. */
  381. readonly viewCount: number;
  382. }
  383. /**
  384. * @publicApi
  385. */
  386. export declare function asNativeElements(debugEls: DebugElement[]): any;
  387. /**
  388. * Checks that there currently is a platform which contains the given token as a provider.
  389. *
  390. * @publicApi
  391. */
  392. export declare function assertPlatform(requiredToken: any): PlatformRef;
  393. /**
  394. * Type of the Attribute metadata.
  395. *
  396. * @publicApi
  397. */
  398. export declare interface Attribute {
  399. /**
  400. * The name of the attribute whose value can be injected.
  401. */
  402. attributeName?: string;
  403. }
  404. /**
  405. * Attribute decorator and metadata.
  406. *
  407. * @Annotation
  408. * @publicApi
  409. */
  410. export declare const Attribute: AttributeDecorator;
  411. /**
  412. * Type of the Attribute decorator / constructor function.
  413. *
  414. * @publicApi
  415. */
  416. export declare interface AttributeDecorator {
  417. /**
  418. * A parameter decorator for a directive constructor that designates
  419. * a host-element attribute whose value is injected as a constant string literal.
  420. *
  421. * @usageNotes
  422. *
  423. * Suppose we have an `<input>` element and want to know its `type`.
  424. *
  425. * ```html
  426. * <input type="text">
  427. * ```
  428. *
  429. * The following example uses the decorator to inject the string literal `text`.
  430. *
  431. * {@example core/ts/metadata/metadata.ts region='attributeMetadata'}
  432. *
  433. * ### Example as TypeScript Decorator
  434. *
  435. * {@example core/ts/metadata/metadata.ts region='attributeFactory'}
  436. *
  437. */
  438. (name: string): any;
  439. new (name: string): Attribute;
  440. }
  441. declare const BINDING_INDEX = 7;
  442. declare interface BindingDef {
  443. flags: ɵBindingFlags;
  444. ns: string | null;
  445. name: string | null;
  446. nonMinifiedName: string | null;
  447. securityContext: SecurityContext | null;
  448. suffix: string | null;
  449. }
  450. declare interface BindingStore {
  451. setValue(prop: string, value: any): void;
  452. }
  453. declare const enum BindingType {
  454. Unset = 0,
  455. Class = 1,
  456. Style = 2
  457. }
  458. /**
  459. * Provides additional options to the bootstraping process.
  460. *
  461. *
  462. */
  463. declare interface BootstrapOptions {
  464. /**
  465. * Optionally specify which `NgZone` should be used.
  466. *
  467. * - Provide your own `NgZone` instance.
  468. * - `zone.js` - Use default `NgZone` which requires `Zone.js`.
  469. * - `noop` - Use `NoopNgZone` which does nothing.
  470. */
  471. ngZone?: NgZone | 'zone.js' | 'noop';
  472. }
  473. declare const BRAND = "__SANITIZER_TRUSTED_BRAND__";
  474. declare const enum BypassType {
  475. Url = "Url",
  476. Html = "Html",
  477. ResourceUrl = "ResourceUrl",
  478. Script = "Script",
  479. Style = "Style"
  480. }
  481. /**
  482. * The strategy that the default change detector uses to detect changes.
  483. * When set, takes effect the next time change detection is triggered.
  484. *
  485. * @publicApi
  486. */
  487. export declare enum ChangeDetectionStrategy {
  488. /**
  489. * Use the `CheckOnce` strategy, meaning that automatic change detection is deactivated
  490. * until reactivated by setting the strategy to `Default` (`CheckAlways`).
  491. * Change detection can still be explicitly invoked.
  492. * This strategy applies to all child directives and cannot be overridden.
  493. */
  494. OnPush = 0,
  495. /**
  496. * Use the default `CheckAlways` strategy, in which change detection is automatic until
  497. * explicitly deactivated.
  498. */
  499. Default = 1
  500. }
  501. /**
  502. * Base class for Angular Views, provides change detection functionality.
  503. * A change-detection tree collects all views that are to be checked for changes.
  504. * Use the methods to add and remove views from the tree, initiate change-detection,
  505. * and explicitly mark views as _dirty_, meaning that they have changed and need to be rerendered.
  506. *
  507. * @usageNotes
  508. *
  509. * The following examples demonstrate how to modify default change-detection behavior
  510. * to perform explicit detection when needed.
  511. *
  512. * ### Use `markForCheck()` with `CheckOnce` strategy
  513. *
  514. * The following example sets the `OnPush` change-detection strategy for a component
  515. * (`CheckOnce`, rather than the default `CheckAlways`), then forces a second check
  516. * after an interval. See [live demo](http://plnkr.co/edit/GC512b?p=preview).
  517. *
  518. * <code-example path="core/ts/change_detect/change-detection.ts"
  519. * region="mark-for-check"></code-example>
  520. *
  521. * ### Detach change detector to limit how often check occurs
  522. *
  523. * The following example defines a component with a large list of read-only data
  524. * that is expected to change constantly, many times per second.
  525. * To improve performance, we want to check and update the list
  526. * less often than the changes actually occur. To do that, we detach
  527. * the component's change detector and perform an explicit local check every five seconds.
  528. *
  529. * <code-example path="core/ts/change_detect/change-detection.ts" region="detach"></code-example>
  530. *
  531. *
  532. * ### Reattaching a detached component
  533. *
  534. * The following example creates a component displaying live data.
  535. * The component detaches its change detector from the main change detector tree
  536. * when the `live` property is set to false, and reattaches it when the property
  537. * becomes true.
  538. *
  539. * <code-example path="core/ts/change_detect/change-detection.ts" region="reattach"></code-example>
  540. *
  541. * @publicApi
  542. */
  543. export declare abstract class ChangeDetectorRef {
  544. /**
  545. * When a view uses the {@link ChangeDetectionStrategy#OnPush OnPush} (checkOnce)
  546. * change detection strategy, explicitly marks the view as changed so that
  547. * it can be checked again.
  548. *
  549. * Components are normally marked as dirty (in need of rerendering) when inputs
  550. * have changed or events have fired in the view. Call this method to ensure that
  551. * a component is checked even if these triggers have not occured.
  552. *
  553. * <!-- TODO: Add a link to a chapter on OnPush components -->
  554. *
  555. */
  556. abstract markForCheck(): void;
  557. /**
  558. * Detaches this view from the change-detection tree.
  559. * A detached view is not checked until it is reattached.
  560. * Use in combination with `detectChanges()` to implement local change detection checks.
  561. *
  562. * Detached views are not checked during change detection runs until they are
  563. * re-attached, even if they are marked as dirty.
  564. *
  565. * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
  566. * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
  567. *
  568. */
  569. abstract detach(): void;
  570. /**
  571. * Checks this view and its children. Use in combination with {@link ChangeDetectorRef#detach
  572. * detach}
  573. * to implement local change detection checks.
  574. *
  575. * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
  576. * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
  577. *
  578. */
  579. abstract detectChanges(): void;
  580. /**
  581. * Checks the change detector and its children, and throws if any changes are detected.
  582. *
  583. * Use in development mode to verify that running change detection doesn't introduce
  584. * other changes.
  585. */
  586. abstract checkNoChanges(): void;
  587. /**
  588. * Re-attaches the previously detached view to the change detection tree.
  589. * Views are attached to the tree by default.
  590. *
  591. * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
  592. *
  593. */
  594. abstract reattach(): void;
  595. }
  596. declare const CHILD_HEAD = 14;
  597. declare const CHILD_TAIL = 15;
  598. /**
  599. * Configures the `Injector` to return an instance of `useClass` for a token.
  600. *
  601. * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
  602. *
  603. * @usageNotes
  604. *
  605. * ### Example
  606. *
  607. * {@example core/di/ts/provider_spec.ts region='ClassProvider'}
  608. *
  609. * Note that following two providers are not equal:
  610. *
  611. * {@example core/di/ts/provider_spec.ts region='ClassProviderDifference'}
  612. *
  613. * ### Multi-value example
  614. *
  615. * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
  616. *
  617. * @publicApi
  618. */
  619. export declare interface ClassProvider extends ClassSansProvider {
  620. /**
  621. * An injection token. (Typically an instance of `Type` or `InjectionToken`, but can be `any`).
  622. */
  623. provide: any;
  624. /**
  625. * If true, then injector returns an array of instances. This is useful to allow multiple
  626. * providers spread across many files to provide configuration information to a common token.
  627. */
  628. multi?: boolean;
  629. }
  630. /**
  631. * Configures the `Injector` to return a value by invoking a `useClass` function.
  632. * Base for `ClassProvider` decorator.
  633. *
  634. * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
  635. *
  636. * @publicApi
  637. */
  638. export declare interface ClassSansProvider {
  639. /**
  640. * Class to instantiate for the `token`.
  641. */
  642. useClass: Type<any>;
  643. }
  644. declare const CLEANUP = 8;
  645. /**
  646. * @deprecated v4.0.0 - Use IterableChangeRecord instead.
  647. * @publicApi
  648. */
  649. export declare interface CollectionChangeRecord<V> extends IterableChangeRecord<V> {
  650. }
  651. /**
  652. * Marks that the next string is for comment.
  653. *
  654. * See `I18nMutateOpCodes` documentation.
  655. */
  656. declare const COMMENT_MARKER: COMMENT_MARKER;
  657. declare interface COMMENT_MARKER {
  658. marker: 'comment';
  659. }
  660. /**
  661. * Compile an Angular injectable according to its `Injectable` metadata, and patch the resulting
  662. * `ngInjectableDef` onto the injectable type.
  663. */
  664. declare function compileInjectable(type: Type<any>, srcMeta?: Injectable): void;
  665. /**
  666. * Low-level service for running the angular compiler during runtime
  667. * to create {@link ComponentFactory}s, which
  668. * can later be used to create and render a Component instance.
  669. *
  670. * Each `@NgModule` provides an own `Compiler` to its injector,
  671. * that will use the directives/pipes of the ng module for compilation
  672. * of components.
  673. *
  674. * @publicApi
  675. */
  676. export declare class Compiler {
  677. /**
  678. * Compiles the given NgModule and all of its components. All templates of the components listed
  679. * in `entryComponents` have to be inlined.
  680. */
  681. compileModuleSync: <T>(moduleType: Type<T>) => NgModuleFactory<T>;
  682. /**
  683. * Compiles the given NgModule and all of its components
  684. */
  685. compileModuleAsync: <T>(moduleType: Type<T>) => Promise<NgModuleFactory<T>>;
  686. /**
  687. * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.
  688. */
  689. compileModuleAndAllComponentsSync: <T>(moduleType: Type<T>) => ModuleWithComponentFactories<T>;
  690. /**
  691. * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.
  692. */
  693. compileModuleAndAllComponentsAsync: <T>(moduleType: Type<T>) => Promise<ModuleWithComponentFactories<T>>;
  694. /**
  695. * Clears all caches.
  696. */
  697. clearCache(): void;
  698. /**
  699. * Clears the cache for the given component/ngModule.
  700. */
  701. clearCacheFor(type: Type<any>): void;
  702. /**
  703. * Returns the id for a given NgModule, if one is defined and known to the compiler.
  704. */
  705. getModuleId(moduleType: Type<any>): string | undefined;
  706. }
  707. /**
  708. * Token to provide CompilerOptions in the platform injector.
  709. *
  710. * @publicApi
  711. */
  712. export declare const COMPILER_OPTIONS: InjectionToken<CompilerOptions[]>;
  713. /**
  714. * A factory for creating a Compiler
  715. *
  716. * @publicApi
  717. */
  718. export declare abstract class CompilerFactory {
  719. abstract createCompiler(options?: CompilerOptions[]): Compiler;
  720. }
  721. /**
  722. * Options for creating a compiler
  723. *
  724. * @publicApi
  725. */
  726. export declare type CompilerOptions = {
  727. useJit?: boolean;
  728. defaultEncapsulation?: ViewEncapsulation;
  729. providers?: StaticProvider[];
  730. missingTranslation?: MissingTranslationStrategy;
  731. preserveWhitespaces?: boolean;
  732. };
  733. /**
  734. * Supplies configuration metadata for an Angular component.
  735. *
  736. * @publicApi
  737. */
  738. export declare interface Component extends Directive {
  739. /**
  740. * The change-detection strategy to use for this component.
  741. *
  742. * When a component is instantiated, Angular creates a change detector,
  743. * which is responsible for propagating the component's bindings.
  744. * The strategy is one of:
  745. * - `ChangeDetectionStrategy#OnPush` sets the strategy to `CheckOnce` (on demand).
  746. * - `ChangeDetectionStrategy#Default` sets the strategy to `CheckAlways`.
  747. */
  748. changeDetection?: ChangeDetectionStrategy;
  749. /**
  750. * Defines the set of injectable objects that are visible to its view DOM children.
  751. * See [example](#injecting-a-class-with-a-view-provider).
  752. *
  753. */
  754. viewProviders?: Provider[];
  755. /**
  756. * The module ID of the module that contains the component.
  757. * The component must be able to resolve relative URLs for templates and styles.
  758. * SystemJS exposes the `__moduleName` variable within each module.
  759. * In CommonJS, this can be set to `module.id`.
  760. *
  761. */
  762. moduleId?: string;
  763. /**
  764. * The relative path or absolute URL of a template file for an Angular component.
  765. * If provided, do not supply an inline template using `template`.
  766. *
  767. */
  768. templateUrl?: string;
  769. /**
  770. * An inline template for an Angular component. If provided,
  771. * do not supply a template file using `templateUrl`.
  772. *
  773. */
  774. template?: string;
  775. /**
  776. * One or more relative paths or absolute URLs for files containing CSS stylesheets to use
  777. * in this component.
  778. */
  779. styleUrls?: string[];
  780. /**
  781. * One or more inline CSS stylesheets to use
  782. * in this component.
  783. */
  784. styles?: string[];
  785. /**
  786. * One or more animation `trigger()` calls, containing
  787. * `state()` and `transition()` definitions.
  788. * See the [Animations guide](/guide/animations) and animations API documentation.
  789. *
  790. */
  791. animations?: any[];
  792. /**
  793. * An encapsulation policy for the template and CSS styles. One of:
  794. * - `ViewEncapsulation.Native`: Deprecated. Use `ViewEncapsulation.ShadowDom` instead.
  795. * - `ViewEncapsulation.Emulated`: Use shimmed CSS that
  796. * emulates the native behavior.
  797. * - `ViewEncapsulation.None`: Use global CSS without any
  798. * encapsulation.
  799. * - `ViewEncapsulation.ShadowDom`: Use Shadow DOM v1 to encapsulate styles.
  800. *
  801. * If not supplied, the value is taken from `CompilerOptions`. The default compiler option is
  802. * `ViewEncapsulation.Emulated`.
  803. *
  804. * If the policy is set to `ViewEncapsulation.Emulated` and the component has no `styles`
  805. * or `styleUrls` specified, the policy is automatically switched to `ViewEncapsulation.None`.
  806. */
  807. encapsulation?: ViewEncapsulation;
  808. /**
  809. * Overrides the default encapsulation start and end delimiters (`{{` and `}}`)
  810. */
  811. interpolation?: [string, string];
  812. /**
  813. * A set of components that should be compiled along with
  814. * this component. For each component listed here,
  815. * Angular creates a {@link ComponentFactory} and stores it in the
  816. * {@link ComponentFactoryResolver}.
  817. */
  818. entryComponents?: Array<Type<any> | any[]>;
  819. /**
  820. * True to preserve or false to remove potentially superfluous whitespace characters
  821. * from the compiled template. Whitespace characters are those matching the `\s`
  822. * character class in JavaScript regular expressions. Default is false, unless
  823. * overridden in compiler options.
  824. */
  825. preserveWhitespaces?: boolean;
  826. }
  827. /**
  828. * Component decorator and metadata.
  829. *
  830. * @Annotation
  831. * @publicApi
  832. */
  833. export declare const Component: ComponentDecorator;
  834. /**
  835. * Component decorator interface
  836. *
  837. * @publicApi
  838. */
  839. export declare interface ComponentDecorator {
  840. /**
  841. * Decorator that marks a class as an Angular component and provides configuration
  842. * metadata that determines how the component should be processed,
  843. * instantiated, and used at runtime.
  844. *
  845. * Components are the most basic UI building block of an Angular app.
  846. * An Angular app contains a tree of Angular components.
  847. *
  848. * Angular components are a subset of directives, always associated with a template.
  849. * Unlike other directives, only one component can be instantiated per an element in a template.
  850. *
  851. * A component must belong to an NgModule in order for it to be available
  852. * to another component or application. To make it a member of an NgModule,
  853. * list it in the `declarations` field of the `NgModule` metadata.
  854. *
  855. * Note that, in addition to these options for configuring a directive,
  856. * you can control a component's runtime behavior by implementing
  857. * life-cycle hooks. For more information, see the
  858. * [Lifecycle Hooks](guide/lifecycle-hooks) guide.
  859. *
  860. * @usageNotes
  861. *
  862. * ### Setting component inputs
  863. *
  864. * The following example creates a component with two data-bound properties,
  865. * specified by the `inputs` value.
  866. *
  867. * <code-example path="core/ts/metadata/directives.ts" region="component-input">
  868. * </code-example>
  869. *
  870. *
  871. * ### Setting component outputs
  872. *
  873. * The following example shows two event emitters that emit on an interval. One
  874. * emits an output every second, while the other emits every five seconds.
  875. *
  876. * {@example core/ts/metadata/directives.ts region='component-output-interval'}
  877. *
  878. * ### Injecting a class with a view provider
  879. *
  880. * The following simple example injects a class into a component
  881. * using the view provider specified in component metadata:
  882. *
  883. * ```
  884. * class Greeter {
  885. * greet(name:string) {
  886. * return 'Hello ' + name + '!';
  887. * }
  888. * }
  889. *
  890. * @Directive({
  891. * selector: 'needs-greeter'
  892. * })
  893. * class NeedsGreeter {
  894. * greeter:Greeter;
  895. *
  896. * constructor(greeter:Greeter) {
  897. * this.greeter = greeter;
  898. * }
  899. * }
  900. *
  901. * @Component({
  902. * selector: 'greet',
  903. * viewProviders: [
  904. * Greeter
  905. * ],
  906. * template: `<needs-greeter></needs-greeter>`
  907. * })
  908. * class HelloWorld {
  909. * }
  910. *
  911. * ```
  912. *
  913. * ### Preserving whitespace
  914. *
  915. * Removing whitespace can greatly reduce AOT-generated code size and speed up view creation.
  916. * As of Angular 6, the default for `preserveWhitespaces` is false (whitespace is removed).
  917. * To change the default setting for all components in your application, set
  918. * the `preserveWhitespaces` option of the AOT compiler.
  919. *
  920. * By default, the AOT compiler removes whitespace characters as follows:
  921. * * Trims all whitespaces at the beginning and the end of a template.
  922. * * Removes whitespace-only text nodes. For example,
  923. *
  924. * ```
  925. * <button>Action 1</button> <button>Action 2</button>
  926. * ```
  927. *
  928. * becomes:
  929. *
  930. * ```
  931. * <button>Action 1</button><button>Action 2</button>
  932. * ```
  933. *
  934. * * Replaces a series of whitespace characters in text nodes with a single space.
  935. * For example, `<span>\n some text\n</span>` becomes `<span> some text </span>`.
  936. * * Does NOT alter text nodes inside HTML tags such as `<pre>` or `<textarea>`,
  937. * where whitespace characters are significant.
  938. *
  939. * Note that these transformations can influence DOM nodes layout, although impact
  940. * should be minimal.
  941. *
  942. * You can override the default behavior to preserve whitespace characters
  943. * in certain fragments of a template. For example, you can exclude an entire
  944. * DOM sub-tree by using the `ngPreserveWhitespaces` attribute:
  945. *
  946. * ```html
  947. * <div ngPreserveWhitespaces>
  948. * whitespaces are preserved here
  949. * <span> and here </span>
  950. * </div>
  951. * ```
  952. *
  953. * You can force a single space to be preserved in a text node by using `&ngsp;`,
  954. * which is replaced with a space character by Angular's template
  955. * compiler:
  956. *
  957. * ```html
  958. * <a>Spaces</a>&ngsp;<a>between</a>&ngsp;<a>links.</a>
  959. * <!-->compiled to be equivalent to:</>
  960. * <a>Spaces</a> <a>between</a> <a>links.</a>
  961. * ```
  962. *
  963. * Note that sequences of `&ngsp;` are still collapsed to just one space character when
  964. * the `preserveWhitespaces` option is set to `false`.
  965. *
  966. * ```html
  967. * <a>before</a>&ngsp;&ngsp;&ngsp;<a>after</a>
  968. * <!-->compiled to be equivalent to:</>
  969. * <a>Spaces</a> <a>between</a> <a>links.</a>
  970. * ```
  971. *
  972. * To preserve sequences of whitespace characters, use the
  973. * `ngPreserveWhitespaces` attribute.
  974. *
  975. * @Annotation
  976. */
  977. (obj: Component): TypeDecorator;
  978. /**
  979. * See the `Component` decorator.
  980. */
  981. new (obj: Component): Component;
  982. }
  983. declare interface ComponentDefFeature {
  984. <T>(componentDef: ɵComponentDef<T>): void;
  985. /**
  986. * Marks a feature as something that {@link InheritDefinitionFeature} will execute
  987. * during inheritance.
  988. *
  989. * NOTE: DO NOT SET IN ROOT OF MODULE! Doing so will result in tree-shakers/bundlers
  990. * identifying the change as a side effect, and the feature will be included in
  991. * every bundle.
  992. */
  993. ngInherit?: true;
  994. }
  995. /**
  996. * @publicApi
  997. */
  998. declare abstract class ComponentFactory<C> {
  999. /**
  1000. * The component's HTML selector.
  1001. */
  1002. abstract readonly selector: string;
  1003. /**
  1004. * The component's type
  1005. */
  1006. abstract readonly componentType: Type<any>;
  1007. /**
  1008. * Selector for all <ng-content> elements in the component.
  1009. */
  1010. abstract readonly ngContentSelectors: string[];
  1011. /**
  1012. * The inputs of the component.
  1013. */
  1014. abstract readonly inputs: {
  1015. propName: string;
  1016. templateName: string;
  1017. }[];
  1018. /**
  1019. * The outputs of the component.
  1020. */
  1021. abstract readonly outputs: {
  1022. propName: string;
  1023. templateName: string;
  1024. }[];
  1025. /**
  1026. * Creates a new component.
  1027. */
  1028. abstract create(injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string | any, ngModule?: NgModuleRef<any>): ComponentRef<C>;
  1029. }
  1030. export { ComponentFactory }
  1031. export { ComponentFactory as ɵComponentFactory }
  1032. /**
  1033. * @publicApi
  1034. */
  1035. export declare abstract class ComponentFactoryResolver {
  1036. static NULL: ComponentFactoryResolver;
  1037. abstract resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>;
  1038. }
  1039. declare type ComponentInstance = {};
  1040. /**
  1041. * Represents a component created by a `ComponentFactory`.
  1042. * Provides access to the component instance and related objects,
  1043. * and provides the means of destroying the instance.
  1044. *
  1045. * @publicApi
  1046. */
  1047. export declare abstract class ComponentRef<C> {
  1048. /**
  1049. * The host or anchor [element](guide/glossary#element) for this component instance.
  1050. */
  1051. abstract readonly location: ElementRef;
  1052. /**
  1053. * The [dependency injector](guide/glossary#injector) for this component instance.
  1054. */
  1055. abstract readonly injector: Injector;
  1056. /**
  1057. * This component instance.
  1058. */
  1059. abstract readonly instance: C;
  1060. /**
  1061. * The [host view](guide/glossary#view-tree) defined by the template
  1062. * for this component instance.
  1063. */
  1064. abstract readonly hostView: ViewRef;
  1065. /**
  1066. * The change detector for this component instance.
  1067. */
  1068. abstract readonly changeDetectorRef: ChangeDetectorRef;
  1069. /**
  1070. * The component type.
  1071. */
  1072. abstract readonly componentType: Type<any>;
  1073. /**
  1074. * Destroys the component instance and all of the data structures associated with it.
  1075. */
  1076. abstract destroy(): void;
  1077. /**
  1078. * A lifecycle hook that provides additional developer-defined cleanup
  1079. * functionality for the component.
  1080. * @param callback A handler function that cleans up developer-defined data
  1081. * associated with this component. Called when the `destroy()` method is invoked.
  1082. */
  1083. abstract onDestroy(callback: Function): void;
  1084. }
  1085. /**
  1086. * Definition of what a template rendering function should look like for a component.
  1087. */
  1088. declare type ComponentTemplate<T> = {
  1089. <U extends T>(rf: ɵRenderFlags, ctx: T | U): void;
  1090. };
  1091. /**
  1092. * Configures the `Injector` to return an instance of a token.
  1093. *
  1094. * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
  1095. *
  1096. * @usageNotes
  1097. *
  1098. * ### Example
  1099. *
  1100. * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}
  1101. *
  1102. * ### Multi-value example
  1103. *
  1104. * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
  1105. *
  1106. * @publicApi
  1107. */
  1108. declare interface ConstructorProvider extends ConstructorSansProvider {
  1109. /**
  1110. * An injection token. (Typically an instance of `Type` or `InjectionToken`, but can be `any`).
  1111. */
  1112. provide: Type<any>;
  1113. /**
  1114. * If true, then injector returns an array of instances. This is useful to allow multiple
  1115. * providers spread across many files to provide configuration information to a common token.
  1116. */
  1117. multi?: boolean;
  1118. }
  1119. /**
  1120. * Configures the `Injector` to return an instance of a token.
  1121. *
  1122. * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
  1123. *
  1124. * @usageNotes
  1125. *
  1126. * ### Example
  1127. *
  1128. * ```
  1129. * @Injectable(SomeModule, {deps: []})
  1130. * class MyService {}
  1131. * ```
  1132. *
  1133. * @publicApi
  1134. */
  1135. export declare interface ConstructorSansProvider {
  1136. /**
  1137. * A list of `token`s which need to be resolved by the injector. The list of values is then
  1138. * used as arguments to the `useClass` constructor.
  1139. */
  1140. deps?: any[];
  1141. }
  1142. declare const CONTENT_QUERIES = 16;
  1143. /**
  1144. * Type of the ContentChild metadata.
  1145. *
  1146. * @publicApi
  1147. */
  1148. export declare type ContentChild = Query;
  1149. /**
  1150. * ContentChild decorator and metadata.
  1151. *
  1152. *
  1153. * @Annotation
  1154. *
  1155. * @publicApi
  1156. */
  1157. export declare const ContentChild: ContentChildDecorator;
  1158. /**
  1159. * Type of the ContentChild decorator / constructor function.
  1160. *
  1161. * @publicApi
  1162. */
  1163. export declare interface ContentChildDecorator {
  1164. /**
  1165. * Configures a content query.
  1166. *
  1167. * You can use ContentChild to get the first element or the directive matching the selector from
  1168. * the content DOM. If the content DOM changes, and a new child matches the selector,
  1169. * the property will be updated.
  1170. *
  1171. * Content queries are set before the `ngAfterContentInit` callback is called.
  1172. *
  1173. * **Metadata Properties**:
  1174. *
  1175. * * **selector** - the directive type or the name used for querying.
  1176. * * **read** - read a different token from the queried element.
  1177. * * **static** - whether or not to resolve query results before change detection runs (i.e.
  1178. * return static results only). If this option is not provided, the compiler will fall back
  1179. * to its default behavior, which is to use query results to determine the timing of query
  1180. * resolution. If any query results are inside a nested view (e.g. *ngIf), the query will be
  1181. * resolved after change detection runs. Otherwise, it will be resolved before change detection
  1182. * runs.
  1183. *
  1184. * @usageNotes
  1185. * ### Example
  1186. *
  1187. * {@example core/di/ts/contentChild/content_child_howto.ts region='HowTo'}
  1188. *
  1189. * ### Example
  1190. *
  1191. * {@example core/di/ts/contentChild/content_child_example.ts region='Component'}
  1192. *
  1193. * @Annotation
  1194. */
  1195. (selector: Type<any> | Function | string, opts: {
  1196. read?: any;
  1197. static: boolean;
  1198. }): any;
  1199. new (selector: Type<any> | Function | string, opts: {
  1200. read?: any;
  1201. static: boolean;
  1202. }): ContentChild;
  1203. }
  1204. /**
  1205. * Type of the ContentChildren metadata.
  1206. *
  1207. *
  1208. * @Annotation
  1209. * @publicApi
  1210. */
  1211. export declare type ContentChildren = Query;
  1212. /**
  1213. * ContentChildren decorator and metadata.
  1214. *
  1215. *
  1216. * @Annotation
  1217. * @publicApi
  1218. */
  1219. export declare const ContentChildren: ContentChildrenDecorator;
  1220. /**
  1221. * Type of the ContentChildren decorator / constructor function.
  1222. *
  1223. * @see `ContentChildren`.
  1224. * @publicApi
  1225. */
  1226. export declare interface ContentChildrenDecorator {
  1227. /**
  1228. * Configures a content query.
  1229. *
  1230. * You can use ContentChildren to get the `QueryList` of elements or directives from the
  1231. * content DOM. Any time a child element is added, removed, or moved, the query list will be
  1232. * updated, and the changes observable of the query list will emit a new value.
  1233. *
  1234. * Content queries are set before the `ngAfterContentInit` callback is called.
  1235. *
  1236. * **Metadata Properties**:
  1237. *
  1238. * * **selector** - the directive type or the name used for querying.
  1239. * * **descendants** - include only direct children or all descendants.
  1240. * * **read** - read a different token from the queried elements.
  1241. *
  1242. * @usageNotes
  1243. * ### Basic Example
  1244. *
  1245. * Here is a simple demonstration of how the `ContentChildren` decorator can be used.
  1246. *
  1247. * {@example core/di/ts/contentChildren/content_children_howto.ts region='HowTo'}
  1248. *
  1249. * ### Tab-pane Example
  1250. *
  1251. * Here is a slightly more realistic example that shows how `ContentChildren` decorators
  1252. * can be used to implement a tab pane component.
  1253. *
  1254. * {@example core/di/ts/contentChildren/content_children_example.ts region='Component'}
  1255. *
  1256. * @Annotation
  1257. */
  1258. (selector: Type<any> | Function | string, opts?: {
  1259. descendants?: boolean;
  1260. read?: any;
  1261. }): any;
  1262. new (selector: Type<any> | Function | string, opts?: {
  1263. descendants?: boolean;
  1264. read?: any;
  1265. }): Query;
  1266. }
  1267. /**
  1268. * Definition of what a content queries function should look like.
  1269. */
  1270. declare type ContentQueriesFunction<T> = <U extends T>(rf: ɵRenderFlags, ctx: U, directiveIndex: number) => void;
  1271. declare const CONTEXT = 9;
  1272. /** Options that control how the component should be bootstrapped. */
  1273. declare interface CreateComponentOptions {
  1274. /** Which renderer factory to use. */
  1275. rendererFactory?: RendererFactory3;
  1276. /** A custom sanitizer instance */
  1277. sanitizer?: Sanitizer;
  1278. /** A custom animation player handler */
  1279. playerHandler?: ɵPlayerHandler;
  1280. /**
  1281. * Host element on which the component will be bootstrapped. If not specified,
  1282. * the component definition's `tag` is used to query the existing DOM for the
  1283. * element to bootstrap.
  1284. */
  1285. host?: RElement | string;
  1286. /** Module injector for the component. If unspecified, the injector will be NULL_INJECTOR. */
  1287. injector?: Injector;
  1288. /**
  1289. * List of features to be applied to the created component. Features are simply
  1290. * functions that decorate a component with a certain behavior.
  1291. *
  1292. * Typically, the features in this list are features that cannot be added to the
  1293. * other features list in the component definition because they rely on other factors.
  1294. *
  1295. * Example: `LifecycleHooksFeature` is a function that adds lifecycle hook capabilities
  1296. * to root components in a tree-shakable way. It cannot be added to the component
  1297. * features list because there's no way of knowing when the component will be used as
  1298. * a root component.
  1299. */
  1300. hostFeatures?: HostFeature[];
  1301. /**
  1302. * A function which is used to schedule change detection work in the future.
  1303. *
  1304. * When marking components as dirty, it is necessary to schedule the work of
  1305. * change detection in the future. This is done to coalesce multiple
  1306. * {@link markDirty} calls into a single changed detection processing.
  1307. *
  1308. * The default value of the scheduler is the `requestAnimationFrame` function.
  1309. *
  1310. * It is also useful to override this function for testing purposes.
  1311. */
  1312. scheduler?: (work: () => void) => void;
  1313. }
  1314. /**
  1315. * Creates a platform.
  1316. * Platforms have to be eagerly created via this function.
  1317. *
  1318. * @publicApi
  1319. */
  1320. export declare function createPlatform(injector: Injector): PlatformRef;
  1321. /**
  1322. * Creates a factory for a platform
  1323. *
  1324. * @publicApi
  1325. */
  1326. export declare function createPlatformFactory(parentPlatformFactory: ((extraProviders?: StaticProvider[]) => PlatformRef) | null, name: string, providers?: StaticProvider[]): (extraProviders?: StaticProvider[]) => PlatformRef;
  1327. /**
  1328. * Expresses a single CSS Selector.
  1329. *
  1330. * Beginning of array
  1331. * - First index: element name
  1332. * - Subsequent odd indices: attr keys
  1333. * - Subsequent even indices: attr values
  1334. *
  1335. * After SelectorFlags.CLASS flag
  1336. * - Class name values
  1337. *
  1338. * SelectorFlags.NOT flag
  1339. * - Changes the mode to NOT
  1340. * - Can be combined with other flags to set the element / attr / class mode
  1341. *
  1342. * e.g. SelectorFlags.NOT | SelectorFlags.ELEMENT
  1343. *
  1344. * Example:
  1345. * Original: `div.foo.bar[attr1=val1][attr2]`
  1346. * Parsed: ['div', 'attr1', 'val1', 'attr2', '', SelectorFlags.CLASS, 'foo', 'bar']
  1347. *
  1348. * Original: 'div[attr1]:not(.foo[attr2])
  1349. * Parsed: [
  1350. * 'div', 'attr1', '',
  1351. * SelectorFlags.NOT | SelectorFlags.ATTRIBUTE 'attr2', '', SelectorFlags.CLASS, 'foo'
  1352. * ]
  1353. *
  1354. * See more examples in node_selector_matcher_spec.ts
  1355. */
  1356. declare type CssSelector = (string | SelectorFlags)[];
  1357. /**
  1358. * Defines a schema that allows an NgModule to contain the following:
  1359. * - Non-Angular elements named with dash case (`-`).
  1360. * - Element properties named with dash case (`-`).
  1361. * Dash case is the naming convention for custom elements.
  1362. *
  1363. * @publicApi
  1364. */
  1365. export declare const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata;
  1366. /**
  1367. * @publicApi
  1368. */
  1369. export declare interface DebugElement extends DebugNode {
  1370. readonly name: string;
  1371. readonly properties: {
  1372. [key: string]: any;
  1373. };
  1374. readonly attributes: {
  1375. [key: string]: string | null;
  1376. };
  1377. readonly classes: {
  1378. [key: string]: boolean;
  1379. };
  1380. readonly styles: {
  1381. [key: string]: string | null;
  1382. };
  1383. readonly childNodes: DebugNode[];
  1384. readonly nativeElement: any;
  1385. readonly children: DebugElement[];
  1386. query(predicate: Predicate<DebugElement>): DebugElement;
  1387. queryAll(predicate: Predicate<DebugElement>): DebugElement[];
  1388. queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[];
  1389. triggerEventHandler(eventName: string, eventObj: any): void;
  1390. }
  1391. /**
  1392. * @publicApi
  1393. */
  1394. export declare const DebugElement: {
  1395. new (...args: any[]): DebugElement;
  1396. };
  1397. declare class DebugElement__POST_R3__ extends DebugNode__POST_R3__ implements DebugElement {
  1398. constructor(nativeNode: Element);
  1399. readonly nativeElement: Element | null;
  1400. readonly name: string;
  1401. /**
  1402. * Gets a map of property names to property values for an element.
  1403. *
  1404. * This map includes:
  1405. * - Regular property bindings (e.g. `[id]="id"`)
  1406. * - Host property bindings (e.g. `host: { '[id]': "id" }`)
  1407. * - Interpolated property bindings (e.g. `id="{{ value }}")
  1408. *
  1409. * It does not include:
  1410. * - input property bindings (e.g. `[myCustomInput]="value"`)
  1411. * - attribute bindings (e.g. `[attr.role]="menu"`)
  1412. */
  1413. readonly properties: {
  1414. [key: string]: any;
  1415. };
  1416. readonly attributes: {
  1417. [key: string]: string | null;
  1418. };
  1419. readonly classes: {
  1420. [key: string]: boolean;
  1421. };
  1422. readonly styles: {
  1423. [key: string]: string | null;
  1424. };
  1425. readonly childNodes: DebugNode[];
  1426. readonly children: DebugElement[];
  1427. query(predicate: Predicate<DebugElement>): DebugElement;
  1428. queryAll(predicate: Predicate<DebugElement>): DebugElement[];
  1429. queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[];
  1430. triggerEventHandler(eventName: string, eventObj: any): void;
  1431. }
  1432. /**
  1433. * @publicApi
  1434. */
  1435. export declare class DebugEventListener {
  1436. name: string;
  1437. callback: Function;
  1438. constructor(name: string, callback: Function);
  1439. }
  1440. /**
  1441. * @publicApi
  1442. */
  1443. export declare interface DebugNode {
  1444. readonly listeners: DebugEventListener[];
  1445. readonly parent: DebugElement | null;
  1446. readonly nativeNode: any;
  1447. readonly injector: Injector;
  1448. readonly componentInstance: any;
  1449. readonly context: any;
  1450. readonly references: {
  1451. [key: string]: any;
  1452. };
  1453. readonly providerTokens: any[];
  1454. }
  1455. /**
  1456. * @publicApi
  1457. */
  1458. export declare const DebugNode: {
  1459. new (...args: any[]): DebugNode;
  1460. };
  1461. declare class DebugNode__POST_R3__ implements DebugNode {
  1462. readonly nativeNode: Node;
  1463. constructor(nativeNode: Node);
  1464. readonly parent: DebugElement | null;
  1465. readonly injector: Injector;
  1466. readonly componentInstance: any;
  1467. readonly context: any;
  1468. readonly listeners: DebugEventListener[];
  1469. readonly references: {
  1470. [key: string]: any;
  1471. };
  1472. readonly providerTokens: any[];
  1473. }
  1474. declare const DECLARATION_VIEW = 17;
  1475. /**
  1476. * @deprecated v4.0.0 - Should not be part of public API.
  1477. * @publicApi
  1478. */
  1479. export declare class DefaultIterableDiffer<V> implements IterableDiffer<V>, IterableChanges<V> {
  1480. readonly length: number;
  1481. readonly collection: V[] | Iterable<V> | null;
  1482. private _linkedRecords;
  1483. private _unlinkedRecords;
  1484. private _previousItHead;
  1485. private _itHead;
  1486. private _itTail;
  1487. private _additionsHead;
  1488. private _additionsTail;
  1489. private _movesHead;
  1490. private _movesTail;
  1491. private _removalsHead;
  1492. private _removalsTail;
  1493. private _identityChangesHead;
  1494. private _identityChangesTail;
  1495. private _trackByFn;
  1496. constructor(trackByFn?: TrackByFunction<V>);
  1497. forEachItem(fn: (record: IterableChangeRecord_<V>) => void): void;
  1498. forEachOperation(fn: (item: IterableChangeRecord<V>, previousIndex: number | null, currentIndex: number | null) => void): void;
  1499. forEachPreviousItem(fn: (record: IterableChangeRecord_<V>) => void): void;
  1500. forEachAddedItem(fn: (record: IterableChangeRecord_<V>) => void): void;
  1501. forEachMovedItem(fn: (record: IterableChangeRecord_<V>) => void): void;
  1502. forEachRemovedItem(fn: (record: IterableChangeRecord_<V>) => void): void;
  1503. forEachIdentityChange(fn: (record: IterableChangeRecord_<V>) => void): void;
  1504. diff(collection: NgIterable<V>): DefaultIterableDiffer<V> | null;
  1505. onDestroy(): void;
  1506. check(collection: NgIterable<V>): boolean;
  1507. readonly isDirty: boolean;
  1508. private _addToRemovals;
  1509. }
  1510. /**
  1511. * @deprecated in v8, delete after v10. This API should be used only be generated code, and that
  1512. * code should now use ɵɵdefineInjectable instead.
  1513. * @publicApi
  1514. */
  1515. export declare const defineInjectable: typeof ɵɵdefineInjectable;
  1516. declare interface Definition<DF extends DefinitionFactory<any>> {
  1517. factory: DF | null;
  1518. }
  1519. /**
  1520. * Factory for ViewDefinitions/NgModuleDefinitions.
  1521. * We use a function so we can reexeute it in case an error happens and use the given logger
  1522. * function to log the error from the definition of the node, which is shown in all browser
  1523. * logs.
  1524. */
  1525. declare interface DefinitionFactory<D extends Definition<any>> {
  1526. (logger: NodeLogger): D;
  1527. }
  1528. declare interface DepDef {
  1529. flags: ɵDepFlags;
  1530. token: any;
  1531. tokenKey: string;
  1532. }
  1533. /**
  1534. * Destroy the existing platform.
  1535. *
  1536. * @publicApi
  1537. */
  1538. export declare function destroyPlatform(): void;
  1539. /**
  1540. * Directive decorator and metadata.
  1541. *
  1542. * @Annotation
  1543. * @publicApi
  1544. */
  1545. export declare interface Directive {
  1546. /**
  1547. * The CSS selector that identifies this directive in a template
  1548. * and triggers instantiation of the directive.
  1549. *
  1550. * Declare as one of the following:
  1551. *
  1552. * - `element-name`: Select by element name.
  1553. * - `.class`: Select by class name.
  1554. * - `[attribute]`: Select by attribute name.
  1555. * - `[attribute=value]`: Select by attribute name and value.
  1556. * - `:not(sub_selector)`: Select only if the element does not match the `sub_selector`.
  1557. * - `selector1, selector2`: Select if either `selector1` or `selector2` matches.
  1558. *
  1559. * Angular only allows directives to apply on CSS selectors that do not cross
  1560. * element boundaries.
  1561. *
  1562. * For the following template HTML, a directive with an `input[type=text]` selector,
  1563. * would be instantiated only on the `<input type="text">` element.
  1564. *
  1565. * ```html
  1566. * <form>
  1567. * <input type="text">
  1568. * <input type="radio">
  1569. * <form>
  1570. * ```
  1571. *
  1572. */
  1573. selector?: string;
  1574. /**
  1575. * Enumerates the set of data-bound input properties for a directive
  1576. *
  1577. * Angular automatically updates input properties during change detection.
  1578. * The `inputs` property defines a set of `directiveProperty` to `bindingProperty`
  1579. * configuration:
  1580. *
  1581. * - `directiveProperty` specifies the component property where the value is written.
  1582. * - `bindingProperty` specifies the DOM property where the value is read from.
  1583. *
  1584. * When `bindingProperty` is not provided, it is assumed to be equal to `directiveProperty`.
  1585. * @usageNotes
  1586. *
  1587. * ### Example
  1588. *
  1589. * The following example creates a component with two data-bound properties.
  1590. *
  1591. * ```typescript
  1592. * @Component({
  1593. * selector: 'bank-account',
  1594. * inputs: ['bankName', 'id: account-id'],
  1595. * template: `
  1596. * Bank Name: {{bankName}}
  1597. * Account Id: {{id}}
  1598. * `
  1599. * })
  1600. * class BankAccount {
  1601. * bankName: string;
  1602. * id: string;
  1603. *
  1604. * ```
  1605. *
  1606. */
  1607. inputs?: string[];
  1608. /**
  1609. * Enumerates the set of event-bound output properties.
  1610. *
  1611. * When an output property emits an event, an event handler attached to that event
  1612. * in the template is invoked.
  1613. *
  1614. * The `outputs` property defines a set of `directiveProperty` to `bindingProperty`
  1615. * configuration:
  1616. *
  1617. * - `directiveProperty` specifies the component property that emits events.
  1618. * - `bindingProperty` specifies the DOM property the event handler is attached to.
  1619. *
  1620. * @usageNotes
  1621. *
  1622. * ### Example
  1623. *
  1624. * ```typescript
  1625. * @Component({
  1626. * selector: 'child-dir',
  1627. * outputs: [ 'bankNameChange' ]
  1628. * template: `<input (input)="bankNameChange.emit($event.target.value)" />`
  1629. * })
  1630. * class ChildDir {
  1631. * bankNameChange: EventEmitter<string> = new EventEmitter<string>();
  1632. * }
  1633. *
  1634. * @Component({
  1635. * selector: 'main',
  1636. * template: `
  1637. * {{ bankName }} <child-dir (bankNameChange)="onBankNameChange($event)"></child-dir>
  1638. * `
  1639. * })
  1640. * class MainComponent {
  1641. * bankName: string;
  1642. *
  1643. * onBankNameChange(bankName: string) {
  1644. * this.bankName = bankName;
  1645. * }
  1646. * }
  1647. * ```
  1648. *
  1649. */
  1650. outputs?: string[];
  1651. /**
  1652. * Configures the [injector](guide/glossary#injector) of this
  1653. * directive or component with a [token](guide/glossary#di-token)
  1654. * that maps to a [provider](guide/glossary#provider) of a dependency.
  1655. */
  1656. providers?: Provider[];
  1657. /**
  1658. * Defines the name that can be used in the template to assign this directive to a variable.
  1659. *
  1660. * @usageNotes
  1661. *
  1662. * ### Simple Example
  1663. *
  1664. * ```
  1665. * @Directive({
  1666. * selector: 'child-dir',
  1667. * exportAs: 'child'
  1668. * })
  1669. * class ChildDir {
  1670. * }
  1671. *
  1672. * @Component({
  1673. * selector: 'main',
  1674. * template: `<child-dir #c="child"></child-dir>`
  1675. * })
  1676. * class MainComponent {
  1677. * }
  1678. * ```
  1679. *
  1680. */
  1681. exportAs?: string;
  1682. /**
  1683. * Configures the queries that will be injected into the directive.
  1684. *
  1685. * Content queries are set before the `ngAfterContentInit` callback is called.
  1686. * View queries are set before the `ngAfterViewInit` callback is called.
  1687. *
  1688. * @usageNotes
  1689. *
  1690. * ### Example
  1691. *
  1692. * The following example shows how queries are defined
  1693. * and when their results are available in lifecycle hooks:
  1694. *
  1695. * ```
  1696. * @Component({
  1697. * selector: 'someDir',
  1698. * queries: {
  1699. * contentChildren: new ContentChildren(ChildDirective),
  1700. * viewChildren: new ViewChildren(ChildDirective)
  1701. * },
  1702. * template: '<child-directive></child-directive>'
  1703. * })
  1704. * class SomeDir {
  1705. * contentChildren: QueryList<ChildDirective>,
  1706. * viewChildren: QueryList<ChildDirective>
  1707. *
  1708. * ngAfterContentInit() {
  1709. * // contentChildren is set
  1710. * }
  1711. *
  1712. * ngAfterViewInit() {
  1713. * // viewChildren is set
  1714. * }
  1715. * }
  1716. * ```
  1717. *
  1718. * @Annotation
  1719. */
  1720. queries?: {
  1721. [key: string]: any;
  1722. };
  1723. /**
  1724. * Maps class properties to host element bindings for properties,
  1725. * attributes, and events, using a set of key-value pairs.
  1726. *
  1727. * Angular automatically checks host property bindings during change detection.
  1728. * If a binding changes, Angular updates the directive's host element.
  1729. *
  1730. * When the key is a property of the host element, the property value is
  1731. * the propagated to the specified DOM property.
  1732. *
  1733. * When the key is a static attribute in the DOM, the attribute value
  1734. * is propagated to the specified property in the host element.
  1735. *
  1736. * For event handling:
  1737. * - The key is the DOM event that the directive listens to.
  1738. * To listen to global events, add the target to the event name.
  1739. * The target can be `window`, `document` or `body`.
  1740. * - The value is the statement to execute when the event occurs. If the
  1741. * statement evaluates to `false`, then `preventDefault` is applied on the DOM
  1742. * event. A handler method can refer to the `$event` local variable.
  1743. *
  1744. */
  1745. host?: {
  1746. [key: string]: string;
  1747. };
  1748. /**
  1749. * If true, this directive/component will be skipped by the AOT compiler and so will always be
  1750. * compiled using JIT.
  1751. *
  1752. * This exists to support future Ivy work and has no effect currently.
  1753. */
  1754. jit?: true;
  1755. }
  1756. /**
  1757. * Type of the Directive metadata.
  1758. *
  1759. * @publicApi
  1760. */
  1761. export declare const Directive: DirectiveDecorator;
  1762. /**
  1763. * Type of the Directive decorator / constructor function.
  1764. * @publicApi
  1765. */
  1766. export declare interface DirectiveDecorator {
  1767. /**
  1768. * Marks a class as an Angular directive. You can define your own
  1769. * directives to attach custom behavior to elements in the DOM.
  1770. * The options provide configuration metadata that determines
  1771. * how the directive should be processed, instantiated and used at
  1772. * runtime.
  1773. *
  1774. * Directive classes, like component classes, can implement
  1775. * [life-cycle hooks](guide/lifecycle-hooks) to influence their configuration and behavior.
  1776. *
  1777. *
  1778. * @usageNotes
  1779. * To define a directive, mark the class with the decorator and provide metadata.
  1780. *
  1781. * ```
  1782. * import {Directive} from '@angular/core';
  1783. *
  1784. * @Directive({
  1785. * selector: 'my-directive',
  1786. * })
  1787. * export class MyDirective {
  1788. * ...
  1789. * }
  1790. * ```
  1791. *
  1792. * ### Declaring directives
  1793. *
  1794. * Directives are [declarables](guide/glossary#declarable).
  1795. * They must be declared by an NgModule
  1796. * in order to be usable in an app.
  1797. *
  1798. * A directive must belong to exactly one NgModule. Do not re-declare
  1799. * a directive imported from another module.
  1800. * List the directive class in the `declarations` field of an NgModule.
  1801. *
  1802. * ```
  1803. * declarations: [
  1804. * AppComponent,
  1805. * MyDirective
  1806. * ],
  1807. * ```
  1808. *
  1809. * @Annotation
  1810. */
  1811. (obj: Directive): TypeDecorator;
  1812. /**
  1813. * See the `Directive` decorator.
  1814. */
  1815. new (obj: Directive): Directive;
  1816. }
  1817. declare interface DirectiveDefFeature {
  1818. <T>(directiveDef: ɵDirectiveDef<T>): void;
  1819. /**
  1820. * Marks a feature as something that {@link InheritDefinitionFeature} will execute
  1821. * during inheritance.
  1822. *
  1823. * NOTE: DO NOT SET IN ROOT OF MODULE! Doing so will result in tree-shakers/bundlers
  1824. * identifying the change as a side effect, and the feature will be included in
  1825. * every bundle.
  1826. */
  1827. ngInherit?: true;
  1828. }
  1829. declare type DirectiveDefList = (ɵDirectiveDef<any> | ɵComponentDef<any>)[];
  1830. /**
  1831. * Type used for directiveDefs on component definition.
  1832. *
  1833. * The function is necessary to be able to support forward declarations.
  1834. */
  1835. declare type DirectiveDefListOrFactory = (() => DirectiveDefList) | DirectiveDefList;
  1836. declare type DirectiveInstance = {};
  1837. /**
  1838. * An array located in the StylingContext that houses all directive instances and additional
  1839. * data about them.
  1840. *
  1841. * Each entry in this array represents a source of where style/class binding values could
  1842. * come from. By default, there is always at least one directive here with a null value and
  1843. * that represents bindings that live directly on an element in the template (not host bindings).
  1844. *
  1845. * Each successive entry in the array is an actual instance of a directive as well as some
  1846. * additional info about that entry.
  1847. *
  1848. * An entry within this array has the following values:
  1849. * [0] = The instance of the directive (the first entry is null because its reserved for the
  1850. * template)
  1851. * [1] = The pointer that tells where the single styling (stuff like [class.foo] and [style.prop])
  1852. * offset values are located. This value will allow for a binding instruction to find exactly
  1853. * where a style is located.
  1854. * [2] = Whether or not the directive has any styling values that are dirty. This is used as
  1855. * reference within the `renderStyling` function to decide whether to skip iterating
  1856. * through the context when rendering is executed.
  1857. * [3] = The styleSanitizer instance that is assigned to the directive. Although it's unlikely,
  1858. * a directive could introduce its own special style sanitizer and for this reach each
  1859. * directive will get its own space for it (if null then the very first sanitizer is used).
  1860. *
  1861. * Each time a new directive is added it will insert these four values at the end of the array.
  1862. * When this array is examined then the resulting directiveIndex will be resolved by dividing the
  1863. * index value by the size of the array entries (so if DirA is at spot 8 then its index will be 2).
  1864. */
  1865. declare interface DirectiveRegistryValues extends Array<null | {} | boolean | number | StyleSanitizeFn> {
  1866. [DirectiveRegistryValuesIndex.SinglePropValuesIndexOffset]: number;
  1867. [DirectiveRegistryValuesIndex.StyleSanitizerOffset]: StyleSanitizeFn | null;
  1868. }
  1869. /**
  1870. * An enum that outlines the offset/position values for each directive entry and its data
  1871. * that are housed inside of [DirectiveRegistryValues].
  1872. */
  1873. declare const enum DirectiveRegistryValuesIndex {
  1874. SinglePropValuesIndexOffset = 0,
  1875. StyleSanitizerOffset = 1,
  1876. Size = 2
  1877. }
  1878. declare type DirectiveTypeList = (ɵDirectiveDef<any> | ɵComponentDef<any> | Type<any>)[];
  1879. declare type DirectiveTypesOrFactory = (() => DirectiveTypeList) | DirectiveTypeList;
  1880. declare interface DisposableFn {
  1881. (): void;
  1882. }
  1883. /**
  1884. * @description
  1885. * Hook for manual bootstrapping of the application instead of using bootstrap array in @NgModule
  1886. * annotation.
  1887. *
  1888. * Reference to the current application is provided as a parameter.
  1889. *
  1890. * See ["Bootstrapping"](guide/bootstrapping) and ["Entry components"](guide/entry-components).
  1891. *
  1892. * @usageNotes
  1893. * ```typescript
  1894. * class AppModule implements DoBootstrap {
  1895. * ngDoBootstrap(appRef: ApplicationRef) {
  1896. * appRef.bootstrap(AppComponent); // Or some other component
  1897. * }
  1898. * }
  1899. * ```
  1900. *
  1901. * @publicApi
  1902. */
  1903. export declare interface DoBootstrap {
  1904. ngDoBootstrap(appRef: ApplicationRef): void;
  1905. }
  1906. /**
  1907. * A lifecycle hook that invokes a custom change-detection function for a directive,
  1908. * in addition to the check performed by the default change-detector.
  1909. *
  1910. * The default change-detection algorithm looks for differences by comparing
  1911. * bound-property values by reference across change detection runs. You can use this
  1912. * hook to check for and respond to changes by some other means.
  1913. *
  1914. * When the default change detector detects changes, it invokes `ngOnChanges()` if supplied,
  1915. * regardless of whether you perform additional change detection.
  1916. * Typically, you should not use both `DoCheck` and `OnChanges` to respond to
  1917. * changes on the same input.
  1918. *
  1919. * @see `OnChanges`
  1920. * @see [Lifecycle Hooks](guide/lifecycle-hooks#onchanges) guide
  1921. *
  1922. * @usageNotes
  1923. * The following snippet shows how a component can implement this interface
  1924. * to invoke it own change-detection cycle.
  1925. *
  1926. * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='DoCheck'}
  1927. *
  1928. * @publicApi
  1929. */
  1930. export declare interface DoCheck {
  1931. /**
  1932. * A callback method that performs change-detection, invoked
  1933. * after the default change-detector runs.
  1934. * See `KeyValueDiffers` and `IterableDiffers` for implementing
  1935. * custom change checking for collections.
  1936. *
  1937. */
  1938. ngDoCheck(): void;
  1939. }
  1940. /**
  1941. * Marks that the next string is for element.
  1942. *
  1943. * See `I18nMutateOpCodes` documentation.
  1944. */
  1945. declare const ELEMENT_MARKER: ELEMENT_MARKER;
  1946. declare interface ELEMENT_MARKER {
  1947. marker: 'element';
  1948. }
  1949. declare interface ElementDef {
  1950. name: string | null;
  1951. ns: string | null;
  1952. /** ns, name, value */
  1953. attrs: [string, string, string][] | null;
  1954. template: ɵViewDefinition | null;
  1955. componentProvider: NodeDef | null;
  1956. componentRendererType: RendererType2 | null;
  1957. componentView: ViewDefinitionFactory | null;
  1958. /**
  1959. * visible public providers for DI in the view,
  1960. * as see from this element. This does not include private providers.
  1961. */
  1962. publicProviders: {
  1963. [tokenKey: string]: NodeDef;
  1964. } | null;
  1965. /**
  1966. * same as visiblePublicProviders, but also includes private providers
  1967. * that are located on this element.
  1968. */
  1969. allProviders: {
  1970. [tokenKey: string]: NodeDef;
  1971. } | null;
  1972. handleEvent: ElementHandleEventFn | null;
  1973. }
  1974. declare interface ElementHandleEventFn {
  1975. (view: ViewData, eventName: string, event: any): boolean;
  1976. }
  1977. /**
  1978. * A wrapper around a native element inside of a View.
  1979. *
  1980. * An `ElementRef` is backed by a render-specific element. In the browser, this is usually a DOM
  1981. * element.
  1982. *
  1983. * @security Permitting direct access to the DOM can make your application more vulnerable to
  1984. * XSS attacks. Carefully review any use of `ElementRef` in your code. For more detail, see the
  1985. * [Security Guide](http://g.co/ng/security).
  1986. *
  1987. * @publicApi
  1988. */
  1989. export declare class ElementRef<T = any> {
  1990. /**
  1991. * The underlying native element or `null` if direct access to native elements is not supported
  1992. * (e.g. when the application runs in a web worker).
  1993. *
  1994. * <div class="callout is-critical">
  1995. * <header>Use with caution</header>
  1996. * <p>
  1997. * Use this API as the last resort when direct access to DOM is needed. Use templating and
  1998. * data-binding provided by Angular instead. Alternatively you can take a look at {@link
  1999. * Renderer2}
  2000. * which provides API that can safely be used even when direct access to native elements is not
  2001. * supported.
  2002. * </p>
  2003. * <p>
  2004. * Relying on direct DOM access creates tight coupling between your application and rendering
  2005. * layers which will make it impossible to separate the two and deploy your application into a
  2006. * web worker.
  2007. * </p>
  2008. * </div>
  2009. *
  2010. */
  2011. nativeElement: T;
  2012. constructor(nativeElement: T);
  2013. }
  2014. /**
  2015. * Represents an Angular [view](guide/glossary#view) in a view container.
  2016. * An [embedded view](guide/glossary#view-tree) can be referenced from a component
  2017. * other than the hosting component whose template defines it, or it can be defined
  2018. * independently by a `TemplateRef`.
  2019. *
  2020. * Properties of elements in a view can change, but the structure (number and order) of elements in
  2021. * a view cannot. Change the structure of elements by inserting, moving, or
  2022. * removing nested views in a view container.
  2023. *
  2024. * @see `ViewContainerRef`
  2025. *
  2026. * @usageNotes
  2027. *
  2028. * The following template breaks down into two separate `TemplateRef` instances,
  2029. * an outer one and an inner one.
  2030. *
  2031. * ```
  2032. * Count: {{items.length}}
  2033. * <ul>
  2034. * <li *ngFor="let item of items">{{item}}</li>
  2035. * </ul>
  2036. * ```
  2037. *
  2038. * This is the outer `TemplateRef`:
  2039. *
  2040. * ```
  2041. * Count: {{items.length}}
  2042. * <ul>
  2043. * <ng-template ngFor let-item [ngForOf]="items"></ng-template>
  2044. * </ul>
  2045. * ```
  2046. *
  2047. * This is the inner `TemplateRef`:
  2048. *
  2049. * ```
  2050. * <li>{{item}}</li>
  2051. * ```
  2052. *
  2053. * The outer and inner `TemplateRef` instances are assembled into views as follows:
  2054. *
  2055. * ```
  2056. * <!-- ViewRef: outer-0 -->
  2057. * Count: 2
  2058. * <ul>
  2059. * <ng-template view-container-ref></ng-template>
  2060. * <!-- ViewRef: inner-1 --><li>first</li><!-- /ViewRef: inner-1 -->
  2061. * <!-- ViewRef: inner-2 --><li>second</li><!-- /ViewRef: inner-2 -->
  2062. * </ul>
  2063. * <!-- /ViewRef: outer-0 -->
  2064. * ```
  2065. * @publicApi
  2066. */
  2067. export declare abstract class EmbeddedViewRef<C> extends ViewRef {
  2068. /**
  2069. * The context for this view, inherited from the anchor element.
  2070. */
  2071. abstract readonly context: C;
  2072. /**
  2073. * The root nodes for this embedded view.
  2074. */
  2075. abstract readonly rootNodes: any[];
  2076. }
  2077. /**
  2078. * Disable Angular's development mode, which turns off assertions and other
  2079. * checks within the framework.
  2080. *
  2081. * One important assertion this disables verifies that a change detection pass
  2082. * does not result in additional changes to any bindings (also known as
  2083. * unidirectional data flow).
  2084. *
  2085. * @publicApi
  2086. */
  2087. export declare function enableProdMode(): void;
  2088. /**
  2089. * Provides a hook for centralized exception handling.
  2090. *
  2091. * The default implementation of `ErrorHandler` prints error messages to the `console`. To
  2092. * intercept error handling, write a custom exception handler that replaces this default as
  2093. * appropriate for your app.
  2094. *
  2095. * @usageNotes
  2096. * ### Example
  2097. *
  2098. * ```
  2099. * class MyErrorHandler implements ErrorHandler {
  2100. * handleError(error) {
  2101. * // do something with the exception
  2102. * }
  2103. * }
  2104. *
  2105. * @NgModule({
  2106. * providers: [{provide: ErrorHandler, useClass: MyErrorHandler}]
  2107. * })
  2108. * class MyModule {}
  2109. * ```
  2110. *
  2111. * @publicApi
  2112. */
  2113. export declare class ErrorHandler {
  2114. handleError(error: any): void;
  2115. }
  2116. /**
  2117. * Use in directives and components to emit custom events synchronously
  2118. * or asynchronously, and register handlers for those events by subscribing
  2119. * to an instance.
  2120. *
  2121. * @usageNotes
  2122. *
  2123. * In the following example, a component defines two output properties
  2124. * that create event emitters. When the title is clicked, the emitter
  2125. * emits an open or close event to toggle the current visibility state.
  2126. *
  2127. * ```
  2128. * @Component({
  2129. * selector: 'zippy',
  2130. * template: `
  2131. * <div class="zippy">
  2132. * <div (click)="toggle()">Toggle</div>
  2133. * <div [hidden]="!visible">
  2134. * <ng-content></ng-content>
  2135. * </div>
  2136. * </div>`})
  2137. * export class Zippy {
  2138. * visible: boolean = true;
  2139. * @Output() open: EventEmitter<any> = new EventEmitter();
  2140. * @Output() close: EventEmitter<any> = new EventEmitter();
  2141. *
  2142. * toggle() {
  2143. * this.visible = !this.visible;
  2144. * if (this.visible) {
  2145. * this.open.emit(null);
  2146. * } else {
  2147. * this.close.emit(null);
  2148. * }
  2149. * }
  2150. * }
  2151. * ```
  2152. *
  2153. * Access the event object with the `$event` argument passed to the output event
  2154. * handler:
  2155. *
  2156. * ```
  2157. * <zippy (open)="onOpen($event)" (close)="onClose($event)"></zippy>
  2158. * ```
  2159. *
  2160. * ### Notes
  2161. *
  2162. * Uses Rx.Observable but provides an adapter to make it work as specified here:
  2163. * https://github.com/jhusain/observable-spec
  2164. *
  2165. * Once a reference implementation of the spec is available, switch to it.
  2166. *
  2167. * @publicApi
  2168. */
  2169. export declare class EventEmitter<T> extends Subject<T> {
  2170. /**
  2171. * Internal
  2172. */
  2173. __isAsync: boolean;
  2174. /**
  2175. * Creates an instance of this class that can
  2176. * deliver events synchronously or asynchronously.
  2177. *
  2178. * @param isAsync When true, deliver events asynchronously.
  2179. *
  2180. */
  2181. constructor(isAsync?: boolean);
  2182. /**
  2183. * Emits an event containing a given value.
  2184. * @param value The value to emit.
  2185. */
  2186. emit(value?: T): void;
  2187. /**
  2188. * Registers handlers for events emitted by this instance.
  2189. * @param generatorOrNext When supplied, a custom handler for emitted events.
  2190. * @param error When supplied, a custom handler for an error notification
  2191. * from this emitter.
  2192. * @param complete When supplied, a custom handler for a completion
  2193. * notification from this emitter.
  2194. */
  2195. subscribe(generatorOrNext?: any, error?: any, complete?: any): Subscription;
  2196. }
  2197. /**
  2198. * Configures the `Injector` to return a value of another `useExisting` token.
  2199. *
  2200. * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
  2201. *
  2202. * @usageNotes
  2203. *
  2204. * ### Example
  2205. *
  2206. * {@example core/di/ts/provider_spec.ts region='ExistingProvider'}
  2207. *
  2208. * ### Multi-value example
  2209. *
  2210. * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
  2211. *
  2212. * @publicApi
  2213. */
  2214. export declare interface ExistingProvider extends ExistingSansProvider {
  2215. /**
  2216. * An injection token. (Typically an instance of `Type` or `InjectionToken`, but can be `any`).
  2217. */
  2218. provide: any;
  2219. /**
  2220. * If true, then injector returns an array of instances. This is useful to allow multiple
  2221. * providers spread across many files to provide configuration information to a common token.
  2222. */
  2223. multi?: boolean;
  2224. }
  2225. /**
  2226. * Configures the `Injector` to return a value of another `useExisting` token.
  2227. *
  2228. * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
  2229. *
  2230. * @usageNotes
  2231. *
  2232. * ### Example
  2233. *
  2234. * {@example core/di/ts/provider_spec.ts region='ExistingSansProvider'}
  2235. *
  2236. * @publicApi
  2237. */
  2238. declare interface ExistingSansProvider {
  2239. /**
  2240. * Existing `token` to return. (equivalent to `injector.get(useExisting)`)
  2241. */
  2242. useExisting: any;
  2243. }
  2244. /**
  2245. * Set of instructions used to process host bindings efficiently.
  2246. *
  2247. * See VIEW_DATA.md for more information.
  2248. */
  2249. declare interface ExpandoInstructions extends Array<number | HostBindingsFunction<any> | null> {
  2250. }
  2251. /**
  2252. * Definition of what a factory function should look like.
  2253. */
  2254. declare type FactoryFn<T> = {
  2255. /**
  2256. * Subclasses without an explicit constructor call through to the factory of their base
  2257. * definition, providing it with their own constructor to instantiate.
  2258. */
  2259. <U extends T>(t: Type<U>): U;
  2260. /**
  2261. * If no constructor to instantiate is provided, an instance of type T itself is created.
  2262. */
  2263. (t?: undefined): T;
  2264. };
  2265. /**
  2266. * Configures the `Injector` to return a value by invoking a `useFactory` function.
  2267. *
  2268. * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
  2269. *
  2270. * @usageNotes
  2271. *
  2272. * ### Example
  2273. *
  2274. * {@example core/di/ts/provider_spec.ts region='FactoryProvider'}
  2275. *
  2276. * Dependencies can also be marked as optional:
  2277. *
  2278. * {@example core/di/ts/provider_spec.ts region='FactoryProviderOptionalDeps'}
  2279. *
  2280. * ### Multi-value example
  2281. *
  2282. * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
  2283. *
  2284. * @publicApi
  2285. */
  2286. export declare interface FactoryProvider extends FactorySansProvider {
  2287. /**
  2288. * An injection token. (Typically an instance of `Type` or `InjectionToken`, but can be `any`).
  2289. */
  2290. provide: any;
  2291. /**
  2292. * If true, then injector returns an array of instances. This is useful to allow multiple
  2293. * providers spread across many files to provide configuration information to a common token.
  2294. */
  2295. multi?: boolean;
  2296. }
  2297. /**
  2298. * Configures the `Injector` to return a value by invoking a `useFactory` function.
  2299. *
  2300. * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
  2301. *
  2302. * @usageNotes
  2303. * ### Example
  2304. *
  2305. * {@example core/di/ts/provider_spec.ts region='FactorySansProvider'}
  2306. *
  2307. * @publicApi
  2308. */
  2309. declare interface FactorySansProvider {
  2310. /**
  2311. * A function to invoke to create a value for this `token`. The function is invoked with
  2312. * resolved values of `token`s in the `deps` field.
  2313. */
  2314. useFactory: Function;
  2315. /**
  2316. * A list of `token`s which need to be resolved by the injector. The list of values is then
  2317. * used as arguments to the `useFactory` function.
  2318. */
  2319. deps?: any[];
  2320. }
  2321. declare const FLAGS = 2;
  2322. /**
  2323. * Allows to refer to references which are not yet defined.
  2324. *
  2325. * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of
  2326. * DI is declared, but not yet defined. It is also used when the `token` which we use when creating
  2327. * a query is not yet defined.
  2328. *
  2329. * @usageNotes
  2330. * ### Example
  2331. * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}
  2332. * @publicApi
  2333. */
  2334. export declare function forwardRef(forwardRefFn: ForwardRefFn): Type<any>;
  2335. /**
  2336. * An interface that a function passed into {@link forwardRef} has to implement.
  2337. *
  2338. * @usageNotes
  2339. * ### Example
  2340. *
  2341. * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref_fn'}
  2342. * @publicApi
  2343. */
  2344. export declare interface ForwardRefFn {
  2345. (): any;
  2346. }
  2347. /**
  2348. * @publicApi
  2349. */
  2350. export declare const getDebugNode: (nativeNode: any) => DebugNode | null;
  2351. /**
  2352. * Returns the NgModuleFactory with the given id, if it exists and has been loaded.
  2353. * Factories for modules that do not specify an `id` cannot be retrieved. Throws if the module
  2354. * cannot be found.
  2355. * @publicApi
  2356. */
  2357. export declare const getModuleFactory: (id: string) => NgModuleFactory<any>;
  2358. /**
  2359. * Returns the current platform.
  2360. *
  2361. * @publicApi
  2362. */
  2363. export declare function getPlatform(): PlatformRef | null;
  2364. /**
  2365. * Adapter interface for retrieving the `Testability` service associated for a
  2366. * particular context.
  2367. *
  2368. * @publicApi
  2369. */
  2370. export declare interface GetTestability {
  2371. addToWindow(registry: TestabilityRegistry): void;
  2372. findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean): Testability | null;
  2373. }
  2374. declare type GlobalTargetName = 'document' | 'window' | 'body';
  2375. declare type GlobalTargetResolver = (element: any) => {
  2376. name: GlobalTargetName;
  2377. target: EventTarget;
  2378. };
  2379. /**
  2380. * Array of hooks that should be executed for a view and their directive indices.
  2381. *
  2382. * For each node of the view, the following data is stored:
  2383. * 1) Node index (optional)
  2384. * 2) A series of number/function pairs where:
  2385. * - even indices are directive indices
  2386. * - odd indices are hook functions
  2387. *
  2388. * Special cases:
  2389. * - a negative directive index flags an init hook (ngOnInit, ngAfterContentInit, ngAfterViewInit)
  2390. */
  2391. declare type HookData = (number | (() => void))[];
  2392. declare const HOST = 0;
  2393. /**
  2394. * Type of the Host metadata.
  2395. *
  2396. * @publicApi
  2397. */
  2398. export declare interface Host {
  2399. }
  2400. /**
  2401. * Host decorator and metadata.
  2402. *
  2403. * @Annotation
  2404. * @publicApi
  2405. */
  2406. export declare const Host: HostDecorator;
  2407. /**
  2408. * Type of the HostBinding metadata.
  2409. *
  2410. * @publicApi
  2411. */
  2412. export declare interface HostBinding {
  2413. /**
  2414. * The DOM property that is bound to a data property.
  2415. */
  2416. hostPropertyName?: string;
  2417. }
  2418. /**
  2419. * @Annotation
  2420. * @publicApi
  2421. */
  2422. export declare const HostBinding: HostBindingDecorator;
  2423. /**
  2424. * Type of the HostBinding decorator / constructor function.
  2425. *
  2426. * @publicApi
  2427. */
  2428. export declare interface HostBindingDecorator {
  2429. /**
  2430. * Decorator that marks a DOM property as a host-binding property and supplies configuration
  2431. * metadata.
  2432. * Angular automatically checks host property bindings during change detection, and
  2433. * if a binding changes it updates the host element of the directive.
  2434. *
  2435. * @usageNotes
  2436. *
  2437. * The following example creates a directive that sets the `valid` and `invalid`
  2438. * properties on the DOM element that has an `ngModel` directive on it.
  2439. *
  2440. * ```typescript
  2441. * @Directive({selector: '[ngModel]'})
  2442. * class NgModelStatus {
  2443. * constructor(public control: NgModel) {}
  2444. * @HostBinding('class.valid') get valid() { return this.control.valid; }
  2445. * @HostBinding('class.invalid') get invalid() { return this.control.invalid; }
  2446. * }
  2447. *
  2448. * @Component({
  2449. * selector: 'app',
  2450. * template: `<input [(ngModel)]="prop">`,
  2451. * })
  2452. * class App {
  2453. * prop;
  2454. * }
  2455. * ```
  2456. *
  2457. */
  2458. (hostPropertyName?: string): any;
  2459. new (hostPropertyName?: string): any;
  2460. }
  2461. declare type HostBindingsFunction<T> = <U extends T>(rf: ɵRenderFlags, ctx: U, elementIndex: number) => void;
  2462. /**
  2463. * Type of the Host decorator / constructor function.
  2464. *
  2465. * @publicApi
  2466. */
  2467. export declare interface HostDecorator {
  2468. /**
  2469. * A parameter decorator on a view-provider parameter of a class constructor
  2470. * that tells the DI framework to resolve the view by checking injectors of child
  2471. * elements, and stop when reaching the host element of the current component.
  2472. *
  2473. * For an extended example, see
  2474. * ["Dependency Injection Guide"](guide/dependency-injection-in-action#optional).
  2475. *
  2476. * @usageNotes
  2477. *
  2478. * The following shows use with the `@Optional` decorator, and allows for a null result.
  2479. *
  2480. * <code-example path="core/di/ts/metadata_spec.ts" region="Host"></code-example>
  2481. */
  2482. (): any;
  2483. new (): Host;
  2484. }
  2485. /** See CreateComponentOptions.hostFeatures */
  2486. declare type HostFeature = (<T>(component: T, componentDef: ɵComponentDef<T>) => void);
  2487. /**
  2488. * A queue of all host-related styling instructions (these are buffered and evaluated just before
  2489. * the styling is applied).
  2490. *
  2491. * This queue is used when any `hostStyling` instructions are executed from the `hostBindings`
  2492. * function. Template-level styling functions (e.g. `styleMap` and `classProp`)
  2493. * do not make use of this queue (they are applied to the styling context immediately).
  2494. *
  2495. * Due to the nature of how components/directives are evaluated, directives (both parent and
  2496. * subclass directives) may not apply their styling at the right time for the styling
  2497. * algorithm code to prioritize them. Therefore, all host-styling instructions are queued up
  2498. * (buffered) into the array below and are automatically sorted in terms of priority. The
  2499. * priority for host-styling is as follows:
  2500. *
  2501. * 1. The template (this doesn't get queued, but gets evaluated immediately)
  2502. * 2. Any directives present on the host
  2503. * 2a) first child directive styling bindings are updated
  2504. * 2b) then any parent directives
  2505. * 3. Component host bindings
  2506. *
  2507. * Angular runs change detection for each of these cases in a different order. Because of this
  2508. * the array below is populated with each of the host styling functions + their arguments.
  2509. *
  2510. * context[HostInstructionsQueue] = [
  2511. * directiveIndex,
  2512. * hostStylingFn,
  2513. * [argumentsForFn],
  2514. * ...
  2515. * anotherDirectiveIndex, <-- this has a lower priority (a higher directive index)
  2516. * anotherHostStylingFn,
  2517. * [argumentsForFn],
  2518. * ]
  2519. *
  2520. * When `renderStyling` is called (within `class_and_host_bindings.ts`) then the queue is
  2521. * drained and each of the instructions are executed. Once complete the queue is empty then
  2522. * the style/class binding code is rendered on the element (which is what happens normally
  2523. * inside of `renderStyling`).
  2524. *
  2525. * Right now each directive's hostBindings function, as well the template function, both
  2526. * call `stylingApply()` and `hostStylingApply()`. The fact that this is called
  2527. * multiple times for the same element (b/c of change detection) causes some issues. To avoid
  2528. * having styling code be rendered on an element multiple times, the `HostInstructionsQueue`
  2529. * reserves a slot for a reference pointing to the very last directive that was registered and
  2530. * only allows for styling to be applied once that directive is encountered (which will happen
  2531. * as the last update for that element).
  2532. */
  2533. declare interface HostInstructionsQueue extends Array<number | Function | any[]> {
  2534. [0]: number;
  2535. }
  2536. /**
  2537. * Type of the HostListener metadata.
  2538. *
  2539. * @publicApi
  2540. */
  2541. export declare interface HostListener {
  2542. /**
  2543. * The DOM event to listen for.
  2544. */
  2545. eventName?: string;
  2546. /**
  2547. * A set of arguments to pass to the handler method when the event occurs.
  2548. */
  2549. args?: string[];
  2550. }
  2551. /**
  2552. * Binds a DOM event to a host listener and supplies configuration metadata.
  2553. * Angular invokes the supplied handler method when the host element emits the specified event,
  2554. * and updates the bound element with the result.
  2555. * If the handler method returns false, applies `preventDefault` on the bound element.
  2556. *
  2557. * @usageNotes
  2558. *
  2559. * The following example declares a directive
  2560. * that attaches a click listener to a button and counts clicks.
  2561. *
  2562. * ```
  2563. * @Directive({selector: 'button[counting]'})
  2564. * class CountClicks {
  2565. * numberOfClicks = 0;
  2566. *
  2567. * @HostListener('click', ['$event.target'])
  2568. * onClick(btn) {
  2569. * console.log('button', btn, 'number of clicks:', this.numberOfClicks++);
  2570. * }
  2571. * }
  2572. *
  2573. * @Component({
  2574. * selector: 'app',
  2575. * template: '<button counting>Increment</button>',
  2576. * })
  2577. * class App {}
  2578. * ```
  2579. *
  2580. * @Annotation
  2581. * @publicApi
  2582. */
  2583. export declare const HostListener: HostListenerDecorator;
  2584. /**
  2585. * Type of the HostListener decorator / constructor function.
  2586. *
  2587. * @publicApi
  2588. */
  2589. export declare interface HostListenerDecorator {
  2590. /**
  2591. * Decorator that declares a DOM event to listen for,
  2592. * and provides a handler method to run when that event occurs.
  2593. */
  2594. (eventName: string, args?: string[]): any;
  2595. new (eventName: string, args?: string[]): any;
  2596. }
  2597. declare interface I18nLocalizeOptions {
  2598. translations: {
  2599. [key: string]: string;
  2600. };
  2601. }
  2602. /**
  2603. * Array storing OpCode for dynamically creating `i18n` blocks.
  2604. *
  2605. * Example:
  2606. * ```ts
  2607. * <I18nCreateOpCode>[
  2608. * // For adding text nodes
  2609. * // ---------------------
  2610. * // Equivalent to:
  2611. * // const node = lView[index++] = document.createTextNode('abc');
  2612. * // lView[1].insertBefore(node, lView[2]);
  2613. * 'abc', 1 << SHIFT_PARENT | 2 << SHIFT_REF | InsertBefore,
  2614. *
  2615. * // Equivalent to:
  2616. * // const node = lView[index++] = document.createTextNode('xyz');
  2617. * // lView[1].appendChild(node);
  2618. * 'xyz', 1 << SHIFT_PARENT | AppendChild,
  2619. *
  2620. * // For adding element nodes
  2621. * // ---------------------
  2622. * // Equivalent to:
  2623. * // const node = lView[index++] = document.createElement('div');
  2624. * // lView[1].insertBefore(node, lView[2]);
  2625. * ELEMENT_MARKER, 'div', 1 << SHIFT_PARENT | 2 << SHIFT_REF | InsertBefore,
  2626. *
  2627. * // Equivalent to:
  2628. * // const node = lView[index++] = document.createElement('div');
  2629. * // lView[1].appendChild(node);
  2630. * ELEMENT_MARKER, 'div', 1 << SHIFT_PARENT | AppendChild,
  2631. *
  2632. * // For adding comment nodes
  2633. * // ---------------------
  2634. * // Equivalent to:
  2635. * // const node = lView[index++] = document.createComment('');
  2636. * // lView[1].insertBefore(node, lView[2]);
  2637. * COMMENT_MARKER, '', 1 << SHIFT_PARENT | 2 << SHIFT_REF | InsertBefore,
  2638. *
  2639. * // Equivalent to:
  2640. * // const node = lView[index++] = document.createComment('');
  2641. * // lView[1].appendChild(node);
  2642. * COMMENT_MARKER, '', 1 << SHIFT_PARENT | AppendChild,
  2643. *
  2644. * // For moving existing nodes to a different location
  2645. * // --------------------------------------------------
  2646. * // Equivalent to:
  2647. * // const node = lView[1];
  2648. * // lView[2].insertBefore(node, lView[3]);
  2649. * 1 << SHIFT_REF | Select, 2 << SHIFT_PARENT | 3 << SHIFT_REF | InsertBefore,
  2650. *
  2651. * // Equivalent to:
  2652. * // const node = lView[1];
  2653. * // lView[2].appendChild(node);
  2654. * 1 << SHIFT_REF | Select, 2 << SHIFT_PARENT | AppendChild,
  2655. *
  2656. * // For removing existing nodes
  2657. * // --------------------------------------------------
  2658. * // const node = lView[1];
  2659. * // removeChild(tView.data(1), node, lView);
  2660. * 1 << SHIFT_REF | Remove,
  2661. *
  2662. * // For writing attributes
  2663. * // --------------------------------------------------
  2664. * // const node = lView[1];
  2665. * // node.setAttribute('attr', 'value');
  2666. * 1 << SHIFT_REF | Select, 'attr', 'value'
  2667. * // NOTE: Select followed by two string (vs select followed by OpCode)
  2668. * ];
  2669. * ```
  2670. * NOTE:
  2671. * - `index` is initial location where the extra nodes should be stored in the EXPANDO section of
  2672. * `LVIewData`.
  2673. *
  2674. * See: `applyI18nCreateOpCodes`;
  2675. */
  2676. declare interface I18nMutateOpCodes extends Array<number | string | ELEMENT_MARKER | COMMENT_MARKER | null> {
  2677. }
  2678. /**
  2679. * Stores DOM operations which need to be applied to update DOM render tree due to changes in
  2680. * expressions.
  2681. *
  2682. * The basic idea is that `i18nExp` OpCodes capture expression changes and update a change
  2683. * mask bit. (Bit 1 for expression 1, bit 2 for expression 2 etc..., bit 32 for expression 32 and
  2684. * higher.) The OpCodes then compare its own change mask against the expression change mask to
  2685. * determine if the OpCodes should execute.
  2686. *
  2687. * These OpCodes can be used by both the i18n block as well as ICU sub-block.
  2688. *
  2689. * ## Example
  2690. *
  2691. * Assume
  2692. * ```ts
  2693. * if (rf & RenderFlags.Update) {
  2694. * i18nExp(bind(ctx.exp1)); // If changed set mask bit 1
  2695. * i18nExp(bind(ctx.exp2)); // If changed set mask bit 2
  2696. * i18nExp(bind(ctx.exp3)); // If changed set mask bit 3
  2697. * i18nExp(bind(ctx.exp4)); // If changed set mask bit 4
  2698. * i18nApply(0); // Apply all changes by executing the OpCodes.
  2699. * }
  2700. * ```
  2701. * We can assume that each call to `i18nExp` sets an internal `changeMask` bit depending on the
  2702. * index of `i18nExp`.
  2703. *
  2704. * ### OpCodes
  2705. * ```ts
  2706. * <I18nUpdateOpCodes>[
  2707. * // The following OpCodes represent: `<div i18n-title="pre{{exp1}}in{{exp2}}post">`
  2708. * // If `changeMask & 0b11`
  2709. * // has changed then execute update OpCodes.
  2710. * // has NOT changed then skip `7` values and start processing next OpCodes.
  2711. * 0b11, 7,
  2712. * // Concatenate `newValue = 'pre'+lView[bindIndex-4]+'in'+lView[bindIndex-3]+'post';`.
  2713. * 'pre', -4, 'in', -3, 'post',
  2714. * // Update attribute: `elementAttribute(1, 'title', sanitizerFn(newValue));`
  2715. * 1 << SHIFT_REF | Attr, 'title', sanitizerFn,
  2716. *
  2717. * // The following OpCodes represent: `<div i18n>Hello {{exp3}}!">`
  2718. * // If `changeMask & 0b100`
  2719. * // has changed then execute update OpCodes.
  2720. * // has NOT changed then skip `4` values and start processing next OpCodes.
  2721. * 0b100, 4,
  2722. * // Concatenate `newValue = 'Hello ' + lView[bindIndex -2] + '!';`.
  2723. * 'Hello ', -2, '!',
  2724. * // Update text: `lView[1].textContent = newValue;`
  2725. * 1 << SHIFT_REF | Text,
  2726. *
  2727. * // The following OpCodes represent: `<div i18n>{exp4, plural, ... }">`
  2728. * // If `changeMask & 0b1000`
  2729. * // has changed then execute update OpCodes.
  2730. * // has NOT changed then skip `4` values and start processing next OpCodes.
  2731. * 0b1000, 4,
  2732. * // Concatenate `newValue = lView[bindIndex -1];`.
  2733. * -1,
  2734. * // Switch ICU: `icuSwitchCase(lView[1], 0, newValue);`
  2735. * 0 << SHIFT_ICU | 1 << SHIFT_REF | IcuSwitch,
  2736. *
  2737. * // Note `changeMask & -1` is always true, so the IcuUpdate will always execute.
  2738. * -1, 1,
  2739. * // Update ICU: `icuUpdateCase(lView[1], 0);`
  2740. * 0 << SHIFT_ICU | 1 << SHIFT_REF | IcuUpdate,
  2741. *
  2742. * ];
  2743. * ```
  2744. *
  2745. */
  2746. declare interface I18nUpdateOpCodes extends Array<string | number | SanitizerFn | null> {
  2747. }
  2748. /**
  2749. * Defines the ICU type of `select` or `plural`
  2750. */
  2751. declare const enum IcuType {
  2752. select = 0,
  2753. plural = 1
  2754. }
  2755. /**
  2756. * This array contains information about input properties that
  2757. * need to be set once from attribute data. It's ordered by
  2758. * directive index (relative to element) so it's simple to
  2759. * look up a specific directive's initial input data.
  2760. *
  2761. * Within each sub-array:
  2762. *
  2763. * i+0: attribute name
  2764. * i+1: minified/internal input name
  2765. * i+2: initial value
  2766. *
  2767. * If a directive on a node does not have any input properties
  2768. * that should be set from attributes, its index is set to null
  2769. * to avoid a sparse array.
  2770. *
  2771. * e.g. [null, ['role-min', 'minified-input', 'button']]
  2772. */
  2773. declare type InitialInputData = (InitialInputs | null)[];
  2774. /**
  2775. * Used by InitialInputData to store input properties
  2776. * that should be set once from attributes.
  2777. *
  2778. * i+0: attribute name
  2779. * i+1: minified/internal input name
  2780. * i+2: initial value
  2781. *
  2782. * e.g. ['role-min', 'minified-input', 'button']
  2783. */
  2784. declare type InitialInputs = string[];
  2785. /**
  2786. * Used as a styling array to house static class and style values that were extracted
  2787. * by the compiler and placed in the animation context via `elementStart` and
  2788. * `elementHostAttrs`.
  2789. *
  2790. * See [InitialStylingValuesIndex] for a breakdown of how all this works.
  2791. */
  2792. declare interface InitialStylingValues extends Array<string | boolean | number | null> {
  2793. [InitialStylingValuesIndex.DefaultNullValuePosition]: null;
  2794. [InitialStylingValuesIndex.CachedStringValuePosition]: string | null;
  2795. }
  2796. /**
  2797. * Used as an offset/position index to figure out where initial styling
  2798. * values are located.
  2799. *
  2800. * Used as a reference point to provide markers to all static styling
  2801. * values (the initial style and class values on an element) within an
  2802. * array within the `StylingContext`. This array contains key/value pairs
  2803. * where the key is the style property name or className and the value is
  2804. * the style value or whether or not a class is present on the elment.
  2805. *
  2806. * The first value is always null so that a initial index value of
  2807. * `0` will always point to a null value.
  2808. *
  2809. * The second value is also always null unless a string-based representation
  2810. * of the styling data was constructed (it gets cached in this slot).
  2811. *
  2812. * If a <div> elements contains a list of static styling values like so:
  2813. *
  2814. * <div class="foo bar baz" style="width:100px; height:200px;">
  2815. *
  2816. * Then the initial styles for that will look like so:
  2817. *
  2818. * Styles:
  2819. * ```
  2820. * StylingContext[InitialStylesIndex] = [
  2821. * null, null, 'width', '100px', height, '200px'
  2822. * ]
  2823. * ```
  2824. *
  2825. * Classes:
  2826. * ```
  2827. * StylingContext[InitialClassesIndex] = [
  2828. * null, null, 'foo', true, 'bar', true, 'baz', true
  2829. * ]
  2830. * ```
  2831. *
  2832. * Initial style and class entries have their own arrays. This is because
  2833. * it's easier to add to the end of one array and not then have to update
  2834. * every context entries' pointer index to the newly offseted values.
  2835. *
  2836. * When property bindinds are added to a context then initial style/class
  2837. * values will also be inserted into the array. This is to create a space
  2838. * in the situation when a follow-up directive inserts static styling into
  2839. * the array. By default, style values are `null` and class values are
  2840. * `false` when inserted by property bindings.
  2841. *
  2842. * For example:
  2843. * ```
  2844. * <div class="foo bar baz"
  2845. * [class.car]="myCarExp"
  2846. * style="width:100px; height:200px;"
  2847. * [style.opacity]="myOpacityExp">
  2848. * ```
  2849. *
  2850. * Will construct initial styling values that look like:
  2851. *
  2852. * Styles:
  2853. * ```
  2854. * StylingContext[InitialStylesIndex] = [
  2855. * null, null, 'width', '100px', height, '200px', 'opacity', null
  2856. * ]
  2857. * ```
  2858. *
  2859. * Classes:
  2860. * ```
  2861. * StylingContext[InitialClassesIndex] = [
  2862. * null, null, 'foo', true, 'bar', true, 'baz', true, 'car', false
  2863. * ]
  2864. * ```
  2865. *
  2866. * Now if a directive comes along and introduces `car` as a static
  2867. * class value or `opacity` then those values will be filled into
  2868. * the initial styles array.
  2869. *
  2870. * For example:
  2871. *
  2872. * ```
  2873. * @Directive({
  2874. * selector: 'opacity-car-directive',
  2875. * host: {
  2876. * 'style': 'opacity:0.5',
  2877. * 'class': 'car'
  2878. * }
  2879. * })
  2880. * class OpacityCarDirective {}
  2881. * ```
  2882. *
  2883. * This will render itself as:
  2884. *
  2885. * Styles:
  2886. * ```
  2887. * StylingContext[InitialStylesIndex] = [
  2888. * null, null, 'width', '100px', height, '200px', 'opacity', '0.5'
  2889. * ]
  2890. * ```
  2891. *
  2892. * Classes:
  2893. * ```
  2894. * StylingContext[InitialClassesIndex] = [
  2895. * null, null, 'foo', true, 'bar', true, 'baz', true, 'car', true
  2896. * ]
  2897. * ```
  2898. */
  2899. declare const enum InitialStylingValuesIndex {
  2900. /**
  2901. * The first value is always `null` so that `styles[0] == null` for unassigned values
  2902. */
  2903. DefaultNullValuePosition = 0,
  2904. /**
  2905. * Used for non-styling code to examine what the style or className string is:
  2906. * styles: ['width', '100px', 0, 'opacity', null, 0, 'height', '200px', 0]
  2907. * => initialStyles[CachedStringValuePosition] = 'width:100px;height:200px';
  2908. * classes: ['foo', true, 0, 'bar', false, 0, 'baz', true, 0]
  2909. * => initialClasses[CachedStringValuePosition] = 'foo bar';
  2910. *
  2911. * Note that this value is `null` by default and it will only be populated
  2912. * once `getInitialStyleStringValue` or `getInitialClassNameValue` is executed.
  2913. */
  2914. CachedStringValuePosition = 1,
  2915. /**
  2916. * Where the style or class values start in the tuple
  2917. */
  2918. KeyValueStartPosition = 2,
  2919. /**
  2920. * The offset value (index + offset) for the property value for each style/class entry
  2921. */
  2922. PropOffset = 0,
  2923. /**
  2924. * The offset value (index + offset) for the style/class value for each style/class entry
  2925. */
  2926. ValueOffset = 1,
  2927. /**
  2928. * The offset value (index + offset) for the style/class directive owner for each style/class
  2929. entry
  2930. */
  2931. DirectiveOwnerOffset = 2,
  2932. /**
  2933. * The first bit set aside to mark if the initial style was already rendere
  2934. */
  2935. AppliedFlagBitPosition = 0,
  2936. AppliedFlagBitLength = 1,
  2937. /**
  2938. * The total size for each style/class entry (prop + value + directiveOwner)
  2939. */
  2940. Size = 3
  2941. }
  2942. /**
  2943. * Type of the Inject metadata.
  2944. *
  2945. * @publicApi
  2946. */
  2947. export declare interface Inject {
  2948. /**
  2949. * A [DI token](guide/glossary#di-token) that maps to the dependency to be injected.
  2950. */
  2951. token: any;
  2952. }
  2953. /**
  2954. * Inject decorator and metadata.
  2955. *
  2956. * @Annotation
  2957. * @publicApi
  2958. */
  2959. export declare const Inject: InjectDecorator;
  2960. /**
  2961. * Injects a token from the currently active injector.
  2962. *
  2963. * Must be used in the context of a factory function such as one defined for an
  2964. * `InjectionToken`. Throws an error if not called from such a context.
  2965. *
  2966. * Within such a factory function, using this function to request injection of a dependency
  2967. * is faster and more type-safe than providing an additional array of dependencies
  2968. * (as has been common with `useFactory` providers).
  2969. *
  2970. * @param token The injection token for the dependency to be injected.
  2971. * @param flags Optional flags that control how injection is executed.
  2972. * The flags correspond to injection strategies that can be specified with
  2973. * parameter decorators `@Host`, `@Self`, `@SkipSef`, and `@Optional`.
  2974. * @returns True if injection is successful, null otherwise.
  2975. *
  2976. * @usageNotes
  2977. *
  2978. * ### Example
  2979. *
  2980. * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}
  2981. *
  2982. * @publicApi
  2983. */
  2984. export declare const inject: typeof ɵɵinject;
  2985. /**
  2986. * Type of the Injectable metadata.
  2987. *
  2988. * @publicApi
  2989. */
  2990. export declare interface Injectable {
  2991. /**
  2992. * Determines which injectors will provide the injectable,
  2993. * by either associating it with an @NgModule or other `InjectorType`,
  2994. * or by specifying that this injectable should be provided in the
  2995. * 'root' injector, which will be the application-level injector in most apps.
  2996. */
  2997. providedIn?: Type<any> | 'root' | null;
  2998. }
  2999. /**
  3000. * Injectable decorator and metadata.
  3001. *
  3002. * @Annotation
  3003. * @publicApi
  3004. */
  3005. export declare const Injectable: InjectableDecorator;
  3006. /**
  3007. * Type of the Injectable decorator / constructor function.
  3008. *
  3009. * @publicApi
  3010. */
  3011. export declare interface InjectableDecorator {
  3012. /**
  3013. * Marks a class as available to `Injector` for creation.
  3014. *
  3015. * @see [Introduction to Services and DI](guide/architecture-services)
  3016. * @see [Dependency Injection Guide](guide/dependency-injection)
  3017. *
  3018. * @usageNotes
  3019. *
  3020. * The following example shows how service classes are properly marked as
  3021. * injectable.
  3022. *
  3023. * <code-example path="core/di/ts/metadata_spec.ts" region="Injectable"></code-example>
  3024. *
  3025. */
  3026. (): TypeDecorator;
  3027. (options?: {
  3028. providedIn: Type<any> | 'root' | null;
  3029. } & InjectableProvider): TypeDecorator;
  3030. new (): Injectable;
  3031. new (options?: {
  3032. providedIn: Type<any> | 'root' | null;
  3033. } & InjectableProvider): Injectable;
  3034. }
  3035. /**
  3036. * Injectable providers used in `@Injectable` decorator.
  3037. *
  3038. * @publicApi
  3039. */
  3040. export declare type InjectableProvider = ValueSansProvider | ExistingSansProvider | StaticClassSansProvider | ConstructorSansProvider | FactorySansProvider | ClassSansProvider;
  3041. /**
  3042. * A `Type` which has an `InjectableDef` static field.
  3043. *
  3044. * `InjectableDefType`s contain their own Dependency Injection metadata and are usable in an
  3045. * `InjectorDef`-based `StaticInjector.
  3046. *
  3047. * @publicApi
  3048. */
  3049. export declare interface InjectableType<T> extends Type<T> {
  3050. /**
  3051. * Opaque type whose structure is highly version dependent. Do not rely on any properties.
  3052. */
  3053. ngInjectableDef: never;
  3054. }
  3055. /** Returns a ChangeDetectorRef (a.k.a. a ViewRef) */
  3056. declare function injectChangeDetectorRef(): ChangeDetectorRef;
  3057. /**
  3058. * Type of the Inject decorator / constructor function.
  3059. *
  3060. * @publicApi
  3061. */
  3062. export declare interface InjectDecorator {
  3063. /**
  3064. * A parameter decorator on a dependency parameter of a class constructor
  3065. * that specifies a custom provider of the dependency.
  3066. *
  3067. * Learn more in the ["Dependency Injection Guide"](guide/dependency-injection).
  3068. *
  3069. * @usageNotes
  3070. * The following example shows a class constructor that specifies a
  3071. * custom provider of a dependency using the parameter decorator.
  3072. *
  3073. * When `@Inject()` is not present, the injector uses the type annotation of the
  3074. * parameter as the provider.
  3075. *
  3076. * <code-example path="core/di/ts/metadata_spec.ts"
  3077. * region="InjectWithoutDecorator"></code-example>
  3078. */
  3079. (token: any): any;
  3080. new (token: any): Inject;
  3081. }
  3082. /**
  3083. * Creates an ElementRef from the most recent node.
  3084. *
  3085. * @returns The ElementRef instance to use
  3086. */
  3087. declare function injectElementRef(ElementRefToken: typeof ElementRef): ElementRef;
  3088. /**
  3089. * Injection flags for DI.
  3090. *
  3091. * @publicApi
  3092. */
  3093. export declare enum InjectFlags {
  3094. /** Check self and check parent injector if needed */
  3095. Default = 0,
  3096. /**
  3097. * Specifies that an injector should retrieve a dependency from any injector until reaching the
  3098. * host element of the current component. (Only used with Element Injector)
  3099. */
  3100. Host = 1,
  3101. /** Don't ascend to ancestors of the node requesting injection. */
  3102. Self = 2,
  3103. /** Skip the node that is requesting injection. */
  3104. SkipSelf = 4,
  3105. /** Inject `defaultValue` instead if token not found. */
  3106. Optional = 8
  3107. }
  3108. /**
  3109. * Creates a token that can be used in a DI Provider.
  3110. *
  3111. * Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a
  3112. * runtime representation) such as when injecting an interface, callable type, array or
  3113. * parameterized type.
  3114. *
  3115. * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by
  3116. * the `Injector`. This provides additional level of type safety.
  3117. *
  3118. * ```
  3119. * interface MyInterface {...}
  3120. * var myInterface = injector.get(new InjectionToken<MyInterface>('SomeToken'));
  3121. * // myInterface is inferred to be MyInterface.
  3122. * ```
  3123. *
  3124. * When creating an `InjectionToken`, you can optionally specify a factory function which returns
  3125. * (possibly by creating) a default value of the parameterized type `T`. This sets up the
  3126. * `InjectionToken` using this factory as a provider as if it was defined explicitly in the
  3127. * application's root injector. If the factory function, which takes zero arguments, needs to inject
  3128. * dependencies, it can do so using the `inject` function. See below for an example.
  3129. *
  3130. * Additionally, if a `factory` is specified you can also specify the `providedIn` option, which
  3131. * overrides the above behavior and marks the token as belonging to a particular `@NgModule`. As
  3132. * mentioned above, `'root'` is the default value for `providedIn`.
  3133. *
  3134. * @usageNotes
  3135. * ### Basic Example
  3136. *
  3137. * ### Plain InjectionToken
  3138. *
  3139. * {@example core/di/ts/injector_spec.ts region='InjectionToken'}
  3140. *
  3141. * ### Tree-shakable InjectionToken
  3142. *
  3143. * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}
  3144. *
  3145. *
  3146. * @publicApi
  3147. */
  3148. export declare class InjectionToken<T> {
  3149. protected _desc: string;
  3150. readonly ngInjectableDef: never | undefined;
  3151. constructor(_desc: string, options?: {
  3152. providedIn?: Type<any> | 'root' | null;
  3153. factory: () => T;
  3154. });
  3155. toString(): string;
  3156. }
  3157. /**
  3158. * An InjectionToken that gets the current `Injector` for `createInjector()`-style injectors.
  3159. *
  3160. * Requesting this token instead of `Injector` allows `StaticInjector` to be tree-shaken from a
  3161. * project.
  3162. *
  3163. * @publicApi
  3164. */
  3165. export declare const INJECTOR: InjectionToken<Injector>;
  3166. /**
  3167. * Concrete injectors implement this interface.
  3168. *
  3169. * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
  3170. *
  3171. * @usageNotes
  3172. * ### Example
  3173. *
  3174. * {@example core/di/ts/injector_spec.ts region='Injector'}
  3175. *
  3176. * `Injector` returns itself when given `Injector` as a token:
  3177. *
  3178. * {@example core/di/ts/injector_spec.ts region='injectInjector'}
  3179. *
  3180. * @publicApi
  3181. */
  3182. export declare abstract class Injector {
  3183. static THROW_IF_NOT_FOUND: Object;
  3184. static NULL: Injector;
  3185. /**
  3186. * Retrieves an instance from the injector based on the provided token.
  3187. * @returns The instance from the injector if defined, otherwise the `notFoundValue`.
  3188. * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.
  3189. */
  3190. abstract get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): T;
  3191. /**
  3192. * @deprecated from v4.0.0 use Type<T> or InjectionToken<T>
  3193. * @suppress {duplicate}
  3194. */
  3195. abstract get(token: any, notFoundValue?: any): any;
  3196. /**
  3197. * @deprecated from v5 use the new signature Injector.create(options)
  3198. */
  3199. static create(providers: StaticProvider[], parent?: Injector): Injector;
  3200. static create(options: {
  3201. providers: StaticProvider[];
  3202. parent?: Injector;
  3203. name?: string;
  3204. }): Injector;
  3205. /** @nocollapse */
  3206. static ngInjectableDef: never;
  3207. }
  3208. declare const INJECTOR_2 = 10;
  3209. /**
  3210. * A type which has an `InjectorDef` static field.
  3211. *
  3212. * `InjectorDefTypes` can be used to configure a `StaticInjector`.
  3213. *
  3214. * @publicApi
  3215. */
  3216. export declare interface InjectorType<T> extends Type<T> {
  3217. /**
  3218. * Opaque type whose structure is highly version dependent. Do not rely on any properties.
  3219. */
  3220. ngInjectorDef: never;
  3221. }
  3222. /**
  3223. * Describes the `InjectorDef` equivalent of a `ModuleWithProviders`, an `InjectorDefType` with an
  3224. * associated array of providers.
  3225. *
  3226. * Objects of this type can be listed in the imports section of an `InjectorDef`.
  3227. *
  3228. * NOTE: This is a private type and should not be exported
  3229. */
  3230. declare interface InjectorTypeWithProviders<T> {
  3231. ngModule: InjectorType<T>;
  3232. providers?: (Type<any> | ValueProvider | ExistingProvider | FactoryProvider | ConstructorProvider | StaticClassProvider | ClassProvider | any[])[];
  3233. }
  3234. /** Injects a Renderer2 for the current component. */
  3235. declare function injectRenderer2(): Renderer2;
  3236. /**
  3237. * Creates a TemplateRef given a node.
  3238. *
  3239. * @returns The TemplateRef instance to use
  3240. */
  3241. declare function injectTemplateRef<T>(TemplateRefToken: typeof TemplateRef, ElementRefToken: typeof ElementRef): TemplateRef<T> | null;
  3242. /**
  3243. * Creates a ViewContainerRef and stores it on the injector. Or, if the ViewContainerRef
  3244. * already exists, retrieves the existing ViewContainerRef.
  3245. *
  3246. * @returns The ViewContainerRef instance to use
  3247. */
  3248. declare function injectViewContainerRef(ViewContainerRefToken: typeof ViewContainerRef, ElementRefToken: typeof ElementRef): ViewContainerRef;
  3249. /**
  3250. * Type of metadata for an `Input` property.
  3251. *
  3252. * @publicApi
  3253. */
  3254. export declare interface Input {
  3255. /**
  3256. * The name of the DOM property to which the input property is bound.
  3257. */
  3258. bindingPropertyName?: string;
  3259. }
  3260. /**
  3261. * @Annotation
  3262. * @publicApi
  3263. */
  3264. export declare const Input: InputDecorator;
  3265. /**
  3266. * @publicApi
  3267. */
  3268. export declare interface InputDecorator {
  3269. /**
  3270. * Decorator that marks a class field as an input property and supplies configuration metadata.
  3271. * The input property is bound to a DOM property in the template. During change detection,
  3272. * Angular automatically updates the data property with the DOM property's value.
  3273. *
  3274. * @usageNotes
  3275. *
  3276. * You can supply an optional name to use in templates when the
  3277. * component is instantiated, that maps to the
  3278. * name of the bound property. By default, the original
  3279. * name of the bound property is used for input binding.
  3280. *
  3281. * The following example creates a component with two input properties,
  3282. * one of which is given a special binding name.
  3283. *
  3284. * ```typescript
  3285. * @Component({
  3286. * selector: 'bank-account',
  3287. * template: `
  3288. * Bank Name: {{bankName}}
  3289. * Account Id: {{id}}
  3290. * `
  3291. * })
  3292. * class BankAccount {
  3293. * // This property is bound using its original name.
  3294. * @Input() bankName: string;
  3295. * // this property value is bound to a different property name
  3296. * // when this component is instantiated in a template.
  3297. * @Input('account-id') id: string;
  3298. *
  3299. * // this property is not bound, and is not automatically updated by Angular
  3300. * normalizedBankName: string;
  3301. * }
  3302. *
  3303. * @Component({
  3304. * selector: 'app',
  3305. * template: `
  3306. * <bank-account bankName="RBC" account-id="4747"></bank-account>
  3307. * `
  3308. * })
  3309. * class App {}
  3310. * ```
  3311. */
  3312. (bindingPropertyName?: string): any;
  3313. new (bindingPropertyName?: string): any;
  3314. }
  3315. declare interface InternalNgModuleRef<T> extends NgModuleRef<T> {
  3316. _bootstrapComponents: Type<any>[];
  3317. }
  3318. declare interface InternalViewRef extends ViewRef {
  3319. detachFromAppRef(): void;
  3320. attachToAppRef(appRef: ApplicationRef): void;
  3321. }
  3322. /**
  3323. * Returns whether Angular is in development mode. After called once,
  3324. * the value is locked and won't change any more.
  3325. *
  3326. * By default, this is true, unless a user calls `enableProdMode` before calling this.
  3327. *
  3328. * @publicApi
  3329. */
  3330. export declare function isDevMode(): boolean;
  3331. /**
  3332. * Record representing the item change information.
  3333. *
  3334. * @publicApi
  3335. */
  3336. export declare interface IterableChangeRecord<V> {
  3337. /** Current index of the item in `Iterable` or null if removed. */
  3338. readonly currentIndex: number | null;
  3339. /** Previous index of the item in `Iterable` or null if added. */
  3340. readonly previousIndex: number | null;
  3341. /** The item. */
  3342. readonly item: V;
  3343. /** Track by identity as computed by the `TrackByFunction`. */
  3344. readonly trackById: any;
  3345. }
  3346. declare class IterableChangeRecord_<V> implements IterableChangeRecord<V> {
  3347. item: V;
  3348. trackById: any;
  3349. currentIndex: number | null;
  3350. previousIndex: number | null;
  3351. constructor(item: V, trackById: any);
  3352. }
  3353. /**
  3354. * An object describing the changes in the `Iterable` collection since last time
  3355. * `IterableDiffer#diff()` was invoked.
  3356. *
  3357. * @publicApi
  3358. */
  3359. export declare interface IterableChanges<V> {
  3360. /**
  3361. * Iterate over all changes. `IterableChangeRecord` will contain information about changes
  3362. * to each item.
  3363. */
  3364. forEachItem(fn: (record: IterableChangeRecord<V>) => void): void;
  3365. /**
  3366. * Iterate over a set of operations which when applied to the original `Iterable` will produce the
  3367. * new `Iterable`.
  3368. *
  3369. * NOTE: These are not necessarily the actual operations which were applied to the original
  3370. * `Iterable`, rather these are a set of computed operations which may not be the same as the
  3371. * ones applied.
  3372. *
  3373. * @param record A change which needs to be applied
  3374. * @param previousIndex The `IterableChangeRecord#previousIndex` of the `record` refers to the
  3375. * original `Iterable` location, where as `previousIndex` refers to the transient location
  3376. * of the item, after applying the operations up to this point.
  3377. * @param currentIndex The `IterableChangeRecord#currentIndex` of the `record` refers to the
  3378. * original `Iterable` location, where as `currentIndex` refers to the transient location
  3379. * of the item, after applying the operations up to this point.
  3380. */
  3381. forEachOperation(fn: (record: IterableChangeRecord<V>, previousIndex: number | null, currentIndex: number | null) => void): void;
  3382. /**
  3383. * Iterate over changes in the order of original `Iterable` showing where the original items
  3384. * have moved.
  3385. */
  3386. forEachPreviousItem(fn: (record: IterableChangeRecord<V>) => void): void;
  3387. /** Iterate over all added items. */
  3388. forEachAddedItem(fn: (record: IterableChangeRecord<V>) => void): void;
  3389. /** Iterate over all moved items. */
  3390. forEachMovedItem(fn: (record: IterableChangeRecord<V>) => void): void;
  3391. /** Iterate over all removed items. */
  3392. forEachRemovedItem(fn: (record: IterableChangeRecord<V>) => void): void;
  3393. /** Iterate over all items which had their identity (as computed by the `TrackByFunction`)
  3394. * changed. */
  3395. forEachIdentityChange(fn: (record: IterableChangeRecord<V>) => void): void;
  3396. }
  3397. /**
  3398. * A strategy for tracking changes over time to an iterable. Used by {@link NgForOf} to
  3399. * respond to changes in an iterable by effecting equivalent changes in the DOM.
  3400. *
  3401. * @publicApi
  3402. */
  3403. export declare interface IterableDiffer<V> {
  3404. /**
  3405. * Compute a difference between the previous state and the new `object` state.
  3406. *
  3407. * @param object containing the new value.
  3408. * @returns an object describing the difference. The return value is only valid until the next
  3409. * `diff()` invocation.
  3410. */
  3411. diff(object: NgIterable<V>): IterableChanges<V> | null;
  3412. }
  3413. /**
  3414. * Provides a factory for {@link IterableDiffer}.
  3415. *
  3416. * @publicApi
  3417. */
  3418. export declare interface IterableDifferFactory {
  3419. supports(objects: any): boolean;
  3420. create<V>(trackByFn?: TrackByFunction<V>): IterableDiffer<V>;
  3421. }
  3422. /**
  3423. * A repository of different iterable diffing strategies used by NgFor, NgClass, and others.
  3424. *
  3425. * @publicApi
  3426. */
  3427. export declare class IterableDiffers {
  3428. /** @nocollapse */
  3429. static ngInjectableDef: never;
  3430. /**
  3431. * @deprecated v4.0.0 - Should be private
  3432. */
  3433. factories: IterableDifferFactory[];
  3434. constructor(factories: IterableDifferFactory[]);
  3435. static create(factories: IterableDifferFactory[], parent?: IterableDiffers): IterableDiffers;
  3436. /**
  3437. * Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the
  3438. * inherited {@link IterableDiffers} instance with the provided factories and return a new
  3439. * {@link IterableDiffers} instance.
  3440. *
  3441. * @usageNotes
  3442. * ### Example
  3443. *
  3444. * The following example shows how to extend an existing list of factories,
  3445. * which will only be applied to the injector for this component and its children.
  3446. * This step is all that's required to make a new {@link IterableDiffer} available.
  3447. *
  3448. * ```
  3449. * @Component({
  3450. * viewProviders: [
  3451. * IterableDiffers.extend([new ImmutableListDiffer()])
  3452. * ]
  3453. * })
  3454. * ```
  3455. */
  3456. static extend(factories: IterableDifferFactory[]): StaticProvider;
  3457. find(iterable: any): IterableDifferFactory;
  3458. }
  3459. /**
  3460. * Record representing the item change information.
  3461. *
  3462. * @publicApi
  3463. */
  3464. export declare interface KeyValueChangeRecord<K, V> {
  3465. /**
  3466. * Current key in the Map.
  3467. */
  3468. readonly key: K;
  3469. /**
  3470. * Current value for the key or `null` if removed.
  3471. */
  3472. readonly currentValue: V | null;
  3473. /**
  3474. * Previous value for the key or `null` if added.
  3475. */
  3476. readonly previousValue: V | null;
  3477. }
  3478. /**
  3479. * An object describing the changes in the `Map` or `{[k:string]: string}` since last time
  3480. * `KeyValueDiffer#diff()` was invoked.
  3481. *
  3482. * @publicApi
  3483. */
  3484. export declare interface KeyValueChanges<K, V> {
  3485. /**
  3486. * Iterate over all changes. `KeyValueChangeRecord` will contain information about changes
  3487. * to each item.
  3488. */
  3489. forEachItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
  3490. /**
  3491. * Iterate over changes in the order of original Map showing where the original items
  3492. * have moved.
  3493. */
  3494. forEachPreviousItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
  3495. /**
  3496. * Iterate over all keys for which values have changed.
  3497. */
  3498. forEachChangedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
  3499. /**
  3500. * Iterate over all added items.
  3501. */
  3502. forEachAddedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
  3503. /**
  3504. * Iterate over all removed items.
  3505. */
  3506. forEachRemovedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
  3507. }
  3508. /**
  3509. * A differ that tracks changes made to an object over time.
  3510. *
  3511. * @publicApi
  3512. */
  3513. export declare interface KeyValueDiffer<K, V> {
  3514. /**
  3515. * Compute a difference between the previous state and the new `object` state.
  3516. *
  3517. * @param object containing the new value.
  3518. * @returns an object describing the difference. The return value is only valid until the next
  3519. * `diff()` invocation.
  3520. */
  3521. diff(object: Map<K, V>): KeyValueChanges<K, V> | null;
  3522. /**
  3523. * Compute a difference between the previous state and the new `object` state.
  3524. *
  3525. * @param object containing the new value.
  3526. * @returns an object describing the difference. The return value is only valid until the next
  3527. * `diff()` invocation.
  3528. */
  3529. diff(object: {
  3530. [key: string]: V;
  3531. }): KeyValueChanges<string, V> | null;
  3532. }
  3533. /**
  3534. * Provides a factory for {@link KeyValueDiffer}.
  3535. *
  3536. * @publicApi
  3537. */
  3538. export declare interface KeyValueDifferFactory {
  3539. /**
  3540. * Test to see if the differ knows how to diff this kind of object.
  3541. */
  3542. supports(objects: any): boolean;
  3543. /**
  3544. * Create a `KeyValueDiffer`.
  3545. */
  3546. create<K, V>(): KeyValueDiffer<K, V>;
  3547. }
  3548. /**
  3549. * A repository of different Map diffing strategies used by NgClass, NgStyle, and others.
  3550. *
  3551. * @publicApi
  3552. */
  3553. export declare class KeyValueDiffers {
  3554. /** @nocollapse */
  3555. static ngInjectableDef: never;
  3556. /**
  3557. * @deprecated v4.0.0 - Should be private.
  3558. */
  3559. factories: KeyValueDifferFactory[];
  3560. constructor(factories: KeyValueDifferFactory[]);
  3561. static create<S>(factories: KeyValueDifferFactory[], parent?: KeyValueDiffers): KeyValueDiffers;
  3562. /**
  3563. * Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the
  3564. * inherited {@link KeyValueDiffers} instance with the provided factories and return a new
  3565. * {@link KeyValueDiffers} instance.
  3566. *
  3567. * @usageNotes
  3568. * ### Example
  3569. *
  3570. * The following example shows how to extend an existing list of factories,
  3571. * which will only be applied to the injector for this component and its children.
  3572. * This step is all that's required to make a new {@link KeyValueDiffer} available.
  3573. *
  3574. * ```
  3575. * @Component({
  3576. * viewProviders: [
  3577. * KeyValueDiffers.extend([new ImmutableMapDiffer()])
  3578. * ]
  3579. * })
  3580. * ```
  3581. */
  3582. static extend<S>(factories: KeyValueDifferFactory[]): StaticProvider;
  3583. find(kv: any): KeyValueDifferFactory;
  3584. }
  3585. /**
  3586. * The state associated with a container.
  3587. *
  3588. * This is an array so that its structure is closer to LView. This helps
  3589. * when traversing the view tree (which is a mix of containers and component
  3590. * views), so we can jump to viewOrContainer[NEXT] in the same way regardless
  3591. * of type.
  3592. */
  3593. declare interface LContainer extends Array<any> {
  3594. /**
  3595. * The host element of this LContainer.
  3596. *
  3597. * The host could be an LView if this container is on a component node.
  3598. * In that case, the component LView is its HOST.
  3599. *
  3600. * It could also be a styling context if this is a node with a style/class
  3601. * binding.
  3602. */
  3603. readonly [HOST]: RElement | RComment | StylingContext | ɵangular_packages_core_core_bm;
  3604. /**
  3605. * This is a type field which allows us to differentiate `LContainer` from `StylingContext` in an
  3606. * efficient way. The value is always set to `true`
  3607. */
  3608. [TYPE]: true;
  3609. /**
  3610. * The next active index in the views array to read or write to. This helps us
  3611. * keep track of where we are in the views array.
  3612. * In the case the LContainer is created for a ViewContainerRef,
  3613. * it is set to null to identify this scenario, as indices are "absolute" in that case,
  3614. * i.e. provided directly by the user of the ViewContainerRef API.
  3615. */
  3616. [ACTIVE_INDEX]: number;
  3617. /**
  3618. * Access to the parent view is necessary so we can propagate back
  3619. * up from inside a container to parent[NEXT].
  3620. */
  3621. [PARENT]: ɵangular_packages_core_core_bm;
  3622. /**
  3623. * This allows us to jump from a container to a sibling container or component
  3624. * view with the same parent, so we can remove listeners efficiently.
  3625. */
  3626. [NEXT]: ɵangular_packages_core_core_bm | LContainer | null;
  3627. /**
  3628. * Queries active for this container - all the views inserted to / removed from
  3629. * this container are reported to queries referenced here.
  3630. */
  3631. [QUERIES]: LQueries | null;
  3632. /**
  3633. * Pointer to the `TNode` which represents the host of the container.
  3634. */
  3635. [T_HOST]: TNode;
  3636. /** The comment element that serves as an anchor for this LContainer. */
  3637. readonly [NATIVE]: RComment;
  3638. /**
  3639. * Array of `ViewRef`s used by any `ViewContainerRef`s that point to this container.
  3640. *
  3641. * This is lazily initialized by `ViewContainerRef` when the first view is inserted.
  3642. */
  3643. [VIEW_REFS]: ViewRef[] | null;
  3644. }
  3645. /**
  3646. * Provide this token to set the locale of your application.
  3647. * It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,
  3648. * DecimalPipe and PercentPipe) and by ICU expressions.
  3649. *
  3650. * See the [i18n guide](guide/i18n#setting-up-locale) for more information.
  3651. *
  3652. * @usageNotes
  3653. * ### Example
  3654. *
  3655. * ```typescript
  3656. * import { LOCALE_ID } from '@angular/core';
  3657. * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
  3658. * import { AppModule } from './app/app.module';
  3659. *
  3660. * platformBrowserDynamic().bootstrapModule(AppModule, {
  3661. * providers: [{provide: LOCALE_ID, useValue: 'en-US' }]
  3662. * });
  3663. * ```
  3664. *
  3665. * @publicApi
  3666. */
  3667. export declare const LOCALE_ID: InjectionToken<string>;
  3668. /**
  3669. * Type for a function that extracts a value for a local refs.
  3670. * Example:
  3671. * - `<div #nativeDivEl>` - `nativeDivEl` should point to the native `<div>` element;
  3672. * - `<ng-template #tplRef>` - `tplRef` should point to the `TemplateRef` instance;
  3673. */
  3674. declare type LocalRefExtractor = (tNode: TNodeWithLocalRefs, currentView: ɵangular_packages_core_core_bm) => any;
  3675. /** Used for tracking queries (e.g. ViewChild, ContentChild). */
  3676. declare interface LQueries {
  3677. /**
  3678. * The parent LQueries instance.
  3679. *
  3680. * When there is a content query, a new LQueries instance is created to avoid mutating any
  3681. * existing LQueries. After we are done searching content children, the parent property allows
  3682. * us to traverse back up to the original LQueries instance to continue to search for matches
  3683. * in the main view.
  3684. */
  3685. parent: LQueries | null;
  3686. /**
  3687. * The index of the node on which this LQueries instance was created / cloned in a given LView.
  3688. *
  3689. * This index is stored to minimize LQueries cloning: we can observe that LQueries can be mutated
  3690. * only under 2 conditions:
  3691. * - we are crossing an element that has directives with content queries (new queries are added);
  3692. * - we are descending into element hierarchy (creating a child element of an existing element)
  3693. * and the current LQueries object is tracking shallow queries (shallow queries are removed).
  3694. *
  3695. * Since LQueries are not cloned systematically we need to know exactly where (on each element)
  3696. * cloning occurred, so we can properly restore the set of tracked queries when going up the
  3697. * elements hierarchy.
  3698. *
  3699. * Always set to -1 for view queries as view queries are created before we process any node in a
  3700. * given view.
  3701. */
  3702. nodeIndex: number;
  3703. /**
  3704. * Ask queries to prepare a copy of itself. This ensures that:
  3705. * - tracking new queries on content nodes doesn't mutate list of queries tracked on a parent
  3706. * node;
  3707. * - we don't track shallow queries when descending into elements hierarchy.
  3708. *
  3709. * We will clone LQueries before constructing content queries
  3710. */
  3711. clone(tNode: TNode): LQueries;
  3712. /**
  3713. * Notify `LQueries` that a new `TNode` has been created and needs to be added to query results
  3714. * if matching query predicate.
  3715. */
  3716. addNode(tNode: ɵangular_packages_core_core_bg | TContainerNode | TElementContainerNode): void;
  3717. /**
  3718. * Notify `LQueries` that a new `TNode` has been created and needs to be added to query results
  3719. * if matching query predicate. This is a special mode invoked if the query container has to
  3720. * be created out of order (e.g. view created in the constructor of a directive).
  3721. */
  3722. insertNodeBeforeViews(tNode: ɵangular_packages_core_core_bg | TContainerNode | TElementContainerNode): void;
  3723. /**
  3724. * Notify `LQueries` that a new LContainer was added to ivy data structures. As a result we need
  3725. * to prepare room for views that might be inserted into this container.
  3726. */
  3727. container(): LQueries | null;
  3728. /**
  3729. * Notify `LQueries` that a new `LView` has been created. As a result we need to prepare room
  3730. * and collect nodes that match query predicate.
  3731. */
  3732. createView(): LQueries | null;
  3733. /**
  3734. * Notify `LQueries` that a new `LView` has been added to `LContainer`. As a result all
  3735. * the matching nodes from this view should be added to container's queries.
  3736. */
  3737. insertView(newViewIndex: number): void;
  3738. /**
  3739. * Notify `LQueries` that an `LView` has been removed from `LContainer`. As a result all
  3740. * the matching nodes from this view should be removed from container's queries.
  3741. */
  3742. removeView(): void;
  3743. /**
  3744. * Add additional `QueryList` to track.
  3745. *
  3746. * @param queryList `QueryList` to update with changes.
  3747. * @param predicate Either `Type` or selector array of [key, value] predicates.
  3748. * @param descend If true the query will recursively apply to the children.
  3749. * @param read Indicates which token should be read from DI for this query.
  3750. */
  3751. track<T>(queryList: QueryList<T>, predicate: Type<any> | string[], descend?: boolean, read?: Type<T>): void;
  3752. }
  3753. /**
  3754. * Array-based representation of a key/value array.
  3755. *
  3756. * The format of the array is "property", "value", "property2",
  3757. * "value2", etc...
  3758. *
  3759. * The first value in the array is reserved to store the instance
  3760. * of the key/value array that was used to populate the property/
  3761. * value entries that take place in the remainder of the array.
  3762. */
  3763. declare interface LStylingMap extends Array<{} | string | number | null> {
  3764. [LStylingMapIndex.RawValuePosition]: {} | string | null;
  3765. }
  3766. /**
  3767. * An index of position and offset points for any data stored within a `LStylingMap` instance.
  3768. */
  3769. declare const enum LStylingMapIndex {
  3770. /** The location of the raw key/value map instance used last to populate the array entries */
  3771. RawValuePosition = 0,
  3772. /** Where the values start in the array */
  3773. ValuesStartPosition = 1,
  3774. /** The size of each property/value entry */
  3775. TupleSize = 2,
  3776. /** The offset for the property entry in the tuple */
  3777. PropOffset = 0,
  3778. /** The offset for the value entry in the tuple */
  3779. ValueOffset = 1
  3780. }
  3781. /** Flags associated with an LView (saved in LView[FLAGS]) */
  3782. declare const enum LViewFlags {
  3783. /** The state of the init phase on the first 2 bits */
  3784. InitPhaseStateIncrementer = 1,
  3785. InitPhaseStateMask = 3,
  3786. /**
  3787. * Whether or not the view is in creationMode.
  3788. *
  3789. * This must be stored in the view rather than using `data` as a marker so that
  3790. * we can properly support embedded views. Otherwise, when exiting a child view
  3791. * back into the parent view, `data` will be defined and `creationMode` will be
  3792. * improperly reported as false.
  3793. */
  3794. CreationMode = 4,
  3795. /**
  3796. * Whether or not this LView instance is on its first processing pass.
  3797. *
  3798. * An LView instance is considered to be on its "first pass" until it
  3799. * has completed one creation mode run and one update mode run. At this
  3800. * time, the flag is turned off.
  3801. */
  3802. FirstLViewPass = 8,
  3803. /** Whether this view has default change detection strategy (checks always) or onPush */
  3804. CheckAlways = 16,
  3805. /**
  3806. * Whether or not manual change detection is turned on for onPush components.
  3807. *
  3808. * This is a special mode that only marks components dirty in two cases:
  3809. * 1) There has been a change to an @Input property
  3810. * 2) `markDirty()` has been called manually by the user
  3811. *
  3812. * Note that in this mode, the firing of events does NOT mark components
  3813. * dirty automatically.
  3814. *
  3815. * Manual mode is turned off by default for backwards compatibility, as events
  3816. * automatically mark OnPush components dirty in View Engine.
  3817. *
  3818. * TODO: Add a public API to ChangeDetectionStrategy to turn this mode on
  3819. */
  3820. ManualOnPush = 32,
  3821. /** Whether or not this view is currently dirty (needing check) */
  3822. Dirty = 64,
  3823. /** Whether or not this view is currently attached to change detection tree. */
  3824. Attached = 128,
  3825. /** Whether or not this view is destroyed. */
  3826. Destroyed = 256,
  3827. /** Whether or not this view is the root view */
  3828. IsRoot = 512,
  3829. /**
  3830. * Index of the current init phase on last 22 bits
  3831. */
  3832. IndexWithinInitPhaseIncrementer = 1024,
  3833. IndexWithinInitPhaseShift = 10,
  3834. IndexWithinInitPhaseReset = 1023
  3835. }
  3836. /**
  3837. * Used a reference for all multi styling values (values that are assigned via the
  3838. * `[style]` and `[class]` bindings).
  3839. *
  3840. * Single-styling properties (things set via `[style.prop]` and `[class.name]` bindings)
  3841. * are not handled using the same approach as multi-styling bindings (such as `[style]`
  3842. * `[class]` bindings).
  3843. *
  3844. * Multi-styling bindings rely on a diffing algorithm to figure out what properties have been added,
  3845. * removed and modified. Multi-styling properties are also evaluated across directives--which means
  3846. * that Angular supports having multiple directives all write to the same `[style]` and `[class]`
  3847. * bindings (using host bindings) even if the `[style]` and/or `[class]` bindings are being written
  3848. * to on the template element.
  3849. *
  3850. * All multi-styling values that are written to an element (whether it be from the template or any
  3851. * directives attached to the element) are all written into the `MapBasedOffsetValues` array. (Note
  3852. * that there are two arrays: one for styles and another for classes.)
  3853. *
  3854. * This array is shaped in the following way:
  3855. *
  3856. * [0] = The total amount of unique multi-style or multi-class entries that exist currently in the
  3857. * context.
  3858. * [1+] = Contains an entry of four values ... Each entry is a value assigned by a
  3859. * `[style]`/`[class]`
  3860. * binding (we call this a **source**).
  3861. *
  3862. * An example entry looks like so (at a given `i` index):
  3863. * [i + 0] = Whether or not the value is dirty
  3864. *
  3865. * [i + 1] = The index of where the map-based values
  3866. * (for this **source**) start within the context
  3867. *
  3868. * [i + 2] = The untouched, last set value of the binding
  3869. *
  3870. * [i + 3] = The total amount of unqiue binding values that were
  3871. * extracted and set into the context. (Note that this value does
  3872. * not reflect the total amount of values within the binding
  3873. * value (since it's a map), but instead reflects the total values
  3874. * that were not used by another directive).
  3875. *
  3876. * Each time a directive (or template) writes a value to a `[class]`/`[style]` binding then the
  3877. * styling diffing algorithm code will decide whether or not to update the value based on the
  3878. * following rules:
  3879. *
  3880. * 1. If a more important directive (either the template or a directive that was registered
  3881. * beforehand) has written a specific styling value into the context then any follow-up styling
  3882. * values (set by another directive via its `[style]` and/or `[class]` host binding) will not be
  3883. * able to set it. This is because the former directive has priorty.
  3884. * 2. Only if a former directive has set a specific styling value to null (whether by actually
  3885. * setting it to null or not including it in is map value) then a less imporatant directive can
  3886. * set its own value.
  3887. *
  3888. * ## How the map-based styling algorithm updates itself
  3889. */
  3890. declare interface MapBasedOffsetValues extends Array<any> {
  3891. [MapBasedOffsetValuesIndex.EntriesCountPosition]: number;
  3892. }
  3893. declare const enum MapBasedOffsetValuesIndex {
  3894. EntriesCountPosition = 0,
  3895. ValuesStartPosition = 1,
  3896. DirtyFlagOffset = 0,
  3897. PositionStartOffset = 1,
  3898. ValueOffset = 2,
  3899. ValueCountOffset = 3,
  3900. Size = 4
  3901. }
  3902. /**
  3903. * Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy
  3904. * that the compiler should use in case of missing translations:
  3905. * - Error: throw if you have missing translations.
  3906. * - Warning (default): show a warning in the console and/or shell.
  3907. * - Ignore: do nothing.
  3908. *
  3909. * See the [i18n guide](guide/i18n#missing-translation) for more information.
  3910. *
  3911. * @usageNotes
  3912. * ### Example
  3913. * ```typescript
  3914. * import { MissingTranslationStrategy } from '@angular/core';
  3915. * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
  3916. * import { AppModule } from './app/app.module';
  3917. *
  3918. * platformBrowserDynamic().bootstrapModule(AppModule, {
  3919. * missingTranslation: MissingTranslationStrategy.Error
  3920. * });
  3921. * ```
  3922. *
  3923. * @publicApi
  3924. */
  3925. export declare enum MissingTranslationStrategy {
  3926. Error = 0,
  3927. Warning = 1,
  3928. Ignore = 2
  3929. }
  3930. /**
  3931. * Combination of NgModuleFactory and ComponentFactorys.
  3932. *
  3933. * @publicApi
  3934. */
  3935. export declare class ModuleWithComponentFactories<T> {
  3936. ngModuleFactory: NgModuleFactory<T>;
  3937. componentFactories: ComponentFactory<any>[];
  3938. constructor(ngModuleFactory: NgModuleFactory<T>, componentFactories: ComponentFactory<any>[]);
  3939. }
  3940. /**
  3941. * A wrapper around an NgModule that associates it with the providers.
  3942. *
  3943. * @param T the module type. In Ivy applications, this must be explicitly
  3944. * provided.
  3945. *
  3946. * @publicApi
  3947. */
  3948. export declare interface ModuleWithProviders<T = any /** TODO(alxhub): remove default when callers pass explicit type param */> {
  3949. ngModule: Type<T>;
  3950. providers?: Provider[];
  3951. }
  3952. declare const NATIVE = 7;
  3953. declare const NEXT = 4;
  3954. declare interface NgContentDef {
  3955. /**
  3956. * this index is checked against NodeDef.ngContentIndex to find the nodes
  3957. * that are matched by this ng-content.
  3958. * Note that a NodeDef with an ng-content can be reprojected, i.e.
  3959. * have a ngContentIndex on its own.
  3960. */
  3961. index: number;
  3962. }
  3963. /**
  3964. * A type describing supported iterable types.
  3965. *
  3966. * @publicApi
  3967. */
  3968. export declare type NgIterable<T> = Array<T> | Iterable<T>;
  3969. /**
  3970. * Type of the NgModule metadata.
  3971. *
  3972. * @publicApi
  3973. */
  3974. export declare interface NgModule {
  3975. /**
  3976. * The set of injectable objects that are available in the injector
  3977. * of this module.
  3978. *
  3979. * @see [Dependency Injection guide](guide/dependency-injection)
  3980. * @see [NgModule guide](guide/providers)
  3981. *
  3982. * @usageNotes
  3983. *
  3984. * Dependencies whose providers are listed here become available for injection
  3985. * into any component, directive, pipe or service that is a child of this injector.
  3986. * The NgModule used for bootstrapping uses the root injector, and can provide dependencies
  3987. * to any part of the app.
  3988. *
  3989. * A lazy-loaded module has its own injector, typically a child of the app root injector.
  3990. * Lazy-loaded services are scoped to the lazy-loaded module's injector.
  3991. * If a lazy-loaded module also provides the `UserService`, any component created
  3992. * within that module's context (such as by router navigation) gets the local instance
  3993. * of the service, not the instance in the root injector.
  3994. * Components in external modules continue to receive the instance provided by their injectors.
  3995. *
  3996. * ### Example
  3997. *
  3998. * The following example defines a class that is injected in
  3999. * the HelloWorld NgModule:
  4000. *
  4001. * ```
  4002. * class Greeter {
  4003. * greet(name:string) {
  4004. * return 'Hello ' + name + '!';
  4005. * }
  4006. * }
  4007. *
  4008. * @NgModule({
  4009. * providers: [
  4010. * Greeter
  4011. * ]
  4012. * })
  4013. * class HelloWorld {
  4014. * greeter:Greeter;
  4015. *
  4016. * constructor(greeter:Greeter) {
  4017. * this.greeter = greeter;
  4018. * }
  4019. * }
  4020. * ```
  4021. */
  4022. providers?: Provider[];
  4023. /**
  4024. * The set of components, directives, and pipes ([declarables](guide/glossary#declarable))
  4025. * that belong to this module.
  4026. *
  4027. * @usageNotes
  4028. *
  4029. * The set of selectors that are available to a template include those declared here, and
  4030. * those that are exported from imported NgModules.
  4031. *
  4032. * Declarables must belong to exactly one module.
  4033. * The compiler emits an error if you try to declare the same class in more than one module.
  4034. * Be careful not to declare a class that is imported from another module.
  4035. *
  4036. * ### Example
  4037. *
  4038. * The following example allows the CommonModule to use the `NgFor`
  4039. * directive.
  4040. *
  4041. * ```javascript
  4042. * @NgModule({
  4043. * declarations: [NgFor]
  4044. * })
  4045. * class CommonModule {
  4046. * }
  4047. * ```
  4048. */
  4049. declarations?: Array<Type<any> | any[]>;
  4050. /**
  4051. * The set of NgModules whose exported [declarables](guide/glossary#declarable)
  4052. * are available to templates in this module.
  4053. *
  4054. * @usageNotes
  4055. *
  4056. * A template can use exported declarables from any
  4057. * imported module, including those from modules that are imported indirectly
  4058. * and re-exported.
  4059. * For example, `ModuleA` imports `ModuleB`, and also exports
  4060. * it, which makes the declarables from `ModuleB` available
  4061. * wherever `ModuleA` is imported.
  4062. *
  4063. * ### Example
  4064. *
  4065. * The following example allows MainModule to use anything exported by
  4066. * `CommonModule`:
  4067. *
  4068. * ```javascript
  4069. * @NgModule({
  4070. * imports: [CommonModule]
  4071. * })
  4072. * class MainModule {
  4073. * }
  4074. * ```
  4075. *
  4076. */
  4077. imports?: Array<Type<any> | ModuleWithProviders<{}> | any[]>;
  4078. /**
  4079. * The set of components, directives, and pipes declared in this
  4080. * NgModule that can be used in the template of any component that is part of an
  4081. * NgModule that imports this NgModule. Exported declarations are the module's public API.
  4082. *
  4083. * A declarable belongs to one and only one NgModule.
  4084. * A module can list another module among its exports, in which case all of that module's
  4085. * public declaration are exported.
  4086. *
  4087. * @usageNotes
  4088. *
  4089. * Declarations are private by default.
  4090. * If this ModuleA does not export UserComponent, then only the components within this
  4091. * ModuleA can use UserComponent.
  4092. *
  4093. * ModuleA can import ModuleB and also export it, making exports from ModuleB
  4094. * available to an NgModule that imports ModuleA.
  4095. *
  4096. * ### Example
  4097. *
  4098. * The following example exports the `NgFor` directive from CommonModule.
  4099. *
  4100. * ```javascript
  4101. * @NgModule({
  4102. * exports: [NgFor]
  4103. * })
  4104. * class CommonModule {
  4105. * }
  4106. * ```
  4107. */
  4108. exports?: Array<Type<any> | any[]>;
  4109. /**
  4110. * The set of components to compile when this NgModule is defined,
  4111. * so that they can be dynamically loaded into the view.
  4112. *
  4113. * For each component listed here, Angular creates a `ComponentFactory`
  4114. * and stores it in the `ComponentFactoryResolver`.
  4115. *
  4116. * Angular automatically adds components in the module's bootstrap
  4117. * and route definitions into the `entryComponents` list. Use this
  4118. * option to add components that are bootstrapped
  4119. * using one of the imperative techniques, such as `ViewContainerRef.createComponent()`.
  4120. *
  4121. * @see [Entry Components](guide/entry-components)
  4122. */
  4123. entryComponents?: Array<Type<any> | any[]>;
  4124. /**
  4125. * The set of components that are bootstrapped when
  4126. * this module is bootstrapped. The components listed here
  4127. * are automatically added to `entryComponents`.
  4128. */
  4129. bootstrap?: Array<Type<any> | any[]>;
  4130. /**
  4131. * The set of schemas that declare elements to be allowed in the NgModule.
  4132. * Elements and properties that are neither Angular components nor directives
  4133. * must be declared in a schema.
  4134. *
  4135. * Allowed value are `NO_ERRORS_SCHEMA` and `CUSTOM_ELEMENTS_SCHEMA`.
  4136. *
  4137. * @security When using one of `NO_ERRORS_SCHEMA` or `CUSTOM_ELEMENTS_SCHEMA`
  4138. * you must ensure that allowed elements and properties securely escape inputs.
  4139. */
  4140. schemas?: Array<SchemaMetadata | any[]>;
  4141. /**
  4142. * A name or path that uniquely identifies this NgModule in `getModuleFactory`.
  4143. * If left `undefined`, the NgModule is not registered with
  4144. * `getModuleFactory`.
  4145. */
  4146. id?: string;
  4147. /**
  4148. * If true, this module will be skipped by the AOT compiler and so will always be compiled
  4149. * using JIT.
  4150. *
  4151. * This exists to support future Ivy work and has no effect currently.
  4152. */
  4153. jit?: true;
  4154. }
  4155. /**
  4156. * @Annotation
  4157. * @publicApi
  4158. */
  4159. export declare const NgModule: NgModuleDecorator;
  4160. /**
  4161. * Type of the NgModule decorator / constructor function.
  4162. *
  4163. * @publicApi
  4164. */
  4165. export declare interface NgModuleDecorator {
  4166. /**
  4167. * Decorator that marks a class as an NgModule and supplies configuration metadata.
  4168. */
  4169. (obj?: NgModule): TypeDecorator;
  4170. new (obj?: NgModule): NgModule;
  4171. }
  4172. declare interface NgModuleDefinition extends Definition<NgModuleDefinitionFactory> {
  4173. providers: NgModuleProviderDef[];
  4174. providersByKey: {
  4175. [tokenKey: string]: NgModuleProviderDef;
  4176. };
  4177. modules: any[];
  4178. isRoot: boolean;
  4179. }
  4180. declare interface NgModuleDefinitionFactory extends DefinitionFactory<NgModuleDefinition> {
  4181. }
  4182. /**
  4183. * @publicApi
  4184. */
  4185. export declare abstract class NgModuleFactory<T> {
  4186. abstract readonly moduleType: Type<T>;
  4187. abstract create(parentInjector: Injector | null): NgModuleRef<T>;
  4188. }
  4189. /**
  4190. * Used to load ng module factories.
  4191. *
  4192. * @publicApi
  4193. * @deprecated the `string` form of `loadChildren` is deprecated, and `NgModuleFactoryLoader` is
  4194. * part of its implementation. See `LoadChildren` for more details.
  4195. */
  4196. export declare abstract class NgModuleFactoryLoader {
  4197. abstract load(path: string): Promise<NgModuleFactory<any>>;
  4198. }
  4199. declare interface NgModuleProviderDef {
  4200. flags: ɵNodeFlags;
  4201. index: number;
  4202. token: any;
  4203. value: any;
  4204. deps: DepDef[];
  4205. }
  4206. /**
  4207. * Represents an instance of an NgModule created via a {@link NgModuleFactory}.
  4208. *
  4209. * `NgModuleRef` provides access to the NgModule Instance as well other objects related to this
  4210. * NgModule Instance.
  4211. *
  4212. * @publicApi
  4213. */
  4214. export declare abstract class NgModuleRef<T> {
  4215. /**
  4216. * The injector that contains all of the providers of the NgModule.
  4217. */
  4218. abstract readonly injector: Injector;
  4219. /**
  4220. * The ComponentFactoryResolver to get hold of the ComponentFactories
  4221. * declared in the `entryComponents` property of the module.
  4222. */
  4223. abstract readonly componentFactoryResolver: ComponentFactoryResolver;
  4224. /**
  4225. * The NgModule instance.
  4226. */
  4227. abstract readonly instance: T;
  4228. /**
  4229. * Destroys the module instance and all of the data structures associated with it.
  4230. */
  4231. abstract destroy(): void;
  4232. /**
  4233. * Allows to register a callback that will be called when the module is destroyed.
  4234. */
  4235. abstract onDestroy(callback: () => void): void;
  4236. }
  4237. /**
  4238. * A token for third-party components that can register themselves with NgProbe.
  4239. *
  4240. * @publicApi
  4241. */
  4242. export declare class NgProbeToken {
  4243. name: string;
  4244. token: any;
  4245. constructor(name: string, token: any);
  4246. }
  4247. /**
  4248. * An injectable service for executing work inside or outside of the Angular zone.
  4249. *
  4250. * The most common use of this service is to optimize performance when starting a work consisting of
  4251. * one or more asynchronous tasks that don't require UI updates or error handling to be handled by
  4252. * Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks
  4253. * can reenter the Angular zone via {@link #run}.
  4254. *
  4255. * <!-- TODO: add/fix links to:
  4256. * - docs explaining zones and the use of zones in Angular and change-detection
  4257. * - link to runOutsideAngular/run (throughout this file!)
  4258. * -->
  4259. *
  4260. * @usageNotes
  4261. * ### Example
  4262. *
  4263. * ```
  4264. * import {Component, NgZone} from '@angular/core';
  4265. * import {NgIf} from '@angular/common';
  4266. *
  4267. * @Component({
  4268. * selector: 'ng-zone-demo',
  4269. * template: `
  4270. * <h2>Demo: NgZone</h2>
  4271. *
  4272. * <p>Progress: {{progress}}%</p>
  4273. * <p *ngIf="progress >= 100">Done processing {{label}} of Angular zone!</p>
  4274. *
  4275. * <button (click)="processWithinAngularZone()">Process within Angular zone</button>
  4276. * <button (click)="processOutsideOfAngularZone()">Process outside of Angular zone</button>
  4277. * `,
  4278. * })
  4279. * export class NgZoneDemo {
  4280. * progress: number = 0;
  4281. * label: string;
  4282. *
  4283. * constructor(private _ngZone: NgZone) {}
  4284. *
  4285. * // Loop inside the Angular zone
  4286. * // so the UI DOES refresh after each setTimeout cycle
  4287. * processWithinAngularZone() {
  4288. * this.label = 'inside';
  4289. * this.progress = 0;
  4290. * this._increaseProgress(() => console.log('Inside Done!'));
  4291. * }
  4292. *
  4293. * // Loop outside of the Angular zone
  4294. * // so the UI DOES NOT refresh after each setTimeout cycle
  4295. * processOutsideOfAngularZone() {
  4296. * this.label = 'outside';
  4297. * this.progress = 0;
  4298. * this._ngZone.runOutsideAngular(() => {
  4299. * this._increaseProgress(() => {
  4300. * // reenter the Angular zone and display done
  4301. * this._ngZone.run(() => { console.log('Outside Done!'); });
  4302. * });
  4303. * });
  4304. * }
  4305. *
  4306. * _increaseProgress(doneCallback: () => void) {
  4307. * this.progress += 1;
  4308. * console.log(`Current progress: ${this.progress}%`);
  4309. *
  4310. * if (this.progress < 100) {
  4311. * window.setTimeout(() => this._increaseProgress(doneCallback), 10);
  4312. * } else {
  4313. * doneCallback();
  4314. * }
  4315. * }
  4316. * }
  4317. * ```
  4318. *
  4319. * @publicApi
  4320. */
  4321. export declare class NgZone {
  4322. readonly hasPendingMicrotasks: boolean;
  4323. readonly hasPendingMacrotasks: boolean;
  4324. /**
  4325. * Whether there are no outstanding microtasks or macrotasks.
  4326. */
  4327. readonly isStable: boolean;
  4328. /**
  4329. * Notifies when code enters Angular Zone. This gets fired first on VM Turn.
  4330. */
  4331. readonly onUnstable: EventEmitter<any>;
  4332. /**
  4333. * Notifies when there is no more microtasks enqueued in the current VM Turn.
  4334. * This is a hint for Angular to do change detection, which may enqueue more microtasks.
  4335. * For this reason this event can fire multiple times per VM Turn.
  4336. */
  4337. readonly onMicrotaskEmpty: EventEmitter<any>;
  4338. /**
  4339. * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which
  4340. * implies we are about to relinquish VM turn.
  4341. * This event gets called just once.
  4342. */
  4343. readonly onStable: EventEmitter<any>;
  4344. /**
  4345. * Notifies that an error has been delivered.
  4346. */
  4347. readonly onError: EventEmitter<any>;
  4348. constructor({ enableLongStackTrace }: {
  4349. enableLongStackTrace?: boolean | undefined;
  4350. });
  4351. static isInAngularZone(): boolean;
  4352. static assertInAngularZone(): void;
  4353. static assertNotInAngularZone(): void;
  4354. /**
  4355. * Executes the `fn` function synchronously within the Angular zone and returns value returned by
  4356. * the function.
  4357. *
  4358. * Running functions via `run` allows you to reenter Angular zone from a task that was executed
  4359. * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
  4360. *
  4361. * Any future tasks or microtasks scheduled from within this function will continue executing from
  4362. * within the Angular zone.
  4363. *
  4364. * If a synchronous error happens it will be rethrown and not reported via `onError`.
  4365. */
  4366. run<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T;
  4367. /**
  4368. * Executes the `fn` function synchronously within the Angular zone as a task and returns value
  4369. * returned by the function.
  4370. *
  4371. * Running functions via `run` allows you to reenter Angular zone from a task that was executed
  4372. * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
  4373. *
  4374. * Any future tasks or microtasks scheduled from within this function will continue executing from
  4375. * within the Angular zone.
  4376. *
  4377. * If a synchronous error happens it will be rethrown and not reported via `onError`.
  4378. */
  4379. runTask<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[], name?: string): T;
  4380. /**
  4381. * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not
  4382. * rethrown.
  4383. */
  4384. runGuarded<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T;
  4385. /**
  4386. * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by
  4387. * the function.
  4388. *
  4389. * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do
  4390. * work that
  4391. * doesn't trigger Angular change-detection or is subject to Angular's error handling.
  4392. *
  4393. * Any future tasks or microtasks scheduled from within this function will continue executing from
  4394. * outside of the Angular zone.
  4395. *
  4396. * Use {@link #run} to reenter the Angular zone and do work that updates the application model.
  4397. */
  4398. runOutsideAngular<T>(fn: (...args: any[]) => T): T;
  4399. }
  4400. /**
  4401. * Defines a schema that allows any property on any element.
  4402. *
  4403. * @publicApi
  4404. */
  4405. export declare const NO_ERRORS_SCHEMA: SchemaMetadata;
  4406. declare interface NodeCheckFn {
  4407. (view: ViewData, nodeIndex: number, argStyle: ɵArgumentType.Dynamic, values: any[]): any;
  4408. (view: ViewData, nodeIndex: number, argStyle: ɵArgumentType.Inline, v0?: any, v1?: any, v2?: any, v3?: any, v4?: any, v5?: any, v6?: any, v7?: any, v8?: any, v9?: any): any;
  4409. }
  4410. /**
  4411. * Node instance data.
  4412. *
  4413. * We have a separate type per NodeType to save memory
  4414. * (TextData | ElementData | ProviderData | PureExpressionData | QueryList<any>)
  4415. *
  4416. * To keep our code monomorphic,
  4417. * we prohibit using `NodeData` directly but enforce the use of accessors (`asElementData`, ...).
  4418. * This way, no usage site can get a `NodeData` from view.nodes and then use it for different
  4419. * purposes.
  4420. */
  4421. declare class NodeData {
  4422. private __brand;
  4423. }
  4424. /**
  4425. * A node definition in the view.
  4426. *
  4427. * Note: We use one type for all nodes so that loops that loop over all nodes
  4428. * of a ViewDefinition stay monomorphic!
  4429. */
  4430. declare interface NodeDef {
  4431. flags: ɵNodeFlags;
  4432. nodeIndex: number;
  4433. checkIndex: number;
  4434. parent: NodeDef | null;
  4435. renderParent: NodeDef | null;
  4436. /** this is checked against NgContentDef.index to find matched nodes */
  4437. ngContentIndex: number | null;
  4438. /** number of transitive children */
  4439. childCount: number;
  4440. /** aggregated NodeFlags for all transitive children (does not include self) **/
  4441. childFlags: ɵNodeFlags;
  4442. /** aggregated NodeFlags for all direct children (does not include self) **/
  4443. directChildFlags: ɵNodeFlags;
  4444. bindingIndex: number;
  4445. bindings: BindingDef[];
  4446. bindingFlags: ɵBindingFlags;
  4447. outputIndex: number;
  4448. outputs: OutputDef[];
  4449. /**
  4450. * references that the user placed on the element
  4451. */
  4452. references: {
  4453. [refId: string]: ɵQueryValueType;
  4454. };
  4455. /**
  4456. * ids and value types of all queries that are matched by this node.
  4457. */
  4458. matchedQueries: {
  4459. [queryId: number]: ɵQueryValueType;
  4460. };
  4461. /** Binary or of all matched query ids of this node. */
  4462. matchedQueryIds: number;
  4463. /**
  4464. * Binary or of all query ids that are matched by one of the children.
  4465. * This includes query ids from templates as well.
  4466. * Used as a bloom filter.
  4467. */
  4468. childMatchedQueries: number;
  4469. element: ElementDef | null;
  4470. provider: ProviderDef | null;
  4471. text: TextDef | null;
  4472. query: QueryDef | null;
  4473. ngContent: NgContentDef | null;
  4474. }
  4475. /**
  4476. * Function to call console.error at the right source location. This is an indirection
  4477. * via another function as browser will log the location that actually called
  4478. * `console.error`.
  4479. */
  4480. declare interface NodeLogger {
  4481. (): () => void;
  4482. }
  4483. /**
  4484. * Object Oriented style of API needed to create elements and text nodes.
  4485. *
  4486. * This is the native browser API style, e.g. operations are methods on individual objects
  4487. * like HTMLElement. With this style, no additional code is needed as a facade
  4488. * (reducing payload size).
  4489. * */
  4490. declare interface ObjectOrientedRenderer3 {
  4491. createComment(data: string): RComment;
  4492. createElement(tagName: string): RElement;
  4493. createElementNS(namespace: string, tagName: string): RElement;
  4494. createTextNode(data: string): RText;
  4495. querySelector(selectors: string): RElement | null;
  4496. }
  4497. /**
  4498. * @description
  4499. * A lifecycle hook that is called when any data-bound property of a directive changes.
  4500. * Define an `ngOnChanges()` method to handle the changes.
  4501. *
  4502. * @see `DoCheck`
  4503. * @see `OnInit`
  4504. * @see [Lifecycle Hooks](guide/lifecycle-hooks#onchanges) guide
  4505. *
  4506. * @usageNotes
  4507. * The following snippet shows how a component can implement this interface to
  4508. * define an on-changes handler for an input property.
  4509. *
  4510. * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnChanges'}
  4511. *
  4512. * @publicApi
  4513. */
  4514. export declare interface OnChanges {
  4515. /**
  4516. * A callback method that is invoked immediately after the
  4517. * default change detector has checked data-bound properties
  4518. * if at least one has changed, and before the view and content
  4519. * children are checked.
  4520. * @param changes The changed properties.
  4521. */
  4522. ngOnChanges(changes: SimpleChanges): void;
  4523. }
  4524. /**
  4525. * A lifecycle hook that is called when a directive, pipe, or service is destroyed.
  4526. * Use for any custom cleanup that needs to occur when the
  4527. * instance is destroyed.
  4528. * @see [Lifecycle Hooks](guide/lifecycle-hooks#onchanges) guide
  4529. *
  4530. * @usageNotes
  4531. * The following snippet shows how a component can implement this interface
  4532. * to define its own custom clean-up method.
  4533. *
  4534. * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnDestroy'}
  4535. *
  4536. * @publicApi
  4537. */
  4538. export declare interface OnDestroy {
  4539. /**
  4540. * A callback method that performs custom clean-up, invoked immediately
  4541. * after a directive, pipe, or service instance is destroyed.
  4542. */
  4543. ngOnDestroy(): void;
  4544. }
  4545. /**
  4546. * @description
  4547. * A lifecycle hook that is called after Angular has initialized
  4548. * all data-bound properties of a directive.
  4549. * Define an `ngOnInit()` method to handle any additional initialization tasks.
  4550. *
  4551. * @see `AfterContentInit`
  4552. * @see [Lifecycle Hooks](guide/lifecycle-hooks#onchanges) guide
  4553. *
  4554. * @usageNotes
  4555. * The following snippet shows how a component can implement this interface to
  4556. * define its own initialization method.
  4557. *
  4558. * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnInit'}
  4559. *
  4560. * @publicApi
  4561. */
  4562. export declare interface OnInit {
  4563. /**
  4564. * A callback method that is invoked immediately after the
  4565. * default change detector has checked the directive's
  4566. * data-bound properties for the first time,
  4567. * and before any of the view or content children have been checked.
  4568. * It is invoked only once when the directive is instantiated.
  4569. */
  4570. ngOnInit(): void;
  4571. }
  4572. declare interface OpaqueViewState {
  4573. '__brand__': 'Brand for OpaqueViewState that nothing will match';
  4574. }
  4575. /**
  4576. * Type of the Optional metadata.
  4577. *
  4578. * @publicApi
  4579. */
  4580. export declare interface Optional {
  4581. }
  4582. /**
  4583. * Optional decorator and metadata.
  4584. *
  4585. * @Annotation
  4586. * @publicApi
  4587. */
  4588. export declare const Optional: OptionalDecorator;
  4589. /**
  4590. * Type of the Optional decorator / constructor function.
  4591. *
  4592. * @publicApi
  4593. */
  4594. export declare interface OptionalDecorator {
  4595. /**
  4596. * A parameter decorator to be used on constructor parameters,
  4597. * which marks the parameter as being an optional dependency.
  4598. * The DI framework provides null if the dependency is not found.
  4599. *
  4600. * Can be used together with other parameter decorators
  4601. * that modify how dependency injection operates.
  4602. *
  4603. * Learn more in the ["Dependency Injection Guide"](guide/dependency-injection).
  4604. *
  4605. * @usageNotes
  4606. *
  4607. * The following code allows the possibility of a null result:
  4608. *
  4609. * <code-example path="core/di/ts/metadata_spec.ts" region="Optional"></code-example>
  4610. *
  4611. */
  4612. (): any;
  4613. new (): Optional;
  4614. }
  4615. /**
  4616. * Type of the Output metadata.
  4617. *
  4618. * @publicApi
  4619. */
  4620. export declare interface Output {
  4621. /**
  4622. * The name of the DOM property to which the output property is bound.
  4623. */
  4624. bindingPropertyName?: string;
  4625. }
  4626. /**
  4627. * @Annotation
  4628. * @publicApi
  4629. */
  4630. export declare const Output: OutputDecorator;
  4631. /**
  4632. * Type of the Output decorator / constructor function.
  4633. *
  4634. * @publicApi
  4635. */
  4636. export declare interface OutputDecorator {
  4637. /**
  4638. * Decorator that marks a class field as an output property and supplies configuration metadata.
  4639. * The DOM property bound to the output property is automatically updated during change detection.
  4640. *
  4641. * @usageNotes
  4642. *
  4643. * You can supply an optional name to use in templates when the
  4644. * component is instantiated, that maps to the
  4645. * name of the bound property. By default, the original
  4646. * name of the bound property is used for output binding.
  4647. *
  4648. * See `Input` decorator for an example of providing a binding name.
  4649. *
  4650. */
  4651. (bindingPropertyName?: string): any;
  4652. new (bindingPropertyName?: string): any;
  4653. }
  4654. declare interface OutputDef {
  4655. type: OutputType;
  4656. target: 'window' | 'document' | 'body' | 'component' | null;
  4657. eventName: string;
  4658. propName: string | null;
  4659. }
  4660. declare const enum OutputType {
  4661. ElementOutput = 0,
  4662. DirectiveOutput = 1
  4663. }
  4664. /**
  4665. * A token which indicates the root directory of the application
  4666. * @publicApi
  4667. */
  4668. export declare const PACKAGE_ROOT_URL: InjectionToken<string>;
  4669. declare const PARENT = 3;
  4670. /**
  4671. * Type of the Pipe metadata.
  4672. *
  4673. * @publicApi
  4674. */
  4675. export declare interface Pipe {
  4676. /**
  4677. * The pipe name to use in template bindings.
  4678. *
  4679. */
  4680. name: string;
  4681. /**
  4682. * When true, the pipe is pure, meaning that the
  4683. * `transform()` method is invoked only when its input arguments
  4684. * change. Pipes are pure by default.
  4685. *
  4686. * If the pipe has internal state (that is, the result
  4687. * depends on state other than its arguments), set `pure` to false.
  4688. * In this case, the pipe is invoked on each change-detection cycle,
  4689. * even if the arguments have not changed.
  4690. */
  4691. pure?: boolean;
  4692. }
  4693. /**
  4694. * @Annotation
  4695. * @publicApi
  4696. */
  4697. export declare const Pipe: PipeDecorator;
  4698. /**
  4699. * Type of the Pipe decorator / constructor function.
  4700. *
  4701. * @publicApi
  4702. */
  4703. export declare interface PipeDecorator {
  4704. /**
  4705. *
  4706. * Decorator that marks a class as pipe and supplies configuration metadata.
  4707. *
  4708. * A pipe class must implement the `PipeTransform` interface.
  4709. * For example, if the name is "myPipe", use a template binding expression
  4710. * such as the following:
  4711. *
  4712. * ```
  4713. * {{ exp | myPipe }}
  4714. * ```
  4715. *
  4716. * The result of the expression is passed to the pipe's `transform()` method.
  4717. *
  4718. * A pipe must belong to an NgModule in order for it to be available
  4719. * to a template. To make it a member of an NgModule,
  4720. * list it in the `declarations` field of the `NgModule` metadata.
  4721. *
  4722. */
  4723. (obj: Pipe): TypeDecorator;
  4724. /**
  4725. * See the `Pipe` decorator.
  4726. */
  4727. new (obj: Pipe): Pipe;
  4728. }
  4729. declare type PipeDefList = ɵPipeDef<any>[];
  4730. /**
  4731. * Type used for PipeDefs on component definition.
  4732. *
  4733. * The function is necessary to be able to support forward declarations.
  4734. */
  4735. declare type PipeDefListOrFactory = (() => PipeDefList) | PipeDefList;
  4736. /**
  4737. * To create a Pipe, you must implement this interface.
  4738. *
  4739. * Angular invokes the `transform` method with the value of a binding
  4740. * as the first argument, and any parameters as the second argument in list form.
  4741. *
  4742. * @usageNotes
  4743. * ### Example
  4744. *
  4745. * The `RepeatPipe` below repeats the value as many times as indicated by the first argument:
  4746. *
  4747. * ```
  4748. * import {Pipe, PipeTransform} from '@angular/core';
  4749. *
  4750. * @Pipe({name: 'repeat'})
  4751. * export class RepeatPipe implements PipeTransform {
  4752. * transform(value: any, times: number) {
  4753. * return value.repeat(times);
  4754. * }
  4755. * }
  4756. * ```
  4757. *
  4758. * Invoking `{{ 'ok' | repeat:3 }}` in a template produces `okokok`.
  4759. *
  4760. * @publicApi
  4761. */
  4762. export declare interface PipeTransform {
  4763. transform(value: any, ...args: any[]): any;
  4764. }
  4765. declare type PipeTypesOrFactory = (() => DirectiveTypeList) | DirectiveTypeList;
  4766. /**
  4767. * A token that indicates an opaque platform id.
  4768. * @publicApi
  4769. */
  4770. export declare const PLATFORM_ID: InjectionToken<Object>;
  4771. /**
  4772. * A function that will be executed when a platform is initialized.
  4773. * @publicApi
  4774. */
  4775. export declare const PLATFORM_INITIALIZER: InjectionToken<(() => void)[]>;
  4776. /**
  4777. * This platform has to be included in any other platform
  4778. *
  4779. * @publicApi
  4780. */
  4781. export declare const platformCore: (extraProviders?: StaticProvider[] | undefined) => PlatformRef;
  4782. /**
  4783. * The Angular platform is the entry point for Angular on a web page. Each page
  4784. * has exactly one platform, and services (such as reflection) which are common
  4785. * to every Angular application running on the page are bound in its scope.
  4786. *
  4787. * A page's platform is initialized implicitly when a platform is created via a platform factory
  4788. * (e.g. {@link platformBrowser}), or explicitly by calling the {@link createPlatform} function.
  4789. *
  4790. * @publicApi
  4791. */
  4792. export declare class PlatformRef {
  4793. private _injector;
  4794. private _modules;
  4795. private _destroyListeners;
  4796. private _destroyed;
  4797. /**
  4798. * Creates an instance of an `@NgModule` for the given platform
  4799. * for offline compilation.
  4800. *
  4801. * @usageNotes
  4802. * ### Simple Example
  4803. *
  4804. * ```typescript
  4805. * my_module.ts:
  4806. *
  4807. * @NgModule({
  4808. * imports: [BrowserModule]
  4809. * })
  4810. * class MyModule {}
  4811. *
  4812. * main.ts:
  4813. * import {MyModuleNgFactory} from './my_module.ngfactory';
  4814. * import {platformBrowser} from '@angular/platform-browser';
  4815. *
  4816. * let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);
  4817. * ```
  4818. */
  4819. bootstrapModuleFactory<M>(moduleFactory: NgModuleFactory<M>, options?: BootstrapOptions): Promise<NgModuleRef<M>>;
  4820. /**
  4821. * Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.
  4822. *
  4823. * @usageNotes
  4824. * ### Simple Example
  4825. *
  4826. * ```typescript
  4827. * @NgModule({
  4828. * imports: [BrowserModule]
  4829. * })
  4830. * class MyModule {}
  4831. *
  4832. * let moduleRef = platformBrowser().bootstrapModule(MyModule);
  4833. * ```
  4834. *
  4835. */
  4836. bootstrapModule<M>(moduleType: Type<M>, compilerOptions?: (CompilerOptions & BootstrapOptions) | Array<CompilerOptions & BootstrapOptions>): Promise<NgModuleRef<M>>;
  4837. private _moduleDoBootstrap;
  4838. /**
  4839. * Register a listener to be called when the platform is disposed.
  4840. */
  4841. onDestroy(callback: () => void): void;
  4842. /**
  4843. * Retrieve the platform {@link Injector}, which is the parent injector for
  4844. * every Angular application on the page and provides singleton providers.
  4845. */
  4846. readonly injector: Injector;
  4847. /**
  4848. * Destroy the Angular platform and all Angular applications on the page.
  4849. */
  4850. destroy(): void;
  4851. readonly destroyed: boolean;
  4852. }
  4853. declare interface PlatformReflectionCapabilities {
  4854. isReflectionEnabled(): boolean;
  4855. factory(type: Type<any>): Function;
  4856. hasLifecycleHook(type: any, lcProperty: string): boolean;
  4857. guards(type: any): {
  4858. [key: string]: any;
  4859. };
  4860. /**
  4861. * Return a list of annotations/types for constructor parameters
  4862. */
  4863. parameters(type: Type<any>): any[][];
  4864. /**
  4865. * Return a list of annotations declared on the class
  4866. */
  4867. annotations(type: Type<any>): any[];
  4868. /**
  4869. * Return a object literal which describes the annotations on Class fields/properties.
  4870. */
  4871. propMetadata(typeOrFunc: Type<any>): {
  4872. [key: string]: any[];
  4873. };
  4874. getter(name: string): ɵGetterFn;
  4875. setter(name: string): ɵSetterFn;
  4876. method(name: string): ɵMethodFn;
  4877. importUri(type: Type<any>): string;
  4878. resourceUri(type: Type<any>): string;
  4879. resolveIdentifier(name: string, moduleUrl: string, members: string[], runtime: any): any;
  4880. resolveEnum(enumIdentifier: any, name: string): any;
  4881. }
  4882. declare interface PlayerBuilder extends BindingStore {
  4883. buildPlayer(currentPlayer: ɵPlayer | null, isFirstRender: boolean): ɵPlayer | undefined | null;
  4884. }
  4885. /**
  4886. * The context that stores all the active players and queued player factories present on an element.
  4887. */
  4888. declare interface PlayerContext extends Array<null | number | ɵPlayer | PlayerBuilder> {
  4889. [PlayerIndex.NonBuilderPlayersStart]: number;
  4890. [PlayerIndex.ClassMapPlayerBuilderPosition]: PlayerBuilder | null;
  4891. [PlayerIndex.ClassMapPlayerPosition]: ɵPlayer | null;
  4892. [PlayerIndex.StyleMapPlayerBuilderPosition]: PlayerBuilder | null;
  4893. [PlayerIndex.StyleMapPlayerPosition]: ɵPlayer | null;
  4894. }
  4895. declare const enum PlayerIndex {
  4896. NonBuilderPlayersStart = 0,
  4897. ClassMapPlayerBuilderPosition = 1,
  4898. ClassMapPlayerPosition = 2,
  4899. StyleMapPlayerBuilderPosition = 3,
  4900. StyleMapPlayerPosition = 4,
  4901. PlayerBuildersStartPosition = 1,
  4902. SinglePlayerBuildersStartPosition = 5,
  4903. PlayerAndPlayerBuildersTupleSize = 2,
  4904. PlayerOffsetPosition = 1
  4905. }
  4906. /**
  4907. * A boolean-valued function over a value, possibly including context information
  4908. * regarding that value's position in an array.
  4909. *
  4910. * @publicApi
  4911. */
  4912. export declare interface Predicate<T> {
  4913. (value: T): boolean;
  4914. }
  4915. declare const PREORDER_HOOK_FLAGS = 18;
  4916. /** More flags associated with an LView (saved in LView[FLAGS_MORE]) */
  4917. declare const enum PreOrderHookFlags {
  4918. /** The index of the next pre-order hook to be called in the hooks array, on the first 16
  4919. bits */
  4920. IndexOfTheNextPreOrderHookMaskMask = 65535,
  4921. /**
  4922. * The number of init hooks that have already been called, on the last 16 bits
  4923. */
  4924. NumberOfInitHooksCalledIncrementer = 65536,
  4925. NumberOfInitHooksCalledShift = 16,
  4926. NumberOfInitHooksCalledMask = 4294901760
  4927. }
  4928. /**
  4929. * Procedural style of API needed to create elements and text nodes.
  4930. *
  4931. * In non-native browser environments (e.g. platforms such as web-workers), this is the
  4932. * facade that enables element manipulation. This also facilitates backwards compatibility
  4933. * with Renderer2.
  4934. */
  4935. declare interface ProceduralRenderer3 {
  4936. destroy(): void;
  4937. createComment(value: string): RComment;
  4938. createElement(name: string, namespace?: string | null): RElement;
  4939. createText(value: string): RText;
  4940. /**
  4941. * This property is allowed to be null / undefined,
  4942. * in which case the view engine won't call it.
  4943. * This is used as a performance optimization for production mode.
  4944. */
  4945. destroyNode?: ((node: RNode) => void) | null;
  4946. appendChild(parent: RElement, newChild: RNode): void;
  4947. insertBefore(parent: RNode, newChild: RNode, refChild: RNode | null): void;
  4948. removeChild(parent: RElement, oldChild: RNode, isHostElement?: boolean): void;
  4949. selectRootElement(selectorOrNode: string | any): RElement;
  4950. parentNode(node: RNode): RElement | null;
  4951. nextSibling(node: RNode): RNode | null;
  4952. setAttribute(el: RElement, name: string, value: string, namespace?: string | null): void;
  4953. removeAttribute(el: RElement, name: string, namespace?: string | null): void;
  4954. addClass(el: RElement, name: string): void;
  4955. removeClass(el: RElement, name: string): void;
  4956. setStyle(el: RElement, style: string, value: any, flags?: RendererStyleFlags2 | RendererStyleFlags3): void;
  4957. removeStyle(el: RElement, style: string, flags?: RendererStyleFlags2 | RendererStyleFlags3): void;
  4958. setProperty(el: RElement, name: string, value: any): void;
  4959. setValue(node: RText | RComment, value: string): void;
  4960. listen(target: GlobalTargetName | RNode, eventName: string, callback: (event: any) => boolean | void): () => void;
  4961. }
  4962. /**
  4963. * Describes a function that is used to process provider list (for example in case of provider
  4964. * overrides).
  4965. */
  4966. declare type ProcessProvidersFunction = (providers: Provider[]) => Provider[];
  4967. /**
  4968. * List of slots for a projection. A slot can be either based on a parsed CSS selector
  4969. * which will be used to determine nodes which are projected into that slot.
  4970. *
  4971. * When set to "*", the slot is reserved and can be used for multi-slot projection
  4972. * using {@link ViewContainerRef#createComponent}. The last slot that specifies the
  4973. * wildcard selector will retrieve all projectable nodes which do not match any selector.
  4974. */
  4975. declare type ProjectionSlots = (ɵCssSelectorList | '*')[];
  4976. /**
  4977. * This mapping is necessary so we can set input properties and output listeners
  4978. * properly at runtime when property names are minified or aliased.
  4979. *
  4980. * Key: unminified / public input or output name
  4981. * Value: array containing minified / internal name and related directive index
  4982. *
  4983. * The value must be an array to support inputs and outputs with the same name
  4984. * on the same node.
  4985. */
  4986. declare type PropertyAliases = {
  4987. [key: string]: PropertyAliasValue;
  4988. };
  4989. /**
  4990. * Store the runtime input or output names for all the directives.
  4991. *
  4992. * i+0: directive instance index
  4993. * i+1: publicName
  4994. * i+2: privateName
  4995. *
  4996. * e.g. [0, 'change', 'change-minified']
  4997. */
  4998. declare type PropertyAliasValue = (number | string)[];
  4999. /**
  5000. * Describes how the `Injector` should be configured.
  5001. *
  5002. * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
  5003. *
  5004. * @see `TypeProvider`
  5005. * @see `ClassProvider`
  5006. * @see `StaticProvider`
  5007. *
  5008. * @publicApi
  5009. */
  5010. export declare type Provider = TypeProvider | ValueProvider | ClassProvider | ConstructorProvider | ExistingProvider | FactoryProvider | any[];
  5011. declare interface ProviderDef {
  5012. token: any;
  5013. value: any;
  5014. deps: DepDef[];
  5015. }
  5016. declare interface ProviderOverride {
  5017. token: any;
  5018. flags: ɵNodeFlags;
  5019. value: any;
  5020. deps: ([ɵDepFlags, any] | any)[];
  5021. deprecatedBehavior: boolean;
  5022. }
  5023. /**
  5024. * Testability API.
  5025. * `declare` keyword causes tsickle to generate externs, so these methods are
  5026. * not renamed by Closure Compiler.
  5027. * @publicApi
  5028. */
  5029. declare interface PublicTestability {
  5030. isStable(): boolean;
  5031. whenStable(callback: Function, timeout?: number, updateCallback?: Function): void;
  5032. findProviders(using: any, provider: string, exactMatch: boolean): any[];
  5033. }
  5034. declare const QUERIES = 5;
  5035. /**
  5036. * Type of the Query metadata.
  5037. *
  5038. * @publicApi
  5039. */
  5040. export declare interface Query {
  5041. descendants: boolean;
  5042. first: boolean;
  5043. read: any;
  5044. isViewQuery: boolean;
  5045. selector: any;
  5046. static: boolean;
  5047. }
  5048. /**
  5049. * Base class for query metadata.
  5050. *
  5051. * @see `ContentChildren`.
  5052. * @see `ContentChild`.
  5053. * @see `ViewChildren`.
  5054. * @see `ViewChild`.
  5055. *
  5056. * @publicApi
  5057. */
  5058. export declare abstract class Query {
  5059. }
  5060. declare interface QueryBindingDef {
  5061. propName: string;
  5062. bindingType: ɵQueryBindingType;
  5063. }
  5064. declare interface QueryDef {
  5065. id: number;
  5066. filterId: number;
  5067. bindings: QueryBindingDef[];
  5068. }
  5069. /**
  5070. * An unmodifiable list of items that Angular keeps up to date when the state
  5071. * of the application changes.
  5072. *
  5073. * The type of object that {@link ViewChildren}, {@link ContentChildren}, and {@link QueryList}
  5074. * provide.
  5075. *
  5076. * Implements an iterable interface, therefore it can be used in both ES6
  5077. * javascript `for (var i of items)` loops as well as in Angular templates with
  5078. * `*ngFor="let i of myList"`.
  5079. *
  5080. * Changes can be observed by subscribing to the changes `Observable`.
  5081. *
  5082. * NOTE: In the future this class will implement an `Observable` interface.
  5083. *
  5084. * @usageNotes
  5085. * ### Example
  5086. * ```typescript
  5087. * @Component({...})
  5088. * class Container {
  5089. * @ViewChildren(Item) items:QueryList<Item>;
  5090. * }
  5091. * ```
  5092. *
  5093. * @publicApi
  5094. */
  5095. export declare class QueryList<T> {
  5096. readonly dirty = true;
  5097. private _results;
  5098. readonly changes: Observable<any>;
  5099. readonly length: number;
  5100. readonly first: T;
  5101. readonly last: T;
  5102. constructor();
  5103. /**
  5104. * See
  5105. * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)
  5106. */
  5107. map<U>(fn: (item: T, index: number, array: T[]) => U): U[];
  5108. /**
  5109. * See
  5110. * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
  5111. */
  5112. filter(fn: (item: T, index: number, array: T[]) => boolean): T[];
  5113. /**
  5114. * See
  5115. * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)
  5116. */
  5117. find(fn: (item: T, index: number, array: T[]) => boolean): T | undefined;
  5118. /**
  5119. * See
  5120. * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)
  5121. */
  5122. reduce<U>(fn: (prevValue: U, curValue: T, curIndex: number, array: T[]) => U, init: U): U;
  5123. /**
  5124. * See
  5125. * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)
  5126. */
  5127. forEach(fn: (item: T, index: number, array: T[]) => void): void;
  5128. /**
  5129. * See
  5130. * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)
  5131. */
  5132. some(fn: (value: T, index: number, array: T[]) => boolean): boolean;
  5133. /**
  5134. * Returns a copy of the internal results list as an Array.
  5135. */
  5136. toArray(): T[];
  5137. toString(): string;
  5138. /**
  5139. * Updates the stored data of the query list, and resets the `dirty` flag to `false`, so that
  5140. * on change detection, it will not notify of changes to the queries, unless a new change
  5141. * occurs.
  5142. *
  5143. * @param resultsTree The results tree to store
  5144. */
  5145. reset(resultsTree: Array<T | any[]>): void;
  5146. /**
  5147. * Triggers a change event by emitting on the `changes` {@link EventEmitter}.
  5148. */
  5149. notifyOnChanges(): void;
  5150. /** internal */
  5151. setDirty(): void;
  5152. /** internal */
  5153. destroy(): void;
  5154. }
  5155. declare class R3Injector {
  5156. readonly parent: Injector;
  5157. /**
  5158. * Map of tokens to records which contain the instances of those tokens.
  5159. */
  5160. private records;
  5161. /**
  5162. * The transitive set of `InjectorType`s which define this injector.
  5163. */
  5164. private injectorDefTypes;
  5165. /**
  5166. * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.
  5167. */
  5168. private onDestroy;
  5169. /**
  5170. * Flag indicating this injector provides the APP_ROOT_SCOPE token, and thus counts as the
  5171. * root scope.
  5172. */
  5173. private readonly isRootInjector;
  5174. readonly source: string | null;
  5175. /**
  5176. * Flag indicating that this injector was previously destroyed.
  5177. */
  5178. readonly destroyed: boolean;
  5179. private _destroyed;
  5180. constructor(def: InjectorType<any>, additionalProviders: StaticProvider[] | null, parent: Injector, source?: string | null);
  5181. /**
  5182. * Destroy the injector and release references to every instance or provider associated with it.
  5183. *
  5184. * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a
  5185. * hook was found.
  5186. */
  5187. destroy(): void;
  5188. get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: any, flags?: InjectFlags): T;
  5189. toString(): string;
  5190. private assertNotDestroyed;
  5191. /**
  5192. * Add an `InjectorType` or `InjectorTypeWithProviders` and all of its transitive providers
  5193. * to this injector.
  5194. *
  5195. * If an `InjectorTypeWithProviders` that declares providers besides the type is specified,
  5196. * the function will return "true" to indicate that the providers of the type definition need
  5197. * to be processed. This allows us to process providers of injector types after all imports of
  5198. * an injector definition are processed. (following View Engine semantics: see FW-1349)
  5199. */
  5200. private processInjectorType;
  5201. /**
  5202. * Process a `SingleProvider` and add it.
  5203. */
  5204. private processProvider;
  5205. private hydrate;
  5206. private injectableDefInScope;
  5207. }
  5208. declare interface Range {
  5209. }
  5210. declare interface RComment extends RNode {
  5211. textContent: string | null;
  5212. }
  5213. declare interface RCssStyleDeclaration {
  5214. removeProperty(propertyName: string): string;
  5215. setProperty(propertyName: string, value: string | null, priority?: string): void;
  5216. }
  5217. declare interface RDomTokenList {
  5218. add(token: string): void;
  5219. remove(token: string): void;
  5220. }
  5221. /**
  5222. * A ReflectiveDependency injection container used for instantiating objects and resolving
  5223. * dependencies.
  5224. *
  5225. * An `Injector` is a replacement for a `new` operator, which can automatically resolve the
  5226. * constructor dependencies.
  5227. *
  5228. * In typical use, application code asks for the dependencies in the constructor and they are
  5229. * resolved by the `Injector`.
  5230. *
  5231. * @usageNotes
  5232. * ### Example
  5233. *
  5234. * The following example creates an `Injector` configured to create `Engine` and `Car`.
  5235. *
  5236. * ```typescript
  5237. * @Injectable()
  5238. * class Engine {
  5239. * }
  5240. *
  5241. * @Injectable()
  5242. * class Car {
  5243. * constructor(public engine:Engine) {}
  5244. * }
  5245. *
  5246. * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);
  5247. * var car = injector.get(Car);
  5248. * expect(car instanceof Car).toBe(true);
  5249. * expect(car.engine instanceof Engine).toBe(true);
  5250. * ```
  5251. *
  5252. * Notice, we don't use the `new` operator because we explicitly want to have the `Injector`
  5253. * resolve all of the object's dependencies automatically.
  5254. *
  5255. * @deprecated from v5 - slow and brings in a lot of code, Use `Injector.create` instead.
  5256. * @publicApi
  5257. */
  5258. export declare abstract class ReflectiveInjector implements Injector {
  5259. /**
  5260. * Turns an array of provider definitions into an array of resolved providers.
  5261. *
  5262. * A resolution is a process of flattening multiple nested arrays and converting individual
  5263. * providers into an array of `ResolvedReflectiveProvider`s.
  5264. *
  5265. * @usageNotes
  5266. * ### Example
  5267. *
  5268. * ```typescript
  5269. * @Injectable()
  5270. * class Engine {
  5271. * }
  5272. *
  5273. * @Injectable()
  5274. * class Car {
  5275. * constructor(public engine:Engine) {}
  5276. * }
  5277. *
  5278. * var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);
  5279. *
  5280. * expect(providers.length).toEqual(2);
  5281. *
  5282. * expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);
  5283. * expect(providers[0].key.displayName).toBe("Car");
  5284. * expect(providers[0].dependencies.length).toEqual(1);
  5285. * expect(providers[0].factory).toBeDefined();
  5286. *
  5287. * expect(providers[1].key.displayName).toBe("Engine");
  5288. * });
  5289. * ```
  5290. *
  5291. */
  5292. static resolve(providers: Provider[]): ResolvedReflectiveProvider[];
  5293. /**
  5294. * Resolves an array of providers and creates an injector from those providers.
  5295. *
  5296. * The passed-in providers can be an array of `Type`, `Provider`,
  5297. * or a recursive array of more providers.
  5298. *
  5299. * @usageNotes
  5300. * ### Example
  5301. *
  5302. * ```typescript
  5303. * @Injectable()
  5304. * class Engine {
  5305. * }
  5306. *
  5307. * @Injectable()
  5308. * class Car {
  5309. * constructor(public engine:Engine) {}
  5310. * }
  5311. *
  5312. * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);
  5313. * expect(injector.get(Car) instanceof Car).toBe(true);
  5314. * ```
  5315. */
  5316. static resolveAndCreate(providers: Provider[], parent?: Injector): ReflectiveInjector;
  5317. /**
  5318. * Creates an injector from previously resolved providers.
  5319. *
  5320. * This API is the recommended way to construct injectors in performance-sensitive parts.
  5321. *
  5322. * @usageNotes
  5323. * ### Example
  5324. *
  5325. * ```typescript
  5326. * @Injectable()
  5327. * class Engine {
  5328. * }
  5329. *
  5330. * @Injectable()
  5331. * class Car {
  5332. * constructor(public engine:Engine) {}
  5333. * }
  5334. *
  5335. * var providers = ReflectiveInjector.resolve([Car, Engine]);
  5336. * var injector = ReflectiveInjector.fromResolvedProviders(providers);
  5337. * expect(injector.get(Car) instanceof Car).toBe(true);
  5338. * ```
  5339. */
  5340. static fromResolvedProviders(providers: ResolvedReflectiveProvider[], parent?: Injector): ReflectiveInjector;
  5341. /**
  5342. * Parent of this injector.
  5343. *
  5344. * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.
  5345. * -->
  5346. */
  5347. abstract readonly parent: Injector | null;
  5348. /**
  5349. * Resolves an array of providers and creates a child injector from those providers.
  5350. *
  5351. * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.
  5352. * -->
  5353. *
  5354. * The passed-in providers can be an array of `Type`, `Provider`,
  5355. * or a recursive array of more providers.
  5356. *
  5357. * @usageNotes
  5358. * ### Example
  5359. *
  5360. * ```typescript
  5361. * class ParentProvider {}
  5362. * class ChildProvider {}
  5363. *
  5364. * var parent = ReflectiveInjector.resolveAndCreate([ParentProvider]);
  5365. * var child = parent.resolveAndCreateChild([ChildProvider]);
  5366. *
  5367. * expect(child.get(ParentProvider) instanceof ParentProvider).toBe(true);
  5368. * expect(child.get(ChildProvider) instanceof ChildProvider).toBe(true);
  5369. * expect(child.get(ParentProvider)).toBe(parent.get(ParentProvider));
  5370. * ```
  5371. */
  5372. abstract resolveAndCreateChild(providers: Provider[]): ReflectiveInjector;
  5373. /**
  5374. * Creates a child injector from previously resolved providers.
  5375. *
  5376. * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.
  5377. * -->
  5378. *
  5379. * This API is the recommended way to construct injectors in performance-sensitive parts.
  5380. *
  5381. * @usageNotes
  5382. * ### Example
  5383. *
  5384. * ```typescript
  5385. * class ParentProvider {}
  5386. * class ChildProvider {}
  5387. *
  5388. * var parentProviders = ReflectiveInjector.resolve([ParentProvider]);
  5389. * var childProviders = ReflectiveInjector.resolve([ChildProvider]);
  5390. *
  5391. * var parent = ReflectiveInjector.fromResolvedProviders(parentProviders);
  5392. * var child = parent.createChildFromResolved(childProviders);
  5393. *
  5394. * expect(child.get(ParentProvider) instanceof ParentProvider).toBe(true);
  5395. * expect(child.get(ChildProvider) instanceof ChildProvider).toBe(true);
  5396. * expect(child.get(ParentProvider)).toBe(parent.get(ParentProvider));
  5397. * ```
  5398. */
  5399. abstract createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector;
  5400. /**
  5401. * Resolves a provider and instantiates an object in the context of the injector.
  5402. *
  5403. * The created object does not get cached by the injector.
  5404. *
  5405. * @usageNotes
  5406. * ### Example
  5407. *
  5408. * ```typescript
  5409. * @Injectable()
  5410. * class Engine {
  5411. * }
  5412. *
  5413. * @Injectable()
  5414. * class Car {
  5415. * constructor(public engine:Engine) {}
  5416. * }
  5417. *
  5418. * var injector = ReflectiveInjector.resolveAndCreate([Engine]);
  5419. *
  5420. * var car = injector.resolveAndInstantiate(Car);
  5421. * expect(car.engine).toBe(injector.get(Engine));
  5422. * expect(car).not.toBe(injector.resolveAndInstantiate(Car));
  5423. * ```
  5424. */
  5425. abstract resolveAndInstantiate(provider: Provider): any;
  5426. /**
  5427. * Instantiates an object using a resolved provider in the context of the injector.
  5428. *
  5429. * The created object does not get cached by the injector.
  5430. *
  5431. * @usageNotes
  5432. * ### Example
  5433. *
  5434. * ```typescript
  5435. * @Injectable()
  5436. * class Engine {
  5437. * }
  5438. *
  5439. * @Injectable()
  5440. * class Car {
  5441. * constructor(public engine:Engine) {}
  5442. * }
  5443. *
  5444. * var injector = ReflectiveInjector.resolveAndCreate([Engine]);
  5445. * var carProvider = ReflectiveInjector.resolve([Car])[0];
  5446. * var car = injector.instantiateResolved(carProvider);
  5447. * expect(car.engine).toBe(injector.get(Engine));
  5448. * expect(car).not.toBe(injector.instantiateResolved(carProvider));
  5449. * ```
  5450. */
  5451. abstract instantiateResolved(provider: ResolvedReflectiveProvider): any;
  5452. abstract get(token: any, notFoundValue?: any): any;
  5453. }
  5454. /**
  5455. * A unique object used for retrieving items from the {@link ReflectiveInjector}.
  5456. *
  5457. * Keys have:
  5458. * - a system-wide unique `id`.
  5459. * - a `token`.
  5460. *
  5461. * `Key` is used internally by {@link ReflectiveInjector} because its system-wide unique `id` allows
  5462. * the
  5463. * injector to store created objects in a more efficient way.
  5464. *
  5465. * `Key` should not be created directly. {@link ReflectiveInjector} creates keys automatically when
  5466. * resolving
  5467. * providers.
  5468. *
  5469. * @deprecated No replacement
  5470. * @publicApi
  5471. */
  5472. export declare class ReflectiveKey {
  5473. token: Object;
  5474. id: number;
  5475. readonly displayName: string;
  5476. /**
  5477. * Private
  5478. */
  5479. constructor(token: Object, id: number);
  5480. /**
  5481. * Retrieves a `Key` for a token.
  5482. */
  5483. static get(token: Object): ReflectiveKey;
  5484. /**
  5485. * @returns the number of keys registered in the system.
  5486. */
  5487. static readonly numberOfKeys: number;
  5488. }
  5489. /**
  5490. * Subset of API needed for writing attributes, properties, and setting up
  5491. * listeners on Element.
  5492. */
  5493. declare interface RElement extends RNode {
  5494. style: RCssStyleDeclaration;
  5495. classList: RDomTokenList;
  5496. className: string;
  5497. setAttribute(name: string, value: string): void;
  5498. removeAttribute(name: string): void;
  5499. setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void;
  5500. addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;
  5501. removeEventListener(type: string, listener?: EventListener, options?: boolean): void;
  5502. setProperty?(name: string, value: any): void;
  5503. }
  5504. /**
  5505. * @deprecated Use `RendererType2` (and `Renderer2`) instead.
  5506. * @publicApi
  5507. */
  5508. export declare class RenderComponentType {
  5509. id: string;
  5510. templateUrl: string;
  5511. slotCount: number;
  5512. encapsulation: ViewEncapsulation;
  5513. styles: Array<string | any[]>;
  5514. animations: any;
  5515. constructor(id: string, templateUrl: string, slotCount: number, encapsulation: ViewEncapsulation, styles: Array<string | any[]>, animations: any);
  5516. }
  5517. declare const RENDERER = 12;
  5518. /**
  5519. * @deprecated Use the `Renderer2` instead.
  5520. * @publicApi
  5521. */
  5522. export declare abstract class Renderer {
  5523. abstract selectRootElement(selectorOrNode: string | any, debugInfo?: ɵRenderDebugInfo): any;
  5524. abstract createElement(parentElement: any, name: string, debugInfo?: ɵRenderDebugInfo): any;
  5525. abstract createViewRoot(hostElement: any): any;
  5526. abstract createTemplateAnchor(parentElement: any, debugInfo?: ɵRenderDebugInfo): any;
  5527. abstract createText(parentElement: any, value: string, debugInfo?: ɵRenderDebugInfo): any;
  5528. abstract projectNodes(parentElement: any, nodes: any[]): void;
  5529. abstract attachViewAfter(node: any, viewRootNodes: any[]): void;
  5530. abstract detachView(viewRootNodes: any[]): void;
  5531. abstract destroyView(hostElement: any, viewAllNodes: any[]): void;
  5532. abstract listen(renderElement: any, name: string, callback: Function): Function;
  5533. abstract listenGlobal(target: string, name: string, callback: Function): Function;
  5534. abstract setElementProperty(renderElement: any, propertyName: string, propertyValue: any): void;
  5535. abstract setElementAttribute(renderElement: any, attributeName: string, attributeValue?: string): void;
  5536. /**
  5537. * Used only in debug mode to serialize property changes to dom nodes as attributes.
  5538. */
  5539. abstract setBindingDebugInfo(renderElement: any, propertyName: string, propertyValue: string): void;
  5540. abstract setElementClass(renderElement: any, className: string, isAdd: boolean): void;
  5541. abstract setElementStyle(renderElement: any, styleName: string, styleValue?: string): void;
  5542. abstract invokeElementMethod(renderElement: any, methodName: string, args?: any[]): void;
  5543. abstract setText(renderNode: any, text: string): void;
  5544. abstract animate(element: any, startingStyles: any, keyframes: any[], duration: number, delay: number, easing: string, previousPlayers?: any[]): any;
  5545. }
  5546. /**
  5547. * Extend this base class to implement custom rendering. By default, Angular
  5548. * renders a template into DOM. You can use custom rendering to intercept
  5549. * rendering calls, or to render to something other than DOM.
  5550. *
  5551. * Create your custom renderer using `RendererFactory2`.
  5552. *
  5553. * Use a custom renderer to bypass Angular's templating and
  5554. * make custom UI changes that can't be expressed declaratively.
  5555. * For example if you need to set a property or an attribute whose name is
  5556. * not statically known, use the `setProperty()` or
  5557. * `setAttribute()` method.
  5558. *
  5559. * @publicApi
  5560. */
  5561. export declare abstract class Renderer2 {
  5562. /**
  5563. * Use to store arbitrary developer-defined data on a renderer instance,
  5564. * as an object containing key-value pairs.
  5565. * This is useful for renderers that delegate to other renderers.
  5566. */
  5567. abstract readonly data: {
  5568. [key: string]: any;
  5569. };
  5570. /**
  5571. * Implement this callback to destroy the renderer or the host element.
  5572. */
  5573. abstract destroy(): void;
  5574. /**
  5575. * Implement this callback to create an instance of the host element.
  5576. * @param name An identifying name for the new element, unique within the namespace.
  5577. * @param namespace The namespace for the new element.
  5578. * @returns The new element.
  5579. */
  5580. abstract createElement(name: string, namespace?: string | null): any;
  5581. /**
  5582. * Implement this callback to add a comment to the DOM of the host element.
  5583. * @param value The comment text.
  5584. * @returns The modified element.
  5585. */
  5586. abstract createComment(value: string): any;
  5587. /**
  5588. * Implement this callback to add text to the DOM of the host element.
  5589. * @param value The text string.
  5590. * @returns The modified element.
  5591. */
  5592. abstract createText(value: string): any;
  5593. /**
  5594. * If null or undefined, the view engine won't call it.
  5595. * This is used as a performance optimization for production mode.
  5596. */
  5597. destroyNode: ((node: any) => void) | null;
  5598. /**
  5599. * Appends a child to a given parent node in the host element DOM.
  5600. * @param parent The parent node.
  5601. * @param newChild The new child node.
  5602. */
  5603. abstract appendChild(parent: any, newChild: any): void;
  5604. /**
  5605. * Implement this callback to insert a child node at a given position in a parent node
  5606. * in the host element DOM.
  5607. * @param parent The parent node.
  5608. * @param newChild The new child nodes.
  5609. * @param refChild The existing child node that should precede the new node.
  5610. */
  5611. abstract insertBefore(parent: any, newChild: any, refChild: any): void;
  5612. /**
  5613. * Implement this callback to remove a child node from the host element's DOM.
  5614. * @param parent The parent node.
  5615. * @param oldChild The child node to remove.
  5616. * @param isHostElement Optionally signal to the renderer whether this element is a host element
  5617. * or not
  5618. */
  5619. abstract removeChild(parent: any, oldChild: any, isHostElement?: boolean): void;
  5620. /**
  5621. * Implement this callback to prepare an element to be bootstrapped
  5622. * as a root element, and return the element instance.
  5623. * @param selectorOrNode The DOM element.
  5624. * @param preserveContent Whether the contents of the root element
  5625. * should be preserved, or cleared upon bootstrap (default behavior).
  5626. * Use with `ViewEncapsulation.ShadowDom` to allow simple native
  5627. * content projection via `<slot>` elements.
  5628. * @returns The root element.
  5629. */
  5630. abstract selectRootElement(selectorOrNode: string | any, preserveContent?: boolean): any;
  5631. /**
  5632. * Implement this callback to get the parent of a given node
  5633. * in the host element's DOM.
  5634. * @param node The child node to query.
  5635. * @returns The parent node, or null if there is no parent.
  5636. * For WebWorkers, always returns true.
  5637. * This is because the check is synchronous,
  5638. * and the caller can't rely on checking for null.
  5639. */
  5640. abstract parentNode(node: any): any;
  5641. /**
  5642. * Implement this callback to get the next sibling node of a given node
  5643. * in the host element's DOM.
  5644. * @returns The sibling node, or null if there is no sibling.
  5645. * For WebWorkers, always returns a value.
  5646. * This is because the check is synchronous,
  5647. * and the caller can't rely on checking for null.
  5648. */
  5649. abstract nextSibling(node: any): any;
  5650. /**
  5651. * Implement this callback to set an attribute value for an element in the DOM.
  5652. * @param el The element.
  5653. * @param name The attribute name.
  5654. * @param value The new value.
  5655. * @param namespace The namespace.
  5656. */
  5657. abstract setAttribute(el: any, name: string, value: string, namespace?: string | null): void;
  5658. /**
  5659. * Implement this callback to remove an attribute from an element in the DOM.
  5660. * @param el The element.
  5661. * @param name The attribute name.
  5662. * @param namespace The namespace.
  5663. */
  5664. abstract removeAttribute(el: any, name: string, namespace?: string | null): void;
  5665. /**
  5666. * Implement this callback to add a class to an element in the DOM.
  5667. * @param el The element.
  5668. * @param name The class name.
  5669. */
  5670. abstract addClass(el: any, name: string): void;
  5671. /**
  5672. * Implement this callback to remove a class from an element in the DOM.
  5673. * @param el The element.
  5674. * @param name The class name.
  5675. */
  5676. abstract removeClass(el: any, name: string): void;
  5677. /**
  5678. * Implement this callback to set a CSS style for an element in the DOM.
  5679. * @param el The element.
  5680. * @param style The name of the style.
  5681. * @param value The new value.
  5682. * @param flags Flags for style variations. No flags are set by default.
  5683. */
  5684. abstract setStyle(el: any, style: string, value: any, flags?: RendererStyleFlags2): void;
  5685. /**
  5686. * Implement this callback to remove the value from a CSS style for an element in the DOM.
  5687. * @param el The element.
  5688. * @param style The name of the style.
  5689. * @param flags Flags for style variations to remove, if set. ???
  5690. */
  5691. abstract removeStyle(el: any, style: string, flags?: RendererStyleFlags2): void;
  5692. /**
  5693. * Implement this callback to set the value of a property of an element in the DOM.
  5694. * @param el The element.
  5695. * @param name The property name.
  5696. * @param value The new value.
  5697. */
  5698. abstract setProperty(el: any, name: string, value: any): void;
  5699. /**
  5700. * Implement this callback to set the value of a node in the host element.
  5701. * @param node The node.
  5702. * @param value The new value.
  5703. */
  5704. abstract setValue(node: any, value: string): void;
  5705. /**
  5706. * Implement this callback to start an event listener.
  5707. * @param target The context in which to listen for events. Can be
  5708. * the entire window or document, the body of the document, or a specific
  5709. * DOM element.
  5710. * @param eventName The event to listen for.
  5711. * @param callback A handler function to invoke when the event occurs.
  5712. * @returns An "unlisten" function for disposing of this handler.
  5713. */
  5714. abstract listen(target: 'window' | 'document' | 'body' | any, eventName: string, callback: (event: any) => boolean | void): () => void;
  5715. }
  5716. declare type Renderer3 = ObjectOrientedRenderer3 | ProceduralRenderer3;
  5717. declare const RENDERER_FACTORY = 11;
  5718. /**
  5719. * Creates and initializes a custom renderer that implements the `Renderer2` base class.
  5720. *
  5721. * @publicApi
  5722. */
  5723. export declare abstract class RendererFactory2 {
  5724. /**
  5725. * Creates and initializes a custom renderer for a host DOM element.
  5726. * @param hostElement The element to render.
  5727. * @param type The base class to implement.
  5728. * @returns The new custom renderer instance.
  5729. */
  5730. abstract createRenderer(hostElement: any, type: RendererType2 | null): Renderer2;
  5731. /**
  5732. * A callback invoked when rendering has begun.
  5733. */
  5734. abstract begin?(): void;
  5735. /**
  5736. * A callback invoked when rendering has completed.
  5737. */
  5738. abstract end?(): void;
  5739. /**
  5740. * Use with animations test-only mode. Notifies the test when rendering has completed.
  5741. * @returns The asynchronous result of the developer-defined function.
  5742. */
  5743. abstract whenRenderingDone?(): Promise<any>;
  5744. }
  5745. declare interface RendererFactory3 {
  5746. createRenderer(hostElement: RElement | null, rendererType: RendererType2 | null): Renderer3;
  5747. begin?(): void;
  5748. end?(): void;
  5749. }
  5750. /**
  5751. * Flags for renderer-specific style modifiers.
  5752. * @publicApi
  5753. */
  5754. export declare enum RendererStyleFlags2 {
  5755. /**
  5756. * Marks a style as important.
  5757. */
  5758. Important = 1,
  5759. /**
  5760. * Marks a style as using dash case naming (this-is-dash-case).
  5761. */
  5762. DashCase = 2
  5763. }
  5764. declare enum RendererStyleFlags3 {
  5765. Important = 1,
  5766. DashCase = 2
  5767. }
  5768. /**
  5769. * Used by `RendererFactory2` to associate custom rendering data and styles
  5770. * with a rendering implementation.
  5771. * @publicApi
  5772. */
  5773. export declare interface RendererType2 {
  5774. /**
  5775. * A unique identifying string for the new renderer, used when creating
  5776. * unique styles for encapsulation.
  5777. */
  5778. id: string;
  5779. /**
  5780. * The view encapsulation type, which determines how styles are applied to
  5781. * DOM elements. One of
  5782. * - `Emulated` (default): Emulate native scoping of styles.
  5783. * - `Native`: Use the native encapsulation mechanism of the renderer.
  5784. * - `ShadowDom`: Use modern [Shadow
  5785. * DOM](https://w3c.github.io/webcomponents/spec/shadow/) and
  5786. * create a ShadowRoot for component's host element.
  5787. * - `None`: Do not provide any template or style encapsulation.
  5788. */
  5789. encapsulation: ViewEncapsulation;
  5790. /**
  5791. * Defines CSS styles to be stored on a renderer instance.
  5792. */
  5793. styles: (string | any[])[];
  5794. /**
  5795. * Defines arbitrary developer-defined data to be stored on a renderer instance.
  5796. * This is useful for renderers that delegate to other renderers.
  5797. */
  5798. data: {
  5799. [kind: string]: any;
  5800. };
  5801. }
  5802. /**
  5803. * An internal resolved representation of a factory function created by resolving `Provider`.
  5804. * @publicApi
  5805. */
  5806. export declare class ResolvedReflectiveFactory {
  5807. /**
  5808. * Factory function which can return an instance of an object represented by a key.
  5809. */
  5810. factory: Function;
  5811. /**
  5812. * Arguments (dependencies) to the `factory` function.
  5813. */
  5814. dependencies: ɵangular_packages_core_core_d[];
  5815. constructor(
  5816. /**
  5817. * Factory function which can return an instance of an object represented by a key.
  5818. */
  5819. factory: Function,
  5820. /**
  5821. * Arguments (dependencies) to the `factory` function.
  5822. */
  5823. dependencies: ɵangular_packages_core_core_d[]);
  5824. }
  5825. /**
  5826. * An internal resolved representation of a `Provider` used by the `Injector`.
  5827. *
  5828. * @usageNotes
  5829. * This is usually created automatically by `Injector.resolveAndCreate`.
  5830. *
  5831. * It can be created manually, as follows:
  5832. *
  5833. * ### Example
  5834. *
  5835. * ```typescript
  5836. * var resolvedProviders = Injector.resolve([{ provide: 'message', useValue: 'Hello' }]);
  5837. * var injector = Injector.fromResolvedProviders(resolvedProviders);
  5838. *
  5839. * expect(injector.get('message')).toEqual('Hello');
  5840. * ```
  5841. *
  5842. * @publicApi
  5843. */
  5844. export declare interface ResolvedReflectiveProvider {
  5845. /**
  5846. * A key, usually a `Type<any>`.
  5847. */
  5848. key: ReflectiveKey;
  5849. /**
  5850. * Factory function which can return an instance of an object represented by a key.
  5851. */
  5852. resolvedFactories: ResolvedReflectiveFactory[];
  5853. /**
  5854. * Indicates if the provider is a multi-provider or a regular provider.
  5855. */
  5856. multiProvider: boolean;
  5857. }
  5858. /**
  5859. * Lazily retrieves the reference value from a forwardRef.
  5860. *
  5861. * Acts as the identity function when given a non-forward-ref value.
  5862. *
  5863. * @usageNotes
  5864. * ### Example
  5865. *
  5866. * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}
  5867. *
  5868. * @see `forwardRef`
  5869. * @publicApi
  5870. */
  5871. export declare function resolveForwardRef<T>(type: T): T;
  5872. /** Subset of API needed for appending elements and text nodes. */
  5873. declare interface RNode {
  5874. /**
  5875. * Returns the parent Element, Document, or DocumentFragment
  5876. */
  5877. parentNode: RNode | null;
  5878. /**
  5879. * Returns the parent Element if there is one
  5880. */
  5881. parentElement: RElement | null;
  5882. /**
  5883. * Gets the Node immediately following this one in the parent's childNodes
  5884. */
  5885. nextSibling: RNode | null;
  5886. /**
  5887. * Removes a child from the current node and returns the removed node
  5888. * @param oldChild the child node to remove
  5889. */
  5890. removeChild(oldChild: RNode): RNode;
  5891. /**
  5892. * Insert a child node.
  5893. *
  5894. * Used exclusively for adding View root nodes into ViewAnchor location.
  5895. */
  5896. insertBefore(newChild: RNode, refChild: RNode | null, isViewRoot: boolean): void;
  5897. /**
  5898. * Append a child node.
  5899. *
  5900. * Used exclusively for building up DOM which are static (ie not View roots)
  5901. */
  5902. appendChild(newChild: RNode): RNode;
  5903. }
  5904. /**
  5905. * RootContext contains information which is shared for all components which
  5906. * were bootstrapped with {@link renderComponent}.
  5907. */
  5908. declare interface RootContext {
  5909. /**
  5910. * A function used for scheduling change detection in the future. Usually
  5911. * this is `requestAnimationFrame`.
  5912. */
  5913. scheduler: (workFn: () => void) => void;
  5914. /**
  5915. * A promise which is resolved when all components are considered clean (not dirty).
  5916. *
  5917. * This promise is overwritten every time a first call to {@link markDirty} is invoked.
  5918. */
  5919. clean: Promise<null>;
  5920. /**
  5921. * RootComponents - The components that were instantiated by the call to
  5922. * {@link renderComponent}.
  5923. */
  5924. components: {}[];
  5925. /**
  5926. * The player flushing handler to kick off all animations
  5927. */
  5928. playerHandler: ɵPlayerHandler | null;
  5929. /**
  5930. * What render-related operations to run once a scheduler has been set
  5931. */
  5932. flags: RootContextFlags;
  5933. }
  5934. declare const enum RootContextFlags {
  5935. Empty = 0,
  5936. DetectChanges = 1,
  5937. FlushPlayers = 2
  5938. }
  5939. declare interface RootData {
  5940. injector: Injector;
  5941. ngModule: NgModuleRef<any>;
  5942. projectableNodes: any[][];
  5943. selectorOrNode: any;
  5944. renderer: Renderer2;
  5945. rendererFactory: RendererFactory2;
  5946. errorHandler: ErrorHandler;
  5947. sanitizer: Sanitizer;
  5948. }
  5949. /**
  5950. * Injectable service that provides a low-level interface for modifying the UI.
  5951. *
  5952. * Use this service to bypass Angular's templating and make custom UI changes that can't be
  5953. * expressed declaratively. For example if you need to set a property or an attribute whose name is
  5954. * not statically known, use {@link Renderer#setElementProperty setElementProperty} or
  5955. * {@link Renderer#setElementAttribute setElementAttribute} respectively.
  5956. *
  5957. * If you are implementing a custom renderer, you must implement this interface.
  5958. *
  5959. * The default Renderer implementation is `DomRenderer`. Also available is `WebWorkerRenderer`.
  5960. *
  5961. * @deprecated Use `RendererFactory2` instead.
  5962. * @publicApi
  5963. */
  5964. export declare abstract class RootRenderer {
  5965. abstract renderComponent(componentType: RenderComponentType): Renderer;
  5966. }
  5967. declare interface RText extends RNode {
  5968. textContent: string | null;
  5969. }
  5970. declare const SANITIZER = 13;
  5971. /**
  5972. * Sanitizer is used by the views to sanitize potentially dangerous values.
  5973. *
  5974. * @publicApi
  5975. */
  5976. export declare abstract class Sanitizer {
  5977. abstract sanitize(context: SecurityContext, value: {} | string | null): string | null;
  5978. }
  5979. /**
  5980. * Function used to sanitize the value before writing it into the renderer.
  5981. */
  5982. declare type SanitizerFn = (value: any, tagName?: string, propName?: string) => string;
  5983. /**
  5984. * A schema definition associated with an NgModule.
  5985. *
  5986. * @see `@NgModule`, `CUSTOM_ELEMENTS_SCHEMA`, `NO_ERRORS_SCHEMA`
  5987. *
  5988. * @param name The name of a defined schema.
  5989. *
  5990. * @publicApi
  5991. */
  5992. export declare interface SchemaMetadata {
  5993. name: string;
  5994. }
  5995. declare interface Scope {
  5996. (...args: any[] /** TODO #9100 */): any;
  5997. }
  5998. /**
  5999. * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property
  6000. * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly
  6001. * handled.
  6002. *
  6003. * See DomSanitizer for more details on security in Angular applications.
  6004. *
  6005. * @publicApi
  6006. */
  6007. export declare enum SecurityContext {
  6008. NONE = 0,
  6009. HTML = 1,
  6010. STYLE = 2,
  6011. SCRIPT = 3,
  6012. URL = 4,
  6013. RESOURCE_URL = 5
  6014. }
  6015. /** Flags used to build up CssSelectors */
  6016. declare const enum SelectorFlags {
  6017. /** Indicates this is the beginning of a new negative selector */
  6018. NOT = 1,
  6019. /** Mode for matching attributes */
  6020. ATTRIBUTE = 2,
  6021. /** Mode for matching tag names */
  6022. ELEMENT = 4,
  6023. /** Mode for matching class names */
  6024. CLASS = 8
  6025. }
  6026. /**
  6027. * Type of the Self metadata.
  6028. *
  6029. * @publicApi
  6030. */
  6031. export declare interface Self {
  6032. }
  6033. /**
  6034. * Self decorator and metadata.
  6035. *
  6036. * @Annotation
  6037. * @publicApi
  6038. */
  6039. export declare const Self: SelfDecorator;
  6040. /**
  6041. * Type of the Self decorator / constructor function.
  6042. *
  6043. * @publicApi
  6044. */
  6045. export declare interface SelfDecorator {
  6046. /**
  6047. * A parameter decorator to be used on constructor parameters,
  6048. * which tells the DI framework to start dependency resolution from the local injector.
  6049. *
  6050. * Resolution works upward through the injector hierarchy, so the children
  6051. * of this class must configure their own providers or be prepared for a null result.
  6052. *
  6053. * @usageNotes
  6054. *
  6055. * In the following example, the dependency can be resolved
  6056. * by the local injector when instantiating the class itself, but not
  6057. * when instantiating a child.
  6058. *
  6059. * <code-example path="core/di/ts/metadata_spec.ts" region="Self"></code-example>
  6060. *
  6061. *
  6062. * @see `SkipSelf`
  6063. * @see `Optional`
  6064. *
  6065. */
  6066. (): any;
  6067. new (): Self;
  6068. }
  6069. /**
  6070. * Set the {@link GetTestability} implementation used by the Angular testing framework.
  6071. * @publicApi
  6072. */
  6073. export declare function setTestabilityGetter(getter: GetTestability): void;
  6074. /**
  6075. * Represents a basic change from a previous to a new value for a single
  6076. * property on a directive instance. Passed as a value in a
  6077. * {@link SimpleChanges} object to the `ngOnChanges` hook.
  6078. *
  6079. * @see `OnChanges`
  6080. *
  6081. * @publicApi
  6082. */
  6083. export declare class SimpleChange {
  6084. previousValue: any;
  6085. currentValue: any;
  6086. firstChange: boolean;
  6087. constructor(previousValue: any, currentValue: any, firstChange: boolean);
  6088. /**
  6089. * Check whether the new value is the first value assigned.
  6090. */
  6091. isFirstChange(): boolean;
  6092. }
  6093. /**
  6094. * A hashtable of changes represented by {@link SimpleChange} objects stored
  6095. * at the declared property name they belong to on a Directive or Component. This is
  6096. * the type passed to the `ngOnChanges` hook.
  6097. *
  6098. * @see `OnChanges`
  6099. *
  6100. * @publicApi
  6101. */
  6102. export declare interface SimpleChanges {
  6103. [propName: string]: SimpleChange;
  6104. }
  6105. /**
  6106. * An array that contains the index pointer values for every single styling property
  6107. * that exists in the context and for every directive. It also contains the total
  6108. * single styles and single classes that exists in the context as the first two values.
  6109. *
  6110. * Let's say we have the following template code:
  6111. *
  6112. * <div [style.width]="myWidth"
  6113. * [style.height]="myHeight"
  6114. * [class.flipped]="flipClass"
  6115. * directive-with-opacity>
  6116. * directive-with-foo-bar-classes>
  6117. *
  6118. * We have two directive and template-binding sources,
  6119. * 2 + 1 styles and 1 + 1 classes. When the bindings are
  6120. * registered the SinglePropOffsets array will look like so:
  6121. *
  6122. * s_0/c_0 = template directive value
  6123. * s_1/c_1 = directive one (directive-with-opacity)
  6124. * s_2/c_2 = directive two (directive-with-foo-bar-classes)
  6125. *
  6126. * [3, 2, 2, 1, s_00, s01, c_01, 1, 0, s_10, 0, 1, c_20
  6127. */
  6128. declare interface SinglePropOffsetValues extends Array<number> {
  6129. [SinglePropOffsetValuesIndex.StylesCountPosition]: number;
  6130. [SinglePropOffsetValuesIndex.ClassesCountPosition]: number;
  6131. }
  6132. /**
  6133. * An enum that outlines the offset/position values for each single prop/class entry
  6134. * that are housed inside of [SinglePropOffsetValues].
  6135. */
  6136. declare const enum SinglePropOffsetValuesIndex {
  6137. StylesCountPosition = 0,
  6138. ClassesCountPosition = 1,
  6139. ValueStartPosition = 2
  6140. }
  6141. /**
  6142. * Type of the SkipSelf metadata.
  6143. *
  6144. * @publicApi
  6145. */
  6146. export declare interface SkipSelf {
  6147. }
  6148. /**
  6149. * SkipSelf decorator and metadata.
  6150. *
  6151. * @Annotation
  6152. * @publicApi
  6153. */
  6154. export declare const SkipSelf: SkipSelfDecorator;
  6155. /**
  6156. * Type of the SkipSelf decorator / constructor function.
  6157. *
  6158. * @publicApi
  6159. */
  6160. export declare interface SkipSelfDecorator {
  6161. /**
  6162. * A parameter decorator to be used on constructor parameters,
  6163. * which tells the DI framework to start dependency resolution from the parent injector.
  6164. * Resolution works upward through the injector hierarchy, so the local injector
  6165. * is not checked for a provider.
  6166. *
  6167. * @usageNotes
  6168. *
  6169. * In the following example, the dependency can be resolved when
  6170. * instantiating a child, but not when instantiating the class itself.
  6171. *
  6172. * <code-example path="core/di/ts/metadata_spec.ts" region="SkipSelf"></code-example>
  6173. *
  6174. * Learn more in the
  6175. * [Dependency Injection guide](guide/dependency-injection-in-action#skip).
  6176. *
  6177. * @see `Self`
  6178. * @see `Optional`
  6179. *
  6180. */
  6181. (): any;
  6182. new (): SkipSelf;
  6183. }
  6184. /**
  6185. * Configures the `Injector` to return an instance of `useClass` for a token.
  6186. *
  6187. * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
  6188. *
  6189. * @usageNotes
  6190. *
  6191. * ### Example
  6192. *
  6193. * {@example core/di/ts/provider_spec.ts region='StaticClassProvider'}
  6194. *
  6195. * Note that following two providers are not equal:
  6196. *
  6197. * {@example core/di/ts/provider_spec.ts region='StaticClassProviderDifference'}
  6198. *
  6199. * ### Multi-value example
  6200. *
  6201. * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
  6202. *
  6203. * @publicApi
  6204. */
  6205. declare interface StaticClassProvider extends StaticClassSansProvider {
  6206. /**
  6207. * An injection token. (Typically an instance of `Type` or `InjectionToken`, but can be `any`).
  6208. */
  6209. provide: any;
  6210. /**
  6211. * If true, then injector returns an array of instances. This is useful to allow multiple
  6212. * providers spread across many files to provide configuration information to a common token.
  6213. */
  6214. multi?: boolean;
  6215. }
  6216. /**
  6217. * Configures the `Injector` to return an instance of `useClass` for a token.
  6218. * Base for `StaticClassProvider` decorator.
  6219. *
  6220. * @publicApi
  6221. */
  6222. declare interface StaticClassSansProvider {
  6223. /**
  6224. * An optional class to instantiate for the `token`. (If not provided `provide` is assumed to be a
  6225. * class to instantiate)
  6226. */
  6227. useClass: Type<any>;
  6228. /**
  6229. * A list of `token`s which need to be resolved by the injector. The list of values is then
  6230. * used as arguments to the `useClass` constructor.
  6231. */
  6232. deps: any[];
  6233. }
  6234. /**
  6235. * Describes how the `Injector` should be configured in a static way (Without reflection).
  6236. *
  6237. * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
  6238. *
  6239. * @see `ValueProvider`
  6240. * @see `ExistingProvider`
  6241. * @see `FactoryProvider`
  6242. *
  6243. * @publicApi
  6244. */
  6245. export declare type StaticProvider = ValueProvider | ExistingProvider | StaticClassProvider | ConstructorProvider | FactoryProvider | any[];
  6246. /**
  6247. * Used to intercept and sanitize style values before they are written to the renderer.
  6248. *
  6249. * This function is designed to be called in two modes. When a value is not provided
  6250. * then the function will return a boolean whether a property will be sanitized later.
  6251. * If a value is provided then the sanitized version of that will be returned.
  6252. */
  6253. declare interface StyleSanitizeFn {
  6254. (prop: string, value: string | null, mode?: StyleSanitizeMode): any;
  6255. }
  6256. /**
  6257. * A series of flags to instruct a style sanitizer to either validate
  6258. * or sanitize a value.
  6259. *
  6260. * Because sanitization is dependent on the style property (i.e. style
  6261. * sanitization for `width` is much different than for `background-image`)
  6262. * the sanitization function (e.g. `StyleSanitizerFn`) needs to check a
  6263. * property value first before it actually sanitizes any values.
  6264. *
  6265. * This enum exist to allow a style sanitization function to either only
  6266. * do validation (check the property to see whether a value will be
  6267. * sanitized or not) or to sanitize the value (or both).
  6268. *
  6269. * @publicApi
  6270. */
  6271. declare const enum StyleSanitizeMode {
  6272. /** Just check to see if the property is required to be sanitized or not */
  6273. ValidateProperty = 1,
  6274. /** Skip checking the property; just sanitize the value */
  6275. SanitizeOnly = 2,
  6276. /** Check the property and (if true) then sanitize the value */
  6277. ValidateAndSanitize = 3
  6278. }
  6279. /**
  6280. * The styling context acts as a styling manifest (shaped as an array) for determining which
  6281. * styling properties have been assigned via the provided `updateStylingMap`, `updateStyleProp`
  6282. * and `updateClassProp` functions. It also stores the static style/class values that were
  6283. * extracted from the template by the compiler.
  6284. *
  6285. * A context is created by Angular when:
  6286. * 1. An element contains static styling values (like style="..." or class="...")
  6287. * 2. An element contains single property binding values (like [style.prop]="x" or
  6288. * [class.prop]="y")
  6289. * 3. An element contains multi property binding values (like [style]="x" or [class]="y")
  6290. * 4. A directive contains host bindings for static, single or multi styling properties/bindings.
  6291. * 5. An animation player is added to an element via `addPlayer`
  6292. *
  6293. * Note that even if an element contains static styling then this context will be created and
  6294. * attached to it. The reason why this happens (instead of treating styles/classes as regular
  6295. * HTML attributes) is because the style/class bindings must be able to default themselves back
  6296. * to their respective static values when they are set to null.
  6297. *
  6298. * Say for example we have this:
  6299. * ```
  6300. * <!-- when `myWidthExp=null` then a width of `100px`
  6301. * will be used a default value for width -->
  6302. * <div style="width:100px" [style.width]="myWidthExp"></div>
  6303. * ```
  6304. *
  6305. * Even in the situation where there are no bindings, the static styling is still placed into the
  6306. * context because there may be another directive on the same element that has styling.
  6307. *
  6308. * When Angular initializes styling data for an element then it will first register the static
  6309. * styling values on the element using one of these two instructions:
  6310. *
  6311. * 1. elementStart or element (within the template function of a component)
  6312. * 2. elementHostAttrs (for directive host bindings)
  6313. *
  6314. * In either case, a styling context will be created and stored within an element's `LViewData`.
  6315. * Once the styling context is created then single and multi properties can be stored within it.
  6316. * For this to happen, the following function needs to be called:
  6317. *
  6318. * `styling` (called with style properties, class properties and a sanitizer + a directive
  6319. * instance).
  6320. *
  6321. * When this instruction is called it will populate the styling context with the provided style
  6322. * and class names into the context.
  6323. *
  6324. * The context itself looks like this:
  6325. *
  6326. * context = [
  6327. * // 0-8: header values (about 8 entries of configuration data)
  6328. * // 9+: this is where each entry is stored:
  6329. * ]
  6330. *
  6331. * Let's say we have the following template code:
  6332. *
  6333. * ```
  6334. * <div class="foo bar"
  6335. * style="width:200px; color:red"
  6336. * [style.width]="myWidthExp"
  6337. * [style.height]="myHeightExp"
  6338. * [class.baz]="myBazExp">
  6339. * ```
  6340. *
  6341. * The context generated from these values will look like this (note that
  6342. * for each binding name (the class and style bindings) the values will
  6343. * be inserted twice into the array (once for single property entries and
  6344. * again for multi property entries).
  6345. *
  6346. * context = [
  6347. * // 0-8: header values (about 8 entries of configuration data)
  6348. * // 9+: this is where each entry is stored:
  6349. *
  6350. * // SINGLE PROPERTIES
  6351. * configForWidth,
  6352. * 'width'
  6353. * myWidthExp, // the binding value not the binding itself
  6354. * 0, // the directive owner
  6355. *
  6356. * configForHeight,
  6357. * 'height'
  6358. * myHeightExp, // the binding value not the binding itself
  6359. * 0, // the directive owner
  6360. *
  6361. * configForBazClass,
  6362. * 'baz
  6363. * myBazClassExp, // the binding value not the binding itself
  6364. * 0, // the directive owner
  6365. *
  6366. * // MULTI PROPERTIES
  6367. * configForWidth,
  6368. * 'width'
  6369. * myWidthExp, // the binding value not the binding itself
  6370. * 0, // the directive owner
  6371. *
  6372. * configForHeight,
  6373. * 'height'
  6374. * myHeightExp, // the binding value not the binding itself
  6375. * 0, // the directive owner
  6376. *
  6377. * configForBazClass,
  6378. * 'baz
  6379. * myBazClassExp, // the binding value not the binding itself
  6380. * 0, // the directive owner
  6381. * ]
  6382. *
  6383. * The configuration values are left out of the example above because
  6384. * the ordering of them could change between code patches. Please read the
  6385. * documentation below to get a better understand of what the configuration
  6386. * values are and how they work.
  6387. *
  6388. * Each time a binding property is updated (whether it be through a single
  6389. * property instruction like `styleProp`, `classProp`,
  6390. * `styleMap` or `classMap`) then the values in the context will be updated as
  6391. * well.
  6392. *
  6393. * If for example `[style.width]` updates to `555px` then its value will be reflected
  6394. * in the context as so:
  6395. *
  6396. * context = [
  6397. * // ...
  6398. * configForWidth, // this will be marked DIRTY
  6399. * 'width'
  6400. * '555px',
  6401. * 0,
  6402. * //..
  6403. * ]
  6404. *
  6405. * The context and directive data will also be marked dirty.
  6406. *
  6407. * Despite the context being updated, nothing has been rendered on screen (not styles or
  6408. * classes have been set on the element). To kick off rendering for an element the following
  6409. * function needs to be run `stylingApply`.
  6410. *
  6411. * `stylingApply` will run through the context and find each dirty value and render them onto
  6412. * the element. Once complete, all styles/classes will be set to clean. Because of this, the render
  6413. * function will now know not to rerun itself again if called again unless new style/class values
  6414. * have changed.
  6415. *
  6416. * ## Directives
  6417. * Directive style/class values (which are provided through host bindings) are also supported and
  6418. * housed within the same styling context as are template-level style/class properties/bindings
  6419. * So long as they are all assigned to the same element, both directive-level and template-level
  6420. * styling bindings share the same context.
  6421. *
  6422. * Each of the following instructions supports accepting a directive instance as an input parameter:
  6423. *
  6424. * - `elementHostAttrs`
  6425. * - `styling`
  6426. * - `styleProp`
  6427. * - `classProp`
  6428. * - `styleMap`
  6429. * - `classMap`
  6430. * - `stylingApply`
  6431. *
  6432. * Each time a directive value is passed in, it will be converted into an index by examining the
  6433. * directive registry (which lives in the context configuration area). The index is then used
  6434. * to help single style properties figure out where a value is located in the context.
  6435. *
  6436. *
  6437. * ## Single-level styling bindings (`[style.prop]` and `[class.name]`)
  6438. *
  6439. * Both `[style.prop]` and `[class.name]` bindings are run through the `updateStyleProp`
  6440. * and `updateClassProp` functions respectively. They work by examining the provided
  6441. * `offset` value and are able to locate the exact spot in the context where the
  6442. * matching style is located.
  6443. *
  6444. * Both `[style.prop]` and `[class.name]` bindings are able to process these values
  6445. * from directive host bindings. When evaluated (from the host binding function) the
  6446. * `directiveRef` value is then passed in.
  6447. *
  6448. * If two directives or a directive + a template binding both write to the same style/class
  6449. * binding then the styling context code will decide which one wins based on the following
  6450. * rule:
  6451. *
  6452. * 1. If the template binding has a value then it always wins
  6453. * 2. Otherwise whichever first-registered directive that has that value first will win
  6454. *
  6455. * The code example helps make this clear:
  6456. *
  6457. * ```
  6458. * <!--
  6459. * <div [style.width]="myWidth"
  6460. * [my-width-directive]="'600px'">
  6461. * -->
  6462. *
  6463. * @Directive({
  6464. * selector: '[my-width-directive']
  6465. * })
  6466. * class MyWidthDirective {
  6467. * @Input('my-width-directive')
  6468. * @HostBinding('style.width')
  6469. * public width = null;
  6470. * }
  6471. * ```
  6472. *
  6473. * Since there is a style binding for width present on the element (`[style.width]`) then
  6474. * it will always win over the width binding that is present as a host binding within
  6475. * the `MyWidthDirective`. However, if `[style.width]` renders as `null` (so `myWidth=null`)
  6476. * then the `MyWidthDirective` will be able to write to the `width` style within the context.
  6477. * Simply put, whichever directive writes to a value first ends up having ownership of it as
  6478. * long as the template didn't set anything.
  6479. *
  6480. * The way in which the ownership is facilitated is through index value. The earliest directives
  6481. * get the smallest index values (with 0 being reserved for the template element bindings). Each
  6482. * time a value is written from a directive or the template bindings, the value itself gets
  6483. * assigned the directive index value in its data. If another directive writes a value again then
  6484. * its directive index gets compared against the directive index that exists on the element. Only
  6485. * when the new value's directive index is less than the existing directive index then the new
  6486. * value will be written to the context. But, if the existing value is null then the new value is
  6487. * written by the less important directive.
  6488. *
  6489. * Each directive also has its own sanitizer and dirty flags. These values are consumed within the
  6490. * rendering function.
  6491. *
  6492. *
  6493. * ## Multi-level styling bindings (`[style]` and `[class]`)
  6494. *
  6495. * Multi-level styling bindings are treated as less important (less specific) as single-level
  6496. * bindings (things like `[style.prop]` and `[class.name]`).
  6497. *
  6498. * Multi-level bindings are still applied to the context in a similar way as are single level
  6499. * bindings, but this process works by diffing the new multi-level values (which are key/value
  6500. * maps) against the existing set of styles that live in the context. Each time a new map value
  6501. * is detected (via identity check) then it will loop through the values and figure out what
  6502. * has changed and reorder the context array to match the ordering of the keys. This reordering
  6503. * of the context makes sure that follow-up traversals of the context when updated against the
  6504. * key/value map are as close as possible to o(n) (where "n" is the size of the key/value map).
  6505. *
  6506. * If a `directiveRef` value is passed in then the styling algorithm code will take the directive's
  6507. * prioritization index into account and update the values with respect to more important
  6508. * directives. This means that if a value such as `width` is updated in two different `[style]`
  6509. * bindings (say one on the template and another within a directive that sits on the same element)
  6510. * then the algorithm will decide how to update the value based on the following heuristic:
  6511. *
  6512. * 1. If the template binding has a value then it always wins
  6513. * 2. If not then whichever first-registered directive that has that value first will win
  6514. *
  6515. * It will also update the value if it was set to `null` by a previous directive (or the template).
  6516. *
  6517. * Each time a value is updated (or removed) then the context will change shape to better match
  6518. * the ordering of the styling data as well as the ordering of each directive that contains styling
  6519. * data. (See `patchStylingMapIntoContext` inside of class_and_style_bindings.ts to better
  6520. * understand how this works.)
  6521. *
  6522. * ## Rendering
  6523. * The rendering mechanism (when the styling data is applied on screen) occurs via the
  6524. * `stylingApply` function and is designed to run after **all** styling functions have been
  6525. * evaluated. The rendering algorithm will loop over the context and only apply the styles that are
  6526. * flagged as dirty (either because they are new, updated or have been removed via multi or
  6527. * single bindings).
  6528. */
  6529. declare interface StylingContext extends Array<{
  6530. [key: string]: any;
  6531. } | number | string | boolean | RElement | StyleSanitizeFn | PlayerContext | null> {
  6532. /**
  6533. * Location of element that is used as a target for this context.
  6534. */
  6535. [StylingIndex.ElementPosition]: LContainer | ɵangular_packages_core_core_bm | RElement | null;
  6536. /**
  6537. * A numeric value representing the configuration status (whether the context is dirty or not)
  6538. * mixed together (using bit shifting) with a index value which tells the starting index value
  6539. * of where the multi style entries begin.
  6540. */
  6541. [StylingIndex.MasterFlagPosition]: number;
  6542. /**
  6543. * Location of the collection of directives for this context
  6544. */
  6545. [StylingIndex.DirectiveRegistryPosition]: DirectiveRegistryValues;
  6546. /**
  6547. * Location of all static styles values
  6548. */
  6549. [StylingIndex.InitialStyleValuesPosition]: InitialStylingValues;
  6550. /**
  6551. * Location of all static class values
  6552. */
  6553. [StylingIndex.InitialClassValuesPosition]: InitialStylingValues;
  6554. /**
  6555. * A numeric value representing the class index offset value. Whenever a single class is
  6556. * applied (using `classProp`) it should have an styling index value that doesn't
  6557. * need to take into account any style values that exist in the context.
  6558. */
  6559. [StylingIndex.SinglePropOffsetPositions]: SinglePropOffsetValues;
  6560. /**
  6561. * The last class value that was interpreted by `styleMap`. This is cached
  6562. * So that the algorithm can exit early incase the value has not changed.
  6563. */
  6564. [StylingIndex.CachedMultiClasses]: any | MapBasedOffsetValues;
  6565. /**
  6566. * The last style value that was interpreted by `classMap`. This is cached
  6567. * So that the algorithm can exit early incase the value has not changed.
  6568. */
  6569. [StylingIndex.CachedMultiStyles]: any | MapBasedOffsetValues;
  6570. /**
  6571. * A queue of all hostStyling instructions.
  6572. *
  6573. * This array (queue) is populated only when host-level styling instructions
  6574. * (e.g. `hostStyleMap` and `hostClassProp`) are used to apply style and
  6575. * class values via host bindings to the host element. Despite these being
  6576. * standard angular instructions, they are not designed to immediately apply
  6577. * their values to the styling context when executed. What happens instead is
  6578. * a queue is constructed and each instruction is populated into the queue.
  6579. * Then, once the style/class values are set to flush (via `stylingApply` or
  6580. * `hostStylingApply`), the queue is flushed and the values are rendered onto
  6581. * the host element.
  6582. */
  6583. [StylingIndex.HostInstructionsQueue]: HostInstructionsQueue | null;
  6584. /**
  6585. * Location of animation context (which contains the active players) for this element styling
  6586. * context.
  6587. */
  6588. [StylingIndex.PlayerContext]: PlayerContext | null;
  6589. }
  6590. /** Used as numeric pointer values to determine what cells to update in the `StylingContext` */
  6591. declare const enum StylingIndex {
  6592. ElementPosition = 0,
  6593. MasterFlagPosition = 1,
  6594. DirectiveRegistryPosition = 2,
  6595. InitialStyleValuesPosition = 3,
  6596. InitialClassValuesPosition = 4,
  6597. SinglePropOffsetPositions = 5,
  6598. CachedMultiClasses = 6,
  6599. CachedMultiStyles = 7,
  6600. HostInstructionsQueue = 8,
  6601. PlayerContext = 9,
  6602. SingleStylesStartPosition = 10,
  6603. FlagsOffset = 0,
  6604. PropertyOffset = 1,
  6605. ValueOffset = 2,
  6606. PlayerBuilderIndexOffset = 3,
  6607. Size = 4,
  6608. BitCountSize = 14,
  6609. BitMask = 16383
  6610. }
  6611. /**
  6612. * NgModuleFactoryLoader that uses SystemJS to load NgModuleFactory
  6613. * @publicApi
  6614. * @deprecated the `string` form of `loadChildren` is deprecated, and `SystemJsNgModuleLoader` is
  6615. * part of its implementation. See `LoadChildren` for more details.
  6616. */
  6617. export declare class SystemJsNgModuleLoader implements NgModuleFactoryLoader {
  6618. private _compiler;
  6619. private _config;
  6620. constructor(_compiler: Compiler, config?: SystemJsNgModuleLoaderConfig);
  6621. load(path: string): Promise<NgModuleFactory<any>>;
  6622. private loadAndCompile;
  6623. private loadFactory;
  6624. }
  6625. /**
  6626. * Configuration for SystemJsNgModuleLoader.
  6627. * token.
  6628. *
  6629. * @publicApi
  6630. * @deprecated the `string` form of `loadChildren` is deprecated, and `SystemJsNgModuleLoaderConfig`
  6631. * is part of its implementation. See `LoadChildren` for more details.
  6632. */
  6633. export declare abstract class SystemJsNgModuleLoaderConfig {
  6634. /**
  6635. * Prefix to add when computing the name of the factory module for a given module name.
  6636. */
  6637. factoryPathPrefix: string;
  6638. /**
  6639. * Suffix to add when computing the name of the factory module for a given module name.
  6640. */
  6641. factoryPathSuffix: string;
  6642. }
  6643. declare const T_HOST = 6;
  6644. /**
  6645. * A combination of:
  6646. * - Attribute names and values.
  6647. * - Special markers acting as flags to alter attributes processing.
  6648. * - Parsed ngProjectAs selectors.
  6649. */
  6650. declare type TAttributes = (string | ɵAttributeMarker | CssSelector)[];
  6651. /** Static data for an LContainer */
  6652. declare interface TContainerNode extends TNode {
  6653. /**
  6654. * Index in the data[] array.
  6655. *
  6656. * If it's -1, this is a dynamically created container node that isn't stored in
  6657. * data[] (e.g. when you inject ViewContainerRef) .
  6658. */
  6659. index: number;
  6660. child: null;
  6661. /**
  6662. * Container nodes will have parents unless:
  6663. *
  6664. * - They are the first node of a component or embedded view
  6665. * - They are dynamically created
  6666. */
  6667. parent: ɵangular_packages_core_core_bg | TElementContainerNode | null;
  6668. tViews: TView | TView[] | null;
  6669. projection: null;
  6670. }
  6671. /**
  6672. * Static data that corresponds to the instance-specific data array on an LView.
  6673. *
  6674. * Each node's static data is stored in tData at the same index that it's stored
  6675. * in the data array. Any nodes that do not have static data store a null value in
  6676. * tData to avoid a sparse array.
  6677. *
  6678. * Each pipe's definition is stored here at the same index as its pipe instance in
  6679. * the data array.
  6680. *
  6681. * Each host property's name is stored here at the same index as its value in the
  6682. * data array.
  6683. *
  6684. * Each property binding name is stored here at the same index as its value in
  6685. * the data array. If the binding is an interpolation, the static string values
  6686. * are stored parallel to the dynamic values. Example:
  6687. *
  6688. * id="prefix {{ v0 }} a {{ v1 }} b {{ v2 }} suffix"
  6689. *
  6690. * LView | TView.data
  6691. *------------------------
  6692. * v0 value | 'a'
  6693. * v1 value | 'b'
  6694. * v2 value | id � prefix � suffix
  6695. *
  6696. * Injector bloom filters are also stored here.
  6697. */
  6698. declare type TData = (TNode | ɵPipeDef<any> | ɵDirectiveDef<any> | ɵComponentDef<any> | number | Type<any> | InjectionToken<any> | TI18n | I18nUpdateOpCodes | null | string)[];
  6699. /** Static data for an <ng-container> */
  6700. declare interface TElementContainerNode extends TNode {
  6701. /** Index in the LView[] array. */
  6702. index: number;
  6703. child: ɵangular_packages_core_core_bg | TTextNode | TContainerNode | TElementContainerNode | TProjectionNode | null;
  6704. parent: ɵangular_packages_core_core_bg | TElementContainerNode | null;
  6705. tViews: null;
  6706. projection: null;
  6707. }
  6708. /**
  6709. * Represents an embedded template that can be used to instantiate embedded views.
  6710. * To instantiate embedded views based on a template, use the `ViewContainerRef`
  6711. * method `createEmbeddedView()`.
  6712. *
  6713. * Access a `TemplateRef` instance by placing a directive on an `<ng-template>`
  6714. * element (or directive prefixed with `*`). The `TemplateRef` for the embedded view
  6715. * is injected into the constructor of the directive,
  6716. * using the `TemplateRef` token.
  6717. *
  6718. * You can also use a `Query` to find a `TemplateRef` associated with
  6719. * a component or a directive.
  6720. *
  6721. * @see `ViewContainerRef`
  6722. * @see [Navigate the Component Tree with DI](guide/dependency-injection-navtree)
  6723. *
  6724. * @publicApi
  6725. */
  6726. export declare abstract class TemplateRef<C> {
  6727. /**
  6728. * The anchor element in the parent view for this embedded view.
  6729. *
  6730. * The data-binding and injection contexts of embedded views created from this `TemplateRef`
  6731. * inherit from the contexts of this location.
  6732. *
  6733. * Typically new embedded views are attached to the view container of this location, but in
  6734. * advanced use-cases, the view can be attached to a different container while keeping the
  6735. * data-binding and injection context from the original location.
  6736. *
  6737. */
  6738. abstract readonly elementRef: ElementRef;
  6739. /**
  6740. * Instantiates an embedded view based on this template,
  6741. * and attaches it to the view container.
  6742. * @param context The data-binding context of the embedded view, as declared
  6743. * in the `<ng-template>` usage.
  6744. * @returns The new embedded view object.
  6745. */
  6746. abstract createEmbeddedView(context: C): EmbeddedViewRef<C>;
  6747. }
  6748. /**
  6749. * The Testability service provides testing hooks that can be accessed from
  6750. * the browser and by services such as Protractor. Each bootstrapped Angular
  6751. * application on the page will have an instance of Testability.
  6752. * @publicApi
  6753. */
  6754. export declare class Testability implements PublicTestability {
  6755. private _ngZone;
  6756. private _pendingCount;
  6757. private _isZoneStable;
  6758. private _callbacks;
  6759. private taskTrackingZone;
  6760. constructor(_ngZone: NgZone);
  6761. private _watchAngularEvents;
  6762. /**
  6763. * Increases the number of pending request
  6764. * @deprecated pending requests are now tracked with zones.
  6765. */
  6766. increasePendingRequestCount(): number;
  6767. /**
  6768. * Decreases the number of pending request
  6769. * @deprecated pending requests are now tracked with zones
  6770. */
  6771. decreasePendingRequestCount(): number;
  6772. /**
  6773. * Whether an associated application is stable
  6774. */
  6775. isStable(): boolean;
  6776. private _runCallbacksIfReady;
  6777. private getPendingTasks;
  6778. private addCallback;
  6779. /**
  6780. * Wait for the application to be stable with a timeout. If the timeout is reached before that
  6781. * happens, the callback receives a list of the macro tasks that were pending, otherwise null.
  6782. *
  6783. * @param doneCb The callback to invoke when Angular is stable or the timeout expires
  6784. * whichever comes first.
  6785. * @param timeout Optional. The maximum time to wait for Angular to become stable. If not
  6786. * specified, whenStable() will wait forever.
  6787. * @param updateCb Optional. If specified, this callback will be invoked whenever the set of
  6788. * pending macrotasks changes. If this callback returns true doneCb will not be invoked
  6789. * and no further updates will be issued.
  6790. */
  6791. whenStable(doneCb: Function, timeout?: number, updateCb?: Function): void;
  6792. /**
  6793. * Get the number of pending requests
  6794. * @deprecated pending requests are now tracked with zones
  6795. */
  6796. getPendingRequestCount(): number;
  6797. /**
  6798. * Find providers by name
  6799. * @param using The root element to search from
  6800. * @param provider The name of binding variable
  6801. * @param exactMatch Whether using exactMatch
  6802. */
  6803. findProviders(using: any, provider: string, exactMatch: boolean): any[];
  6804. }
  6805. /**
  6806. * A global registry of {@link Testability} instances for specific elements.
  6807. * @publicApi
  6808. */
  6809. export declare class TestabilityRegistry {
  6810. constructor();
  6811. /**
  6812. * Registers an application with a testability hook so that it can be tracked
  6813. * @param token token of application, root element
  6814. * @param testability Testability hook
  6815. */
  6816. registerApplication(token: any, testability: Testability): void;
  6817. /**
  6818. * Unregisters an application.
  6819. * @param token token of application, root element
  6820. */
  6821. unregisterApplication(token: any): void;
  6822. /**
  6823. * Unregisters all applications
  6824. */
  6825. unregisterAllApplications(): void;
  6826. /**
  6827. * Get a testability hook associated with the application
  6828. * @param elem root element
  6829. */
  6830. getTestability(elem: any): Testability | null;
  6831. /**
  6832. * Get all registered testabilities
  6833. */
  6834. getAllTestabilities(): Testability[];
  6835. /**
  6836. * Get all registered applications(root elements)
  6837. */
  6838. getAllRootElements(): any[];
  6839. /**
  6840. * Find testability of a node in the Tree
  6841. * @param elem node
  6842. * @param findInAncestors whether finding testability in ancestors if testability was not found in
  6843. * current node
  6844. */
  6845. findTestabilityInTree(elem: Node, findInAncestors?: boolean): Testability | null;
  6846. }
  6847. declare interface TextDef {
  6848. prefix: string;
  6849. }
  6850. /**
  6851. * Store information for the i18n translation block.
  6852. */
  6853. declare interface TI18n {
  6854. /**
  6855. * Number of slots to allocate in expando.
  6856. *
  6857. * This is the max number of DOM elements which will be created by this i18n + ICU blocks. When
  6858. * the DOM elements are being created they are stored in the EXPANDO, so that update OpCodes can
  6859. * write into them.
  6860. */
  6861. vars: number;
  6862. /**
  6863. * A set of OpCodes which will create the Text Nodes and ICU anchors for the translation blocks.
  6864. *
  6865. * NOTE: The ICU anchors are filled in with ICU Update OpCode.
  6866. */
  6867. create: I18nMutateOpCodes;
  6868. /**
  6869. * A set of OpCodes which will be executed on each change detection to determine if any changes to
  6870. * DOM are required.
  6871. */
  6872. update: I18nUpdateOpCodes;
  6873. /**
  6874. * A list of ICUs in a translation block (or `null` if block has no ICUs).
  6875. *
  6876. * Example:
  6877. * Given: `<div i18n>You have {count, plural, ...} and {state, switch, ...}</div>`
  6878. * There would be 2 ICUs in this array.
  6879. * 1. `{count, plural, ...}`
  6880. * 2. `{state, switch, ...}`
  6881. */
  6882. icus: TIcu[] | null;
  6883. }
  6884. declare interface TIcu {
  6885. /**
  6886. * Defines the ICU type of `select` or `plural`
  6887. */
  6888. type: IcuType;
  6889. /**
  6890. * Number of slots to allocate in expando for each case.
  6891. *
  6892. * This is the max number of DOM elements which will be created by this i18n + ICU blocks. When
  6893. * the DOM elements are being created they are stored in the EXPANDO, so that update OpCodes can
  6894. * write into them.
  6895. */
  6896. vars: number[];
  6897. /**
  6898. * An optional array of child/sub ICUs.
  6899. *
  6900. * In case of nested ICUs such as:
  6901. * ```
  6902. * {�0�, plural,
  6903. * =0 {zero}
  6904. * other {�0� {�1�, select,
  6905. * cat {cats}
  6906. * dog {dogs}
  6907. * other {animals}
  6908. * }!
  6909. * }
  6910. * }
  6911. * ```
  6912. * When the parent ICU is changing it must clean up child ICUs as well. For this reason it needs
  6913. * to know which child ICUs to run clean up for as well.
  6914. *
  6915. * In the above example this would be:
  6916. * ```ts
  6917. * [
  6918. * [], // `=0` has no sub ICUs
  6919. * [1], // `other` has one subICU at `1`st index.
  6920. * ]
  6921. * ```
  6922. *
  6923. * The reason why it is Array of Arrays is because first array represents the case, and second
  6924. * represents the child ICUs to clean up. There may be more than one child ICUs per case.
  6925. */
  6926. childIcus: number[][];
  6927. /**
  6928. * A list of case values which the current ICU will try to match.
  6929. *
  6930. * The last value is `other`
  6931. */
  6932. cases: any[];
  6933. /**
  6934. * A set of OpCodes to apply in order to build up the DOM render tree for the ICU
  6935. */
  6936. create: I18nMutateOpCodes[];
  6937. /**
  6938. * A set of OpCodes to apply in order to destroy the DOM render tree for the ICU.
  6939. */
  6940. remove: I18nMutateOpCodes[];
  6941. /**
  6942. * A set of OpCodes to apply in order to update the DOM render tree for the ICU bindings.
  6943. */
  6944. update: I18nUpdateOpCodes[];
  6945. }
  6946. /**
  6947. * Binding data (flyweight) for a particular node that is shared between all templates
  6948. * of a specific type.
  6949. *
  6950. * If a property is:
  6951. * - PropertyAliases: that property's data was generated and this is it
  6952. * - Null: that property's data was already generated and nothing was found.
  6953. * - Undefined: that property's data has not yet been generated
  6954. *
  6955. * see: https://en.wikipedia.org/wiki/Flyweight_pattern for more on the Flyweight pattern
  6956. */
  6957. declare interface TNode {
  6958. /** The type of the TNode. See TNodeType. */
  6959. type: TNodeType;
  6960. /**
  6961. * Index of the TNode in TView.data and corresponding native element in LView.
  6962. *
  6963. * This is necessary to get from any TNode to its corresponding native element when
  6964. * traversing the node tree.
  6965. *
  6966. * If index is -1, this is a dynamically created container node or embedded view node.
  6967. */
  6968. index: number;
  6969. /**
  6970. * The index of the closest injector in this node's LView.
  6971. *
  6972. * If the index === -1, there is no injector on this node or any ancestor node in this view.
  6973. *
  6974. * If the index !== -1, it is the index of this node's injector OR the index of a parent injector
  6975. * in the same view. We pass the parent injector index down the node tree of a view so it's
  6976. * possible to find the parent injector without walking a potentially deep node tree. Injector
  6977. * indices are not set across view boundaries because there could be multiple component hosts.
  6978. *
  6979. * If tNode.injectorIndex === tNode.parent.injectorIndex, then the index belongs to a parent
  6980. * injector.
  6981. */
  6982. injectorIndex: number;
  6983. /**
  6984. * Stores starting index of the directives.
  6985. */
  6986. directiveStart: number;
  6987. /**
  6988. * Stores final exclusive index of the directives.
  6989. */
  6990. directiveEnd: number;
  6991. /**
  6992. * Stores the first index where property binding metadata is stored for
  6993. * this node.
  6994. */
  6995. propertyMetadataStartIndex: number;
  6996. /**
  6997. * Stores the exclusive final index where property binding metadata is
  6998. * stored for this node.
  6999. */
  7000. propertyMetadataEndIndex: number;
  7001. /**
  7002. * Stores if Node isComponent, isProjected, hasContentQuery, hasClassInput and hasStyleInput
  7003. */
  7004. flags: TNodeFlags;
  7005. /**
  7006. * This number stores two values using its bits:
  7007. *
  7008. * - the index of the first provider on that node (first 16 bits)
  7009. * - the count of view providers from the component on this node (last 16 bits)
  7010. */
  7011. providerIndexes: TNodeProviderIndexes;
  7012. /** The tag name associated with this node. */
  7013. tagName: string | null;
  7014. /**
  7015. * Attributes associated with an element. We need to store attributes to support various use-cases
  7016. * (attribute injection, content projection with selectors, directives matching).
  7017. * Attributes are stored statically because reading them from the DOM would be way too slow for
  7018. * content projection and queries.
  7019. *
  7020. * Since attrs will always be calculated first, they will never need to be marked undefined by
  7021. * other instructions.
  7022. *
  7023. * For regular attributes a name of an attribute and its value alternate in the array.
  7024. * e.g. ['role', 'checkbox']
  7025. * This array can contain flags that will indicate "special attributes" (attributes with
  7026. * namespaces, attributes extracted from bindings and outputs).
  7027. */
  7028. attrs: TAttributes | null;
  7029. /**
  7030. * A set of local names under which a given element is exported in a template and
  7031. * visible to queries. An entry in this array can be created for different reasons:
  7032. * - an element itself is referenced, ex.: `<div #foo>`
  7033. * - a component is referenced, ex.: `<my-cmpt #foo>`
  7034. * - a directive is referenced, ex.: `<my-cmpt #foo="directiveExportAs">`.
  7035. *
  7036. * A given element might have different local names and those names can be associated
  7037. * with a directive. We store local names at even indexes while odd indexes are reserved
  7038. * for directive index in a view (or `-1` if there is no associated directive).
  7039. *
  7040. * Some examples:
  7041. * - `<div #foo>` => `["foo", -1]`
  7042. * - `<my-cmpt #foo>` => `["foo", myCmptIdx]`
  7043. * - `<my-cmpt #foo #bar="directiveExportAs">` => `["foo", myCmptIdx, "bar", directiveIdx]`
  7044. * - `<div #foo #bar="directiveExportAs">` => `["foo", -1, "bar", directiveIdx]`
  7045. */
  7046. localNames: (string | number)[] | null;
  7047. /** Information about input properties that need to be set once from attribute data. */
  7048. initialInputs: InitialInputData | null | undefined;
  7049. /**
  7050. * Input data for all directives on this node.
  7051. *
  7052. * - `undefined` means that the prop has not been initialized yet,
  7053. * - `null` means that the prop has been initialized but no inputs have been found.
  7054. */
  7055. inputs: PropertyAliases | null | undefined;
  7056. /**
  7057. * Output data for all directives on this node.
  7058. *
  7059. * - `undefined` means that the prop has not been initialized yet,
  7060. * - `null` means that the prop has been initialized but no outputs have been found.
  7061. */
  7062. outputs: PropertyAliases | null | undefined;
  7063. /**
  7064. * The TView or TViews attached to this node.
  7065. *
  7066. * If this TNode corresponds to an LContainer with inline views, the container will
  7067. * need to store separate static data for each of its view blocks (TView[]). Otherwise,
  7068. * nodes in inline views with the same index as nodes in their parent views will overwrite
  7069. * each other, as they are in the same template.
  7070. *
  7071. * Each index in this array corresponds to the static data for a certain
  7072. * view. So if you had V(0) and V(1) in a container, you might have:
  7073. *
  7074. * [
  7075. * [{tagName: 'div', attrs: ...}, null], // V(0) TView
  7076. * [{tagName: 'button', attrs ...}, null] // V(1) TView
  7077. *
  7078. * If this TNode corresponds to an LContainer with a template (e.g. structural
  7079. * directive), the template's TView will be stored here.
  7080. *
  7081. * If this TNode corresponds to an element, tViews will be null .
  7082. */
  7083. tViews: TView | TView[] | null;
  7084. /**
  7085. * The next sibling node. Necessary so we can propagate through the root nodes of a view
  7086. * to insert them or remove them from the DOM.
  7087. */
  7088. next: TNode | null;
  7089. /**
  7090. * The next projected sibling. Since in Angular content projection works on the node-by-node basis
  7091. * the act of projecting nodes might change nodes relationship at the insertion point (target
  7092. * view). At the same time we need to keep initial relationship between nodes as expressed in
  7093. * content view.
  7094. */
  7095. projectionNext: TNode | null;
  7096. /**
  7097. * First child of the current node.
  7098. *
  7099. * For component nodes, the child will always be a ContentChild (in same view).
  7100. * For embedded view nodes, the child will be in their child view.
  7101. */
  7102. child: TNode | null;
  7103. /**
  7104. * Parent node (in the same view only).
  7105. *
  7106. * We need a reference to a node's parent so we can append the node to its parent's native
  7107. * element at the appropriate time.
  7108. *
  7109. * If the parent would be in a different view (e.g. component host), this property will be null.
  7110. * It's important that we don't try to cross component boundaries when retrieving the parent
  7111. * because the parent will change (e.g. index, attrs) depending on where the component was
  7112. * used (and thus shouldn't be stored on TNode). In these cases, we retrieve the parent through
  7113. * LView.node instead (which will be instance-specific).
  7114. *
  7115. * If this is an inline view node (V), the parent will be its container.
  7116. */
  7117. parent: ɵangular_packages_core_core_bg | TContainerNode | null;
  7118. stylingTemplate: StylingContext | null;
  7119. /**
  7120. * List of projected TNodes for a given component host element OR index into the said nodes.
  7121. *
  7122. * For easier discussion assume this example:
  7123. * `<parent>`'s view definition:
  7124. * ```
  7125. * <child id="c1">content1</child>
  7126. * <child id="c2"><span>content2</span></child>
  7127. * ```
  7128. * `<child>`'s view definition:
  7129. * ```
  7130. * <ng-content id="cont1"></ng-content>
  7131. * ```
  7132. *
  7133. * If `Array.isArray(projection)` then `TNode` is a host element:
  7134. * - `projection` stores the content nodes which are to be projected.
  7135. * - The nodes represent categories defined by the selector: For example:
  7136. * `<ng-content/><ng-content select="abc"/>` would represent the heads for `<ng-content/>`
  7137. * and `<ng-content select="abc"/>` respectively.
  7138. * - The nodes we store in `projection` are heads only, we used `.next` to get their
  7139. * siblings.
  7140. * - The nodes `.next` is sorted/rewritten as part of the projection setup.
  7141. * - `projection` size is equal to the number of projections `<ng-content>`. The size of
  7142. * `c1` will be `1` because `<child>` has only one `<ng-content>`.
  7143. * - we store `projection` with the host (`c1`, `c2`) rather than the `<ng-content>` (`cont1`)
  7144. * because the same component (`<child>`) can be used in multiple locations (`c1`, `c2`) and as
  7145. * a result have different set of nodes to project.
  7146. * - without `projection` it would be difficult to efficiently traverse nodes to be projected.
  7147. *
  7148. * If `typeof projection == 'number'` then `TNode` is a `<ng-content>` element:
  7149. * - `projection` is an index of the host's `projection`Nodes.
  7150. * - This would return the first head node to project:
  7151. * `getHost(currentTNode).projection[currentTNode.projection]`.
  7152. * - When projecting nodes the parent node retrieved may be a `<ng-content>` node, in which case
  7153. * the process is recursive in nature.
  7154. *
  7155. * If `projection` is of type `RNode[][]` than we have a collection of native nodes passed as
  7156. * projectable nodes during dynamic component creation.
  7157. */
  7158. projection: (TNode | RNode[])[] | number | null;
  7159. /**
  7160. * A buffer of functions that will be called once `elementEnd` (or `element`) completes.
  7161. *
  7162. * Due to the nature of how directives work in Angular, some directive code may
  7163. * need to fire after any template-level code runs. If present, this array will
  7164. * be flushed (each function will be invoked) once the associated element is
  7165. * created.
  7166. *
  7167. * If an element is created multiple times then this function will be populated
  7168. * with functions each time the creation block is called.
  7169. */
  7170. onElementCreationFns: Function[] | null;
  7171. newStyles: TStylingContext | null;
  7172. newClasses: TStylingContext | null;
  7173. }
  7174. /**
  7175. * Corresponds to the TNode.flags property.
  7176. */
  7177. declare const enum TNodeFlags {
  7178. /** This bit is set if the node is a component */
  7179. isComponent = 1,
  7180. /** This bit is set if the node has been projected */
  7181. isProjected = 2,
  7182. /** This bit is set if any directive on this node has content queries */
  7183. hasContentQuery = 4,
  7184. /** This bit is set if the node has any "class" inputs */
  7185. hasClassInput = 8,
  7186. /** This bit is set if the node has any "style" inputs */
  7187. hasStyleInput = 16,
  7188. /** This bit is set if the node has been detached by i18n */
  7189. isDetached = 32
  7190. }
  7191. /**
  7192. * Corresponds to the TNode.providerIndexes property.
  7193. */
  7194. declare const enum TNodeProviderIndexes {
  7195. /** The index of the first provider on this node is encoded on the least significant bits */
  7196. ProvidersStartIndexMask = 65535,
  7197. /** The count of view providers from the component on this node is encoded on the 16 most
  7198. significant bits */
  7199. CptViewProvidersCountShift = 16,
  7200. CptViewProvidersCountShifter = 65536
  7201. }
  7202. /**
  7203. * TNodeType corresponds to the {@link TNode} `type` property.
  7204. */
  7205. declare const enum TNodeType {
  7206. /**
  7207. * The TNode contains information about an {@link LContainer} for embedded views.
  7208. */
  7209. Container = 0,
  7210. /**
  7211. * The TNode contains information about an `<ng-content>` projection
  7212. */
  7213. Projection = 1,
  7214. /**
  7215. * The TNode contains information about an {@link LView}
  7216. */
  7217. View = 2,
  7218. /**
  7219. * The TNode contains information about a DOM element aka {@link RNode}.
  7220. */
  7221. Element = 3,
  7222. /**
  7223. * The TNode contains information about an `<ng-container>` element {@link RNode}.
  7224. */
  7225. ElementContainer = 4,
  7226. /**
  7227. * The TNode contains information about an ICU comment used in `i18n`.
  7228. */
  7229. IcuContainer = 5
  7230. }
  7231. /**
  7232. * Type representing a set of TNodes that can have local refs (`#foo`) placed on them.
  7233. */
  7234. declare type TNodeWithLocalRefs = TContainerNode | ɵangular_packages_core_core_bg | TElementContainerNode;
  7235. /** Static data for an LProjectionNode */
  7236. declare interface TProjectionNode extends TNode {
  7237. /** Index in the data[] array */
  7238. child: null;
  7239. /**
  7240. * Projection nodes will have parents unless they are the first node of a component
  7241. * or embedded view (which means their parent is in a different view and must be
  7242. * retrieved using LView.node).
  7243. */
  7244. parent: ɵangular_packages_core_core_bg | TElementContainerNode | null;
  7245. tViews: null;
  7246. /** Index of the projection node. (See TNode.projection for more info.) */
  7247. projection: number;
  7248. }
  7249. /**
  7250. * An optional function passed into the `NgForOf` directive that defines how to track
  7251. * changes for items in an iterable.
  7252. * The function takes the iteration index and item ID.
  7253. * When supplied, Angular tracks changes by the return value of the function.
  7254. *
  7255. * @publicApi
  7256. */
  7257. export declare interface TrackByFunction<T> {
  7258. (index: number, item: T): any;
  7259. }
  7260. /**
  7261. * Use this token at bootstrap to provide the content of your translation file (`xtb`,
  7262. * `xlf` or `xlf2`) when you want to translate your application in another language.
  7263. *
  7264. * See the [i18n guide](guide/i18n#merge) for more information.
  7265. *
  7266. * @usageNotes
  7267. * ### Example
  7268. *
  7269. * ```typescript
  7270. * import { TRANSLATIONS } from '@angular/core';
  7271. * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
  7272. * import { AppModule } from './app/app.module';
  7273. *
  7274. * // content of your translation file
  7275. * const translations = '....';
  7276. *
  7277. * platformBrowserDynamic().bootstrapModule(AppModule, {
  7278. * providers: [{provide: TRANSLATIONS, useValue: translations }]
  7279. * });
  7280. * ```
  7281. *
  7282. * @publicApi
  7283. */
  7284. export declare const TRANSLATIONS: InjectionToken<string>;
  7285. /**
  7286. * Provide this token at bootstrap to set the format of your {@link TRANSLATIONS}: `xtb`,
  7287. * `xlf` or `xlf2`.
  7288. *
  7289. * See the [i18n guide](guide/i18n#merge) for more information.
  7290. *
  7291. * @usageNotes
  7292. * ### Example
  7293. *
  7294. * ```typescript
  7295. * import { TRANSLATIONS_FORMAT } from '@angular/core';
  7296. * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
  7297. * import { AppModule } from './app/app.module';
  7298. *
  7299. * platformBrowserDynamic().bootstrapModule(AppModule, {
  7300. * providers: [{provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }]
  7301. * });
  7302. * ```
  7303. *
  7304. * @publicApi
  7305. */
  7306. export declare const TRANSLATIONS_FORMAT: InjectionToken<string>;
  7307. /**
  7308. * A branded trusted string used with sanitization of `html` strings.
  7309. *
  7310. * See: {@link bypassSanitizationTrustHtml} and {@link htmlSanitizer}.
  7311. */
  7312. declare interface TrustedHtmlString extends TrustedString {
  7313. [BRAND]: BypassType.Html;
  7314. }
  7315. /**
  7316. * A branded trusted string used with sanitization of `resourceUrl` strings.
  7317. *
  7318. * See: {@link bypassSanitizationTrustResourceUrl} and {@link resourceUrlSanitizer}.
  7319. */
  7320. declare interface TrustedResourceUrlString extends TrustedString {
  7321. [BRAND]: BypassType.ResourceUrl;
  7322. }
  7323. /**
  7324. * A branded trusted string used with sanitization of `url` strings.
  7325. *
  7326. * See: {@link bypassSanitizationTrustScript} and {@link scriptSanitizer}.
  7327. */
  7328. declare interface TrustedScriptString extends TrustedString {
  7329. [BRAND]: BypassType.Script;
  7330. }
  7331. /**
  7332. * A branded trusted string used with sanitization.
  7333. *
  7334. * See: {@link TrustedHtmlString}, {@link TrustedResourceUrlString}, {@link TrustedScriptString},
  7335. * {@link TrustedStyleString}, {@link TrustedUrlString}
  7336. */
  7337. declare interface TrustedString extends String {
  7338. [BRAND]: BypassType;
  7339. }
  7340. /**
  7341. * A branded trusted string used with sanitization of `style` strings.
  7342. *
  7343. * See: {@link bypassSanitizationTrustStyle} and {@link styleSanitizer}.
  7344. */
  7345. declare interface TrustedStyleString extends TrustedString {
  7346. [BRAND]: BypassType.Style;
  7347. }
  7348. /**
  7349. * A branded trusted string used with sanitization of `url` strings.
  7350. *
  7351. * See: {@link bypassSanitizationTrustUrl} and {@link urlSanitizer}.
  7352. */
  7353. declare interface TrustedUrlString extends TrustedString {
  7354. [BRAND]: BypassType.Url;
  7355. }
  7356. /**
  7357. * Tsickle has a bug where it creates an infinite loop for a function returning itself.
  7358. * This is a temporary type that will be removed when the issue is resolved.
  7359. * https://github.com/angular/tsickle/issues/1009)
  7360. */
  7361. declare type TsickleIssue1009 = any;
  7362. /**
  7363. * A series of flags used to configure the config value present within a
  7364. * `TStylingContext` value.
  7365. */
  7366. declare const enum TStylingConfigFlags {
  7367. /**
  7368. * The initial state of the styling context config
  7369. */
  7370. Initial = 0,
  7371. /**
  7372. * A flag which marks the context as being locked.
  7373. *
  7374. * The styling context is constructed across an element template
  7375. * function as well as any associated hostBindings functions. When
  7376. * this occurs, the context itself is open to mutation and only once
  7377. * it has been flushed once then it will be locked for good (no extra
  7378. * bindings can be added to it).
  7379. */
  7380. Locked = 1
  7381. }
  7382. /**
  7383. * --------
  7384. *
  7385. * This file contains the core interfaces for styling in Angular.
  7386. *
  7387. * To learn more about the algorithm see `TStylingContext`.
  7388. *
  7389. * --------
  7390. */
  7391. /**
  7392. * A static-level representation of all style or class bindings/values
  7393. * associated with a `TNode`.
  7394. *
  7395. * The `TStylingContext` unites all template styling bindings (i.e.
  7396. * `[class]` and `[style]` bindings) as well as all host-level
  7397. * styling bindings (for components and directives) together into
  7398. * a single manifest. It is used each time there are one or more
  7399. * styling bindings present for an element.
  7400. *
  7401. * The styling context is stored on a `TNode` on and there are
  7402. * two instances of it: one for classes and another for styles.
  7403. *
  7404. * ```typescript
  7405. * tNode.styles = [ ... a context only for styles ... ];
  7406. * tNode.classes = [ ... a context only for classes ... ];
  7407. * ```
  7408. *
  7409. * Due to the fact the the `TStylingContext` is stored on a `TNode`
  7410. * this means that all data within the context is static. Instead of
  7411. * storing actual styling binding values, the lView binding index values
  7412. * are stored within the context. (static nature means it is more compact.)
  7413. *
  7414. * ```typescript
  7415. * // <div [class.active]="c" // lView binding index = 20
  7416. * // [style.width]="x" // lView binding index = 21
  7417. * // [style.height]="y"> // lView binding index = 22
  7418. * tNode.stylesContext = [
  7419. * 0, // the context config value
  7420. *
  7421. * 0b001, // guard mask for width
  7422. * 2, // total entries for width
  7423. * 'width', // the property name
  7424. * 21, // the binding location for the "x" binding in the lView
  7425. * null,
  7426. *
  7427. * 0b010, // guard mask for height
  7428. * 2, // total entries for height
  7429. * 'height', // the property name
  7430. * 22, // the binding location for the "y" binding in the lView
  7431. * null,
  7432. * ];
  7433. *
  7434. * tNode.classesContext = [
  7435. * 0, // the context config value
  7436. *
  7437. * 0b001, // guard mask for active
  7438. * 2, // total entries for active
  7439. * 'active', // the property name
  7440. * 20, // the binding location for the "c" binding in the lView
  7441. * null,
  7442. * ];
  7443. * ```
  7444. *
  7445. * Entry value present in an entry (called a tuple) within the
  7446. * styling context is as follows:
  7447. *
  7448. * ```typescript
  7449. * context = [
  7450. * CONFIG, // the styling context config value
  7451. * //...
  7452. * guardMask,
  7453. * totalEntries,
  7454. * propName,
  7455. * bindingIndices...,
  7456. * defaultValue
  7457. * ];
  7458. * ```
  7459. *
  7460. * Below is a breakdown of each value:
  7461. *
  7462. * - **guardMask**:
  7463. * A numeric value where each bit represents a binding index
  7464. * location. Each binding index location is assigned based on
  7465. * a local counter value that increments each time an instruction
  7466. * is called:
  7467. *
  7468. * ```
  7469. * <div [style.width]="x" // binding index = 21 (counter index = 0)
  7470. * [style.height]="y"> // binding index = 22 (counter index = 1)
  7471. * ```
  7472. *
  7473. * In the example code above, if the `width` value where to change
  7474. * then the first bit in the local bit mask value would be flipped
  7475. * (and the second bit for when `height`).
  7476. *
  7477. * If and when there are more than 32 binding sources in the context
  7478. * (more than 32 `[style/class]` bindings) then the bit masking will
  7479. * overflow and we are left with a situation where a `-1` value will
  7480. * represent the bit mask. Due to the way that JavaScript handles
  7481. * negative values, when the bit mask is `-1` then all bits within
  7482. * that value will be automatically flipped (this is a quick and
  7483. * efficient way to flip all bits on the mask when a special kind
  7484. * of caching scenario occurs or when there are more than 32 bindings).
  7485. *
  7486. * - **totalEntries**:
  7487. * Each property present in the contains various binding sources of
  7488. * where the styling data could come from. This includes template
  7489. * level bindings, directive/component host bindings as well as the
  7490. * default value (or static value) all writing to the same property.
  7491. * This value depicts how many binding source entries exist for the
  7492. * property.
  7493. *
  7494. * The reason why the totalEntries value is needed is because the
  7495. * styling context is dynamic in size and it's not possible
  7496. * for the flushing or update algorithms to know when and where
  7497. * a property starts and ends without it.
  7498. *
  7499. * - **propName**:
  7500. * The CSS property name or class name (e.g `width` or `active`).
  7501. *
  7502. * - **bindingIndices...**:
  7503. * A series of numeric binding values that reflect where in the
  7504. * lView to find the style/class values associated with the property.
  7505. * Each value is in order in terms of priority (templates are first,
  7506. * then directives and then components). When the context is flushed
  7507. * and the style/class values are applied to the element (this happens
  7508. * inside of the `stylingApply` instruction) then the flushing code
  7509. * will keep checking each binding index against the associated lView
  7510. * to find the first style/class value that is non-null.
  7511. *
  7512. * - **defaultValue**:
  7513. * This is the default that will always be applied to the element if
  7514. * and when all other binding sources return a result that is null.
  7515. * Usually this value is null but it can also be a static value that
  7516. * is intercepted when the tNode is first constructured (e.g.
  7517. * `<div style="width:200px">` has a default value of `200px` for
  7518. * the `width` property).
  7519. *
  7520. * Each time a new binding is encountered it is registered into the
  7521. * context. The context then is continually updated until the first
  7522. * styling apply call has been called (this is triggered by the
  7523. * `stylingApply()` instruction for the active element).
  7524. *
  7525. * # How Styles/Classes are Rendered
  7526. * Each time a styling instruction (e.g. `[class.name]`, `[style.prop]`,
  7527. * etc...) is executed, the associated `lView` for the view is updated
  7528. * at the current binding location. Also, when this happens, a local
  7529. * counter value is incremented. If the binding value has changed then
  7530. * a local `bitMask` variable is updated with the specific bit based
  7531. * on the counter value.
  7532. *
  7533. * Below is a lightweight example of what happens when a single style
  7534. * property is updated (i.e. `<div [style.prop]="val">`):
  7535. *
  7536. * ```typescript
  7537. * function updateStyleProp(prop: string, value: string) {
  7538. * const lView = getLView();
  7539. * const bindingIndex = BINDING_INDEX++;
  7540. * const indexForStyle = localStylesCounter++;
  7541. * if (lView[bindingIndex] !== value) {
  7542. * lView[bindingIndex] = value;
  7543. * localBitMaskForStyles |= 1 << indexForStyle;
  7544. * }
  7545. * }
  7546. * ```
  7547. *
  7548. * ## The Apply Algorithm
  7549. * As explained above, each time a binding updates its value, the resulting
  7550. * value is stored in the `lView` array. These styling values have yet to
  7551. * be flushed to the element.
  7552. *
  7553. * Once all the styling instructions have been evaluated, then the styling
  7554. * context(s) are flushed to the element. When this happens, the context will
  7555. * be iterated over (property by property) and each binding source will be
  7556. * examined and the first non-null value will be applied to the element.
  7557. *
  7558. * Let's say that we the following template code:
  7559. *
  7560. * ```html
  7561. * <div [style.width]="w1" dir-that-set-width="w2"></div>
  7562. * ```
  7563. *
  7564. * There are two styling bindings in the code above and they both write
  7565. * to the `width` property. When styling is flushed on the element, the
  7566. * algorithm will try and figure out which one of these values to write
  7567. * to the element.
  7568. *
  7569. * In order to figure out which value to apply, the following
  7570. * binding prioritization is adhered to:
  7571. *
  7572. * 1. First template-level styling bindings are applied (if present).
  7573. * This includes things like `[style.width]` and `[class.active]`.
  7574. *
  7575. * 2. Second are styling-level host bindings present in directives.
  7576. * (if there are sub/super directives present then the sub directives
  7577. * are applied first).
  7578. *
  7579. * 3. Third are styling-level host bindings present in components.
  7580. * (if there are sub/super components present then the sub directives
  7581. * are applied first).
  7582. *
  7583. * This means that in the code above the styling binding present in the
  7584. * template is applied first and, only if its falsy, then the directive
  7585. * styling binding for width will be applied.
  7586. *
  7587. * ### What about map-based styling bindings?
  7588. * Map-based styling bindings are activated when there are one or more
  7589. * `[style]` and/or `[class]` bindings present on an element. When this
  7590. * code is activated, the apply algorithm will iterate over each map
  7591. * entry and apply each styling value to the element with the same
  7592. * prioritization rules as above.
  7593. *
  7594. * For the algorithm to apply styling values efficiently, the
  7595. * styling map entries must be applied in sync (property by property)
  7596. * with prop-based bindings. (The map-based algorithm is described
  7597. * more inside of the `render3/styling_next/map_based_bindings.ts` file.)
  7598. *
  7599. * ## Sanitization
  7600. * Sanitization is used to prevent invalid style values from being applied to
  7601. * the element.
  7602. *
  7603. * It is enabled in two cases:
  7604. *
  7605. * 1. The `styleSanitizer(sanitizerFn)` instruction was called (just before any other
  7606. * styling instructions are run).
  7607. *
  7608. * 2. The component/directive `LView` instance has a sanitizer object attached to it
  7609. * (this happens when `renderComponent` is executed with a `sanitizer` value or
  7610. * if the ngModule contains a sanitizer provider attached to it).
  7611. *
  7612. * If and when sanitization is active then all property/value entries will be evaluated
  7613. * through the active sanitizer before they are applied to the element (or the styling
  7614. * debug handler).
  7615. *
  7616. * If a `Sanitizer` object is used (via the `LView[SANITIZER]` value) then that object
  7617. * will be used for every property.
  7618. *
  7619. * If a `StyleSanitizerFn` function is used (via the `styleSanitizer`) then it will be
  7620. * called in two ways:
  7621. *
  7622. * 1. property validation mode: this will be called early to mark whether a property
  7623. * should be sanitized or not at during the flushing stage.
  7624. *
  7625. * 2. value sanitization mode: this will be called during the flushing stage and will
  7626. * run the sanitizer function against the value before applying it to the element.
  7627. *
  7628. * If sanitization returns an empty value then that empty value will be applied
  7629. * to the element.
  7630. */
  7631. declare interface TStylingContext extends Array<number | string | number | boolean | null | LStylingMap> {
  7632. /** Configuration data for the context */
  7633. [TStylingContextIndex.ConfigPosition]: TStylingConfigFlags;
  7634. /** Temporary value used to track directive index entries until
  7635. the old styling code is fully removed. The reason why this
  7636. is required is to figure out which directive is last and,
  7637. when encountered, trigger a styling flush to happen */
  7638. [TStylingContextIndex.MaxDirectiveIndexPosition]: number;
  7639. /** The bit guard value for all map-based bindings on an element */
  7640. [TStylingContextIndex.MapBindingsBitGuardPosition]: number;
  7641. /** The total amount of map-based bindings present on an element */
  7642. [TStylingContextIndex.MapBindingsValuesCountPosition]: number;
  7643. /** The prop value for map-based bindings (there actually isn't a
  7644. * value at all, but this is just used in the context to avoid
  7645. * having any special code to update the binding information for
  7646. * map-based entries). */
  7647. [TStylingContextIndex.MapBindingsPropPosition]: string;
  7648. }
  7649. /**
  7650. * An index of position and offset values used to natigate the `TStylingContext`.
  7651. */
  7652. declare const enum TStylingContextIndex {
  7653. ConfigPosition = 0,
  7654. MaxDirectiveIndexPosition = 1,
  7655. MapBindingsPosition = 2,
  7656. MapBindingsBitGuardPosition = 2,
  7657. MapBindingsValuesCountPosition = 3,
  7658. MapBindingsPropPosition = 4,
  7659. MapBindingsBindingsStartPosition = 5,
  7660. ConfigAndGuardOffset = 0,
  7661. ValuesCountOffset = 1,
  7662. PropOffset = 2,
  7663. BindingsStartOffset = 3
  7664. }
  7665. /** Static data for a text node */
  7666. declare interface TTextNode extends TNode {
  7667. /** Index in the data[] array */
  7668. index: number;
  7669. child: null;
  7670. /**
  7671. * Text nodes will have parents unless they are the first node of a component or
  7672. * embedded view (which means their parent is in a different view and must be
  7673. * retrieved using LView.node).
  7674. */
  7675. parent: ɵangular_packages_core_core_bg | TElementContainerNode | null;
  7676. tViews: null;
  7677. projection: null;
  7678. }
  7679. declare const TVIEW = 1;
  7680. /**
  7681. * The static data for an LView (shared between all templates of a
  7682. * given type).
  7683. *
  7684. * Stored on the `ComponentDef.tView`.
  7685. */
  7686. declare interface TView {
  7687. /**
  7688. * ID for inline views to determine whether a view is the same as the previous view
  7689. * in a certain position. If it's not, we know the new view needs to be inserted
  7690. * and the one that exists needs to be removed (e.g. if/else statements)
  7691. *
  7692. * If this is -1, then this is a component view or a dynamically created view.
  7693. */
  7694. readonly id: number;
  7695. /**
  7696. * This is a blueprint used to generate LView instances for this TView. Copying this
  7697. * blueprint is faster than creating a new LView from scratch.
  7698. */
  7699. blueprint: ɵangular_packages_core_core_bm;
  7700. /**
  7701. * The template function used to refresh the view of dynamically created views
  7702. * and components. Will be null for inline views.
  7703. */
  7704. template: ComponentTemplate<{}> | null;
  7705. /**
  7706. * A function containing query-related instructions.
  7707. */
  7708. viewQuery: ViewQueriesFunction<{}> | null;
  7709. /**
  7710. * Pointer to the host `TNode` (not part of this TView).
  7711. *
  7712. * If this is a `TViewNode` for an `LViewNode`, this is an embedded view of a container.
  7713. * We need this pointer to be able to efficiently find this node when inserting the view
  7714. * into an anchor.
  7715. *
  7716. * If this is a `TElementNode`, this is the view of a root component. It has exactly one
  7717. * root TNode.
  7718. *
  7719. * If this is null, this is the view of a component that is not at root. We do not store
  7720. * the host TNodes for child component views because they can potentially have several
  7721. * different host TNodes, depending on where the component is being used. These host
  7722. * TNodes cannot be shared (due to different indices, etc).
  7723. */
  7724. node: TViewNode | ɵangular_packages_core_core_bg | null;
  7725. /** Whether or not this template has been processed. */
  7726. firstTemplatePass: boolean;
  7727. /** Static data equivalent of LView.data[]. Contains TNodes, PipeDefInternal or TI18n. */
  7728. data: TData;
  7729. /**
  7730. * The binding start index is the index at which the data array
  7731. * starts to store bindings only. Saving this value ensures that we
  7732. * will begin reading bindings at the correct point in the array when
  7733. * we are in update mode.
  7734. */
  7735. bindingStartIndex: number;
  7736. /**
  7737. * The index where the "expando" section of `LView` begins. The expando
  7738. * section contains injectors, directive instances, and host binding values.
  7739. * Unlike the "consts" and "vars" sections of `LView`, the length of this
  7740. * section cannot be calculated at compile-time because directives are matched
  7741. * at runtime to preserve locality.
  7742. *
  7743. * We store this start index so we know where to start checking host bindings
  7744. * in `setHostBindings`.
  7745. */
  7746. expandoStartIndex: number;
  7747. /**
  7748. * Whether or not there are any static view queries tracked on this view.
  7749. *
  7750. * We store this so we know whether or not we should do a view query
  7751. * refresh after creation mode to collect static query results.
  7752. */
  7753. staticViewQueries: boolean;
  7754. /**
  7755. * Whether or not there are any static content queries tracked on this view.
  7756. *
  7757. * We store this so we know whether or not we should do a content query
  7758. * refresh after creation mode to collect static query results.
  7759. */
  7760. staticContentQueries: boolean;
  7761. /**
  7762. * The index where the viewQueries section of `LView` begins. This section contains
  7763. * view queries defined for a component/directive.
  7764. *
  7765. * We store this start index so we know where the list of view queries starts.
  7766. * This is required when we invoke view queries at runtime. We invoke queries one by one and
  7767. * increment query index after each iteration. This information helps us to reset index back to
  7768. * the beginning of view query list before we invoke view queries again.
  7769. */
  7770. viewQueryStartIndex: number;
  7771. /**
  7772. * A reference to the first child node located in the view.
  7773. */
  7774. firstChild: TNode | null;
  7775. /**
  7776. * Set of instructions used to process host bindings efficiently.
  7777. *
  7778. * See VIEW_DATA.md for more information.
  7779. */
  7780. expandoInstructions: ExpandoInstructions | null;
  7781. /**
  7782. * Full registry of directives and components that may be found in this view.
  7783. *
  7784. * It's necessary to keep a copy of the full def list on the TView so it's possible
  7785. * to render template functions without a host component.
  7786. */
  7787. directiveRegistry: DirectiveDefList | null;
  7788. /**
  7789. * Full registry of pipes that may be found in this view.
  7790. *
  7791. * The property is either an array of `PipeDefs`s or a function which returns the array of
  7792. * `PipeDefs`s. The function is necessary to be able to support forward declarations.
  7793. *
  7794. * It's necessary to keep a copy of the full def list on the TView so it's possible
  7795. * to render template functions without a host component.
  7796. */
  7797. pipeRegistry: PipeDefList | null;
  7798. /**
  7799. * Array of ngOnInit, ngOnChanges and ngDoCheck hooks that should be executed for this view in
  7800. * creation mode.
  7801. *
  7802. * Even indices: Directive index
  7803. * Odd indices: Hook function
  7804. */
  7805. preOrderHooks: HookData | null;
  7806. /**
  7807. * Array of ngOnChanges and ngDoCheck hooks that should be executed for this view in update mode.
  7808. *
  7809. * Even indices: Directive index
  7810. * Odd indices: Hook function
  7811. */
  7812. preOrderCheckHooks: HookData | null;
  7813. /**
  7814. * Array of ngAfterContentInit and ngAfterContentChecked hooks that should be executed
  7815. * for this view in creation mode.
  7816. *
  7817. * Even indices: Directive index
  7818. * Odd indices: Hook function
  7819. */
  7820. contentHooks: HookData | null;
  7821. /**
  7822. * Array of ngAfterContentChecked hooks that should be executed for this view in update
  7823. * mode.
  7824. *
  7825. * Even indices: Directive index
  7826. * Odd indices: Hook function
  7827. */
  7828. contentCheckHooks: HookData | null;
  7829. /**
  7830. * Array of ngAfterViewInit and ngAfterViewChecked hooks that should be executed for
  7831. * this view in creation mode.
  7832. *
  7833. * Even indices: Directive index
  7834. * Odd indices: Hook function
  7835. */
  7836. viewHooks: HookData | null;
  7837. /**
  7838. * Array of ngAfterViewChecked hooks that should be executed for this view in
  7839. * update mode.
  7840. *
  7841. * Even indices: Directive index
  7842. * Odd indices: Hook function
  7843. */
  7844. viewCheckHooks: HookData | null;
  7845. /**
  7846. * Array of ngOnDestroy hooks that should be executed when this view is destroyed.
  7847. *
  7848. * Even indices: Directive index
  7849. * Odd indices: Hook function
  7850. */
  7851. destroyHooks: HookData | null;
  7852. /**
  7853. * When a view is destroyed, listeners need to be released and outputs need to be
  7854. * unsubscribed. This cleanup array stores both listener data (in chunks of 4)
  7855. * and output data (in chunks of 2) for a particular view. Combining the arrays
  7856. * saves on memory (70 bytes per array) and on a few bytes of code size (for two
  7857. * separate for loops).
  7858. *
  7859. * If it's a native DOM listener or output subscription being stored:
  7860. * 1st index is: event name `name = tView.cleanup[i+0]`
  7861. * 2nd index is: index of native element or a function that retrieves global target (window,
  7862. * document or body) reference based on the native element:
  7863. * `typeof idxOrTargetGetter === 'function'`: global target getter function
  7864. * `typeof idxOrTargetGetter === 'number'`: index of native element
  7865. *
  7866. * 3rd index is: index of listener function `listener = lView[CLEANUP][tView.cleanup[i+2]]`
  7867. * 4th index is: `useCaptureOrIndx = tView.cleanup[i+3]`
  7868. * `typeof useCaptureOrIndx == 'boolean' : useCapture boolean
  7869. * `typeof useCaptureOrIndx == 'number':
  7870. * `useCaptureOrIndx >= 0` `removeListener = LView[CLEANUP][useCaptureOrIndx]`
  7871. * `useCaptureOrIndx < 0` `subscription = LView[CLEANUP][-useCaptureOrIndx]`
  7872. *
  7873. * If it's an output subscription or query list destroy hook:
  7874. * 1st index is: output unsubscribe function / query list destroy function
  7875. * 2nd index is: index of function context in LView.cleanupInstances[]
  7876. * `tView.cleanup[i+0].call(lView[CLEANUP][tView.cleanup[i+1]])`
  7877. */
  7878. cleanup: any[] | null;
  7879. /**
  7880. * A list of element indices for child components that will need to be
  7881. * refreshed when the current view has finished its check. These indices have
  7882. * already been adjusted for the HEADER_OFFSET.
  7883. *
  7884. */
  7885. components: number[] | null;
  7886. /**
  7887. * A list of indices for child directives that have content queries.
  7888. */
  7889. contentQueries: number[] | null;
  7890. /**
  7891. * Set of schemas that declare elements to be allowed inside the view.
  7892. */
  7893. schemas: SchemaMetadata[] | null;
  7894. }
  7895. /** Static data for a view */
  7896. declare interface TViewNode extends TNode {
  7897. /** If -1, it's a dynamically created view. Otherwise, it is the view block ID. */
  7898. index: number;
  7899. child: ɵangular_packages_core_core_bg | TTextNode | TElementContainerNode | TContainerNode | TProjectionNode | null;
  7900. parent: TContainerNode | null;
  7901. tViews: null;
  7902. projection: null;
  7903. }
  7904. /**
  7905. * Special location which allows easy identification of type. If we have an array which was
  7906. * retrieved from the `LView` and that array has `true` at `TYPE` location, we know it is
  7907. * `LContainer`.
  7908. */
  7909. declare const TYPE = 1;
  7910. /**
  7911. * @description
  7912. *
  7913. * Represents a type that a Component or other object is instances of.
  7914. *
  7915. * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is be represented by
  7916. * the `MyCustomComponent` constructor function.
  7917. *
  7918. * @publicApi
  7919. */
  7920. export declare const Type: FunctionConstructor;
  7921. export declare interface Type<T> extends Function {
  7922. new (...args: any[]): T;
  7923. }
  7924. /**
  7925. * An interface implemented by all Angular type decorators, which allows them to be used as ES7
  7926. * decorators as well as
  7927. * Angular DSL syntax.
  7928. *
  7929. * ES7 syntax:
  7930. *
  7931. * ```
  7932. * @ng.Component({...})
  7933. * class MyClass {...}
  7934. * ```
  7935. *
  7936. * @publicApi
  7937. */
  7938. export declare interface TypeDecorator {
  7939. /**
  7940. * Invoke as ES7 decorator.
  7941. */
  7942. <T extends Type<any>>(type: T): T;
  7943. (target: Object, propertyKey?: string | symbol, parameterIndex?: number): void;
  7944. }
  7945. /**
  7946. * Configures the `Injector` to return an instance of `Type` when `Type' is used as the token.
  7947. *
  7948. * Create an instance by invoking the `new` operator and supplying additional arguments.
  7949. * This form is a short form of `TypeProvider`;
  7950. *
  7951. * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
  7952. *
  7953. * @usageNotes
  7954. *
  7955. * ### Example
  7956. *
  7957. * {@example core/di/ts/provider_spec.ts region='TypeProvider'}
  7958. *
  7959. * @publicApi
  7960. */
  7961. export declare interface TypeProvider extends Type<any> {
  7962. }
  7963. /**
  7964. * Configures the `Injector` to return a value for a token.
  7965. *
  7966. * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
  7967. *
  7968. * @usageNotes
  7969. *
  7970. * ### Example
  7971. *
  7972. * {@example core/di/ts/provider_spec.ts region='ValueProvider'}
  7973. *
  7974. * ### Multi-value example
  7975. *
  7976. * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
  7977. *
  7978. * @publicApi
  7979. */
  7980. export declare interface ValueProvider extends ValueSansProvider {
  7981. /**
  7982. * An injection token. (Typically an instance of `Type` or `InjectionToken`, but can be `any`).
  7983. */
  7984. provide: any;
  7985. /**
  7986. * If true, then injector returns an array of instances. This is useful to allow multiple
  7987. * providers spread across many files to provide configuration information to a common token.
  7988. */
  7989. multi?: boolean;
  7990. }
  7991. /**
  7992. * Configures the `Injector` to return a value for a token.
  7993. * Base for `ValueProvider` decorator.
  7994. *
  7995. * @publicApi
  7996. */
  7997. export declare interface ValueSansProvider {
  7998. /**
  7999. * The value to inject.
  8000. */
  8001. useValue: any;
  8002. }
  8003. /**
  8004. * @publicApi
  8005. */
  8006. export declare const VERSION: Version;
  8007. /**
  8008. * @description Represents the version of Angular
  8009. *
  8010. * @publicApi
  8011. */
  8012. export declare class Version {
  8013. full: string;
  8014. readonly major: string;
  8015. readonly minor: string;
  8016. readonly patch: string;
  8017. constructor(full: string);
  8018. }
  8019. declare const VIEW_REFS = 8;
  8020. /**
  8021. * Type of the ViewChild metadata.
  8022. *
  8023. * @publicApi
  8024. */
  8025. export declare type ViewChild = Query;
  8026. /**
  8027. * ViewChild decorator and metadata.
  8028. *
  8029. * @Annotation
  8030. * @publicApi
  8031. */
  8032. export declare const ViewChild: ViewChildDecorator;
  8033. /**
  8034. * Type of the ViewChild decorator / constructor function.
  8035. *
  8036. * @see `ViewChild`.
  8037. * @publicApi
  8038. */
  8039. export declare interface ViewChildDecorator {
  8040. /**
  8041. * @description
  8042. * Property decorator that configures a view query.
  8043. * The change detector looks for the first element or the directive matching the selector
  8044. * in the view DOM. If the view DOM changes, and a new child matches the selector,
  8045. * the property is updated.
  8046. *
  8047. * View queries are set before the `ngAfterViewInit` callback is called.
  8048. *
  8049. * **Metadata Properties**:
  8050. *
  8051. * * **selector** - the directive type or the name used for querying.
  8052. * * **read** - read a different token from the queried elements.
  8053. * * **static** - whether or not to resolve query results before change detection runs (i.e.
  8054. * return static results only). If this option is not provided, the compiler will fall back
  8055. * to its default behavior, which is to use query results to determine the timing of query
  8056. * resolution. If any query results are inside a nested view (e.g. *ngIf), the query will be
  8057. * resolved after change detection runs. Otherwise, it will be resolved before change detection
  8058. * runs.
  8059. *
  8060. * Supported selectors include:
  8061. * * any class with the `@Component` or `@Directive` decorator
  8062. * * a template reference variable as a string (e.g. query `<my-component #cmp></my-component>`
  8063. * with `@ViewChild('cmp')`)
  8064. * * any provider defined in the child component tree of the current component (e.g.
  8065. * `@ViewChild(SomeService) someService: SomeService`)
  8066. * * any provider defined through a string token (e.g. `@ViewChild('someToken') someTokenVal:
  8067. * any`)
  8068. * * a `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ViewChild(TemplateRef)
  8069. * template;`)
  8070. *
  8071. * @usageNotes
  8072. *
  8073. * {@example core/di/ts/viewChild/view_child_example.ts region='Component'}
  8074. *
  8075. * ### Example
  8076. *
  8077. * {@example core/di/ts/viewChild/view_child_howto.ts region='HowTo'}
  8078. *
  8079. * ### Example
  8080. *
  8081. * {@example core/di/ts/viewChild/view_child_example.ts region='Component'}
  8082. *
  8083. * @Annotation
  8084. */
  8085. (selector: Type<any> | Function | string, opts: {
  8086. read?: any;
  8087. static: boolean;
  8088. }): any;
  8089. new (selector: Type<any> | Function | string, opts: {
  8090. read?: any;
  8091. static: boolean;
  8092. }): ViewChild;
  8093. }
  8094. /**
  8095. * Type of the ViewChildren metadata.
  8096. *
  8097. * @publicApi
  8098. */
  8099. export declare type ViewChildren = Query;
  8100. /**
  8101. * ViewChildren decorator and metadata.
  8102. *
  8103. * @Annotation
  8104. * @publicApi
  8105. */
  8106. export declare const ViewChildren: ViewChildrenDecorator;
  8107. /**
  8108. * Type of the ViewChildren decorator / constructor function.
  8109. *
  8110. * @see `ViewChildren`.
  8111. *
  8112. * @publicApi
  8113. */
  8114. export declare interface ViewChildrenDecorator {
  8115. /**
  8116. * Configures a view query.
  8117. *
  8118. * You can use ViewChildren to get the `QueryList` of elements or directives from the
  8119. * view DOM. Any time a child element is added, removed, or moved, the query list will be updated,
  8120. * and the changes observable of the query list will emit a new value.
  8121. *
  8122. * View queries are set before the `ngAfterViewInit` callback is called.
  8123. *
  8124. * **Metadata Properties**:
  8125. *
  8126. * * **selector** - the directive type or the name used for querying.
  8127. * * **read** - read a different token from the queried elements.
  8128. *
  8129. * @usageNotes
  8130. *
  8131. * ### Example
  8132. *
  8133. * {@example core/di/ts/viewChildren/view_children_howto.ts region='HowTo'}
  8134. *
  8135. * ### Example
  8136. *
  8137. * {@example core/di/ts/viewChildren/view_children_example.ts region='Component'}
  8138. *
  8139. * @Annotation
  8140. */
  8141. (selector: Type<any> | Function | string, opts?: {
  8142. read?: any;
  8143. }): any;
  8144. new (selector: Type<any> | Function | string, opts?: {
  8145. read?: any;
  8146. }): ViewChildren;
  8147. }
  8148. /**
  8149. * Represents a container where one or more views can be attached to a component.
  8150. *
  8151. * Can contain *host views* (created by instantiating a
  8152. * component with the `createComponent()` method), and *embedded views*
  8153. * (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method).
  8154. *
  8155. * A view container instance can contain other view containers,
  8156. * creating a [view hierarchy](guide/glossary#view-tree).
  8157. *
  8158. * @see `ComponentRef`
  8159. * @see `EmbeddedViewRef`
  8160. *
  8161. * @publicApi
  8162. */
  8163. export declare abstract class ViewContainerRef {
  8164. /**
  8165. * Anchor element that specifies the location of this container in the containing view.
  8166. * Each view container can have only one anchor element, and each anchor element
  8167. * can have only a single view container.
  8168. *
  8169. * Root elements of views attached to this container become siblings of the anchor element in
  8170. * the rendered view.
  8171. *
  8172. * Access the `ViewContainerRef` of an element by placing a `Directive` injected
  8173. * with `ViewContainerRef` on the element, or use a `ViewChild` query.
  8174. *
  8175. * <!-- TODO: rename to anchorElement -->
  8176. */
  8177. abstract readonly element: ElementRef;
  8178. /**
  8179. * The [dependency injector](guide/glossary#injector) for this view container.
  8180. */
  8181. abstract readonly injector: Injector;
  8182. /** @deprecated No replacement */
  8183. abstract readonly parentInjector: Injector;
  8184. /**
  8185. * Destroys all views in this container.
  8186. */
  8187. abstract clear(): void;
  8188. /**
  8189. * Retrieves a view from this container.
  8190. * @param index The 0-based index of the view to retrieve.
  8191. * @returns The `ViewRef` instance, or null if the index is out of range.
  8192. */
  8193. abstract get(index: number): ViewRef | null;
  8194. /**
  8195. * Reports how many views are currently attached to this container.
  8196. * @returns The number of views.
  8197. */
  8198. abstract readonly length: number;
  8199. /**
  8200. * Instantiates an embedded view and inserts it
  8201. * into this container.
  8202. * @param templateRef The HTML template that defines the view.
  8203. * @param index The 0-based index at which to insert the new view into this container.
  8204. * If not specified, appends the new view as the last entry.
  8205. *
  8206. * @returns The `ViewRef` instance for the newly created view.
  8207. */
  8208. abstract createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, index?: number): EmbeddedViewRef<C>;
  8209. /**
  8210. * Instantiates a single component and inserts its host view into this container.
  8211. *
  8212. * @param componentFactory The factory to use.
  8213. * @param index The index at which to insert the new component's host view into this container.
  8214. * If not specified, appends the new view as the last entry.
  8215. * @param injector The injector to use as the parent for the new component.
  8216. * @param projectableNodes
  8217. * @param ngModule
  8218. *
  8219. * @returns The new component instance, containing the host view.
  8220. *
  8221. */
  8222. abstract createComponent<C>(componentFactory: ComponentFactory<C>, index?: number, injector?: Injector, projectableNodes?: any[][], ngModule?: NgModuleRef<any>): ComponentRef<C>;
  8223. /**
  8224. * Inserts a view into this container.
  8225. * @param viewRef The view to insert.
  8226. * @param index The 0-based index at which to insert the view.
  8227. * If not specified, appends the new view as the last entry.
  8228. * @returns The inserted `ViewRef` instance.
  8229. *
  8230. */
  8231. abstract insert(viewRef: ViewRef, index?: number): ViewRef;
  8232. /**
  8233. * Moves a view to a new location in this container.
  8234. * @param viewRef The view to move.
  8235. * @param index The 0-based index of the new location.
  8236. * @returns The moved `ViewRef` instance.
  8237. */
  8238. abstract move(viewRef: ViewRef, currentIndex: number): ViewRef;
  8239. /**
  8240. * Returns the index of a view within the current container.
  8241. * @param viewRef The view to query.
  8242. * @returns The 0-based index of the view's position in this container,
  8243. * or `-1` if this container doesn't contain the view.
  8244. */
  8245. abstract indexOf(viewRef: ViewRef): number;
  8246. /**
  8247. * Destroys a view attached to this container
  8248. * @param index The 0-based index of the view to destroy.
  8249. * If not specified, the last view in the container is removed.
  8250. */
  8251. abstract remove(index?: number): void;
  8252. /**
  8253. * Detaches a view from this container without destroying it.
  8254. * Use along with `insert()` to move a view within the current container.
  8255. * @param index The 0-based index of the view to detach.
  8256. * If not specified, the last view in the container is detached.
  8257. */
  8258. abstract detach(index?: number): ViewRef | null;
  8259. }
  8260. /**
  8261. * View instance data.
  8262. * Attention: Adding fields to this is performance sensitive!
  8263. */
  8264. declare interface ViewData {
  8265. def: ɵViewDefinition;
  8266. root: RootData;
  8267. renderer: Renderer2;
  8268. parentNodeDef: NodeDef | null;
  8269. parent: ViewData | null;
  8270. viewContainerParent: ViewData | null;
  8271. component: any;
  8272. context: any;
  8273. nodes: {
  8274. [key: number]: NodeData;
  8275. };
  8276. state: ViewState;
  8277. oldValues: any[];
  8278. disposables: DisposableFn[] | null;
  8279. initIndex: number;
  8280. }
  8281. declare interface ViewDefinitionFactory extends DefinitionFactory<ɵViewDefinition> {
  8282. }
  8283. /**
  8284. * Defines template and style encapsulation options available for Component's {@link Component}.
  8285. *
  8286. * See {@link Component#encapsulation encapsulation}.
  8287. *
  8288. * @usageNotes
  8289. * ### Example
  8290. *
  8291. * {@example core/ts/metadata/encapsulation.ts region='longform'}
  8292. *
  8293. * @publicApi
  8294. */
  8295. export declare enum ViewEncapsulation {
  8296. /**
  8297. * Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host
  8298. * Element and pre-processing the style rules provided via {@link Component#styles styles} or
  8299. * {@link Component#styleUrls styleUrls}, and adding the new Host Element attribute to all
  8300. * selectors.
  8301. *
  8302. * This is the default option.
  8303. */
  8304. Emulated = 0,
  8305. /**
  8306. * @deprecated v6.1.0 - use {ViewEncapsulation.ShadowDom} instead.
  8307. * Use the native encapsulation mechanism of the renderer.
  8308. *
  8309. * For the DOM this means using the deprecated [Shadow DOM
  8310. * v0](https://w3c.github.io/webcomponents/spec/shadow/) and
  8311. * creating a ShadowRoot for Component's Host Element.
  8312. */
  8313. Native = 1,
  8314. /**
  8315. * Don't provide any template or style encapsulation.
  8316. */
  8317. None = 2,
  8318. /**
  8319. * Use Shadow DOM to encapsulate styles.
  8320. *
  8321. * For the DOM this means using modern [Shadow
  8322. * DOM](https://w3c.github.io/webcomponents/spec/shadow/) and
  8323. * creating a ShadowRoot for Component's Host Element.
  8324. */
  8325. ShadowDom = 3
  8326. }
  8327. declare interface viewEngine_ChangeDetectorRef_interface extends ChangeDetectorRef {
  8328. }
  8329. declare interface ViewHandleEventFn {
  8330. (view: ViewData, nodeIndex: number, eventName: string, event: any): boolean;
  8331. }
  8332. /**
  8333. * Definition of what a view queries function should look like.
  8334. */
  8335. declare type ViewQueriesFunction<T> = <U extends T>(rf: ɵRenderFlags, ctx: U) => void;
  8336. /**
  8337. * Represents an Angular [view](guide/glossary#view),
  8338. * specifically the [host view](guide/glossary#view-tree) that is defined by a component.
  8339. * Also serves as the base class
  8340. * that adds destroy methods for [embedded views](guide/glossary#view-tree).
  8341. *
  8342. * @see `EmbeddedViewRef`
  8343. *
  8344. * @publicApi
  8345. */
  8346. export declare abstract class ViewRef extends ChangeDetectorRef {
  8347. /**
  8348. * Destroys this view and all of the data structures associated with it.
  8349. */
  8350. abstract destroy(): void;
  8351. /**
  8352. * Reports whether this view has been destroyed.
  8353. * @returns True after the `destroy()` method has been called, false otherwise.
  8354. */
  8355. abstract readonly destroyed: boolean;
  8356. /**
  8357. * A lifecycle hook that provides additional developer-defined cleanup
  8358. * functionality for views.
  8359. * @param callback A handler function that cleans up developer-defined data
  8360. * associated with a view. Called when the `destroy()` method is invoked.
  8361. */
  8362. abstract onDestroy(callback: Function): any /** TODO #9100 */;
  8363. }
  8364. declare class ViewRef_2<T> implements EmbeddedViewRef<T>, InternalViewRef, viewEngine_ChangeDetectorRef_interface {
  8365. private _context;
  8366. private _componentIndex;
  8367. private _appRef;
  8368. private _viewContainerRef;
  8369. readonly rootNodes: any[];
  8370. constructor(_lView: ɵangular_packages_core_core_bm, _context: T | null, _componentIndex: number);
  8371. readonly context: T;
  8372. readonly destroyed: boolean;
  8373. destroy(): void;
  8374. onDestroy(callback: Function): void;
  8375. /**
  8376. * Marks a view and all of its ancestors dirty.
  8377. *
  8378. * It also triggers change detection by calling `scheduleTick` internally, which coalesces
  8379. * multiple `markForCheck` calls to into one change detection run.
  8380. *
  8381. * This can be used to ensure an {@link ChangeDetectionStrategy#OnPush OnPush} component is
  8382. * checked when it needs to be re-rendered but the two normal triggers haven't marked it
  8383. * dirty (i.e. inputs haven't changed and events haven't fired in the view).
  8384. *
  8385. * <!-- TODO: Add a link to a chapter on OnPush components -->
  8386. *
  8387. * @usageNotes
  8388. * ### Example
  8389. *
  8390. * ```typescript
  8391. * @Component({
  8392. * selector: 'my-app',
  8393. * template: `Number of ticks: {{numberOfTicks}}`
  8394. * changeDetection: ChangeDetectionStrategy.OnPush,
  8395. * })
  8396. * class AppComponent {
  8397. * numberOfTicks = 0;
  8398. *
  8399. * constructor(private ref: ChangeDetectorRef) {
  8400. * setInterval(() => {
  8401. * this.numberOfTicks++;
  8402. * // the following is required, otherwise the view will not be updated
  8403. * this.ref.markForCheck();
  8404. * }, 1000);
  8405. * }
  8406. * }
  8407. * ```
  8408. */
  8409. markForCheck(): void;
  8410. /**
  8411. * Detaches the view from the change detection tree.
  8412. *
  8413. * Detached views will not be checked during change detection runs until they are
  8414. * re-attached, even if they are dirty. `detach` can be used in combination with
  8415. * {@link ChangeDetectorRef#detectChanges detectChanges} to implement local change
  8416. * detection checks.
  8417. *
  8418. * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
  8419. * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
  8420. *
  8421. * @usageNotes
  8422. * ### Example
  8423. *
  8424. * The following example defines a component with a large list of readonly data.
  8425. * Imagine the data changes constantly, many times per second. For performance reasons,
  8426. * we want to check and update the list every five seconds. We can do that by detaching
  8427. * the component's change detector and doing a local check every five seconds.
  8428. *
  8429. * ```typescript
  8430. * class DataProvider {
  8431. * // in a real application the returned data will be different every time
  8432. * get data() {
  8433. * return [1,2,3,4,5];
  8434. * }
  8435. * }
  8436. *
  8437. * @Component({
  8438. * selector: 'giant-list',
  8439. * template: `
  8440. * <li *ngFor="let d of dataProvider.data">Data {{d}}</li>
  8441. * `,
  8442. * })
  8443. * class GiantList {
  8444. * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {
  8445. * ref.detach();
  8446. * setInterval(() => {
  8447. * this.ref.detectChanges();
  8448. * }, 5000);
  8449. * }
  8450. * }
  8451. *
  8452. * @Component({
  8453. * selector: 'app',
  8454. * providers: [DataProvider],
  8455. * template: `
  8456. * <giant-list><giant-list>
  8457. * `,
  8458. * })
  8459. * class App {
  8460. * }
  8461. * ```
  8462. */
  8463. detach(): void;
  8464. /**
  8465. * Re-attaches a view to the change detection tree.
  8466. *
  8467. * This can be used to re-attach views that were previously detached from the tree
  8468. * using {@link ChangeDetectorRef#detach detach}. Views are attached to the tree by default.
  8469. *
  8470. * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
  8471. *
  8472. * @usageNotes
  8473. * ### Example
  8474. *
  8475. * The following example creates a component displaying `live` data. The component will detach
  8476. * its change detector from the main change detector tree when the component's live property
  8477. * is set to false.
  8478. *
  8479. * ```typescript
  8480. * class DataProvider {
  8481. * data = 1;
  8482. *
  8483. * constructor() {
  8484. * setInterval(() => {
  8485. * this.data = this.data * 2;
  8486. * }, 500);
  8487. * }
  8488. * }
  8489. *
  8490. * @Component({
  8491. * selector: 'live-data',
  8492. * inputs: ['live'],
  8493. * template: 'Data: {{dataProvider.data}}'
  8494. * })
  8495. * class LiveData {
  8496. * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}
  8497. *
  8498. * set live(value) {
  8499. * if (value) {
  8500. * this.ref.reattach();
  8501. * } else {
  8502. * this.ref.detach();
  8503. * }
  8504. * }
  8505. * }
  8506. *
  8507. * @Component({
  8508. * selector: 'my-app',
  8509. * providers: [DataProvider],
  8510. * template: `
  8511. * Live Update: <input type="checkbox" [(ngModel)]="live">
  8512. * <live-data [live]="live"><live-data>
  8513. * `,
  8514. * })
  8515. * class AppComponent {
  8516. * live = true;
  8517. * }
  8518. * ```
  8519. */
  8520. reattach(): void;
  8521. /**
  8522. * Checks the view and its children.
  8523. *
  8524. * This can also be used in combination with {@link ChangeDetectorRef#detach detach} to implement
  8525. * local change detection checks.
  8526. *
  8527. * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
  8528. * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
  8529. *
  8530. * @usageNotes
  8531. * ### Example
  8532. *
  8533. * The following example defines a component with a large list of readonly data.
  8534. * Imagine, the data changes constantly, many times per second. For performance reasons,
  8535. * we want to check and update the list every five seconds.
  8536. *
  8537. * We can do that by detaching the component's change detector and doing a local change detection
  8538. * check every five seconds.
  8539. *
  8540. * See {@link ChangeDetectorRef#detach detach} for more information.
  8541. */
  8542. detectChanges(): void;
  8543. /**
  8544. * Checks the change detector and its children, and throws if any changes are detected.
  8545. *
  8546. * This is used in development mode to verify that running change detection doesn't
  8547. * introduce other changes.
  8548. */
  8549. checkNoChanges(): void;
  8550. attachToViewContainerRef(vcRef: ViewContainerRef): void;
  8551. detachFromAppRef(): void;
  8552. attachToAppRef(appRef: ApplicationRef): void;
  8553. private _lookUpContext;
  8554. }
  8555. /**
  8556. * Bitmask of states
  8557. */
  8558. declare const enum ViewState {
  8559. BeforeFirstCheck = 1,
  8560. FirstCheck = 2,
  8561. Attached = 4,
  8562. ChecksEnabled = 8,
  8563. IsProjectedView = 16,
  8564. CheckProjectedView = 32,
  8565. CheckProjectedViews = 64,
  8566. Destroyed = 128,
  8567. InitState_Mask = 1792,
  8568. InitState_BeforeInit = 0,
  8569. InitState_CallingOnInit = 256,
  8570. InitState_CallingAfterContentInit = 512,
  8571. InitState_CallingAfterViewInit = 768,
  8572. InitState_AfterInit = 1024,
  8573. CatDetectChanges = 12,
  8574. CatInit = 13
  8575. }
  8576. declare interface ViewUpdateFn {
  8577. (check: NodeCheckFn, view: ViewData): void;
  8578. }
  8579. /**
  8580. * Indicates that the result of a {@link Pipe} transformation has changed even though the
  8581. * reference has not changed.
  8582. *
  8583. * Wrapped values are unwrapped automatically during the change detection, and the unwrapped value
  8584. * is stored.
  8585. *
  8586. * Example:
  8587. *
  8588. * ```
  8589. * if (this._latestValue === this._latestReturnedValue) {
  8590. * return this._latestReturnedValue;
  8591. * } else {
  8592. * this._latestReturnedValue = this._latestValue;
  8593. * return WrappedValue.wrap(this._latestValue); // this will force update
  8594. * }
  8595. * ```
  8596. *
  8597. * @publicApi
  8598. */
  8599. export declare class WrappedValue {
  8600. /** @deprecated from 5.3, use `unwrap()` instead - will switch to protected */
  8601. wrapped: any;
  8602. constructor(value: any);
  8603. /** Creates a wrapped value. */
  8604. static wrap(value: any): WrappedValue;
  8605. /**
  8606. * Returns the underlying value of a wrapped value.
  8607. * Returns the given `value` when it is not wrapped.
  8608. **/
  8609. static unwrap(value: any): any;
  8610. /** Returns true if `value` is a wrapped value. */
  8611. static isWrapped(value: any): value is WrappedValue;
  8612. }
  8613. /**
  8614. * Create trace scope.
  8615. *
  8616. * Scopes must be strictly nested and are analogous to stack frames, but
  8617. * do not have to follow the stack frames. Instead it is recommended that they follow logical
  8618. * nesting. You may want to use
  8619. * [Event
  8620. * Signatures](http://google.github.io/tracing-framework/instrumenting-code.html#custom-events)
  8621. * as they are defined in WTF.
  8622. *
  8623. * Used to mark scope entry. The return value is used to leave the scope.
  8624. *
  8625. * var myScope = wtfCreateScope('MyClass#myMethod(ascii someVal)');
  8626. *
  8627. * someMethod() {
  8628. * var s = myScope('Foo'); // 'Foo' gets stored in tracing UI
  8629. * // DO SOME WORK HERE
  8630. * return wtfLeave(s, 123); // Return value 123
  8631. * }
  8632. *
  8633. * Note, adding try-finally block around the work to ensure that `wtfLeave` gets called can
  8634. * negatively impact the performance of your application. For this reason we recommend that
  8635. * you don't add them to ensure that `wtfLeave` gets called. In production `wtfLeave` is a noop and
  8636. * so try-finally block has no value. When debugging perf issues, skipping `wtfLeave`, do to
  8637. * exception, will produce incorrect trace, but presence of exception signifies logic error which
  8638. * needs to be fixed before the app should be profiled. Add try-finally only when you expect that
  8639. * an exception is expected during normal execution while profiling.
  8640. *
  8641. * @publicApi
  8642. * @deprecated the Web Tracing Framework is no longer supported in Angular
  8643. */
  8644. export declare const wtfCreateScope: (signature: string, flags?: any) => WtfScopeFn;
  8645. /**
  8646. * Ends a async time range operation.
  8647. * [range] is the return value from [wtfStartTimeRange] Async ranges only work if WTF has been
  8648. * enabled.
  8649. * @publicApi
  8650. * @deprecated the Web Tracing Framework is no longer supported in Angular
  8651. */
  8652. export declare const wtfEndTimeRange: (range: any) => void;
  8653. /**
  8654. * Used to mark end of Scope.
  8655. *
  8656. * - `scope` to end.
  8657. * - `returnValue` (optional) to be passed to the WTF.
  8658. *
  8659. * Returns the `returnValue for easy chaining.
  8660. * @publicApi
  8661. * @deprecated the Web Tracing Framework is no longer supported in Angular
  8662. */
  8663. export declare const wtfLeave: <T>(scope: any, returnValue?: T) => T;
  8664. /**
  8665. * A scope function for the Web Tracing Framework (WTF).
  8666. *
  8667. * @publicApi
  8668. * @deprecated the Web Tracing Framework is no longer supported in Angular
  8669. */
  8670. export declare interface WtfScopeFn {
  8671. (arg0?: any, arg1?: any): any;
  8672. }
  8673. /**
  8674. * Used to mark Async start. Async are similar to scope but they don't have to be strictly nested.
  8675. * The return value is used in the call to [endAsync]. Async ranges only work if WTF has been
  8676. * enabled.
  8677. *
  8678. * someMethod() {
  8679. * var s = wtfStartTimeRange('HTTP:GET', 'some.url');
  8680. * var future = new Future.delay(5).then((_) {
  8681. * wtfEndTimeRange(s);
  8682. * });
  8683. * }
  8684. * @publicApi
  8685. * @deprecated the Web Tracing Framework is no longer supported in Angular
  8686. */
  8687. export declare const wtfStartTimeRange: (rangeType: string, action: string) => any;
  8688. /**
  8689. * Sanitizes the given unsafe, untrusted HTML fragment, and returns HTML text that is safe to add to
  8690. * the DOM in a browser environment.
  8691. */
  8692. export declare function ɵ_sanitizeHtml(defaultDoc: any, unsafeHtmlInput: string): string;
  8693. /**
  8694. * Sanitizes the given untrusted CSS style property value (i.e. not an entire object, just a single
  8695. * value) and returns a value that is safe to use in a browser environment.
  8696. */
  8697. export declare function ɵ_sanitizeStyle(value: string): string;
  8698. export declare function ɵ_sanitizeUrl(url: string): string;
  8699. /**
  8700. * Adds a player to an element, directive or component instance that will later be
  8701. * animated once change detection has passed.
  8702. *
  8703. * When a player is added to a reference it will stay active until `player.destroy()`
  8704. * is called. Once called then the player will be removed from the active players
  8705. * present on the associated ref instance.
  8706. *
  8707. * To get a list of all the active players on an element see [getPlayers].
  8708. *
  8709. * @param ref The element, directive or component that the player will be placed on.
  8710. * @param player The player that will be triggered to play once change detection has run.
  8711. */
  8712. export declare function ɵaddPlayer(ref: ComponentInstance | DirectiveInstance | HTMLElement, player: ɵPlayer): void;
  8713. export declare const ɵALLOW_MULTIPLE_PLATFORMS: InjectionToken<boolean>;
  8714. export declare function ɵand(flags: ɵNodeFlags, matchedQueriesDsl: null | [string | number, ɵQueryValueType][], ngContentIndex: null | number, childCount: number, handleEvent?: null | ElementHandleEventFn, templateFactory?: ViewDefinitionFactory): NodeDef;
  8715. export declare function ɵangular_packages_core_core_a<T>(token: Type<T> | InjectionToken<T>): T;
  8716. export declare function ɵangular_packages_core_core_a<T>(token: Type<T> | InjectionToken<T>, flags?: InjectFlags): T | null;
  8717. export declare class ɵangular_packages_core_core_b implements Injector {
  8718. get(token: any, notFoundValue?: any): any;
  8719. }
  8720. export declare abstract class ɵangular_packages_core_core_ba {
  8721. abstract readonly view: ViewData;
  8722. abstract readonly nodeIndex: number | null;
  8723. abstract readonly injector: Injector;
  8724. abstract readonly component: any;
  8725. abstract readonly providerTokens: any[];
  8726. abstract readonly references: {
  8727. [key: string]: any;
  8728. };
  8729. abstract readonly context: any;
  8730. abstract readonly componentRenderElement: any;
  8731. abstract readonly renderNode: any;
  8732. abstract logError(console: Console, ...values: any[]): void;
  8733. }
  8734. /**
  8735. * A change detection scheduler token for {@link RootContext}. This token is the default value used
  8736. * for the default `RootContext` found in the {@link ROOT_CONTEXT} token.
  8737. */
  8738. export declare const ɵangular_packages_core_core_bb: InjectionToken<(fn: () => void) => void>;
  8739. /**
  8740. * Inject static attribute value into directive constructor.
  8741. *
  8742. * This method is used with `factory` functions which are generated as part of
  8743. * `defineDirective` or `defineComponent`. The method retrieves the static value
  8744. * of an attribute. (Dynamic attributes are not supported since they are not resolved
  8745. * at the time of injection and can change over time.)
  8746. *
  8747. * # Example
  8748. * Given:
  8749. * ```
  8750. * @Component(...)
  8751. * class MyComponent {
  8752. * constructor(@Attribute('title') title: string) { ... }
  8753. * }
  8754. * ```
  8755. * When instantiated with
  8756. * ```
  8757. * <my-component title="Hello"></my-component>
  8758. * ```
  8759. *
  8760. * Then factory method generated is:
  8761. * ```
  8762. * MyComponent.ngComponentDef = defineComponent({
  8763. * factory: () => new MyComponent(injectAttribute('title'))
  8764. * ...
  8765. * })
  8766. * ```
  8767. *
  8768. * @publicApi
  8769. */
  8770. export declare function ɵangular_packages_core_core_bc(tNode: TNode, attrNameToInject: string): string | null;
  8771. export declare function ɵangular_packages_core_core_bd(): ɵangular_packages_core_core_bm;
  8772. export declare function ɵangular_packages_core_core_be(): TNode;
  8773. export declare function ɵangular_packages_core_core_bf<T = any>(level?: number): T;
  8774. /** Static data for an element */
  8775. export declare interface ɵangular_packages_core_core_bg extends TNode {
  8776. /** Index in the data[] array */
  8777. index: number;
  8778. child: ɵangular_packages_core_core_bg | TTextNode | TElementContainerNode | TContainerNode | TProjectionNode | null;
  8779. /**
  8780. * Element nodes will have parents unless they are the first node of a component or
  8781. * embedded view (which means their parent is in a different view and must be
  8782. * retrieved using viewData[HOST_NODE]).
  8783. */
  8784. parent: ɵangular_packages_core_core_bg | TElementContainerNode | null;
  8785. tViews: null;
  8786. /**
  8787. * If this is a component TNode with projection, this will be an array of projected
  8788. * TNodes or native nodes (see TNode.projection for more info). If it's a regular element node or
  8789. * a component without projection, it will be null.
  8790. */
  8791. projection: (TNode | RNode[])[] | null;
  8792. }
  8793. /**
  8794. * Detects which sanitizer to use for URL property, based on tag name and prop name.
  8795. *
  8796. * The rules are based on the RESOURCE_URL context config from
  8797. * `packages/compiler/src/schema/dom_security_schema.ts`.
  8798. * If tag and prop names don't match Resource URL schema, use URL sanitizer.
  8799. */
  8800. export declare function ɵangular_packages_core_core_bh(tag: string, prop: string): typeof ɵɵsanitizeResourceUrl;
  8801. /**
  8802. * Defines the shape which produces the Player.
  8803. *
  8804. * Used to produce a player that will be placed on an element that contains
  8805. * styling bindings that make use of the player. This function is designed
  8806. * to be used with `PlayerFactory`.
  8807. */
  8808. export declare interface ɵangular_packages_core_core_bi {
  8809. (element: HTMLElement, type: BindingType, values: {
  8810. [key: string]: any;
  8811. }, isFirstRender: boolean, currentPlayer: ɵPlayer | null): ɵPlayer | null;
  8812. }
  8813. export declare class ɵangular_packages_core_core_bj<T> {
  8814. fn: ɵangular_packages_core_core_bi;
  8815. value: T;
  8816. '__brand__': 'Brand for PlayerFactory that nothing will match';
  8817. constructor(fn: ɵangular_packages_core_core_bi, value: T);
  8818. }
  8819. export declare function ɵangular_packages_core_core_bk(name: string, props?: (...args: any[]) => any, parentClass?: any): any;
  8820. export declare function ɵangular_packages_core_core_bl(name: string, props?: (...args: any[]) => any, parentClass?: any, additionalProcessing?: (target: any, name: string, ...args: any[]) => void): any;
  8821. /**
  8822. * `LView` stores all of the information needed to process the instructions as
  8823. * they are invoked from the template. Each embedded view and component view has its
  8824. * own `LView`. When processing a particular view, we set the `viewData` to that
  8825. * `LView`. When that view is done processing, the `viewData` is set back to
  8826. * whatever the original `viewData` was before (the parent `LView`).
  8827. *
  8828. * Keeping separate state for each view facilities view insertion / deletion, so we
  8829. * don't have to edit the data array based on which views are present.
  8830. */
  8831. export declare interface ɵangular_packages_core_core_bm extends Array<any> {
  8832. /**
  8833. * The host node for this LView instance, if this is a component view.
  8834. *
  8835. * If this is an embedded view, HOST will be null.
  8836. *
  8837. * If the component uses host bindings for styling that the `RElement` will be wrapped with
  8838. * `StylingContext`.
  8839. */
  8840. [HOST]: RElement | StylingContext | null;
  8841. /**
  8842. * The static data for this view. We need a reference to this so we can easily walk up the
  8843. * node tree in DI and get the TView.data array associated with a node (where the
  8844. * directive defs are stored).
  8845. */
  8846. readonly [TVIEW]: TView;
  8847. /** Flags for this view. See LViewFlags for more info. */
  8848. [FLAGS]: LViewFlags;
  8849. /**
  8850. * This may store an {@link LView} or {@link LContainer}.
  8851. *
  8852. * `LView` - The parent view. This is needed when we exit the view and must restore the previous
  8853. * LView. Without this, the render method would have to keep a stack of
  8854. * views as it is recursively rendering templates.
  8855. *
  8856. * `LContainer` - The current view is part of a container, and is an embedded view.
  8857. */
  8858. [PARENT]: ɵangular_packages_core_core_bm | LContainer | null;
  8859. /**
  8860. *
  8861. * The next sibling LView or LContainer.
  8862. *
  8863. * Allows us to propagate between sibling view states that aren't in the same
  8864. * container. Embedded views already have a node.next, but it is only set for
  8865. * views in the same container. We need a way to link component views and views
  8866. * across containers as well.
  8867. */
  8868. [NEXT]: ɵangular_packages_core_core_bm | LContainer | null;
  8869. /** Queries active for this view - nodes from a view are reported to those queries. */
  8870. [QUERIES]: LQueries | null;
  8871. /**
  8872. * Pointer to the `TViewNode` or `TElementNode` which represents the root of the view.
  8873. *
  8874. * If `TViewNode`, this is an embedded view of a container. We need this to be able to
  8875. * efficiently find the `LViewNode` when inserting the view into an anchor.
  8876. *
  8877. * If `TElementNode`, this is the LView of a component.
  8878. *
  8879. * If null, this is the root view of an application (root component is in this view).
  8880. */
  8881. [T_HOST]: TViewNode | ɵangular_packages_core_core_bg | null;
  8882. /**
  8883. * The binding index we should access next.
  8884. *
  8885. * This is stored so that bindings can continue where they left off
  8886. * if a view is left midway through processing bindings (e.g. if there is
  8887. * a setter that creates an embedded view, like in ngIf).
  8888. */
  8889. [BINDING_INDEX]: number;
  8890. /**
  8891. * When a view is destroyed, listeners need to be released and outputs need to be
  8892. * unsubscribed. This context array stores both listener functions wrapped with
  8893. * their context and output subscription instances for a particular view.
  8894. *
  8895. * These change per LView instance, so they cannot be stored on TView. Instead,
  8896. * TView.cleanup saves an index to the necessary context in this array.
  8897. */
  8898. [CLEANUP]: any[] | null;
  8899. /**
  8900. * - For dynamic views, this is the context with which to render the template (e.g.
  8901. * `NgForContext`), or `{}` if not defined explicitly.
  8902. * - For root view of the root component the context contains change detection data.
  8903. * - For non-root components, the context is the component instance,
  8904. * - For inline views, the context is null.
  8905. */
  8906. [CONTEXT]: {} | RootContext | null;
  8907. /** An optional Module Injector to be used as fall back after Element Injectors are consulted. */
  8908. readonly [INJECTOR_2]: Injector | null;
  8909. /** Renderer to be used for this view. */
  8910. [RENDERER_FACTORY]: RendererFactory3;
  8911. /** Renderer to be used for this view. */
  8912. [RENDERER]: Renderer3;
  8913. /** An optional custom sanitizer. */
  8914. [SANITIZER]: Sanitizer | null;
  8915. /**
  8916. * Reference to the first LView or LContainer beneath this LView in
  8917. * the hierarchy.
  8918. *
  8919. * Necessary to store this so views can traverse through their nested views
  8920. * to remove listeners and call onDestroy callbacks.
  8921. */
  8922. [CHILD_HEAD]: ɵangular_packages_core_core_bm | LContainer | null;
  8923. /**
  8924. * The last LView or LContainer beneath this LView in the hierarchy.
  8925. *
  8926. * The tail allows us to quickly add a new state to the end of the view list
  8927. * without having to propagate starting from the first child.
  8928. */
  8929. [CHILD_TAIL]: ɵangular_packages_core_core_bm | LContainer | null;
  8930. /**
  8931. * Stores QueryLists associated with content queries of a directive. This data structure is
  8932. * filled-in as part of a directive creation process and is later used to retrieve a QueryList to
  8933. * be refreshed.
  8934. */
  8935. [CONTENT_QUERIES]: QueryList<any>[] | null;
  8936. /**
  8937. * View where this view's template was declared.
  8938. *
  8939. * Only applicable for dynamically created views. Will be null for inline/component views.
  8940. *
  8941. * The template for a dynamically created view may be declared in a different view than
  8942. * it is inserted. We already track the "insertion view" (view where the template was
  8943. * inserted) in LView[PARENT], but we also need access to the "declaration view"
  8944. * (view where the template was declared). Otherwise, we wouldn't be able to call the
  8945. * view's template function with the proper contexts. Context should be inherited from
  8946. * the declaration view tree, not the insertion view tree.
  8947. *
  8948. * Example (AppComponent template):
  8949. *
  8950. * <ng-template #foo></ng-template> <-- declared here -->
  8951. * <some-comp [tpl]="foo"></some-comp> <-- inserted inside this component -->
  8952. *
  8953. * The <ng-template> above is declared in the AppComponent template, but it will be passed into
  8954. * SomeComp and inserted there. In this case, the declaration view would be the AppComponent,
  8955. * but the insertion view would be SomeComp. When we are removing views, we would want to
  8956. * traverse through the insertion view to clean up listeners. When we are calling the
  8957. * template function during change detection, we need the declaration view to get inherited
  8958. * context.
  8959. */
  8960. [DECLARATION_VIEW]: ɵangular_packages_core_core_bm | null;
  8961. /**
  8962. * More flags for this view. See PreOrderHookFlags for more info.
  8963. */
  8964. [PREORDER_HOOK_FLAGS]: PreOrderHookFlags;
  8965. }
  8966. /**
  8967. * Convince closure compiler that the wrapped function has no side-effects.
  8968. *
  8969. * Closure compiler always assumes that `toString` has no side-effects. We use this quirk to
  8970. * allow us to execute a function but have closure compiler mark the call as no-side-effects.
  8971. * It is important that the return value for the `noSideEffects` function be assigned
  8972. * to something which is retained otherwise the call to `noSideEffects` will be removed by closure
  8973. * compiler.
  8974. */
  8975. export declare function ɵangular_packages_core_core_bn(fn: () => void): string;
  8976. /** Retrieves a value from any `LView` or `TData`. */
  8977. export declare function ɵangular_packages_core_core_bo<T>(view: ɵangular_packages_core_core_bm | TData, index: number): T;
  8978. /**
  8979. * Returns the `RootContext` instance that is associated with
  8980. * the application where the target is situated. It does this by walking the parent views until it
  8981. * gets to the root view, then getting the context off of that.
  8982. *
  8983. * @param viewOrComponent the `LView` or component to get the root context for.
  8984. */
  8985. export declare function ɵangular_packages_core_core_bp(viewOrComponent: ɵangular_packages_core_core_bm | {}): RootContext;
  8986. export declare function ɵangular_packages_core_core_bq<T>(objWithPropertyToExtract: T): string;
  8987. export declare class ɵangular_packages_core_core_c implements ReflectiveInjector {
  8988. private static INJECTOR_KEY;
  8989. readonly parent: Injector | null;
  8990. keyIds: number[];
  8991. objs: any[];
  8992. /**
  8993. * Private
  8994. */
  8995. constructor(_providers: ResolvedReflectiveProvider[], _parent?: Injector);
  8996. get(token: any, notFoundValue?: any): any;
  8997. resolveAndCreateChild(providers: Provider[]): ReflectiveInjector;
  8998. createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector;
  8999. resolveAndInstantiate(provider: Provider): any;
  9000. instantiateResolved(provider: ResolvedReflectiveProvider): any;
  9001. getProviderAtIndex(index: number): ResolvedReflectiveProvider;
  9002. private _getMaxNumberOfObjects;
  9003. private _instantiateProvider;
  9004. private _instantiate;
  9005. private _getByReflectiveDependency;
  9006. private _getByKey;
  9007. private _getObjByKeyId;
  9008. readonly displayName: string;
  9009. toString(): string;
  9010. }
  9011. /**
  9012. * `Dependency` is used by the framework to extend DI.
  9013. * This is internal to Angular and should not be used directly.
  9014. */
  9015. export declare class ɵangular_packages_core_core_d {
  9016. key: ReflectiveKey;
  9017. optional: boolean;
  9018. visibility: Self | SkipSelf | null;
  9019. constructor(key: ReflectiveKey, optional: boolean, visibility: Self | SkipSelf | null);
  9020. static fromKey(key: ReflectiveKey): ɵangular_packages_core_core_d;
  9021. }
  9022. /**
  9023. * Resolve a list of Providers.
  9024. */
  9025. export declare function ɵangular_packages_core_core_e(providers: Provider[]): ResolvedReflectiveProvider[];
  9026. export declare function ɵangular_packages_core_core_f(): string;
  9027. /**
  9028. * Creates an ElementRef given a node.
  9029. *
  9030. * @param ElementRefToken The ElementRef type
  9031. * @param tNode The node for which you'd like an ElementRef
  9032. * @param view The view to which the node belongs
  9033. * @returns The ElementRef instance to use
  9034. */
  9035. export declare function ɵangular_packages_core_core_g(ElementRefToken: typeof ElementRef, tNode: TNode, view: ɵangular_packages_core_core_bm): ElementRef;
  9036. /**
  9037. * Creates a TemplateRef and stores it on the injector.
  9038. *
  9039. * @param TemplateRefToken The TemplateRef type
  9040. * @param ElementRefToken The ElementRef type
  9041. * @param hostTNode The node that is requesting a TemplateRef
  9042. * @param hostView The view to which the node belongs
  9043. * @returns The TemplateRef instance to use
  9044. */
  9045. export declare function ɵangular_packages_core_core_h<T>(TemplateRefToken: typeof TemplateRef, ElementRefToken: typeof ElementRef, hostTNode: TNode, hostView: ɵangular_packages_core_core_bm): TemplateRef<T> | null;
  9046. /**
  9047. * Creates a ViewRef and stores it on the injector as ChangeDetectorRef (public alias).
  9048. *
  9049. * @param hostTNode The node that is requesting a ChangeDetectorRef
  9050. * @param hostView The view to which the node belongs
  9051. * @param context The context for this change detector ref
  9052. * @returns The ChangeDetectorRef to use
  9053. */
  9054. export declare function ɵangular_packages_core_core_i(hostTNode: TNode, hostView: ɵangular_packages_core_core_bm, context: any): ChangeDetectorRef;
  9055. export declare function ɵangular_packages_core_core_j(id: string): NgModuleFactory<any>;
  9056. export declare class ɵangular_packages_core_core_k {
  9057. readonly listeners: DebugEventListener[];
  9058. readonly parent: DebugElement | null;
  9059. readonly nativeNode: any;
  9060. private readonly _debugContext;
  9061. constructor(nativeNode: any, parent: DebugNode | null, _debugContext: ɵangular_packages_core_core_ba);
  9062. readonly injector: Injector;
  9063. readonly componentInstance: any;
  9064. readonly context: any;
  9065. readonly references: {
  9066. [key: string]: any;
  9067. };
  9068. readonly providerTokens: any[];
  9069. }
  9070. export declare class ɵangular_packages_core_core_l extends ɵangular_packages_core_core_k implements DebugElement {
  9071. readonly name: string;
  9072. readonly properties: {
  9073. [key: string]: any;
  9074. };
  9075. readonly attributes: {
  9076. [key: string]: string | null;
  9077. };
  9078. readonly classes: {
  9079. [key: string]: boolean;
  9080. };
  9081. readonly styles: {
  9082. [key: string]: string | null;
  9083. };
  9084. readonly childNodes: DebugNode[];
  9085. readonly nativeElement: any;
  9086. constructor(nativeNode: any, parent: any, _debugContext: ɵangular_packages_core_core_ba);
  9087. addChild(child: DebugNode): void;
  9088. removeChild(child: DebugNode): void;
  9089. insertChildrenAfter(child: DebugNode, newChildren: DebugNode[]): void;
  9090. insertBefore(refChild: DebugNode, newChild: DebugNode): void;
  9091. query(predicate: Predicate<DebugElement>): DebugElement;
  9092. queryAll(predicate: Predicate<DebugElement>): DebugElement[];
  9093. queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[];
  9094. readonly children: DebugElement[];
  9095. triggerEventHandler(eventName: string, eventObj: any): void;
  9096. }
  9097. export declare class ɵangular_packages_core_core_m implements IterableDifferFactory {
  9098. constructor();
  9099. supports(obj: Object | null | undefined): boolean;
  9100. create<V>(trackByFn?: TrackByFunction<V>): DefaultIterableDiffer<V>;
  9101. }
  9102. export declare class ɵangular_packages_core_core_n<K, V> implements KeyValueDifferFactory {
  9103. constructor();
  9104. supports(obj: any): boolean;
  9105. create<K, V>(): KeyValueDiffer<K, V>;
  9106. }
  9107. export declare function ɵangular_packages_core_core_o(): IterableDiffers;
  9108. export declare function ɵangular_packages_core_core_p(): KeyValueDiffers;
  9109. export declare function ɵangular_packages_core_core_q(locale?: string): string;
  9110. /**
  9111. * A built-in [dependency injection token](guide/glossary#di-token)
  9112. * that is used to configure the root injector for bootstrapping.
  9113. */
  9114. export declare const ɵangular_packages_core_core_r: StaticProvider[];
  9115. /**
  9116. * Schedule work at next available slot.
  9117. *
  9118. * In Ivy this is just `requestAnimationFrame`. For compatibility reasons when bootstrapped
  9119. * using `platformRef.bootstrap` we need to use `NgZone.onStable` as the scheduling mechanism.
  9120. * This overrides the scheduling mechanism in Ivy to `NgZone.onStable`.
  9121. *
  9122. * @param ngZone NgZone to use for scheduling.
  9123. */
  9124. export declare function ɵangular_packages_core_core_s(ngZone: NgZone): (fn: () => void) => void;
  9125. /**
  9126. * True if WTF is enabled.
  9127. */
  9128. export declare const ɵangular_packages_core_core_t: boolean;
  9129. export declare function ɵangular_packages_core_core_u(): boolean;
  9130. export declare function ɵangular_packages_core_core_v(signature: string, flags?: any): any;
  9131. export declare function ɵangular_packages_core_core_w<T>(scope: Scope): void;
  9132. export declare function ɵangular_packages_core_core_w<T>(scope: Scope, returnValue?: T): T;
  9133. export declare function ɵangular_packages_core_core_x(rangeType: string, action: string): Range;
  9134. export declare function ɵangular_packages_core_core_y(range: Range): void;
  9135. export declare function ɵangular_packages_core_core_z(checkIndex: number, flags: ɵNodeFlags, matchedQueriesDsl: [string | number, ɵQueryValueType][] | null, childCount: number, token: any, value: any, deps: ([ɵDepFlags, any] | any)[], bindings?: BindingDef[], outputs?: OutputDef[]): NodeDef;
  9136. /**
  9137. * Providers that will generate a random APP_ID_TOKEN.
  9138. * @publicApi
  9139. */
  9140. export declare const ɵAPP_ID_RANDOM_PROVIDER: {
  9141. provide: InjectionToken<string>;
  9142. useFactory: typeof ɵangular_packages_core_core_f;
  9143. deps: any[];
  9144. };
  9145. /**
  9146. * An internal token whose presence in an injector indicates that the injector should treat itself
  9147. * as a root scoped injector when processing requests for unknown tokens which may indicate
  9148. * they are provided in the root scope.
  9149. */
  9150. export declare const ɵAPP_ROOT: InjectionToken<boolean>;
  9151. export declare const enum ɵArgumentType {
  9152. Inline = 0,
  9153. Dynamic = 1
  9154. }
  9155. /**
  9156. * A set of marker values to be used in the attributes arrays. These markers indicate that some
  9157. * items are not regular attributes and the processing should be adapted accordingly.
  9158. */
  9159. export declare const enum ɵAttributeMarker {
  9160. /**
  9161. * Marker indicates that the following 3 values in the attributes array are:
  9162. * namespaceUri, attributeName, attributeValue
  9163. * in that order.
  9164. */
  9165. NamespaceURI = 0,
  9166. /**
  9167. * Signals class declaration.
  9168. *
  9169. * Each value following `Classes` designates a class name to include on the element.
  9170. * ## Example:
  9171. *
  9172. * Given:
  9173. * ```
  9174. * <div class="foo bar baz">...<d/vi>
  9175. * ```
  9176. *
  9177. * the generated code is:
  9178. * ```
  9179. * var _c1 = [AttributeMarker.Classes, 'foo', 'bar', 'baz'];
  9180. * ```
  9181. */
  9182. Classes = 1,
  9183. /**
  9184. * Signals style declaration.
  9185. *
  9186. * Each pair of values following `Styles` designates a style name and value to include on the
  9187. * element.
  9188. * ## Example:
  9189. *
  9190. * Given:
  9191. * ```
  9192. * <div style="width:100px; height:200px; color:red">...</div>
  9193. * ```
  9194. *
  9195. * the generated code is:
  9196. * ```
  9197. * var _c1 = [AttributeMarker.Styles, 'width', '100px', 'height'. '200px', 'color', 'red'];
  9198. * ```
  9199. */
  9200. Styles = 2,
  9201. /**
  9202. * Signals that the following attribute names were extracted from input or output bindings.
  9203. *
  9204. * For example, given the following HTML:
  9205. *
  9206. * ```
  9207. * <div moo="car" [foo]="exp" (bar)="doSth()">
  9208. * ```
  9209. *
  9210. * the generated code is:
  9211. *
  9212. * ```
  9213. * var _c1 = ['moo', 'car', AttributeMarker.Bindings, 'foo', 'bar'];
  9214. * ```
  9215. */
  9216. Bindings = 3,
  9217. /**
  9218. * Signals that the following attribute names were hoisted from an inline-template declaration.
  9219. *
  9220. * For example, given the following HTML:
  9221. *
  9222. * ```
  9223. * <div *ngFor="let value of values; trackBy:trackBy" dirA [dirB]="value">
  9224. * ```
  9225. *
  9226. * the generated code for the `template()` instruction would include:
  9227. *
  9228. * ```
  9229. * ['dirA', '', AttributeMarker.Bindings, 'dirB', AttributeMarker.Template, 'ngFor', 'ngForOf',
  9230. * 'ngForTrackBy', 'let-value']
  9231. * ```
  9232. *
  9233. * while the generated code for the `element()` instruction inside the template function would
  9234. * include:
  9235. *
  9236. * ```
  9237. * ['dirA', '', AttributeMarker.Bindings, 'dirB']
  9238. * ```
  9239. */
  9240. Template = 4,
  9241. /**
  9242. * Signals that the following attribute is `ngProjectAs` and its value is a parsed `CssSelector`.
  9243. *
  9244. * For example, given the following HTML:
  9245. *
  9246. * ```
  9247. * <h1 attr="value" ngProjectAs="[title]">
  9248. * ```
  9249. *
  9250. * the generated code for the `element()` instruction would include:
  9251. *
  9252. * ```
  9253. * ['attr', 'value', AttributeMarker.ProjectAs, ['', 'title', '']]
  9254. * ```
  9255. */
  9256. ProjectAs = 5,
  9257. /**
  9258. * Signals that the following attribute will be translated by runtime i18n
  9259. *
  9260. * For example, given the following HTML:
  9261. *
  9262. * ```
  9263. * <div moo="car" foo="value" i18n-foo [bar]="binding" i18n-bar>
  9264. * ```
  9265. *
  9266. * the generated code is:
  9267. *
  9268. * ```
  9269. * var _c1 = ['moo', 'car', AttributeMarker.I18n, 'foo', 'bar'];
  9270. */
  9271. I18n = 6
  9272. }
  9273. export declare const enum ɵBindingFlags {
  9274. TypeElementAttribute = 1,
  9275. TypeElementClass = 2,
  9276. TypeElementStyle = 4,
  9277. TypeProperty = 8,
  9278. SyntheticProperty = 16,
  9279. SyntheticHostProperty = 32,
  9280. CatSyntheticProperty = 48,
  9281. Types = 15
  9282. }
  9283. /**
  9284. * Combines the binding value and a factory for an animation player.
  9285. *
  9286. * Used to bind a player to an element template binding (currently only
  9287. * `[style]`, `[style.prop]`, `[class]` and `[class.name]` bindings
  9288. * supported). The provided `factoryFn` function will be run once all
  9289. * the associated bindings have been evaluated on the element and is
  9290. * designed to return a player which will then be placed on the element.
  9291. *
  9292. * @param factoryFn The function that is used to create a player
  9293. * once all the rendering-related (styling values) have been
  9294. * processed for the element binding.
  9295. * @param value The raw value that will be exposed to the binding
  9296. * so that the binding can update its internal values when
  9297. * any changes are evaluated.
  9298. */
  9299. export declare function ɵbindPlayerFactory<T>(factoryFn: ɵangular_packages_core_core_bi, value: T): ɵPlayerFactory;
  9300. /**
  9301. * Mark `html` string as trusted.
  9302. *
  9303. * This function wraps the trusted string in `String` and brands it in a way which makes it
  9304. * recognizable to {@link htmlSanitizer} to be trusted implicitly.
  9305. *
  9306. * @param trustedHtml `html` string which needs to be implicitly trusted.
  9307. * @returns a `html` `String` which has been branded to be implicitly trusted.
  9308. */
  9309. export declare function ɵbypassSanitizationTrustHtml(trustedHtml: string): TrustedHtmlString;
  9310. /**
  9311. * Mark `url` string as trusted.
  9312. *
  9313. * This function wraps the trusted string in `String` and brands it in a way which makes it
  9314. * recognizable to {@link resourceUrlSanitizer} to be trusted implicitly.
  9315. *
  9316. * @param trustedResourceUrl `url` string which needs to be implicitly trusted.
  9317. * @returns a `url` `String` which has been branded to be implicitly trusted.
  9318. */
  9319. export declare function ɵbypassSanitizationTrustResourceUrl(trustedResourceUrl: string): TrustedResourceUrlString;
  9320. /**
  9321. * Mark `script` string as trusted.
  9322. *
  9323. * This function wraps the trusted string in `String` and brands it in a way which makes it
  9324. * recognizable to {@link scriptSanitizer} to be trusted implicitly.
  9325. *
  9326. * @param trustedScript `script` string which needs to be implicitly trusted.
  9327. * @returns a `script` `String` which has been branded to be implicitly trusted.
  9328. */
  9329. export declare function ɵbypassSanitizationTrustScript(trustedScript: string): TrustedScriptString;
  9330. /**
  9331. * Mark `style` string as trusted.
  9332. *
  9333. * This function wraps the trusted string in `String` and brands it in a way which makes it
  9334. * recognizable to {@link styleSanitizer} to be trusted implicitly.
  9335. *
  9336. * @param trustedStyle `style` string which needs to be implicitly trusted.
  9337. * @returns a `style` `String` which has been branded to be implicitly trusted.
  9338. */
  9339. export declare function ɵbypassSanitizationTrustStyle(trustedStyle: string): TrustedStyleString;
  9340. /**
  9341. * Mark `url` string as trusted.
  9342. *
  9343. * This function wraps the trusted string in `String` and brands it in a way which makes it
  9344. * recognizable to {@link urlSanitizer} to be trusted implicitly.
  9345. *
  9346. * @param trustedUrl `url` string which needs to be implicitly trusted.
  9347. * @returns a `url` `String` which has been branded to be implicitly trusted.
  9348. */
  9349. export declare function ɵbypassSanitizationTrustUrl(trustedUrl: string): TrustedUrlString;
  9350. export declare function ɵccf(selector: string, componentType: Type<any>, viewDefFactory: ViewDefinitionFactory, inputs: {
  9351. [propName: string]: string;
  9352. } | null, outputs: {
  9353. [propName: string]: string;
  9354. }, ngContentSelectors: string[]): ComponentFactory<any>;
  9355. /**
  9356. * Defines the possible states of the default change detector.
  9357. * @see `ChangeDetectorRef`
  9358. */
  9359. export declare enum ɵChangeDetectorStatus {
  9360. /**
  9361. * A state in which, after calling `detectChanges()`, the change detector
  9362. * state becomes `Checked`, and must be explicitly invoked or reactivated.
  9363. */
  9364. CheckOnce = 0,
  9365. /**
  9366. * A state in which change detection is skipped until the change detector mode
  9367. * becomes `CheckOnce`.
  9368. */
  9369. Checked = 1,
  9370. /**
  9371. * A state in which change detection continues automatically until explicitly
  9372. * deactivated.
  9373. */
  9374. CheckAlways = 2,
  9375. /**
  9376. * A state in which a change detector sub tree is not a part of the main tree and
  9377. * should be skipped.
  9378. */
  9379. Detached = 3,
  9380. /**
  9381. * Indicates that the change detector encountered an error checking a binding
  9382. * or calling a directive lifecycle method and is now in an inconsistent state. Change
  9383. * detectors in this state do not detect changes.
  9384. */
  9385. Errored = 4,
  9386. /**
  9387. * Indicates that the change detector has been destroyed.
  9388. */
  9389. Destroyed = 5
  9390. }
  9391. export declare function ɵclearOverrides(): void;
  9392. export declare function ɵclearResolutionOfComponentResourcesQueue(): Map<Type<any>, Component>;
  9393. export declare function ɵcmf(ngModuleType: Type<any>, bootstrapComponents: Type<any>[], defFactory: NgModuleDefinitionFactory): NgModuleFactory<any>;
  9394. export declare class ɵCodegenComponentFactoryResolver implements ComponentFactoryResolver {
  9395. private _parent;
  9396. private _ngModule;
  9397. private _factories;
  9398. constructor(factories: ComponentFactory<any>[], _parent: ComponentFactoryResolver, _ngModule: NgModuleRef<any>);
  9399. resolveComponentFactory<T>(component: {
  9400. new (...args: any[]): T;
  9401. }): ComponentFactory<T>;
  9402. }
  9403. /**
  9404. * Compile an Angular component according to its decorator metadata, and patch the resulting
  9405. * ngComponentDef onto the component type.
  9406. *
  9407. * Compilation may be asynchronous (due to the need to resolve URLs for the component template or
  9408. * other resources, for example). In the event that compilation is not immediate, `compileComponent`
  9409. * will enqueue resource resolution into a global queue and will fail to return the `ngComponentDef`
  9410. * until the global queue has been resolved with a call to `resolveComponentResources`.
  9411. */
  9412. export declare function ɵcompileComponent(type: Type<any>, metadata: Component): void;
  9413. /**
  9414. * Compile an Angular directive according to its decorator metadata, and patch the resulting
  9415. * ngDirectiveDef onto the component type.
  9416. *
  9417. * In the event that compilation is not immediate, `compileDirective` will return a `Promise` which
  9418. * will resolve when compilation completes and the directive becomes usable.
  9419. */
  9420. export declare function ɵcompileDirective(type: Type<any>, directive: Directive): void;
  9421. /**
  9422. * Compiles a module in JIT mode.
  9423. *
  9424. * This function automatically gets called when a class has a `@NgModule` decorator.
  9425. */
  9426. export declare function ɵcompileNgModule(moduleType: Type<any>, ngModule?: NgModule): void;
  9427. /**
  9428. * Compiles and adds the `ngModuleDef` and `ngInjectorDef` properties to the module class.
  9429. *
  9430. * It's possible to compile a module via this API which will allow duplicate declarations in its
  9431. * root.
  9432. */
  9433. export declare function ɵcompileNgModuleDefs(moduleType: ɵNgModuleType, ngModule: NgModule, allowDuplicateDeclarationsInRoot?: boolean): void;
  9434. export declare function ɵcompileNgModuleFactory__POST_R3__<M>(injector: Injector, options: CompilerOptions, moduleType: Type<M>): Promise<NgModuleFactory<M>>;
  9435. export declare function ɵcompilePipe(type: Type<any>, meta: Pipe): void;
  9436. export declare const ɵCompiler_compileModuleAndAllComponentsAsync__POST_R3__: <T>(moduleType: Type<T>) => Promise<ModuleWithComponentFactories<T>>;
  9437. export declare const ɵCompiler_compileModuleAndAllComponentsSync__POST_R3__: <T>(moduleType: Type<T>) => ModuleWithComponentFactories<T>;
  9438. export declare const ɵCompiler_compileModuleAsync__POST_R3__: <T>(moduleType: Type<T>) => Promise<NgModuleFactory<T>>;
  9439. export declare const ɵCompiler_compileModuleSync__POST_R3__: <T>(moduleType: Type<T>) => NgModuleFactory<T>;
  9440. /**
  9441. * Runtime link information for Components.
  9442. *
  9443. * This is internal data structure used by the render to link
  9444. * components into templates.
  9445. *
  9446. * NOTE: Always use `defineComponent` function to create this object,
  9447. * never create the object directly since the shape of this object
  9448. * can change between versions.
  9449. *
  9450. * See: {@link defineComponent}
  9451. */
  9452. export declare interface ɵComponentDef<T> extends ɵDirectiveDef<T> {
  9453. /**
  9454. * Runtime unique component ID.
  9455. */
  9456. readonly id: string;
  9457. /**
  9458. * The View template of the component.
  9459. */
  9460. readonly template: ComponentTemplate<T>;
  9461. /**
  9462. * An array of `ngContent[selector]` values that were found in the template.
  9463. */
  9464. readonly ngContentSelectors?: string[];
  9465. /**
  9466. * A set of styles that the component needs to be present for component to render correctly.
  9467. */
  9468. readonly styles: string[];
  9469. /**
  9470. * The number of nodes, local refs, and pipes in this component template.
  9471. *
  9472. * Used to calculate the length of the component's LView array, so we
  9473. * can pre-fill the array and set the binding start index.
  9474. */
  9475. readonly consts: number;
  9476. /**
  9477. * The number of bindings in this component template (including pure fn bindings).
  9478. *
  9479. * Used to calculate the length of the component's LView array, so we
  9480. * can pre-fill the array and set the host binding start index.
  9481. */
  9482. readonly vars: number;
  9483. /**
  9484. * Query-related instructions for a component.
  9485. */
  9486. viewQuery: ViewQueriesFunction<T> | null;
  9487. /**
  9488. * The view encapsulation type, which determines how styles are applied to
  9489. * DOM elements. One of
  9490. * - `Emulated` (default): Emulate native scoping of styles.
  9491. * - `Native`: Use the native encapsulation mechanism of the renderer.
  9492. * - `ShadowDom`: Use modern [ShadowDOM](https://w3c.github.io/webcomponents/spec/shadow/) and
  9493. * create a ShadowRoot for component's host element.
  9494. * - `None`: Do not provide any template or style encapsulation.
  9495. */
  9496. readonly encapsulation: ViewEncapsulation;
  9497. /**
  9498. * Defines arbitrary developer-defined data to be stored on a renderer instance.
  9499. * This is useful for renderers that delegate to other renderers.
  9500. */
  9501. readonly data: {
  9502. [kind: string]: any;
  9503. };
  9504. /** Whether or not this component's ChangeDetectionStrategy is OnPush */
  9505. readonly onPush: boolean;
  9506. /**
  9507. * Registry of directives and components that may be found in this view.
  9508. *
  9509. * The property is either an array of `DirectiveDef`s or a function which returns the array of
  9510. * `DirectiveDef`s. The function is necessary to be able to support forward declarations.
  9511. */
  9512. directiveDefs: DirectiveDefListOrFactory | null;
  9513. /**
  9514. * Registry of pipes that may be found in this view.
  9515. *
  9516. * The property is either an array of `PipeDefs`s or a function which returns the array of
  9517. * `PipeDefs`s. The function is necessary to be able to support forward declarations.
  9518. */
  9519. pipeDefs: PipeDefListOrFactory | null;
  9520. /**
  9521. * The set of schemas that declare elements to be allowed in the component's template.
  9522. */
  9523. schemas: SchemaMetadata[] | null;
  9524. /**
  9525. * Ivy runtime uses this place to store the computed tView for the component. This gets filled on
  9526. * the first run of component.
  9527. */
  9528. tView: TView | null;
  9529. /**
  9530. * Used to store the result of `noSideEffects` function so that it is not removed by closure
  9531. * compiler. The property should never be read.
  9532. */
  9533. readonly _?: never;
  9534. }
  9535. /**
  9536. * A subclass of `Type` which has a static `ngComponentDef`:`ComponentDef` field making it
  9537. * consumable for rendering.
  9538. */
  9539. export declare interface ɵComponentType<T> extends Type<T> {
  9540. ngComponentDef: never;
  9541. }
  9542. export declare class ɵConsole {
  9543. log(message: string): void;
  9544. warn(message: string): void;
  9545. }
  9546. /**
  9547. * Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.
  9548. *
  9549. * @publicApi
  9550. */
  9551. export declare function ɵcreateInjector(defType: any, parent?: Injector | null, additionalProviders?: StaticProvider[] | null, name?: string): Injector;
  9552. export declare function ɵcrt(values: {
  9553. styles: (string | any[])[];
  9554. encapsulation: ViewEncapsulation;
  9555. data: {
  9556. [kind: string]: any[];
  9557. };
  9558. }): RendererType2;
  9559. /**
  9560. * A list of CssSelectors.
  9561. *
  9562. * A directive or component can have multiple selectors. This type is used for
  9563. * directive defs so any of the selectors in the list will match that directive.
  9564. *
  9565. * Original: 'form, [ngForm]'
  9566. * Parsed: [['form'], ['', 'ngForm', '']]
  9567. */
  9568. export declare type ɵCssSelectorList = CssSelector[];
  9569. /**
  9570. * The locale id that the application is currently using (for translations and ICU expressions).
  9571. * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine
  9572. * but is now defined as a global value.
  9573. */
  9574. export declare const ɵDEFAULT_LOCALE_ID = "en-US";
  9575. export declare const ɵdefaultIterableDiffers: IterableDiffers;
  9576. export declare const ɵdefaultKeyValueDiffers: KeyValueDiffers;
  9577. /**
  9578. * Bitmask for DI flags
  9579. */
  9580. export declare const enum ɵDepFlags {
  9581. None = 0,
  9582. SkipSelf = 1,
  9583. Optional = 2,
  9584. Self = 4,
  9585. Value = 8
  9586. }
  9587. /**
  9588. * Synchronously perform change detection on a component (and possibly its sub-components).
  9589. *
  9590. * This function triggers change detection in a synchronous way on a component. There should
  9591. * be very little reason to call this function directly since a preferred way to do change
  9592. * detection is to {@link markDirty} the component and wait for the scheduler to call this method
  9593. * at some future point in time. This is because a single user action often results in many
  9594. * components being invalidated and calling change detection on each component synchronously
  9595. * would be inefficient. It is better to wait until all components are marked as dirty and
  9596. * then perform single change detection across all of the components
  9597. *
  9598. * @param component The component which the change detection should be performed on.
  9599. */
  9600. export declare function ɵdetectChanges<T>(component: T): void;
  9601. export declare function ɵdevModeEqual(a: any, b: any): boolean;
  9602. export declare function ɵdid(checkIndex: number, flags: ɵNodeFlags, matchedQueries: null | [string | number, ɵQueryValueType][], childCount: number, ctor: any, deps: ([ɵDepFlags, any] | any)[], props?: null | {
  9603. [name: string]: [number, string];
  9604. }, outputs?: null | {
  9605. [name: string]: string;
  9606. }): NodeDef;
  9607. /**
  9608. * Runtime link information for Directives.
  9609. *
  9610. * This is internal data structure used by the render to link
  9611. * directives into templates.
  9612. *
  9613. * NOTE: Always use `defineDirective` function to create this object,
  9614. * never create the object directly since the shape of this object
  9615. * can change between versions.
  9616. *
  9617. * @param Selector type metadata specifying the selector of the directive or component
  9618. *
  9619. * See: {@link defineDirective}
  9620. */
  9621. export declare interface ɵDirectiveDef<T> extends ɵɵBaseDef<T> {
  9622. /** Token representing the directive. Used by DI. */
  9623. type: Type<T>;
  9624. /** Function that resolves providers and publishes them into the DI system. */
  9625. providersResolver: (<U extends T>(def: ɵDirectiveDef<U>, processProvidersFn?: ProcessProvidersFunction) => void) | null;
  9626. /** The selectors that will be used to match nodes to this directive. */
  9627. readonly selectors: ɵCssSelectorList;
  9628. /**
  9629. * Name under which the directive is exported (for use with local references in template)
  9630. */
  9631. readonly exportAs: string[] | null;
  9632. /**
  9633. * Factory function used to create a new directive instance.
  9634. */
  9635. factory: FactoryFn<T>;
  9636. onChanges: (() => void) | null;
  9637. onInit: (() => void) | null;
  9638. doCheck: (() => void) | null;
  9639. afterContentInit: (() => void) | null;
  9640. afterContentChecked: (() => void) | null;
  9641. afterViewInit: (() => void) | null;
  9642. afterViewChecked: (() => void) | null;
  9643. onDestroy: (() => void) | null;
  9644. /**
  9645. * The features applied to this directive
  9646. */
  9647. readonly features: DirectiveDefFeature[] | null;
  9648. setInput: (<U extends T>(this: ɵDirectiveDef<U>, instance: U, value: any, publicName: string, privateName: string) => void) | null;
  9649. }
  9650. /**
  9651. * A subclass of `Type` which has a static `ngDirectiveDef`:`DirectiveDef` field making it
  9652. * consumable for rendering.
  9653. */
  9654. export declare interface ɵDirectiveType<T> extends Type<T> {
  9655. ngDirectiveDef: never;
  9656. }
  9657. /**
  9658. * @deprecated Use the `Renderer2` instead.
  9659. */
  9660. export declare interface ɵDirectRenderer {
  9661. remove(node: any): void;
  9662. appendChild(node: any, parent: any): void;
  9663. insertBefore(node: any, refNode: any): void;
  9664. nextSibling(node: any): any;
  9665. parentElement(node: any): any;
  9666. }
  9667. export declare function ɵeld(checkIndex: number, flags: ɵNodeFlags, matchedQueriesDsl: null | [string | number, ɵQueryValueType][], ngContentIndex: null | number, childCount: number, namespaceAndName: string | null, fixedAttrs?: null | [string, string][], bindings?: null | [ɵBindingFlags, string, string | SecurityContext | null][], outputs?: null | ([string, string])[], handleEvent?: null | ElementHandleEventFn, componentView?: null | ViewDefinitionFactory, componentRendererType?: RendererType2 | null): NodeDef;
  9668. export declare const ɵEMPTY_ARRAY: any[];
  9669. export declare const ɵEMPTY_MAP: {
  9670. [key: string]: any;
  9671. };
  9672. /**
  9673. * Finds the locale data for a given locale.
  9674. *
  9675. * @param locale The locale code.
  9676. * @returns The locale data.
  9677. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
  9678. */
  9679. export declare function ɵfindLocaleData(locale: string): any;
  9680. /**
  9681. * Loops over queued module definitions, if a given module definition has all of its
  9682. * declarations resolved, it dequeues that module definition and sets the scope on
  9683. * its declarations.
  9684. */
  9685. export declare function ɵflushModuleScopingQueueAsMuchAsPossible(): void;
  9686. export declare function ɵgetComponentViewDefinitionFactory(componentFactory: ComponentFactory<any>): ViewDefinitionFactory;
  9687. export declare function ɵgetDebugNode__POST_R3__(nativeNode: Element): DebugElement__POST_R3__;
  9688. export declare function ɵgetDebugNode__POST_R3__(nativeNode: Node): DebugNode__POST_R3__;
  9689. export declare function ɵgetDebugNode__POST_R3__(nativeNode: null): null;
  9690. /**
  9691. * Retrieves directives associated with a given DOM host element.
  9692. *
  9693. * @param target A DOM element, component or directive instance.
  9694. *
  9695. * @publicApi
  9696. */
  9697. export declare function ɵgetDirectives(target: {}): Array<{}>;
  9698. /**
  9699. * Retrieve the host element of the component.
  9700. *
  9701. * Use this function to retrieve the host element of the component. The host
  9702. * element is the element which the component is associated with.
  9703. *
  9704. * @param directive Component or Directive for which the host element should be retrieved.
  9705. *
  9706. * @publicApi
  9707. */
  9708. export declare function ɵgetHostElement<T>(directive: T): Element;
  9709. /**
  9710. * Read the `ngInjectableDef` for `type` in a way which is immune to accidentally reading inherited
  9711. * value.
  9712. *
  9713. * @param type A type which may have its own (non-inherited) `ngInjectableDef`.
  9714. */
  9715. export declare function ɵgetInjectableDef<T>(type: any): ɵɵInjectableDef<T> | null;
  9716. /** Returns the matching `LContext` data for a given DOM node, directive or component instance.
  9717. *
  9718. * This function will examine the provided DOM element, component, or directive instance\'s
  9719. * monkey-patched property to derive the `LContext` data. Once called then the monkey-patched
  9720. * value will be that of the newly created `LContext`.
  9721. *
  9722. * If the monkey-patched value is the `LView` instance then the context value for that
  9723. * target will be created and the monkey-patch reference will be updated. Therefore when this
  9724. * function is called it may mutate the provided element\'s, component\'s or any of the associated
  9725. * directive\'s monkey-patch values.
  9726. *
  9727. * If the monkey-patch value is not detected then the code will walk up the DOM until an element
  9728. * is found which contains a monkey-patch reference. When that occurs then the provided element
  9729. * will be updated with a new context (which is then returned). If the monkey-patch value is not
  9730. * detected for a component/directive instance then it will throw an error (all components and
  9731. * directives should be automatically monkey-patched by ivy).
  9732. *
  9733. * @param target Component, Directive or DOM Node.
  9734. */
  9735. export declare function ɵgetLContext(target: any): ɵLContext | null;
  9736. /**
  9737. * Retrieves the plural function used by ICU expressions to determine the plural case to use
  9738. * for a given locale.
  9739. * @param locale A locale code for the locale format rules to use.
  9740. * @returns The plural function for the locale.
  9741. * @see `NgPlural`
  9742. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)
  9743. */
  9744. export declare function ɵgetLocalePluralCase(locale: string): (value: number) => number;
  9745. export declare function ɵgetModuleFactory__POST_R3__(id: string): NgModuleFactory<any>;
  9746. /**
  9747. * Returns a list of all the active players present on the provided ref instance (which can
  9748. * be an instance of a directive, component or element).
  9749. *
  9750. * This function will only return players that have been added to the ref instance using
  9751. * `addPlayer` or any players that are active through any template styling bindings
  9752. * (`[style]`, `[style.prop]`, `[class]` and `[class.name]`).
  9753. *
  9754. * @publicApi
  9755. */
  9756. export declare function ɵgetPlayers(ref: ComponentInstance | DirectiveInstance | HTMLElement): ɵPlayer[];
  9757. export declare type ɵGetterFn = (obj: any) => any;
  9758. export declare const ɵglobal: any;
  9759. /**
  9760. * Set the configuration for `i18nLocalize`.
  9761. *
  9762. * @deprecated this method is temporary & should not be used as it will be removed soon
  9763. */
  9764. export declare function ɵi18nConfigureLocalize(options?: I18nLocalizeOptions): void;
  9765. export declare function ɵinitServicesIfNeeded(): void;
  9766. export declare function ɵINJECTOR_IMPL__POST_R3__(providers: StaticProvider[], parent: Injector | undefined, name: string): Injector;
  9767. export declare function ɵinlineInterpolate(valueCount: number, c0: string, a1: any, c1: string, a2?: any, c2?: string, a3?: any, c3?: string, a4?: any, c4?: string, a5?: any, c5?: string, a6?: any, c6?: string, a7?: any, c7?: string, a8?: any, c8?: string, a9?: any, c9?: string): string;
  9768. export declare function ɵinterpolate(valueCount: number, constAndInterp: string[]): string;
  9769. export declare function ɵisBoundToModule__POST_R3__<C>(cf: ComponentFactory<C>): boolean;
  9770. /**
  9771. * Reports whether a given strategy is currently the default for change detection.
  9772. * @param changeDetectionStrategy The strategy to check.
  9773. * @returns True if the given strategy is the current default, false otherwise.
  9774. * @see `ChangeDetectorStatus`
  9775. * @see `ChangeDetectorRef`
  9776. */
  9777. export declare function ɵisDefaultChangeDetectionStrategy(changeDetectionStrategy: ChangeDetectionStrategy): boolean;
  9778. export declare function ɵisListLikeIterable(obj: any): boolean;
  9779. /**
  9780. * Determine if the argument is an Observable
  9781. */
  9782. export declare function ɵisObservable(obj: any | Observable<any>): obj is Observable<any>;
  9783. /**
  9784. * Determine if the argument is shaped like a Promise
  9785. */
  9786. export declare function ɵisPromise(obj: any): obj is Promise<any>;
  9787. export declare const ɵivyEnabled = false;
  9788. /**
  9789. * The internal view context which is specific to a given DOM element, directive or
  9790. * component instance. Each value in here (besides the LView and element node details)
  9791. * can be present, null or undefined. If undefined then it implies the value has not been
  9792. * looked up yet, otherwise, if null, then a lookup was executed and nothing was found.
  9793. *
  9794. * Each value will get filled when the respective value is examined within the getContext
  9795. * function. The component, element and each directive instance will share the same instance
  9796. * of the context.
  9797. */
  9798. export declare interface ɵLContext {
  9799. /**
  9800. * The component's parent view data.
  9801. */
  9802. lView: ɵangular_packages_core_core_bm;
  9803. /**
  9804. * The index instance of the node.
  9805. */
  9806. nodeIndex: number;
  9807. /**
  9808. * The instance of the DOM node that is attached to the lNode.
  9809. */
  9810. native: RNode;
  9811. /**
  9812. * The instance of the Component node.
  9813. */
  9814. component: {} | null | undefined;
  9815. /**
  9816. * The list of active directives that exist on this element.
  9817. */
  9818. directives: any[] | null | undefined;
  9819. /**
  9820. * The map of local references (local reference name => element or directive instance) that exist
  9821. * on this element.
  9822. */
  9823. localRefs: {
  9824. [key: string]: any;
  9825. } | null | undefined;
  9826. }
  9827. /**
  9828. * Used to enable lifecycle hooks on the root component.
  9829. *
  9830. * Include this feature when calling `renderComponent` if the root component
  9831. * you are rendering has lifecycle hooks defined. Otherwise, the hooks won't
  9832. * be called properly.
  9833. *
  9834. * Example:
  9835. *
  9836. * ```
  9837. * renderComponent(AppComponent, {features: [RootLifecycleHooks]});
  9838. * ```
  9839. */
  9840. export declare function ɵLifecycleHooksFeature(component: any, def: ɵComponentDef<any>): void;
  9841. /**
  9842. * This const is used to store the locale data registered with `registerLocaleData`
  9843. */
  9844. export declare const ɵLOCALE_DATA: {
  9845. [localeId: string]: any;
  9846. };
  9847. /**
  9848. * Index of each type of locale data from the locale data array
  9849. */
  9850. export declare enum ɵLocaleDataIndex {
  9851. LocaleId = 0,
  9852. DayPeriodsFormat = 1,
  9853. DayPeriodsStandalone = 2,
  9854. DaysFormat = 3,
  9855. DaysStandalone = 4,
  9856. MonthsFormat = 5,
  9857. MonthsStandalone = 6,
  9858. Eras = 7,
  9859. FirstDayOfWeek = 8,
  9860. WeekendRange = 9,
  9861. DateFormat = 10,
  9862. TimeFormat = 11,
  9863. DateTimeFormat = 12,
  9864. NumberSymbols = 13,
  9865. NumberFormats = 14,
  9866. CurrencySymbol = 15,
  9867. CurrencyName = 16,
  9868. Currencies = 17,
  9869. PluralCase = 18,
  9870. ExtraData = 19
  9871. }
  9872. export declare function ɵlooseIdentical(a: any, b: any): boolean;
  9873. /**
  9874. * @suppress {globalThis}
  9875. */
  9876. export declare function ɵmakeDecorator<T>(name: string, props?: (...args: any[]) => any, parentClass?: any, additionalProcessing?: (type: Type<T>) => void, typeFn?: (type: Type<T>, ...args: any[]) => void): {
  9877. new (...args: any[]): any;
  9878. (...args: any[]): any;
  9879. (...args: any[]): (cls: any) => any;
  9880. };
  9881. /**
  9882. * Mark the component as dirty (needing change detection).
  9883. *
  9884. * Marking a component dirty will schedule a change detection on this
  9885. * component at some point in the future. Marking an already dirty
  9886. * component as dirty is a noop. Only one outstanding change detection
  9887. * can be scheduled per component tree. (Two components bootstrapped with
  9888. * separate `renderComponent` will have separate schedulers)
  9889. *
  9890. * When the root component is bootstrapped with `renderComponent`, a scheduler
  9891. * can be provided.
  9892. *
  9893. * @param component Component to mark as dirty.
  9894. *
  9895. * @publicApi
  9896. */
  9897. export declare function ɵmarkDirty<T>(component: T): void;
  9898. export declare type ɵMethodFn = (obj: any, args: any[]) => any;
  9899. export declare function ɵmod(providers: NgModuleProviderDef[]): NgModuleDefinition;
  9900. export declare function ɵmpd(flags: ɵNodeFlags, token: any, value: any, deps: ([ɵDepFlags, any] | any)[]): NgModuleProviderDef;
  9901. export declare function ɵncd(ngContentIndex: null | number, index: number): NodeDef;
  9902. export declare const ɵNG_BASE_DEF: string;
  9903. export declare const ɵNG_COMPONENT_DEF: string;
  9904. export declare const ɵNG_DIRECTIVE_DEF: string;
  9905. /**
  9906. * If a directive is diPublic, bloomAdd sets a property on the type with this constant as
  9907. * the key and the directive's unique ID as the value. This allows us to map directives to their
  9908. * bloom filter bit for DI.
  9909. */
  9910. export declare const ɵNG_ELEMENT_ID: string;
  9911. export declare const ɵNG_INJECTABLE_DEF: string;
  9912. export declare const ɵNG_INJECTOR_DEF: string;
  9913. export declare const ɵNG_MODULE_DEF: string;
  9914. export declare const ɵNG_PIPE_DEF: string;
  9915. /**
  9916. * Runtime link information for NgModules.
  9917. *
  9918. * This is the internal data structure used by the runtime to assemble components, directives,
  9919. * pipes, and injectors.
  9920. *
  9921. * NOTE: Always use `ɵɵdefineNgModule` function to create this object,
  9922. * never create the object directly since the shape of this object
  9923. * can change between versions.
  9924. */
  9925. export declare interface ɵNgModuleDef<T> {
  9926. /** Token representing the module. Used by DI. */
  9927. type: T;
  9928. /** List of components to bootstrap. */
  9929. bootstrap: Type<any>[] | (() => Type<any>[]);
  9930. /** List of components, directives, and pipes declared by this module. */
  9931. declarations: Type<any>[] | (() => Type<any>[]);
  9932. /** List of modules or `ModuleWithProviders` imported by this module. */
  9933. imports: Type<any>[] | (() => Type<any>[]);
  9934. /**
  9935. * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this
  9936. * module.
  9937. */
  9938. exports: Type<any>[] | (() => Type<any>[]);
  9939. /**
  9940. * Cached value of computed `transitiveCompileScopes` for this module.
  9941. *
  9942. * This should never be read directly, but accessed via `transitiveScopesFor`.
  9943. */
  9944. transitiveCompileScopes: ɵNgModuleTransitiveScopes | null;
  9945. /** The set of schemas that declare elements to be allowed in the NgModule. */
  9946. schemas: SchemaMetadata[] | null;
  9947. /** Unique ID for the module with which it should be registered. */
  9948. id: string | null;
  9949. }
  9950. export declare class ɵNgModuleFactory<T> extends NgModuleFactory<T> {
  9951. moduleType: Type<T>;
  9952. constructor(moduleType: Type<T>);
  9953. create(parentInjector: Injector | null): NgModuleRef<T>;
  9954. }
  9955. /**
  9956. * Represents the expansion of an `NgModule` into its scopes.
  9957. *
  9958. * A scope is a set of directives and pipes that are visible in a particular context. Each
  9959. * `NgModule` has two scopes. The `compilation` scope is the set of directives and pipes that will
  9960. * be recognized in the templates of components declared by the module. The `exported` scope is the
  9961. * set of directives and pipes exported by a module (that is, module B's exported scope gets added
  9962. * to module A's compilation scope when module A imports B).
  9963. */
  9964. export declare interface ɵNgModuleTransitiveScopes {
  9965. compilation: {
  9966. directives: Set<any>;
  9967. pipes: Set<any>;
  9968. };
  9969. exported: {
  9970. directives: Set<any>;
  9971. pipes: Set<any>;
  9972. };
  9973. schemas: SchemaMetadata[] | null;
  9974. }
  9975. export declare interface ɵNgModuleType<T = any> extends Type<T> {
  9976. ngModuleDef: ɵNgModuleDef<T>;
  9977. }
  9978. export declare interface ɵNO_CHANGE {
  9979. brand: 'NO_CHANGE';
  9980. }
  9981. /** A special value which designates that a value has not changed. */
  9982. export declare const ɵNO_CHANGE: ɵNO_CHANGE;
  9983. /**
  9984. * Bitmask for NodeDef.flags.
  9985. * Naming convention:
  9986. * - `Type...`: flags that are mutually exclusive
  9987. * - `Cat...`: union of multiple `Type...` (short for category).
  9988. */
  9989. export declare const enum ɵNodeFlags {
  9990. None = 0,
  9991. TypeElement = 1,
  9992. TypeText = 2,
  9993. ProjectedTemplate = 4,
  9994. CatRenderNode = 3,
  9995. TypeNgContent = 8,
  9996. TypePipe = 16,
  9997. TypePureArray = 32,
  9998. TypePureObject = 64,
  9999. TypePurePipe = 128,
  10000. CatPureExpression = 224,
  10001. TypeValueProvider = 256,
  10002. TypeClassProvider = 512,
  10003. TypeFactoryProvider = 1024,
  10004. TypeUseExistingProvider = 2048,
  10005. LazyProvider = 4096,
  10006. PrivateProvider = 8192,
  10007. TypeDirective = 16384,
  10008. Component = 32768,
  10009. CatProviderNoDirective = 3840,
  10010. CatProvider = 20224,
  10011. OnInit = 65536,
  10012. OnDestroy = 131072,
  10013. DoCheck = 262144,
  10014. OnChanges = 524288,
  10015. AfterContentInit = 1048576,
  10016. AfterContentChecked = 2097152,
  10017. AfterViewInit = 4194304,
  10018. AfterViewChecked = 8388608,
  10019. EmbeddedViews = 16777216,
  10020. ComponentView = 33554432,
  10021. TypeContentQuery = 67108864,
  10022. TypeViewQuery = 134217728,
  10023. StaticQuery = 268435456,
  10024. DynamicQuery = 536870912,
  10025. TypeNgModule = 1073741824,
  10026. CatQuery = 201326592,
  10027. Types = 201347067
  10028. }
  10029. /**
  10030. * Provides a noop implementation of `NgZone` which does nothing. This zone requires explicit calls
  10031. * to framework to perform rendering.
  10032. */
  10033. export declare class ɵNoopNgZone implements NgZone {
  10034. readonly hasPendingMicrotasks: boolean;
  10035. readonly hasPendingMacrotasks: boolean;
  10036. readonly isStable: boolean;
  10037. readonly onUnstable: EventEmitter<any>;
  10038. readonly onMicrotaskEmpty: EventEmitter<any>;
  10039. readonly onStable: EventEmitter<any>;
  10040. readonly onError: EventEmitter<any>;
  10041. run(fn: () => any): any;
  10042. runGuarded(fn: () => any): any;
  10043. runOutsideAngular(fn: () => any): any;
  10044. runTask<T>(fn: () => any): any;
  10045. }
  10046. export declare const ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR: {};
  10047. export declare function ɵnov(view: ViewData, index: number): any;
  10048. export declare function ɵoverrideComponentView(comp: Type<any>, componentFactory: ComponentFactory<any>): void;
  10049. export declare function ɵoverrideProvider(override: ProviderOverride): void;
  10050. export declare function ɵpad(checkIndex: number, argCount: number): NodeDef;
  10051. /**
  10052. * Patch the definition of a component with directives and pipes from the compilation scope of
  10053. * a given module.
  10054. */
  10055. export declare function ɵpatchComponentDefWithScope<C>(componentDef: ɵComponentDef<C>, transitiveScopes: ɵNgModuleTransitiveScopes): void;
  10056. export declare function ɵpid(flags: ɵNodeFlags, ctor: any, deps: ([ɵDepFlags, any] | any)[]): NodeDef;
  10057. /**
  10058. * Runtime link information for Pipes.
  10059. *
  10060. * This is internal data structure used by the renderer to link
  10061. * pipes into templates.
  10062. *
  10063. * NOTE: Always use `definePipe` function to create this object,
  10064. * never create the object directly since the shape of this object
  10065. * can change between versions.
  10066. *
  10067. * See: {@link definePipe}
  10068. */
  10069. export declare interface ɵPipeDef<T> {
  10070. /**
  10071. * Pipe name.
  10072. *
  10073. * Used to resolve pipe in templates.
  10074. */
  10075. readonly name: string;
  10076. /**
  10077. * Factory function used to create a new pipe instance.
  10078. */
  10079. factory: FactoryFn<T>;
  10080. /**
  10081. * Whether or not the pipe is pure.
  10082. *
  10083. * Pure pipes result only depends on the pipe input and not on internal
  10084. * state of the pipe.
  10085. */
  10086. readonly pure: boolean;
  10087. onDestroy: (() => void) | null;
  10088. }
  10089. /**
  10090. * A shared interface which contains an animation player
  10091. */
  10092. export declare interface ɵPlayer {
  10093. parent?: ɵPlayer | null;
  10094. state: ɵPlayState;
  10095. play(): void;
  10096. pause(): void;
  10097. finish(): void;
  10098. destroy(): void;
  10099. addEventListener(state: ɵPlayState | string, cb: (data?: any) => any): void;
  10100. }
  10101. /**
  10102. * Used as a reference to build a player from a styling template binding
  10103. * (`[style]` and `[class]`).
  10104. *
  10105. * The `fn` function will be called once any styling-related changes are
  10106. * evaluated on an element and is expected to return a player that will
  10107. * be then run on the element.
  10108. *
  10109. * `[style]`, `[style.prop]`, `[class]` and `[class.name]` template bindings
  10110. * all accept a `PlayerFactory` as input and this player factories.
  10111. */
  10112. export declare interface ɵPlayerFactory {
  10113. '__brand__': 'Brand for PlayerFactory that nothing will match';
  10114. }
  10115. /**
  10116. * Designed to be used as an injection service to capture all animation players.
  10117. *
  10118. * When present all animation players will be passed into the flush method below.
  10119. * This feature is designed to service application-wide animation testing, live
  10120. * debugging as well as custom animation choreographing tools.
  10121. */
  10122. export declare interface ɵPlayerHandler {
  10123. /**
  10124. * Designed to kick off the player at the end of change detection
  10125. */
  10126. flushPlayers(): void;
  10127. /**
  10128. * @param player The player that has been scheduled to run within the application.
  10129. * @param context The context as to where the player was bound to
  10130. */
  10131. queuePlayer(player: ɵPlayer, context: ComponentInstance | DirectiveInstance | HTMLElement): void;
  10132. }
  10133. /**
  10134. * The state of a given player
  10135. *
  10136. * Do not change the increasing nature of the numbers since the player
  10137. * code may compare state by checking if a number is higher or lower than
  10138. * a certain numeric value.
  10139. */
  10140. export declare const enum ɵPlayState {
  10141. Pending = 0,
  10142. Running = 1,
  10143. Paused = 2,
  10144. Finished = 100,
  10145. Destroyed = 200
  10146. }
  10147. export declare function ɵpod(checkIndex: number, propToIndex: {
  10148. [p: string]: number;
  10149. }): NodeDef;
  10150. export declare function ɵppd(checkIndex: number, argCount: number): NodeDef;
  10151. export declare function ɵprd(flags: ɵNodeFlags, matchedQueries: null | [string | number, ɵQueryValueType][], token: any, value: any, deps: ([ɵDepFlags, any] | any)[]): NodeDef;
  10152. /**
  10153. * Publishes a collection of default debug tools onto`window.ng`.
  10154. *
  10155. * These functions are available globally when Angular is in development
  10156. * mode and are automatically stripped away from prod mode is on.
  10157. */
  10158. export declare function ɵpublishDefaultGlobalUtils(): void;
  10159. /**
  10160. * Publishes the given function to `window.ng` so that it can be
  10161. * used from the browser console when an application is not in production.
  10162. */
  10163. export declare function ɵpublishGlobalUtil(name: string, fn: Function): void;
  10164. export declare function ɵqud(flags: ɵNodeFlags, id: number, bindings: {
  10165. [propName: string]: ɵQueryBindingType;
  10166. }): NodeDef;
  10167. export declare const enum ɵQueryBindingType {
  10168. First = 0,
  10169. All = 1
  10170. }
  10171. export declare const enum ɵQueryValueType {
  10172. ElementRef = 0,
  10173. RenderElement = 1,
  10174. TemplateRef = 2,
  10175. ViewContainerRef = 3,
  10176. Provider = 4
  10177. }
  10178. export declare class ɵReflectionCapabilities implements PlatformReflectionCapabilities {
  10179. private _reflect;
  10180. constructor(reflect?: any);
  10181. isReflectionEnabled(): boolean;
  10182. factory<T>(t: Type<T>): (args: any[]) => T;
  10183. private _ownParameters;
  10184. parameters(type: Type<any>): any[][];
  10185. private _ownAnnotations;
  10186. annotations(typeOrFunc: Type<any>): any[];
  10187. private _ownPropMetadata;
  10188. propMetadata(typeOrFunc: any): {
  10189. [key: string]: any[];
  10190. };
  10191. ownPropMetadata(typeOrFunc: any): {
  10192. [key: string]: any[];
  10193. };
  10194. hasLifecycleHook(type: any, lcProperty: string): boolean;
  10195. guards(type: any): {
  10196. [key: string]: any;
  10197. };
  10198. getter(name: string): ɵGetterFn;
  10199. setter(name: string): ɵSetterFn;
  10200. method(name: string): ɵMethodFn;
  10201. importUri(type: any): string;
  10202. resourceUri(type: any): string;
  10203. resolveIdentifier(name: string, moduleUrl: string, members: string[], runtime: any): any;
  10204. resolveEnum(enumIdentifier: any, name: string): any;
  10205. }
  10206. /**
  10207. * Registers a loaded module. Should only be called from generated NgModuleFactory code.
  10208. * @publicApi
  10209. */
  10210. export declare function ɵregisterModuleFactory(id: string, factory: NgModuleFactory<any>): void;
  10211. export declare function ɵregisterNgModuleType(ngModuleType: ɵNgModuleType): void;
  10212. /**
  10213. * Render3 implementation of {@link viewEngine_ComponentFactory}.
  10214. */
  10215. export declare class ɵRender3ComponentFactory<T> extends ComponentFactory<T> {
  10216. private componentDef;
  10217. private ngModule?;
  10218. selector: string;
  10219. componentType: Type<any>;
  10220. ngContentSelectors: string[];
  10221. isBoundToModule: boolean;
  10222. readonly inputs: {
  10223. propName: string;
  10224. templateName: string;
  10225. }[];
  10226. readonly outputs: {
  10227. propName: string;
  10228. templateName: string;
  10229. }[];
  10230. /**
  10231. * @param componentDef The component definition.
  10232. * @param ngModule The NgModuleRef to which the factory is bound.
  10233. */
  10234. constructor(componentDef: ɵComponentDef<any>, ngModule?: NgModuleRef<any> | undefined);
  10235. create(injector: Injector, projectableNodes?: any[][] | undefined, rootSelectorOrNode?: any, ngModule?: NgModuleRef<any> | undefined): ComponentRef<T>;
  10236. }
  10237. /**
  10238. * Represents an instance of a Component created via a {@link ComponentFactory}.
  10239. *
  10240. * `ComponentRef` provides access to the Component Instance as well other objects related to this
  10241. * Component Instance and allows you to destroy the Component Instance via the {@link #destroy}
  10242. * method.
  10243. *
  10244. */
  10245. export declare class ɵRender3ComponentRef<T> extends ComponentRef<T> {
  10246. location: ElementRef;
  10247. private _rootLView;
  10248. private _tNode;
  10249. destroyCbs: (() => void)[] | null;
  10250. instance: T;
  10251. hostView: ViewRef_2<T>;
  10252. changeDetectorRef: ChangeDetectorRef;
  10253. componentType: Type<T>;
  10254. constructor(componentType: Type<T>, instance: T, location: ElementRef, _rootLView: ɵangular_packages_core_core_bm, _tNode: ɵangular_packages_core_core_bg | TContainerNode | TElementContainerNode);
  10255. readonly injector: Injector;
  10256. destroy(): void;
  10257. onDestroy(callback: () => void): void;
  10258. }
  10259. export declare class ɵRender3NgModuleRef<T> extends NgModuleRef<T> implements InternalNgModuleRef<T> {
  10260. _parent: Injector | null;
  10261. _bootstrapComponents: Type<any>[];
  10262. _r3Injector: R3Injector;
  10263. injector: Injector;
  10264. instance: T;
  10265. destroyCbs: (() => void)[] | null;
  10266. constructor(ngModuleType: Type<T>, _parent: Injector | null);
  10267. get(token: any, notFoundValue?: any, injectFlags?: InjectFlags): any;
  10268. readonly componentFactoryResolver: ComponentFactoryResolver;
  10269. destroy(): void;
  10270. onDestroy(callback: () => void): void;
  10271. }
  10272. /**
  10273. * Bootstraps a Component into an existing host element and returns an instance
  10274. * of the component.
  10275. *
  10276. * Use this function to bootstrap a component into the DOM tree. Each invocation
  10277. * of this function will create a separate tree of components, injectors and
  10278. * change detection cycles and lifetimes. To dynamically insert a new component
  10279. * into an existing tree such that it shares the same injection, change detection
  10280. * and object lifetime, use {@link ViewContainer#createComponent}.
  10281. *
  10282. * @param componentType Component to bootstrap
  10283. * @param options Optional parameters which control bootstrapping
  10284. */
  10285. export declare function ɵrenderComponent<T>(componentType: ɵComponentType<T> | Type<T>, opts?: CreateComponentOptions): T;
  10286. /**
  10287. * @deprecated Debug info is handled internally in the view engine now.
  10288. */
  10289. export declare abstract class ɵRenderDebugInfo {
  10290. abstract readonly injector: Injector;
  10291. abstract readonly component: any;
  10292. abstract readonly providerTokens: any[];
  10293. abstract readonly references: {
  10294. [key: string]: any;
  10295. };
  10296. abstract readonly context: any;
  10297. abstract readonly source: string;
  10298. }
  10299. /**
  10300. * Flags passed into template functions to determine which blocks (i.e. creation, update)
  10301. * should be executed.
  10302. *
  10303. * Typically, a template runs both the creation block and the update block on initialization and
  10304. * subsequent runs only execute the update block. However, dynamically created views require that
  10305. * the creation block be executed separately from the update block (for backwards compat).
  10306. */
  10307. export declare const enum ɵRenderFlags {
  10308. Create = 1,
  10309. Update = 2
  10310. }
  10311. export declare function ɵresetCompiledComponents(): void;
  10312. /**
  10313. * Used to resolve resource URLs on `@Component` when used with JIT compilation.
  10314. *
  10315. * Example:
  10316. * ```
  10317. * @Component({
  10318. * selector: 'my-comp',
  10319. * templateUrl: 'my-comp.html', // This requires asynchronous resolution
  10320. * })
  10321. * class MyComponent{
  10322. * }
  10323. *
  10324. * // Calling `renderComponent` will fail because `renderComponent` is a synchronous process
  10325. * // and `MyComponent`'s `@Component.templateUrl` needs to be resolved asynchronously.
  10326. *
  10327. * // Calling `resolveComponentResources()` will resolve `@Component.templateUrl` into
  10328. * // `@Component.template`, which allows `renderComponent` to proceed in a synchronous manner.
  10329. *
  10330. * // Use browser's `fetch()` function as the default resource resolution strategy.
  10331. * resolveComponentResources(fetch).then(() => {
  10332. * // After resolution all URLs have been converted into `template` strings.
  10333. * renderComponent(MyComponent);
  10334. * });
  10335. *
  10336. * ```
  10337. *
  10338. * NOTE: In AOT the resolution happens during compilation, and so there should be no need
  10339. * to call this method outside JIT mode.
  10340. *
  10341. * @param resourceResolver a function which is responsible for returning a `Promise` to the
  10342. * contents of the resolved URL. Browser's `fetch()` method is a good default implementation.
  10343. */
  10344. export declare function ɵresolveComponentResources(resourceResolver: (url: string) => (Promise<string | {
  10345. text(): Promise<string>;
  10346. }>)): Promise<void>;
  10347. /**
  10348. * Adds decorator, constructor, and property metadata to a given type via static metadata fields
  10349. * on the type.
  10350. *
  10351. * These metadata fields can later be read with Angular's `ReflectionCapabilities` API.
  10352. *
  10353. * Calls to `setClassMetadata` can be marked as pure, resulting in the metadata assignments being
  10354. * tree-shaken away during production builds.
  10355. */
  10356. export declare function ɵsetClassMetadata(type: Type<any>, decorators: any[] | null, ctorParameters: (() => any[]) | null, propDecorators: {
  10357. [field: string]: any;
  10358. } | null): void;
  10359. export declare function ɵsetCurrentInjector(injector: Injector | null | undefined): Injector | undefined | null;
  10360. /**
  10361. * Sets the locale id that will be used for translations and ICU expressions.
  10362. * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine
  10363. * but is now defined as a global value.
  10364. *
  10365. * @param localeId
  10366. */
  10367. export declare function ɵsetLocaleId(localeId: string): void;
  10368. export declare type ɵSetterFn = (obj: any, value: any) => void;
  10369. /** Store a value in the `data` at a given `index`. */
  10370. export declare function ɵstore<T>(index: number, value: T): void;
  10371. export declare function ɵstringify(token: any): string;
  10372. export declare const ɵSWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__: typeof injectChangeDetectorRef;
  10373. export declare const ɵSWITCH_COMPILE_COMPONENT__POST_R3__: typeof ɵcompileComponent;
  10374. export declare const ɵSWITCH_COMPILE_DIRECTIVE__POST_R3__: typeof ɵcompileDirective;
  10375. export declare const ɵSWITCH_COMPILE_INJECTABLE__POST_R3__: typeof compileInjectable;
  10376. export declare const ɵSWITCH_COMPILE_NGMODULE__POST_R3__: typeof ɵcompileNgModule;
  10377. export declare const ɵSWITCH_COMPILE_PIPE__POST_R3__: typeof ɵcompilePipe;
  10378. export declare const ɵSWITCH_ELEMENT_REF_FACTORY__POST_R3__: typeof injectElementRef;
  10379. export declare const ɵSWITCH_IVY_ENABLED__POST_R3__ = true;
  10380. export declare const ɵSWITCH_RENDERER2_FACTORY__POST_R3__: typeof injectRenderer2;
  10381. export declare const ɵSWITCH_TEMPLATE_REF_FACTORY__POST_R3__: typeof injectTemplateRef;
  10382. export declare const ɵSWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__: typeof injectViewContainerRef;
  10383. export declare function ɵted(checkIndex: number, ngContentIndex: number | null, staticText: string[]): NodeDef;
  10384. /**
  10385. * Compute the pair of transitive scopes (compilation scope and exported scope) for a given module.
  10386. *
  10387. * This operation is memoized and the result is cached on the module's definition. It can be called
  10388. * on modules with components that have not fully compiled yet, but the result should not be used
  10389. * until they have.
  10390. */
  10391. export declare function ɵtransitiveScopesFor<T>(moduleType: Type<T>, processNgModuleFn?: (ngModule: ɵNgModuleType) => void): ɵNgModuleTransitiveScopes;
  10392. export declare function ɵunv(view: ViewData, nodeIdx: number, bindingIdx: number, value: any): any;
  10393. export declare function ɵvid(flags: ɵViewFlags, nodes: NodeDef[], updateDirectives?: null | ViewUpdateFn, updateRenderer?: null | ViewUpdateFn): ɵViewDefinition;
  10394. export declare interface ɵViewDefinition extends Definition<ViewDefinitionFactory> {
  10395. flags: ɵViewFlags;
  10396. updateDirectives: ViewUpdateFn;
  10397. updateRenderer: ViewUpdateFn;
  10398. handleEvent: ViewHandleEventFn;
  10399. /**
  10400. * Order: Depth first.
  10401. * Especially providers are before elements / anchors.
  10402. */
  10403. nodes: NodeDef[];
  10404. /** aggregated NodeFlags for all nodes **/
  10405. nodeFlags: ɵNodeFlags;
  10406. rootNodeFlags: ɵNodeFlags;
  10407. lastRenderRootNode: NodeDef | null;
  10408. bindingCount: number;
  10409. outputCount: number;
  10410. /**
  10411. * Binary or of all query ids that are matched by one of the nodes.
  10412. * This includes query ids from templates as well.
  10413. * Used as a bloom filter.
  10414. */
  10415. nodeMatchedQueries: number;
  10416. }
  10417. /**
  10418. * Bitmask for ViewDefinition.flags.
  10419. */
  10420. export declare const enum ɵViewFlags {
  10421. None = 0,
  10422. OnPush = 2
  10423. }
  10424. /**
  10425. * Wait on component until it is rendered.
  10426. *
  10427. * This function returns a `Promise` which is resolved when the component's
  10428. * change detection is executed. This is determined by finding the scheduler
  10429. * associated with the `component`'s render tree and waiting until the scheduler
  10430. * flushes. If nothing is scheduled, the function returns a resolved promise.
  10431. *
  10432. * Example:
  10433. * ```
  10434. * await whenRendered(myComponent);
  10435. * ```
  10436. *
  10437. * @param component Component to wait upon
  10438. * @returns Promise which resolves when the component is rendered.
  10439. */
  10440. export declare function ɵwhenRendered(component: any): Promise<null>;
  10441. /**
  10442. * Allocates the necessary amount of slots for host vars.
  10443. *
  10444. * @param count Amount of vars to be allocated
  10445. *
  10446. * @codeGenApi
  10447. */
  10448. export declare function ɵɵallocHostVars(count: number): void;
  10449. /**
  10450. * Updates the value of or removes a bound attribute on an Element.
  10451. *
  10452. * Used in the case of `[attr.title]="value"`
  10453. *
  10454. * @param name name The name of the attribute.
  10455. * @param value value The attribute is removed when value is `null` or `undefined`.
  10456. * Otherwise the attribute value is set to the stringified value.
  10457. * @param sanitizer An optional function used to sanitize the value.
  10458. * @param namespace Optional namespace to use when setting the attribute.
  10459. *
  10460. * @codeGenApi
  10461. */
  10462. export declare function ɵɵattribute(name: string, value: any, sanitizer?: SanitizerFn | null, namespace?: string): TsickleIssue1009;
  10463. /**
  10464. *
  10465. * Update an interpolated attribute on an element with single bound value surrounded by text.
  10466. *
  10467. * Used when the value passed to a property has 1 interpolated value in it:
  10468. *
  10469. * ```html
  10470. * <div attr.title="prefix{{v0}}suffix"></div>
  10471. * ```
  10472. *
  10473. * Its compiled representation is::
  10474. *
  10475. * ```ts
  10476. * ɵɵattributeInterpolate1('title', 'prefix', v0, 'suffix');
  10477. * ```
  10478. *
  10479. * @param attrName The name of the attribute to update
  10480. * @param prefix Static value used for concatenation only.
  10481. * @param v0 Value checked for change.
  10482. * @param suffix Static value used for concatenation only.
  10483. * @param sanitizer An optional sanitizer function
  10484. * @returns itself, so that it may be chained.
  10485. * @codeGenApi
  10486. */
  10487. export declare function ɵɵattributeInterpolate1(attrName: string, prefix: string, v0: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): TsickleIssue1009;
  10488. /**
  10489. *
  10490. * Update an interpolated attribute on an element with 2 bound values surrounded by text.
  10491. *
  10492. * Used when the value passed to a property has 2 interpolated values in it:
  10493. *
  10494. * ```html
  10495. * <div attr.title="prefix{{v0}}-{{v1}}suffix"></div>
  10496. * ```
  10497. *
  10498. * Its compiled representation is::
  10499. *
  10500. * ```ts
  10501. * ɵɵattributeInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');
  10502. * ```
  10503. *
  10504. * @param attrName The name of the attribute to update
  10505. * @param prefix Static value used for concatenation only.
  10506. * @param v0 Value checked for change.
  10507. * @param i0 Static value used for concatenation only.
  10508. * @param v1 Value checked for change.
  10509. * @param suffix Static value used for concatenation only.
  10510. * @param sanitizer An optional sanitizer function
  10511. * @returns itself, so that it may be chained.
  10512. * @codeGenApi
  10513. */
  10514. export declare function ɵɵattributeInterpolate2(attrName: string, prefix: string, v0: any, i0: string, v1: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): TsickleIssue1009;
  10515. /**
  10516. *
  10517. * Update an interpolated attribute on an element with 3 bound values surrounded by text.
  10518. *
  10519. * Used when the value passed to a property has 3 interpolated values in it:
  10520. *
  10521. * ```html
  10522. * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>
  10523. * ```
  10524. *
  10525. * Its compiled representation is::
  10526. *
  10527. * ```ts
  10528. * ɵɵattributeInterpolate3(
  10529. * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');
  10530. * ```
  10531. *
  10532. * @param attrName The name of the attribute to update
  10533. * @param prefix Static value used for concatenation only.
  10534. * @param v0 Value checked for change.
  10535. * @param i0 Static value used for concatenation only.
  10536. * @param v1 Value checked for change.
  10537. * @param i1 Static value used for concatenation only.
  10538. * @param v2 Value checked for change.
  10539. * @param suffix Static value used for concatenation only.
  10540. * @param sanitizer An optional sanitizer function
  10541. * @returns itself, so that it may be chained.
  10542. * @codeGenApi
  10543. */
  10544. export declare function ɵɵattributeInterpolate3(attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): TsickleIssue1009;
  10545. /**
  10546. *
  10547. * Update an interpolated attribute on an element with 4 bound values surrounded by text.
  10548. *
  10549. * Used when the value passed to a property has 4 interpolated values in it:
  10550. *
  10551. * ```html
  10552. * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>
  10553. * ```
  10554. *
  10555. * Its compiled representation is::
  10556. *
  10557. * ```ts
  10558. * ɵɵattributeInterpolate4(
  10559. * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
  10560. * ```
  10561. *
  10562. * @param attrName The name of the attribute to update
  10563. * @param prefix Static value used for concatenation only.
  10564. * @param v0 Value checked for change.
  10565. * @param i0 Static value used for concatenation only.
  10566. * @param v1 Value checked for change.
  10567. * @param i1 Static value used for concatenation only.
  10568. * @param v2 Value checked for change.
  10569. * @param i2 Static value used for concatenation only.
  10570. * @param v3 Value checked for change.
  10571. * @param suffix Static value used for concatenation only.
  10572. * @param sanitizer An optional sanitizer function
  10573. * @returns itself, so that it may be chained.
  10574. * @codeGenApi
  10575. */
  10576. 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): TsickleIssue1009;
  10577. /**
  10578. *
  10579. * Update an interpolated attribute on an element with 5 bound values surrounded by text.
  10580. *
  10581. * Used when the value passed to a property has 5 interpolated values in it:
  10582. *
  10583. * ```html
  10584. * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>
  10585. * ```
  10586. *
  10587. * Its compiled representation is::
  10588. *
  10589. * ```ts
  10590. * ɵɵattributeInterpolate5(
  10591. * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
  10592. * ```
  10593. *
  10594. * @param attrName The name of the attribute to update
  10595. * @param prefix Static value used for concatenation only.
  10596. * @param v0 Value checked for change.
  10597. * @param i0 Static value used for concatenation only.
  10598. * @param v1 Value checked for change.
  10599. * @param i1 Static value used for concatenation only.
  10600. * @param v2 Value checked for change.
  10601. * @param i2 Static value used for concatenation only.
  10602. * @param v3 Value checked for change.
  10603. * @param i3 Static value used for concatenation only.
  10604. * @param v4 Value checked for change.
  10605. * @param suffix Static value used for concatenation only.
  10606. * @param sanitizer An optional sanitizer function
  10607. * @returns itself, so that it may be chained.
  10608. * @codeGenApi
  10609. */
  10610. 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): TsickleIssue1009;
  10611. /**
  10612. *
  10613. * Update an interpolated attribute on an element with 6 bound values surrounded by text.
  10614. *
  10615. * Used when the value passed to a property has 6 interpolated values in it:
  10616. *
  10617. * ```html
  10618. * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>
  10619. * ```
  10620. *
  10621. * Its compiled representation is::
  10622. *
  10623. * ```ts
  10624. * ɵɵattributeInterpolate6(
  10625. * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
  10626. * ```
  10627. *
  10628. * @param attrName The name of the attribute to update
  10629. * @param prefix Static value used for concatenation only.
  10630. * @param v0 Value checked for change.
  10631. * @param i0 Static value used for concatenation only.
  10632. * @param v1 Value checked for change.
  10633. * @param i1 Static value used for concatenation only.
  10634. * @param v2 Value checked for change.
  10635. * @param i2 Static value used for concatenation only.
  10636. * @param v3 Value checked for change.
  10637. * @param i3 Static value used for concatenation only.
  10638. * @param v4 Value checked for change.
  10639. * @param i4 Static value used for concatenation only.
  10640. * @param v5 Value checked for change.
  10641. * @param suffix Static value used for concatenation only.
  10642. * @param sanitizer An optional sanitizer function
  10643. * @returns itself, so that it may be chained.
  10644. * @codeGenApi
  10645. */
  10646. 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): TsickleIssue1009;
  10647. /**
  10648. *
  10649. * Update an interpolated attribute on an element with 7 bound values surrounded by text.
  10650. *
  10651. * Used when the value passed to a property has 7 interpolated values in it:
  10652. *
  10653. * ```html
  10654. * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>
  10655. * ```
  10656. *
  10657. * Its compiled representation is::
  10658. *
  10659. * ```ts
  10660. * ɵɵattributeInterpolate7(
  10661. * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
  10662. * ```
  10663. *
  10664. * @param attrName The name of the attribute to update
  10665. * @param prefix Static value used for concatenation only.
  10666. * @param v0 Value checked for change.
  10667. * @param i0 Static value used for concatenation only.
  10668. * @param v1 Value checked for change.
  10669. * @param i1 Static value used for concatenation only.
  10670. * @param v2 Value checked for change.
  10671. * @param i2 Static value used for concatenation only.
  10672. * @param v3 Value checked for change.
  10673. * @param i3 Static value used for concatenation only.
  10674. * @param v4 Value checked for change.
  10675. * @param i4 Static value used for concatenation only.
  10676. * @param v5 Value checked for change.
  10677. * @param i5 Static value used for concatenation only.
  10678. * @param v6 Value checked for change.
  10679. * @param suffix Static value used for concatenation only.
  10680. * @param sanitizer An optional sanitizer function
  10681. * @returns itself, so that it may be chained.
  10682. * @codeGenApi
  10683. */
  10684. 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): TsickleIssue1009;
  10685. /**
  10686. *
  10687. * Update an interpolated attribute on an element with 8 bound values surrounded by text.
  10688. *
  10689. * Used when the value passed to a property has 8 interpolated values in it:
  10690. *
  10691. * ```html
  10692. * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>
  10693. * ```
  10694. *
  10695. * Its compiled representation is::
  10696. *
  10697. * ```ts
  10698. * ɵɵattributeInterpolate8(
  10699. * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
  10700. * ```
  10701. *
  10702. * @param attrName The name of the attribute to update
  10703. * @param prefix Static value used for concatenation only.
  10704. * @param v0 Value checked for change.
  10705. * @param i0 Static value used for concatenation only.
  10706. * @param v1 Value checked for change.
  10707. * @param i1 Static value used for concatenation only.
  10708. * @param v2 Value checked for change.
  10709. * @param i2 Static value used for concatenation only.
  10710. * @param v3 Value checked for change.
  10711. * @param i3 Static value used for concatenation only.
  10712. * @param v4 Value checked for change.
  10713. * @param i4 Static value used for concatenation only.
  10714. * @param v5 Value checked for change.
  10715. * @param i5 Static value used for concatenation only.
  10716. * @param v6 Value checked for change.
  10717. * @param i6 Static value used for concatenation only.
  10718. * @param v7 Value checked for change.
  10719. * @param suffix Static value used for concatenation only.
  10720. * @param sanitizer An optional sanitizer function
  10721. * @returns itself, so that it may be chained.
  10722. * @codeGenApi
  10723. */
  10724. 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): TsickleIssue1009;
  10725. /**
  10726. * Update an interpolated attribute on an element with 8 or more bound values surrounded by text.
  10727. *
  10728. * Used when the number of interpolated values exceeds 7.
  10729. *
  10730. * ```html
  10731. * <div
  10732. * title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"></div>
  10733. * ```
  10734. *
  10735. * Its compiled representation is::
  10736. *
  10737. * ```ts
  10738. * ɵɵattributeInterpolateV(
  10739. * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
  10740. * 'suffix']);
  10741. * ```
  10742. *
  10743. * @param attrName The name of the attribute to update.
  10744. * @param values The a collection of values and the strings in-between those values, beginning with
  10745. * a string prefix and ending with a string suffix.
  10746. * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
  10747. * @param sanitizer An optional sanitizer function
  10748. * @returns itself, so that it may be chained.
  10749. * @codeGenApi
  10750. */
  10751. export declare function ɵɵattributeInterpolateV(attrName: string, values: any[], sanitizer?: SanitizerFn, namespace?: string): TsickleIssue1009;
  10752. /**
  10753. * Runtime information for classes that are inherited by components or directives
  10754. * that aren't defined as components or directives.
  10755. *
  10756. * This is an internal data structure used by the renderer to determine what inputs
  10757. * and outputs should be inherited.
  10758. *
  10759. * See: {@link defineBase}
  10760. *
  10761. * @codeGenApi
  10762. */
  10763. export declare interface ɵɵBaseDef<T> {
  10764. /**
  10765. * A dictionary mapping the inputs' minified property names to their public API names, which
  10766. * are their aliases if any, or their original unminified property names
  10767. * (as in `@Input('alias') propertyName: any;`).
  10768. */
  10769. readonly inputs: {
  10770. [P in keyof T]: string;
  10771. };
  10772. /**
  10773. * @deprecated This is only here because `NgOnChanges` incorrectly uses declared name instead of
  10774. * public or minified name.
  10775. */
  10776. readonly declaredInputs: {
  10777. [P in keyof T]: string;
  10778. };
  10779. /**
  10780. * A dictionary mapping the outputs' minified property names to their public API names, which
  10781. * are their aliases if any, or their original unminified property names
  10782. * (as in `@Output('alias') propertyName: any;`).
  10783. */
  10784. readonly outputs: {
  10785. [P in keyof T]: string;
  10786. };
  10787. /**
  10788. * Function to create and refresh content queries associated with a given directive.
  10789. */
  10790. contentQueries: ContentQueriesFunction<T> | null;
  10791. /**
  10792. * Query-related instructions for a directive. Note that while directives don't have a
  10793. * view and as such view queries won't necessarily do anything, there might be
  10794. * components that extend the directive.
  10795. */
  10796. viewQuery: ViewQueriesFunction<T> | null;
  10797. /**
  10798. * Refreshes host bindings on the associated directive.
  10799. */
  10800. hostBindings: HostBindingsFunction<T> | null;
  10801. }
  10802. /**
  10803. * Update class bindings using an object literal or class-string on an element.
  10804. *
  10805. * This instruction is meant to apply styling via the `[class]="exp"` template bindings.
  10806. * When classes are applied to the element they will then be updated with
  10807. * respect to any styles/classes set via `classProp`. If any
  10808. * classes are set to falsy then they will be removed from the element.
  10809. *
  10810. * Note that the styling instruction will not be applied until `stylingApply` is called.
  10811. * Note that this will the provided classMap value to the host element if this function is called
  10812. * within a host binding.
  10813. *
  10814. * @param classes A key/value map or string of CSS classes that will be added to the
  10815. * given element. Any missing classes (that have already been applied to the element
  10816. * beforehand) will be removed (unset) from the element's list of CSS classes.
  10817. *
  10818. * @codeGenApi
  10819. */
  10820. export declare function ɵɵclassMap(classes: {
  10821. [styleName: string]: any;
  10822. } | ɵNO_CHANGE | string | null): void;
  10823. /**
  10824. * Update a class binding on an element with the provided value.
  10825. *
  10826. * This instruction is meant to handle the `[class.foo]="exp"` case and,
  10827. * therefore, the class binding itself must already be allocated using
  10828. * `styling` within the creation block.
  10829. *
  10830. * @param classIndex Index of class to toggle. This index value refers to the
  10831. * index of the class in the class bindings array that was passed into
  10832. * `styling` (which is meant to be called before this
  10833. * function is).
  10834. * @param value A true/false value which will turn the class on or off.
  10835. * @param forceOverride Whether or not this value will be applied regardless
  10836. * of where it is being set within the styling priority structure.
  10837. *
  10838. * Note that this will apply the provided class value to the host element if this function
  10839. * is called within a host binding.
  10840. *
  10841. * @codeGenApi
  10842. */
  10843. export declare function ɵɵclassProp(classIndex: number, value: boolean | ɵPlayerFactory, forceOverride?: boolean): void;
  10844. /**
  10845. * @codeGenApi
  10846. */
  10847. export declare type ɵɵComponentDefWithMeta<T, Selector extends String, ExportAs extends string[], InputMap extends {
  10848. [key: string]: string;
  10849. }, OutputMap extends {
  10850. [key: string]: string;
  10851. }, QueryFields extends string[]> = ɵComponentDef<T>;
  10852. /**
  10853. * Registers a synthetic host listener (e.g. `(@foo.start)`) on a component.
  10854. *
  10855. * This instruction is for compatibility purposes and is designed to ensure that a
  10856. * synthetic host listener (e.g. `@HostListener('@foo.start')`) properly gets rendered
  10857. * in the component's renderer. Normally all host listeners are evaluated with the
  10858. * parent component's renderer, but, in the case of animation @triggers, they need
  10859. * to be evaluated with the sub component's renderer (because that's where the
  10860. * animation triggers are defined).
  10861. *
  10862. * Do not use this instruction as a replacement for `listener`. This instruction
  10863. * only exists to ensure compatibility with the ViewEngine's host binding behavior.
  10864. *
  10865. * @param eventName Name of the event
  10866. * @param listenerFn The function to be called when event emits
  10867. * @param useCapture Whether or not to use capture in event listener
  10868. * @param eventTargetResolver Function that returns global target information in case this listener
  10869. * should be attached to a global object like window, document or body
  10870. *
  10871. * @codeGenApi
  10872. */
  10873. export declare function ɵɵcomponentHostSyntheticListener<T>(eventName: string, listenerFn: (e?: any) => any, useCapture?: boolean, eventTargetResolver?: GlobalTargetResolver): void;
  10874. /**
  10875. * Creates an LContainer for inline views, e.g.
  10876. *
  10877. * % if (showing) {
  10878. * <div></div>
  10879. * % }
  10880. *
  10881. * @param index The index of the container in the data array
  10882. *
  10883. * @codeGenApi
  10884. */
  10885. export declare function ɵɵcontainer(index: number): void;
  10886. /**
  10887. * Marks the end of the LContainer.
  10888. *
  10889. * Marking the end of LContainer is the time when to child views get inserted or removed.
  10890. *
  10891. * @codeGenApi
  10892. */
  10893. export declare function ɵɵcontainerRefreshEnd(): void;
  10894. /**
  10895. * Sets a container up to receive views.
  10896. *
  10897. * @param index The index of the container in the data array
  10898. *
  10899. * @codeGenApi
  10900. */
  10901. export declare function ɵɵcontainerRefreshStart(index: number): void;
  10902. /**
  10903. * Registers a QueryList, associated with a content query, for later refresh (part of a view
  10904. * refresh).
  10905. *
  10906. * @param directiveIndex Current directive index
  10907. * @param predicate The type for which the query will search
  10908. * @param descend Whether or not to descend into children
  10909. * @param read What to save in the query
  10910. * @returns QueryList<T>
  10911. *
  10912. * @codeGenApi
  10913. */
  10914. export declare function ɵɵcontentQuery<T>(directiveIndex: number, predicate: Type<any> | string[], descend: boolean, read: any): QueryList<T>;
  10915. /**
  10916. * The default style sanitizer will handle sanitization for style properties by
  10917. * sanitizing any CSS property that can include a `url` value (usually image-based properties)
  10918. *
  10919. * @publicApi
  10920. */
  10921. export declare const ɵɵdefaultStyleSanitizer: StyleSanitizeFn;
  10922. /**
  10923. * Create a base definition
  10924. *
  10925. * # Example
  10926. * ```ts
  10927. * class ShouldBeInherited {
  10928. * static ngBaseDef = ɵɵdefineBase({
  10929. * ...
  10930. * })
  10931. * }
  10932. * ```
  10933. *
  10934. * @param baseDefinition The base definition parameters
  10935. *
  10936. * @codeGenApi
  10937. */
  10938. export declare function ɵɵdefineBase<T>(baseDefinition: {
  10939. /**
  10940. * A map of input names.
  10941. *
  10942. * The format is in: `{[actualPropertyName: string]:(string|[string, string])}`.
  10943. *
  10944. * Given:
  10945. * ```
  10946. * class MyComponent {
  10947. * @Input()
  10948. * publicInput1: string;
  10949. *
  10950. * @Input('publicInput2')
  10951. * declaredInput2: string;
  10952. * }
  10953. * ```
  10954. *
  10955. * is described as:
  10956. * ```
  10957. * {
  10958. * publicInput1: 'publicInput1',
  10959. * declaredInput2: ['declaredInput2', 'publicInput2'],
  10960. * }
  10961. * ```
  10962. *
  10963. * Which the minifier may translate to:
  10964. * ```
  10965. * {
  10966. * minifiedPublicInput1: 'publicInput1',
  10967. * minifiedDeclaredInput2: [ 'declaredInput2', 'publicInput2'],
  10968. * }
  10969. * ```
  10970. *
  10971. * This allows the render to re-construct the minified, public, and declared names
  10972. * of properties.
  10973. *
  10974. * NOTE:
  10975. * - Because declared and public name are usually same we only generate the array
  10976. * `['declared', 'public']` format when they differ.
  10977. * - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has
  10978. * inconsistent behavior in that it uses declared names rather than minified or public. For
  10979. * this reason `NgOnChanges` will be deprecated and removed in future version and this
  10980. * API will be simplified to be consistent with `outputs`.
  10981. */
  10982. inputs?: {
  10983. [P in keyof T]?: string | [string, string];
  10984. };
  10985. /**
  10986. * A map of output names.
  10987. *
  10988. * The format is in: `{[actualPropertyName: string]:string}`.
  10989. *
  10990. * Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.
  10991. *
  10992. * This allows the render to re-construct the minified and non-minified names
  10993. * of properties.
  10994. */
  10995. outputs?: {
  10996. [P in keyof T]?: string;
  10997. };
  10998. /**
  10999. * Function to create instances of content queries associated with a given directive.
  11000. */
  11001. contentQueries?: ContentQueriesFunction<T> | null;
  11002. /**
  11003. * Additional set of instructions specific to view query processing. This could be seen as a
  11004. * set of instructions to be inserted into the template function.
  11005. */
  11006. viewQuery?: ViewQueriesFunction<T> | null;
  11007. /**
  11008. * Function executed by the parent template to allow children to apply host bindings.
  11009. */
  11010. hostBindings?: HostBindingsFunction<T>;
  11011. }): ɵɵBaseDef<T>;
  11012. /**
  11013. * Create a component definition object.
  11014. *
  11015. *
  11016. * # Example
  11017. * ```
  11018. * class MyDirective {
  11019. * // Generated by Angular Template Compiler
  11020. * // [Symbol] syntax will not be supported by TypeScript until v2.7
  11021. * static ngComponentDef = defineComponent({
  11022. * ...
  11023. * });
  11024. * }
  11025. * ```
  11026. * @codeGenApi
  11027. */
  11028. export declare function ɵɵdefineComponent<T>(componentDefinition: {
  11029. /**
  11030. * Directive type, needed to configure the injector.
  11031. */
  11032. type: Type<T>;
  11033. /** The selectors that will be used to match nodes to this component. */
  11034. selectors: ɵCssSelectorList;
  11035. /**
  11036. * Factory method used to create an instance of directive.
  11037. */
  11038. factory: FactoryFn<T>;
  11039. /**
  11040. * The number of nodes, local refs, and pipes in this component template.
  11041. *
  11042. * Used to calculate the length of this component's LView array, so we
  11043. * can pre-fill the array and set the binding start index.
  11044. */
  11045. consts: number;
  11046. /**
  11047. * The number of bindings in this component template (including pure fn bindings).
  11048. *
  11049. * Used to calculate the length of this component's LView array, so we
  11050. * can pre-fill the array and set the host binding start index.
  11051. */
  11052. vars: number;
  11053. /**
  11054. * A map of input names.
  11055. *
  11056. * The format is in: `{[actualPropertyName: string]:(string|[string, string])}`.
  11057. *
  11058. * Given:
  11059. * ```
  11060. * class MyComponent {
  11061. * @Input()
  11062. * publicInput1: string;
  11063. *
  11064. * @Input('publicInput2')
  11065. * declaredInput2: string;
  11066. * }
  11067. * ```
  11068. *
  11069. * is described as:
  11070. * ```
  11071. * {
  11072. * publicInput1: 'publicInput1',
  11073. * declaredInput2: ['publicInput2', 'declaredInput2'],
  11074. * }
  11075. * ```
  11076. *
  11077. * Which the minifier may translate to:
  11078. * ```
  11079. * {
  11080. * minifiedPublicInput1: 'publicInput1',
  11081. * minifiedDeclaredInput2: ['publicInput2', 'declaredInput2'],
  11082. * }
  11083. * ```
  11084. *
  11085. * This allows the render to re-construct the minified, public, and declared names
  11086. * of properties.
  11087. *
  11088. * NOTE:
  11089. * - Because declared and public name are usually same we only generate the array
  11090. * `['public', 'declared']` format when they differ.
  11091. * - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has
  11092. * inconsistent behavior in that it uses declared names rather than minified or public. For
  11093. * this reason `NgOnChanges` will be deprecated and removed in future version and this
  11094. * API will be simplified to be consistent with `output`.
  11095. */
  11096. inputs?: {
  11097. [P in keyof T]?: string | [string, string];
  11098. };
  11099. /**
  11100. * A map of output names.
  11101. *
  11102. * The format is in: `{[actualPropertyName: string]:string}`.
  11103. *
  11104. * Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.
  11105. *
  11106. * This allows the render to re-construct the minified and non-minified names
  11107. * of properties.
  11108. */
  11109. outputs?: {
  11110. [P in keyof T]?: string;
  11111. };
  11112. /**
  11113. * Function executed by the parent template to allow child directive to apply host bindings.
  11114. */
  11115. hostBindings?: HostBindingsFunction<T>;
  11116. /**
  11117. * Function to create instances of content queries associated with a given directive.
  11118. */
  11119. contentQueries?: ContentQueriesFunction<T>;
  11120. /**
  11121. * Defines the name that can be used in the template to assign this directive to a variable.
  11122. *
  11123. * See: {@link Directive.exportAs}
  11124. */
  11125. exportAs?: string[];
  11126. /**
  11127. * Template function use for rendering DOM.
  11128. *
  11129. * This function has following structure.
  11130. *
  11131. * ```
  11132. * function Template<T>(ctx:T, creationMode: boolean) {
  11133. * if (creationMode) {
  11134. * // Contains creation mode instructions.
  11135. * }
  11136. * // Contains binding update instructions
  11137. * }
  11138. * ```
  11139. *
  11140. * Common instructions are:
  11141. * Creation mode instructions:
  11142. * - `elementStart`, `elementEnd`
  11143. * - `text`
  11144. * - `container`
  11145. * - `listener`
  11146. *
  11147. * Binding update instructions:
  11148. * - `bind`
  11149. * - `elementAttribute`
  11150. * - `elementProperty`
  11151. * - `elementClass`
  11152. * - `elementStyle`
  11153. *
  11154. */
  11155. template: ComponentTemplate<T>;
  11156. /**
  11157. * An array of `ngContent[selector]` values that were found in the template.
  11158. */
  11159. ngContentSelectors?: string[];
  11160. /**
  11161. * Additional set of instructions specific to view query processing. This could be seen as a
  11162. * set of instruction to be inserted into the template function.
  11163. *
  11164. * Query-related instructions need to be pulled out to a specific function as a timing of
  11165. * execution is different as compared to all other instructions (after change detection hooks but
  11166. * before view hooks).
  11167. */
  11168. viewQuery?: ViewQueriesFunction<T> | null;
  11169. /**
  11170. * A list of optional features to apply.
  11171. *
  11172. * See: {@link NgOnChangesFeature}, {@link ProvidersFeature}
  11173. */
  11174. features?: ComponentDefFeature[];
  11175. /**
  11176. * Defines template and style encapsulation options available for Component's {@link Component}.
  11177. */
  11178. encapsulation?: ViewEncapsulation;
  11179. /**
  11180. * Defines arbitrary developer-defined data to be stored on a renderer instance.
  11181. * This is useful for renderers that delegate to other renderers.
  11182. *
  11183. * see: animation
  11184. */
  11185. data?: {
  11186. [kind: string]: any;
  11187. };
  11188. /**
  11189. * A set of styles that the component needs to be present for component to render correctly.
  11190. */
  11191. styles?: string[];
  11192. /**
  11193. * The strategy that the default change detector uses to detect changes.
  11194. * When set, takes effect the next time change detection is triggered.
  11195. */
  11196. changeDetection?: ChangeDetectionStrategy;
  11197. /**
  11198. * Registry of directives and components that may be found in this component's view.
  11199. *
  11200. * The property is either an array of `DirectiveDef`s or a function which returns the array of
  11201. * `DirectiveDef`s. The function is necessary to be able to support forward declarations.
  11202. */
  11203. directives?: DirectiveTypesOrFactory | null;
  11204. /**
  11205. * Registry of pipes that may be found in this component's view.
  11206. *
  11207. * The property is either an array of `PipeDefs`s or a function which returns the array of
  11208. * `PipeDefs`s. The function is necessary to be able to support forward declarations.
  11209. */
  11210. pipes?: PipeTypesOrFactory | null;
  11211. /**
  11212. * The set of schemas that declare elements to be allowed in the component's template.
  11213. */
  11214. schemas?: SchemaMetadata[] | null;
  11215. }): never;
  11216. /**
  11217. * Create a directive definition object.
  11218. *
  11219. * # Example
  11220. * ```ts
  11221. * class MyDirective {
  11222. * // Generated by Angular Template Compiler
  11223. * // [Symbol] syntax will not be supported by TypeScript until v2.7
  11224. * static ngDirectiveDef = ɵɵdefineDirective({
  11225. * ...
  11226. * });
  11227. * }
  11228. * ```
  11229. *
  11230. * @codeGenApi
  11231. */
  11232. export declare const ɵɵdefineDirective: <T>(directiveDefinition: {
  11233. /**
  11234. * Directive type, needed to configure the injector.
  11235. */
  11236. type: Type<T>;
  11237. /** The selectors that will be used to match nodes to this directive. */
  11238. selectors: (string | SelectorFlags)[][];
  11239. /**
  11240. * Factory method used to create an instance of directive.
  11241. */
  11242. factory: FactoryFn<T>;
  11243. /**
  11244. * A map of input names.
  11245. *
  11246. * The format is in: `{[actualPropertyName: string]:(string|[string, string])}`.
  11247. *
  11248. * Given:
  11249. * ```
  11250. * class MyComponent {
  11251. * @Input()
  11252. * publicInput1: string;
  11253. *
  11254. * @Input('publicInput2')
  11255. * declaredInput2: string;
  11256. * }
  11257. * ```
  11258. *
  11259. * is described as:
  11260. * ```
  11261. * {
  11262. * publicInput1: 'publicInput1',
  11263. * declaredInput2: ['declaredInput2', 'publicInput2'],
  11264. * }
  11265. * ```
  11266. *
  11267. * Which the minifier may translate to:
  11268. * ```
  11269. * {
  11270. * minifiedPublicInput1: 'publicInput1',
  11271. * minifiedDeclaredInput2: [ 'publicInput2', 'declaredInput2'],
  11272. * }
  11273. * ```
  11274. *
  11275. * This allows the render to re-construct the minified, public, and declared names
  11276. * of properties.
  11277. *
  11278. * NOTE:
  11279. * - Because declared and public name are usually same we only generate the array
  11280. * `['declared', 'public']` format when they differ.
  11281. * - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has
  11282. * inconsistent behavior in that it uses declared names rather than minified or public. For
  11283. * this reason `NgOnChanges` will be deprecated and removed in future version and this
  11284. * API will be simplified to be consistent with `output`.
  11285. */
  11286. inputs?: { [P in keyof T]?: string | [string, string] | undefined; } | undefined;
  11287. /**
  11288. * A map of output names.
  11289. *
  11290. * The format is in: `{[actualPropertyName: string]:string}`.
  11291. *
  11292. * Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.
  11293. *
  11294. * This allows the render to re-construct the minified and non-minified names
  11295. * of properties.
  11296. */
  11297. outputs?: { [P in keyof T]?: string | undefined; } | undefined;
  11298. /**
  11299. * A list of optional features to apply.
  11300. *
  11301. * See: {@link NgOnChangesFeature}, {@link ProvidersFeature}, {@link InheritDefinitionFeature}
  11302. */
  11303. features?: DirectiveDefFeature[] | undefined;
  11304. /**
  11305. * Function executed by the parent template to allow child directive to apply host bindings.
  11306. */
  11307. hostBindings?: HostBindingsFunction<T> | undefined;
  11308. /**
  11309. * Function to create instances of content queries associated with a given directive.
  11310. */
  11311. contentQueries?: ContentQueriesFunction<T> | undefined;
  11312. /**
  11313. * Additional set of instructions specific to view query processing. This could be seen as a
  11314. * set of instructions to be inserted into the template function.
  11315. */
  11316. viewQuery?: ViewQueriesFunction<T> | null | undefined;
  11317. /**
  11318. * Defines the name that can be used in the template to assign this directive to a variable.
  11319. *
  11320. * See: {@link Directive.exportAs}
  11321. */
  11322. exportAs?: string[] | undefined;
  11323. }) => never;
  11324. /**
  11325. * Construct an `InjectableDef` which defines how a token will be constructed by the DI system, and
  11326. * in which injectors (if any) it will be available.
  11327. *
  11328. * This should be assigned to a static `ngInjectableDef` field on a type, which will then be an
  11329. * `InjectableType`.
  11330. *
  11331. * Options:
  11332. * * `providedIn` determines which injectors will include the injectable, by either associating it
  11333. * with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be
  11334. * provided in the `'root'` injector, which will be the application-level injector in most apps.
  11335. * * `factory` gives the zero argument function which will create an instance of the injectable.
  11336. * The factory can call `inject` to access the `Injector` and request injection of dependencies.
  11337. *
  11338. * @codeGenApi
  11339. */
  11340. export declare function ɵɵdefineInjectable<T>(opts: {
  11341. token: unknown;
  11342. providedIn?: Type<any> | 'root' | 'any' | null;
  11343. factory: () => T;
  11344. }): never;
  11345. /**
  11346. * Construct an `InjectorDef` which configures an injector.
  11347. *
  11348. * This should be assigned to a static `ngInjectorDef` field on a type, which will then be an
  11349. * `InjectorType`.
  11350. *
  11351. * Options:
  11352. *
  11353. * * `factory`: an `InjectorType` is an instantiable type, so a zero argument `factory` function to
  11354. * create the type must be provided. If that factory function needs to inject arguments, it can
  11355. * use the `inject` function.
  11356. * * `providers`: an optional array of providers to add to the injector. Each provider must
  11357. * either have a factory or point to a type which has an `ngInjectableDef` static property (the
  11358. * type must be an `InjectableType`).
  11359. * * `imports`: an optional array of imports of other `InjectorType`s or `InjectorTypeWithModule`s
  11360. * whose providers will also be added to the injector. Locally provided types will override
  11361. * providers from imports.
  11362. *
  11363. * @publicApi
  11364. */
  11365. export declare function ɵɵdefineInjector(options: {
  11366. factory: () => any;
  11367. providers?: any[];
  11368. imports?: any[];
  11369. }): never;
  11370. /**
  11371. * @codeGenApi
  11372. */
  11373. export declare function ɵɵdefineNgModule<T>(def: {
  11374. /** Token representing the module. Used by DI. */
  11375. type: T;
  11376. /** List of components to bootstrap. */
  11377. bootstrap?: Type<any>[] | (() => Type<any>[]);
  11378. /** List of components, directives, and pipes declared by this module. */
  11379. declarations?: Type<any>[] | (() => Type<any>[]);
  11380. /** List of modules or `ModuleWithProviders` imported by this module. */
  11381. imports?: Type<any>[] | (() => Type<any>[]);
  11382. /**
  11383. * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this
  11384. * module.
  11385. */
  11386. exports?: Type<any>[] | (() => Type<any>[]);
  11387. /** The set of schemas that declare elements to be allowed in the NgModule. */
  11388. schemas?: SchemaMetadata[] | null;
  11389. /** Unique ID for the module that is used with `getModuleFactory`. */
  11390. id?: string | null;
  11391. }): never;
  11392. /**
  11393. * Create a pipe definition object.
  11394. *
  11395. * # Example
  11396. * ```
  11397. * class MyPipe implements PipeTransform {
  11398. * // Generated by Angular Template Compiler
  11399. * static ngPipeDef = definePipe({
  11400. * ...
  11401. * });
  11402. * }
  11403. * ```
  11404. * @param pipeDef Pipe definition generated by the compiler
  11405. *
  11406. * @codeGenApi
  11407. */
  11408. export declare function ɵɵdefinePipe<T>(pipeDef: {
  11409. /** Name of the pipe. Used for matching pipes in template to pipe defs. */
  11410. name: string;
  11411. /** Pipe class reference. Needed to extract pipe lifecycle hooks. */
  11412. type: Type<T>;
  11413. /** A factory for creating a pipe instance. */
  11414. factory: FactoryFn<T>;
  11415. /** Whether the pipe is pure. */
  11416. pure?: boolean;
  11417. }): never;
  11418. /**
  11419. * @codeGenApi
  11420. */
  11421. export declare type ɵɵDirectiveDefWithMeta<T, Selector extends string, ExportAs extends string[], InputMap extends {
  11422. [key: string]: string;
  11423. }, OutputMap extends {
  11424. [key: string]: string;
  11425. }, QueryFields extends string[]> = ɵDirectiveDef<T>;
  11426. /**
  11427. * Returns the value associated to the given token from the injectors.
  11428. *
  11429. * `directiveInject` is intended to be used for directive, component and pipe factories.
  11430. * All other injection use `inject` which does not walk the node injector tree.
  11431. *
  11432. * Usage example (in factory function):
  11433. *
  11434. * ```ts
  11435. * class SomeDirective {
  11436. * constructor(directive: DirectiveA) {}
  11437. *
  11438. * static ngDirectiveDef = ɵɵdefineDirective({
  11439. * type: SomeDirective,
  11440. * factory: () => new SomeDirective(ɵɵdirectiveInject(DirectiveA))
  11441. * });
  11442. * }
  11443. * ```
  11444. * @param token the type or token to inject
  11445. * @param flags Injection flags
  11446. * @returns the value from the injector or `null` when not found
  11447. *
  11448. * @codeGenApi
  11449. */
  11450. export declare function ɵɵdirectiveInject<T>(token: Type<T> | InjectionToken<T>): T;
  11451. export declare function ɵɵdirectiveInject<T>(token: Type<T> | InjectionToken<T>, flags: InjectFlags): T;
  11452. /**
  11453. * Disables directive matching on element.
  11454. *
  11455. * * Example:
  11456. * ```
  11457. * <my-comp my-directive>
  11458. * Should match component / directive.
  11459. * </my-comp>
  11460. * <div ngNonBindable>
  11461. * <!-- ɵɵdisableBindings() -->
  11462. * <my-comp my-directive>
  11463. * Should not match component / directive because we are in ngNonBindable.
  11464. * </my-comp>
  11465. * <!-- ɵɵenableBindings() -->
  11466. * </div>
  11467. * ```
  11468. *
  11469. * @codeGenApi
  11470. */
  11471. export declare function ɵɵdisableBindings(): void;
  11472. /**
  11473. * Creates an empty element using {@link elementStart} and {@link elementEnd}
  11474. *
  11475. * @param index Index of the element in the data array
  11476. * @param name Name of the DOM Node
  11477. * @param attrs Statically bound set of attributes, classes, and styles to be written into the DOM
  11478. * element on creation. Use [AttributeMarker] to denote the meaning of this array.
  11479. * @param localRefs A set of local reference bindings on the element.
  11480. *
  11481. * @codeGenApi
  11482. */
  11483. export declare function ɵɵelement(index: number, name: string, attrs?: TAttributes | null, localRefs?: string[] | null): void;
  11484. /**
  11485. * Mark the end of the <ng-container>.
  11486. *
  11487. * @codeGenApi
  11488. */
  11489. export declare function ɵɵelementContainerEnd(): void;
  11490. /**
  11491. * Creates a logical container for other nodes (<ng-container>) backed by a comment node in the DOM.
  11492. * The instruction must later be followed by `elementContainerEnd()` call.
  11493. *
  11494. * @param index Index of the element in the LView array
  11495. * @param attrs Set of attributes to be used when matching directives.
  11496. * @param localRefs A set of local reference bindings on the element.
  11497. *
  11498. * Even if this instruction accepts a set of attributes no actual attribute values are propagated to
  11499. * the DOM (as a comment node can't have attributes). Attributes are here only for directive
  11500. * matching purposes and setting initial inputs of directives.
  11501. *
  11502. * @codeGenApi
  11503. */
  11504. export declare function ɵɵelementContainerStart(index: number, attrs?: TAttributes | null, localRefs?: string[] | null): void;
  11505. /**
  11506. * Mark the end of the element.
  11507. *
  11508. * @codeGenApi
  11509. */
  11510. export declare function ɵɵelementEnd(): void;
  11511. /**
  11512. * Assign static attribute values to a host element.
  11513. *
  11514. * This instruction will assign static attribute values as well as class and style
  11515. * values to an element within the host bindings function. Since attribute values
  11516. * can consist of different types of values, the `attrs` array must include the values in
  11517. * the following format:
  11518. *
  11519. * attrs = [
  11520. * // static attributes (like `title`, `name`, `id`...)
  11521. * attr1, value1, attr2, value,
  11522. *
  11523. * // a single namespace value (like `x:id`)
  11524. * NAMESPACE_MARKER, namespaceUri1, name1, value1,
  11525. *
  11526. * // another single namespace value (like `x:name`)
  11527. * NAMESPACE_MARKER, namespaceUri2, name2, value2,
  11528. *
  11529. * // a series of CSS classes that will be applied to the element (no spaces)
  11530. * CLASSES_MARKER, class1, class2, class3,
  11531. *
  11532. * // a series of CSS styles (property + value) that will be applied to the element
  11533. * STYLES_MARKER, prop1, value1, prop2, value2
  11534. * ]
  11535. *
  11536. * All non-class and non-style attributes must be defined at the start of the list
  11537. * first before all class and style values are set. When there is a change in value
  11538. * type (like when classes and styles are introduced) a marker must be used to separate
  11539. * the entries. The marker values themselves are set via entries found in the
  11540. * [AttributeMarker] enum.
  11541. *
  11542. * NOTE: This instruction is meant to used from `hostBindings` function only.
  11543. *
  11544. * @param directive A directive instance the styling is associated with.
  11545. * @param attrs An array of static values (attributes, classes and styles) with the correct marker
  11546. * values.
  11547. *
  11548. * @codeGenApi
  11549. */
  11550. export declare function ɵɵelementHostAttrs(attrs: TAttributes): void;
  11551. /**
  11552. * Create DOM element. The instruction must later be followed by `elementEnd()` call.
  11553. *
  11554. * @param index Index of the element in the LView array
  11555. * @param name Name of the DOM Node
  11556. * @param attrs Statically bound set of attributes, classes, and styles to be written into the DOM
  11557. * element on creation. Use [AttributeMarker] to denote the meaning of this array.
  11558. * @param localRefs A set of local reference bindings on the element.
  11559. *
  11560. * Attributes and localRefs are passed as an array of strings where elements with an even index
  11561. * hold an attribute name and elements with an odd index hold an attribute value, ex.:
  11562. * ['id', 'warning5', 'class', 'alert']
  11563. *
  11564. * @codeGenApi
  11565. */
  11566. export declare function ɵɵelementStart(index: number, name: string, attrs?: TAttributes | null, localRefs?: string[] | null): void;
  11567. /**
  11568. * Marks the end of an embedded view.
  11569. *
  11570. * @codeGenApi
  11571. */
  11572. export declare function ɵɵembeddedViewEnd(): void;
  11573. /**
  11574. * Marks the start of an embedded view.
  11575. *
  11576. * @param viewBlockId The ID of this view
  11577. * @return boolean Whether or not this view is in creation mode
  11578. *
  11579. * @codeGenApi
  11580. */
  11581. export declare function ɵɵembeddedViewStart(viewBlockId: number, consts: number, vars: number): ɵRenderFlags;
  11582. /**
  11583. * Enables directive matching on elements.
  11584. *
  11585. * * Example:
  11586. * ```
  11587. * <my-comp my-directive>
  11588. * Should match component / directive.
  11589. * </my-comp>
  11590. * <div ngNonBindable>
  11591. * <!-- ɵɵdisableBindings() -->
  11592. * <my-comp my-directive>
  11593. * Should not match component / directive because we are in ngNonBindable.
  11594. * </my-comp>
  11595. * <!-- ɵɵenableBindings() -->
  11596. * </div>
  11597. * ```
  11598. *
  11599. * @codeGenApi
  11600. */
  11601. export declare function ɵɵenableBindings(): void;
  11602. /**
  11603. * Returns the current OpaqueViewState instance.
  11604. *
  11605. * Used in conjunction with the restoreView() instruction to save a snapshot
  11606. * of the current view and restore it when listeners are invoked. This allows
  11607. * walking the declaration view tree in listeners to get vars from parent views.
  11608. *
  11609. * @codeGenApi
  11610. */
  11611. export declare function ɵɵgetCurrentView(): OpaqueViewState;
  11612. /**
  11613. * @codeGenApi
  11614. */
  11615. export declare function ɵɵgetFactoryOf<T>(type: Type<any>): FactoryFn<T> | null;
  11616. /**
  11617. * @codeGenApi
  11618. */
  11619. export declare function ɵɵgetInheritedFactory<T>(type: Type<any>): (type: Type<T>) => T;
  11620. /**
  11621. *
  11622. * Use this instruction to create a translation block that doesn't contain any placeholder.
  11623. * It calls both {@link i18nStart} and {@link i18nEnd} in one instruction.
  11624. *
  11625. * The translation `message` is the value which is locale specific. The translation string may
  11626. * contain placeholders which associate inner elements and sub-templates within the translation.
  11627. *
  11628. * The translation `message` placeholders are:
  11629. * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be
  11630. * interpolated into. The placeholder `index` points to the expression binding index. An optional
  11631. * `block` that matches the sub-template in which it was declared.
  11632. * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning
  11633. * and end of DOM element that were embedded in the original translation block. The placeholder
  11634. * `index` points to the element index in the template instructions set. An optional `block` that
  11635. * matches the sub-template in which it was declared.
  11636. * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be
  11637. * split up and translated separately in each angular template function. The `index` points to the
  11638. * `template` instruction index. A `block` that matches the sub-template in which it was declared.
  11639. *
  11640. * @param index A unique index of the translation in the static block.
  11641. * @param message The translation message.
  11642. * @param subTemplateIndex Optional sub-template index in the `message`.
  11643. *
  11644. * @codeGenApi
  11645. */
  11646. export declare function ɵɵi18n(index: number, message: string, subTemplateIndex?: number): void;
  11647. /**
  11648. * Updates a translation block or an i18n attribute when the bindings have changed.
  11649. *
  11650. * @param index Index of either {@link i18nStart} (translation block) or {@link i18nAttributes}
  11651. * (i18n attribute) on which it should update the content.
  11652. *
  11653. * @codeGenApi
  11654. */
  11655. export declare function ɵɵi18nApply(index: number): void;
  11656. /**
  11657. * Marks a list of attributes as translatable.
  11658. *
  11659. * @param index A unique index in the static block
  11660. * @param values
  11661. *
  11662. * @codeGenApi
  11663. */
  11664. export declare function ɵɵi18nAttributes(index: number, values: string[]): void;
  11665. /**
  11666. * Translates a translation block marked by `i18nStart` and `i18nEnd`. It inserts the text/ICU nodes
  11667. * into the render tree, moves the placeholder nodes and removes the deleted nodes.
  11668. *
  11669. * @codeGenApi
  11670. */
  11671. export declare function ɵɵi18nEnd(): void;
  11672. /**
  11673. * Stores the values of the bindings during each update cycle in order to determine if we need to
  11674. * update the translated nodes.
  11675. *
  11676. * @param value The binding's value
  11677. * @returns This function returns itself so that it may be chained
  11678. * (e.g. `i18nExp(ctx.name)(ctx.title)`)
  11679. *
  11680. * @codeGenApi
  11681. */
  11682. export declare function ɵɵi18nExp<T>(value: T): TsickleIssue1009;
  11683. /**
  11684. * A goog.getMsg-like function for users that do not use Closure.
  11685. *
  11686. * This method is required as a *temporary* measure to prevent i18n tests from being blocked while
  11687. * running outside of Closure Compiler. This method will not be needed once runtime translation
  11688. * service support is introduced.
  11689. *
  11690. * @codeGenApi
  11691. * @deprecated this method is temporary & should not be used as it will be removed soon
  11692. */
  11693. export declare function ɵɵi18nLocalize(input: string, placeholders?: {
  11694. [key: string]: string;
  11695. }): string;
  11696. /**
  11697. * Handles message string post-processing for internationalization.
  11698. *
  11699. * Handles message string post-processing by transforming it from intermediate
  11700. * format (that might contain some markers that we need to replace) to the final
  11701. * form, consumable by i18nStart instruction. Post processing steps include:
  11702. *
  11703. * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�])
  11704. * 2. Replace all ICU vars (like "VAR_PLURAL")
  11705. * 3. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�)
  11706. * in case multiple ICUs have the same placeholder name
  11707. *
  11708. * @param message Raw translation string for post processing
  11709. * @param replacements Set of replacements that should be applied
  11710. *
  11711. * @returns Transformed string that can be consumed by i18nStart instruction
  11712. *
  11713. * @codeGenApi
  11714. */
  11715. export declare function ɵɵi18nPostprocess(message: string, replacements?: {
  11716. [key: string]: (string | string[]);
  11717. }): string;
  11718. /**
  11719. * Marks a block of text as translatable.
  11720. *
  11721. * The instructions `i18nStart` and `i18nEnd` mark the translation block in the template.
  11722. * The translation `message` is the value which is locale specific. The translation string may
  11723. * contain placeholders which associate inner elements and sub-templates within the translation.
  11724. *
  11725. * The translation `message` placeholders are:
  11726. * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be
  11727. * interpolated into. The placeholder `index` points to the expression binding index. An optional
  11728. * `block` that matches the sub-template in which it was declared.
  11729. * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning
  11730. * and end of DOM element that were embedded in the original translation block. The placeholder
  11731. * `index` points to the element index in the template instructions set. An optional `block` that
  11732. * matches the sub-template in which it was declared.
  11733. * - `�!{index}(:{block})�`/`�/!{index}(:{block})�`: *Projection Placeholder*: Marks the
  11734. * beginning and end of <ng-content> that was embedded in the original translation block.
  11735. * The placeholder `index` points to the element index in the template instructions set.
  11736. * An optional `block` that matches the sub-template in which it was declared.
  11737. * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be
  11738. * split up and translated separately in each angular template function. The `index` points to the
  11739. * `template` instruction index. A `block` that matches the sub-template in which it was declared.
  11740. *
  11741. * @param index A unique index of the translation in the static block.
  11742. * @param message The translation message.
  11743. * @param subTemplateIndex Optional sub-template index in the `message`.
  11744. *
  11745. * @codeGenApi
  11746. */
  11747. export declare function ɵɵi18nStart(index: number, message: string, subTemplateIndex?: number): void;
  11748. /**
  11749. * Merges the definition from a super class to a sub class.
  11750. * @param definition The definition that is a SubClass of another directive of component
  11751. *
  11752. * @codeGenApi
  11753. */
  11754. export declare function ɵɵInheritDefinitionFeature(definition: ɵDirectiveDef<any> | ɵComponentDef<any>): void;
  11755. /**
  11756. * Generated instruction: Injects a token from the currently active injector.
  11757. *
  11758. * Must be used in the context of a factory function such as one defined for an
  11759. * `InjectionToken`. Throws an error if not called from such a context.
  11760. *
  11761. * (Additional documentation moved to `inject`, as it is the public API, and an alias for this instruction)
  11762. *
  11763. * @see inject
  11764. * @codeGenApi
  11765. */
  11766. export declare function ɵɵinject<T>(token: Type<T> | InjectionToken<T>): T;
  11767. export declare function ɵɵinject<T>(token: Type<T> | InjectionToken<T>, flags?: InjectFlags): T | null;
  11768. /**
  11769. * Information about how a type or `InjectionToken` interfaces with the DI system.
  11770. *
  11771. * At a minimum, this includes a `factory` which defines how to create the given type `T`, possibly
  11772. * requesting injection of other types if necessary.
  11773. *
  11774. * Optionally, a `providedIn` parameter specifies that the given type belongs to a particular
  11775. * `InjectorDef`, `NgModule`, or a special scope (e.g. `'root'`). A value of `null` indicates
  11776. * that the injectable does not belong to any scope.
  11777. *
  11778. * NOTE: This is a private type and should not be exported
  11779. *
  11780. * @publicApi
  11781. */
  11782. export declare interface ɵɵInjectableDef<T> {
  11783. /**
  11784. * Specifies that the given type belongs to a particular injector:
  11785. * - `InjectorType` such as `NgModule`,
  11786. * - `'root'` the root injector
  11787. * - `'any'` all injectors.
  11788. * - `null`, does not belong to any injector. Must be explicitly listed in the injector
  11789. * `providers`.
  11790. */
  11791. providedIn: InjectorType<any> | 'root' | 'any' | null;
  11792. /**
  11793. * The token to which this definition belongs.
  11794. *
  11795. * Note that this may not be the same as the type that the `factory` will create.
  11796. */
  11797. token: unknown;
  11798. /**
  11799. * Factory method to execute to create an instance of the injectable.
  11800. */
  11801. factory: (t?: Type<any>) => T;
  11802. /**
  11803. * In a case of no explicit injector, a location where the instance of the injectable is stored.
  11804. */
  11805. value: T | undefined;
  11806. }
  11807. /**
  11808. * Facade for the attribute injection from DI.
  11809. *
  11810. * @codeGenApi
  11811. */
  11812. export declare function ɵɵinjectAttribute(attrNameToInject: string): string | null;
  11813. /**
  11814. * Information about the providers to be included in an `Injector` as well as how the given type
  11815. * which carries the information should be created by the DI system.
  11816. *
  11817. * An `InjectorDef` can import other types which have `InjectorDefs`, forming a deep nested
  11818. * structure of providers with a defined priority (identically to how `NgModule`s also have
  11819. * an import/dependency structure).
  11820. *
  11821. * NOTE: This is a private type and should not be exported
  11822. *
  11823. * @publicApi
  11824. */
  11825. export declare interface ɵɵInjectorDef<T> {
  11826. factory: () => T;
  11827. providers: (Type<any> | ValueProvider | ExistingProvider | FactoryProvider | ConstructorProvider | StaticClassProvider | ClassProvider | any[])[];
  11828. imports: (InjectorType<any> | InjectorTypeWithProviders<any>)[];
  11829. }
  11830. /**
  11831. * Creates an interpolation binding with 1 expression.
  11832. *
  11833. * @param prefix static value used for concatenation only.
  11834. * @param v0 value checked for change.
  11835. * @param suffix static value used for concatenation only.
  11836. *
  11837. * @codeGenApi
  11838. */
  11839. export declare function ɵɵinterpolation1(prefix: string, v0: any, suffix: string): string | ɵNO_CHANGE;
  11840. /**
  11841. * Creates an interpolation binding with 2 expressions.
  11842. *
  11843. * @codeGenApi
  11844. */
  11845. export declare function ɵɵinterpolation2(prefix: string, v0: any, i0: string, v1: any, suffix: string): string | ɵNO_CHANGE;
  11846. /**
  11847. * Creates an interpolation binding with 3 expressions.
  11848. *
  11849. * @codeGenApi
  11850. */
  11851. export declare function ɵɵinterpolation3(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): string | ɵNO_CHANGE;
  11852. /**
  11853. * Create an interpolation binding with 4 expressions.
  11854. *
  11855. * @codeGenApi
  11856. */
  11857. export declare function ɵɵinterpolation4(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string): string | ɵNO_CHANGE;
  11858. /**
  11859. * Creates an interpolation binding with 5 expressions.
  11860. *
  11861. * @codeGenApi
  11862. */
  11863. export declare function ɵɵinterpolation5(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, suffix: string): string | ɵNO_CHANGE;
  11864. /**
  11865. * Creates an interpolation binding with 6 expressions.
  11866. *
  11867. * @codeGenApi
  11868. */
  11869. export declare function ɵɵinterpolation6(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): string | ɵNO_CHANGE;
  11870. /**
  11871. * Creates an interpolation binding with 7 expressions.
  11872. *
  11873. * @codeGenApi
  11874. */
  11875. export declare function ɵɵinterpolation7(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): string | ɵNO_CHANGE;
  11876. /**
  11877. * Creates an interpolation binding with 8 expressions.
  11878. *
  11879. * @codeGenApi
  11880. */
  11881. export declare function ɵɵinterpolation8(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): string | ɵNO_CHANGE;
  11882. /**
  11883. * Create interpolation bindings with a variable number of expressions.
  11884. *
  11885. * If there are 1 to 8 expressions `interpolation1()` to `interpolation8()` should be used instead.
  11886. * Those are faster because there is no need to create an array of expressions and iterate over it.
  11887. *
  11888. * `values`:
  11889. * - has static text at even indexes,
  11890. * - has evaluated expressions at odd indexes.
  11891. *
  11892. * Returns the concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.
  11893. *
  11894. * @codeGenApi
  11895. */
  11896. export declare function ɵɵinterpolationV(values: any[]): string | ɵNO_CHANGE;
  11897. /**
  11898. * Adds an event listener to the current node.
  11899. *
  11900. * If an output exists on one of the node's directives, it also subscribes to the output
  11901. * and saves the subscription for later cleanup.
  11902. *
  11903. * @param eventName Name of the event
  11904. * @param listenerFn The function to be called when event emits
  11905. * @param useCapture Whether or not to use capture in event listener
  11906. * @param eventTargetResolver Function that returns global target information in case this listener
  11907. * should be attached to a global object like window, document or body
  11908. *
  11909. * @codeGenApi
  11910. */
  11911. export declare function ɵɵlistener(eventName: string, listenerFn: (e?: any) => any, useCapture?: boolean, eventTargetResolver?: GlobalTargetResolver): void;
  11912. /**
  11913. * Retrieves a value from current `viewData`.
  11914. *
  11915. * @codeGenApi
  11916. */
  11917. export declare function ɵɵload<T>(index: number): T;
  11918. /**
  11919. *
  11920. * @codeGenApi
  11921. */
  11922. export declare function ɵɵloadContentQuery<T>(): QueryList<T>;
  11923. /**
  11924. * Loads current View Query and moves the pointer/index to the next View Query in LView.
  11925. *
  11926. * @codeGenApi
  11927. */
  11928. export declare function ɵɵloadViewQuery<T>(): T;
  11929. /**
  11930. * Sets the namespace used to create elements no `null`, which forces element creation to use
  11931. * `createElement` rather than `createElementNS`.
  11932. *
  11933. * @codeGenApi
  11934. */
  11935. export declare function ɵɵnamespaceHTML(): void;
  11936. /**
  11937. * Sets the namespace used to create elements to `'http://www.w3.org/1998/MathML/'` in global state.
  11938. *
  11939. * @codeGenApi
  11940. */
  11941. export declare function ɵɵnamespaceMathML(): void;
  11942. /**
  11943. * Sets the namespace used to create elements to `'http://www.w3.org/2000/svg'` in global state.
  11944. *
  11945. * @codeGenApi
  11946. */
  11947. export declare function ɵɵnamespaceSVG(): void;
  11948. /**
  11949. * Retrieves a context at the level specified and saves it as the global, contextViewData.
  11950. * Will get the next level up if level is not specified.
  11951. *
  11952. * This is used to save contexts of parent views so they can be bound in embedded views, or
  11953. * in conjunction with reference() to bind a ref from a parent view.
  11954. *
  11955. * @param level The relative level of the view from which to grab context compared to contextVewData
  11956. * @returns context
  11957. *
  11958. * @codeGenApi
  11959. */
  11960. export declare function ɵɵnextContext<T = any>(level?: number): T;
  11961. /**
  11962. * @publicApi
  11963. */
  11964. export declare type ɵɵNgModuleDefWithMeta<T, Declarations, Imports, Exports> = ɵNgModuleDef<T>;
  11965. /**
  11966. * The NgOnChangesFeature decorates a component with support for the ngOnChanges
  11967. * lifecycle hook, so it should be included in any component that implements
  11968. * that hook.
  11969. *
  11970. * If the component or directive uses inheritance, the NgOnChangesFeature MUST
  11971. * be included as a feature AFTER {@link InheritDefinitionFeature}, otherwise
  11972. * inherited properties will not be propagated to the ngOnChanges lifecycle
  11973. * hook.
  11974. *
  11975. * Example usage:
  11976. *
  11977. * ```
  11978. * static ngComponentDef = defineComponent({
  11979. * ...
  11980. * inputs: {name: 'publicName'},
  11981. * features: [NgOnChangesFeature()]
  11982. * });
  11983. * ```
  11984. *
  11985. * @codeGenApi
  11986. */
  11987. export declare function ɵɵNgOnChangesFeature<T>(): DirectiveDefFeature;
  11988. /**
  11989. * Create a pipe.
  11990. *
  11991. * @param index Pipe index where the pipe will be stored.
  11992. * @param pipeName The name of the pipe
  11993. * @returns T the instance of the pipe.
  11994. *
  11995. * @codeGenApi
  11996. */
  11997. export declare function ɵɵpipe(index: number, pipeName: string): any;
  11998. /**
  11999. * Invokes a pipe with 1 arguments.
  12000. *
  12001. * This instruction acts as a guard to {@link PipeTransform#transform} invoking
  12002. * the pipe only when an input to the pipe changes.
  12003. *
  12004. * @param index Pipe index where the pipe was stored on creation.
  12005. * @param slotOffset the offset in the reserved slot space
  12006. * @param v1 1st argument to {@link PipeTransform#transform}.
  12007. *
  12008. * @codeGenApi
  12009. */
  12010. export declare function ɵɵpipeBind1(index: number, slotOffset: number, v1: any): any;
  12011. /**
  12012. * Invokes a pipe with 2 arguments.
  12013. *
  12014. * This instruction acts as a guard to {@link PipeTransform#transform} invoking
  12015. * the pipe only when an input to the pipe changes.
  12016. *
  12017. * @param index Pipe index where the pipe was stored on creation.
  12018. * @param slotOffset the offset in the reserved slot space
  12019. * @param v1 1st argument to {@link PipeTransform#transform}.
  12020. * @param v2 2nd argument to {@link PipeTransform#transform}.
  12021. *
  12022. * @codeGenApi
  12023. */
  12024. export declare function ɵɵpipeBind2(index: number, slotOffset: number, v1: any, v2: any): any;
  12025. /**
  12026. * Invokes a pipe with 3 arguments.
  12027. *
  12028. * This instruction acts as a guard to {@link PipeTransform#transform} invoking
  12029. * the pipe only when an input to the pipe changes.
  12030. *
  12031. * @param index Pipe index where the pipe was stored on creation.
  12032. * @param slotOffset the offset in the reserved slot space
  12033. * @param v1 1st argument to {@link PipeTransform#transform}.
  12034. * @param v2 2nd argument to {@link PipeTransform#transform}.
  12035. * @param v3 4rd argument to {@link PipeTransform#transform}.
  12036. *
  12037. * @codeGenApi
  12038. */
  12039. export declare function ɵɵpipeBind3(index: number, slotOffset: number, v1: any, v2: any, v3: any): any;
  12040. /**
  12041. * Invokes a pipe with 4 arguments.
  12042. *
  12043. * This instruction acts as a guard to {@link PipeTransform#transform} invoking
  12044. * the pipe only when an input to the pipe changes.
  12045. *
  12046. * @param index Pipe index where the pipe was stored on creation.
  12047. * @param slotOffset the offset in the reserved slot space
  12048. * @param v1 1st argument to {@link PipeTransform#transform}.
  12049. * @param v2 2nd argument to {@link PipeTransform#transform}.
  12050. * @param v3 3rd argument to {@link PipeTransform#transform}.
  12051. * @param v4 4th argument to {@link PipeTransform#transform}.
  12052. *
  12053. * @codeGenApi
  12054. */
  12055. export declare function ɵɵpipeBind4(index: number, slotOffset: number, v1: any, v2: any, v3: any, v4: any): any;
  12056. /**
  12057. * Invokes a pipe with variable number of arguments.
  12058. *
  12059. * This instruction acts as a guard to {@link PipeTransform#transform} invoking
  12060. * the pipe only when an input to the pipe changes.
  12061. *
  12062. * @param index Pipe index where the pipe was stored on creation.
  12063. * @param slotOffset the offset in the reserved slot space
  12064. * @param values Array of arguments to pass to {@link PipeTransform#transform} method.
  12065. *
  12066. * @codeGenApi
  12067. */
  12068. export declare function ɵɵpipeBindV(index: number, slotOffset: number, values: any[]): any;
  12069. /**
  12070. * @codeGenApi
  12071. */
  12072. export declare type ɵɵPipeDefWithMeta<T, Name extends string> = ɵPipeDef<T>;
  12073. /**
  12074. * Inserts previously re-distributed projected nodes. This instruction must be preceded by a call
  12075. * to the projectionDef instruction.
  12076. *
  12077. * @param nodeIndex
  12078. * @param selectorIndex:
  12079. * - 0 when the selector is `*` (or unspecified as this is the default value),
  12080. * - 1 based index of the selector from the {@link projectionDef}
  12081. *
  12082. * @codeGenApi
  12083. */
  12084. export declare function ɵɵprojection(nodeIndex: number, selectorIndex?: number, attrs?: TAttributes): void;
  12085. /**
  12086. * Instruction to distribute projectable nodes among <ng-content> occurrences in a given template.
  12087. * It takes all the selectors from the entire component's template and decides where
  12088. * each projected node belongs (it re-distributes nodes among "buckets" where each "bucket" is
  12089. * backed by a selector).
  12090. *
  12091. * This function requires CSS selectors to be provided in 2 forms: parsed (by a compiler) and text,
  12092. * un-parsed form.
  12093. *
  12094. * The parsed form is needed for efficient matching of a node against a given CSS selector.
  12095. * The un-parsed, textual form is needed for support of the ngProjectAs attribute.
  12096. *
  12097. * Having a CSS selector in 2 different formats is not ideal, but alternatives have even more
  12098. * drawbacks:
  12099. * - having only a textual form would require runtime parsing of CSS selectors;
  12100. * - we can't have only a parsed as we can't re-construct textual form from it (as entered by a
  12101. * template author).
  12102. *
  12103. * @param projectionSlots? A collection of projection slots. A projection slot can be based
  12104. * on a parsed CSS selectors or set to the wildcard selector ("*") in order to match
  12105. * all nodes which do not match any selector. If not specified, a single wildcard
  12106. * selector projection slot will be defined.
  12107. *
  12108. * @codeGenApi
  12109. */
  12110. export declare function ɵɵprojectionDef(projectionSlots?: ProjectionSlots): void;
  12111. /**
  12112. * Update a property on a selected element.
  12113. *
  12114. * Operates on the element selected by index via the {@link select} instruction.
  12115. *
  12116. * If the property name also exists as an input property on one of the element's directives,
  12117. * the component property will be set instead of the element property. This check must
  12118. * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled
  12119. *
  12120. * @param propName Name of property. Because it is going to DOM, this is not subject to
  12121. * renaming as part of minification.
  12122. * @param value New value to write.
  12123. * @param sanitizer An optional function used to sanitize the value.
  12124. * @param nativeOnly Whether or not we should only set native properties and skip input check
  12125. * (this is necessary for host property bindings)
  12126. * @returns This function returns itself so that it may be chained
  12127. * (e.g. `property('name', ctx.name)('title', ctx.title)`)
  12128. *
  12129. * @codeGenApi
  12130. */
  12131. export declare function ɵɵproperty<T>(propName: string, value: T, sanitizer?: SanitizerFn | null, nativeOnly?: boolean): TsickleIssue1009;
  12132. /**
  12133. *
  12134. * Update an interpolated property on an element with a lone bound value
  12135. *
  12136. * Used when the value passed to a property has 1 interpolated value in it, an no additional text
  12137. * surrounds that interpolated value:
  12138. *
  12139. * ```html
  12140. * <div title="{{v0}}"></div>
  12141. * ```
  12142. *
  12143. * Its compiled representation is::
  12144. *
  12145. * ```ts
  12146. * ɵɵpropertyInterpolate('title', v0);
  12147. * ```
  12148. *
  12149. * If the property name also exists as an input property on one of the element's directives,
  12150. * the component property will be set instead of the element property. This check must
  12151. * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
  12152. *
  12153. * @param propName The name of the property to update
  12154. * @param prefix Static value used for concatenation only.
  12155. * @param v0 Value checked for change.
  12156. * @param suffix Static value used for concatenation only.
  12157. * @param sanitizer An optional sanitizer function
  12158. * @returns itself, so that it may be chained.
  12159. * @codeGenApi
  12160. */
  12161. export declare function ɵɵpropertyInterpolate(propName: string, v0: any, sanitizer?: SanitizerFn): TsickleIssue1009;
  12162. /**
  12163. *
  12164. * Update an interpolated property on an element with single bound value surrounded by text.
  12165. *
  12166. * Used when the value passed to a property has 1 interpolated value in it:
  12167. *
  12168. * ```html
  12169. * <div title="prefix{{v0}}suffix"></div>
  12170. * ```
  12171. *
  12172. * Its compiled representation is::
  12173. *
  12174. * ```ts
  12175. * ɵɵpropertyInterpolate1('title', 'prefix', v0, 'suffix');
  12176. * ```
  12177. *
  12178. * If the property name also exists as an input property on one of the element's directives,
  12179. * the component property will be set instead of the element property. This check must
  12180. * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
  12181. *
  12182. * @param propName The name of the property to update
  12183. * @param prefix Static value used for concatenation only.
  12184. * @param v0 Value checked for change.
  12185. * @param suffix Static value used for concatenation only.
  12186. * @param sanitizer An optional sanitizer function
  12187. * @returns itself, so that it may be chained.
  12188. * @codeGenApi
  12189. */
  12190. export declare function ɵɵpropertyInterpolate1(propName: string, prefix: string, v0: any, suffix: string, sanitizer?: SanitizerFn): TsickleIssue1009;
  12191. /**
  12192. *
  12193. * Update an interpolated property on an element with 2 bound values surrounded by text.
  12194. *
  12195. * Used when the value passed to a property has 2 interpolated values in it:
  12196. *
  12197. * ```html
  12198. * <div title="prefix{{v0}}-{{v1}}suffix"></div>
  12199. * ```
  12200. *
  12201. * Its compiled representation is::
  12202. *
  12203. * ```ts
  12204. * ɵɵpropertyInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');
  12205. * ```
  12206. *
  12207. * If the property name also exists as an input property on one of the element's directives,
  12208. * the component property will be set instead of the element property. This check must
  12209. * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
  12210. *
  12211. * @param propName The name of the property to update
  12212. * @param prefix Static value used for concatenation only.
  12213. * @param v0 Value checked for change.
  12214. * @param i0 Static value used for concatenation only.
  12215. * @param v1 Value checked for change.
  12216. * @param suffix Static value used for concatenation only.
  12217. * @param sanitizer An optional sanitizer function
  12218. * @returns itself, so that it may be chained.
  12219. * @codeGenApi
  12220. */
  12221. export declare function ɵɵpropertyInterpolate2(propName: string, prefix: string, v0: any, i0: string, v1: any, suffix: string, sanitizer?: SanitizerFn): TsickleIssue1009;
  12222. /**
  12223. *
  12224. * Update an interpolated property on an element with 3 bound values surrounded by text.
  12225. *
  12226. * Used when the value passed to a property has 3 interpolated values in it:
  12227. *
  12228. * ```html
  12229. * <div title="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>
  12230. * ```
  12231. *
  12232. * Its compiled representation is::
  12233. *
  12234. * ```ts
  12235. * ɵɵpropertyInterpolate3(
  12236. * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');
  12237. * ```
  12238. *
  12239. * If the property name also exists as an input property on one of the element's directives,
  12240. * the component property will be set instead of the element property. This check must
  12241. * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
  12242. *
  12243. * @param propName The name of the property to update
  12244. * @param prefix Static value used for concatenation only.
  12245. * @param v0 Value checked for change.
  12246. * @param i0 Static value used for concatenation only.
  12247. * @param v1 Value checked for change.
  12248. * @param i1 Static value used for concatenation only.
  12249. * @param v2 Value checked for change.
  12250. * @param suffix Static value used for concatenation only.
  12251. * @param sanitizer An optional sanitizer function
  12252. * @returns itself, so that it may be chained.
  12253. * @codeGenApi
  12254. */
  12255. export declare function ɵɵpropertyInterpolate3(propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string, sanitizer?: SanitizerFn): TsickleIssue1009;
  12256. /**
  12257. *
  12258. * Update an interpolated property on an element with 4 bound values surrounded by text.
  12259. *
  12260. * Used when the value passed to a property has 4 interpolated values in it:
  12261. *
  12262. * ```html
  12263. * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>
  12264. * ```
  12265. *
  12266. * Its compiled representation is::
  12267. *
  12268. * ```ts
  12269. * ɵɵpropertyInterpolate4(
  12270. * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
  12271. * ```
  12272. *
  12273. * If the property name also exists as an input property on one of the element's directives,
  12274. * the component property will be set instead of the element property. This check must
  12275. * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
  12276. *
  12277. * @param propName The name of the property to update
  12278. * @param prefix Static value used for concatenation only.
  12279. * @param v0 Value checked for change.
  12280. * @param i0 Static value used for concatenation only.
  12281. * @param v1 Value checked for change.
  12282. * @param i1 Static value used for concatenation only.
  12283. * @param v2 Value checked for change.
  12284. * @param i2 Static value used for concatenation only.
  12285. * @param v3 Value checked for change.
  12286. * @param suffix Static value used for concatenation only.
  12287. * @param sanitizer An optional sanitizer function
  12288. * @returns itself, so that it may be chained.
  12289. * @codeGenApi
  12290. */
  12291. 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): TsickleIssue1009;
  12292. /**
  12293. *
  12294. * Update an interpolated property on an element with 5 bound values surrounded by text.
  12295. *
  12296. * Used when the value passed to a property has 5 interpolated values in it:
  12297. *
  12298. * ```html
  12299. * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>
  12300. * ```
  12301. *
  12302. * Its compiled representation is::
  12303. *
  12304. * ```ts
  12305. * ɵɵpropertyInterpolate5(
  12306. * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
  12307. * ```
  12308. *
  12309. * If the property name also exists as an input property on one of the element's directives,
  12310. * the component property will be set instead of the element property. This check must
  12311. * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
  12312. *
  12313. * @param propName The name of the property to update
  12314. * @param prefix Static value used for concatenation only.
  12315. * @param v0 Value checked for change.
  12316. * @param i0 Static value used for concatenation only.
  12317. * @param v1 Value checked for change.
  12318. * @param i1 Static value used for concatenation only.
  12319. * @param v2 Value checked for change.
  12320. * @param i2 Static value used for concatenation only.
  12321. * @param v3 Value checked for change.
  12322. * @param i3 Static value used for concatenation only.
  12323. * @param v4 Value checked for change.
  12324. * @param suffix Static value used for concatenation only.
  12325. * @param sanitizer An optional sanitizer function
  12326. * @returns itself, so that it may be chained.
  12327. * @codeGenApi
  12328. */
  12329. 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): TsickleIssue1009;
  12330. /**
  12331. *
  12332. * Update an interpolated property on an element with 6 bound values surrounded by text.
  12333. *
  12334. * Used when the value passed to a property has 6 interpolated values in it:
  12335. *
  12336. * ```html
  12337. * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>
  12338. * ```
  12339. *
  12340. * Its compiled representation is::
  12341. *
  12342. * ```ts
  12343. * ɵɵpropertyInterpolate6(
  12344. * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
  12345. * ```
  12346. *
  12347. * If the property name also exists as an input property on one of the element's directives,
  12348. * the component property will be set instead of the element property. This check must
  12349. * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
  12350. *
  12351. * @param propName The name of the property to update
  12352. * @param prefix Static value used for concatenation only.
  12353. * @param v0 Value checked for change.
  12354. * @param i0 Static value used for concatenation only.
  12355. * @param v1 Value checked for change.
  12356. * @param i1 Static value used for concatenation only.
  12357. * @param v2 Value checked for change.
  12358. * @param i2 Static value used for concatenation only.
  12359. * @param v3 Value checked for change.
  12360. * @param i3 Static value used for concatenation only.
  12361. * @param v4 Value checked for change.
  12362. * @param i4 Static value used for concatenation only.
  12363. * @param v5 Value checked for change.
  12364. * @param suffix Static value used for concatenation only.
  12365. * @param sanitizer An optional sanitizer function
  12366. * @returns itself, so that it may be chained.
  12367. * @codeGenApi
  12368. */
  12369. 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): TsickleIssue1009;
  12370. /**
  12371. *
  12372. * Update an interpolated property on an element with 7 bound values surrounded by text.
  12373. *
  12374. * Used when the value passed to a property has 7 interpolated values in it:
  12375. *
  12376. * ```html
  12377. * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>
  12378. * ```
  12379. *
  12380. * Its compiled representation is::
  12381. *
  12382. * ```ts
  12383. * ɵɵpropertyInterpolate7(
  12384. * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
  12385. * ```
  12386. *
  12387. * If the property name also exists as an input property on one of the element's directives,
  12388. * the component property will be set instead of the element property. This check must
  12389. * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
  12390. *
  12391. * @param propName The name of the property to update
  12392. * @param prefix Static value used for concatenation only.
  12393. * @param v0 Value checked for change.
  12394. * @param i0 Static value used for concatenation only.
  12395. * @param v1 Value checked for change.
  12396. * @param i1 Static value used for concatenation only.
  12397. * @param v2 Value checked for change.
  12398. * @param i2 Static value used for concatenation only.
  12399. * @param v3 Value checked for change.
  12400. * @param i3 Static value used for concatenation only.
  12401. * @param v4 Value checked for change.
  12402. * @param i4 Static value used for concatenation only.
  12403. * @param v5 Value checked for change.
  12404. * @param i5 Static value used for concatenation only.
  12405. * @param v6 Value checked for change.
  12406. * @param suffix Static value used for concatenation only.
  12407. * @param sanitizer An optional sanitizer function
  12408. * @returns itself, so that it may be chained.
  12409. * @codeGenApi
  12410. */
  12411. 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): TsickleIssue1009;
  12412. /**
  12413. *
  12414. * Update an interpolated property on an element with 8 bound values surrounded by text.
  12415. *
  12416. * Used when the value passed to a property has 8 interpolated values in it:
  12417. *
  12418. * ```html
  12419. * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>
  12420. * ```
  12421. *
  12422. * Its compiled representation is::
  12423. *
  12424. * ```ts
  12425. * ɵɵpropertyInterpolate8(
  12426. * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
  12427. * ```
  12428. *
  12429. * If the property name also exists as an input property on one of the element's directives,
  12430. * the component property will be set instead of the element property. This check must
  12431. * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
  12432. *
  12433. * @param propName The name of the property to update
  12434. * @param prefix Static value used for concatenation only.
  12435. * @param v0 Value checked for change.
  12436. * @param i0 Static value used for concatenation only.
  12437. * @param v1 Value checked for change.
  12438. * @param i1 Static value used for concatenation only.
  12439. * @param v2 Value checked for change.
  12440. * @param i2 Static value used for concatenation only.
  12441. * @param v3 Value checked for change.
  12442. * @param i3 Static value used for concatenation only.
  12443. * @param v4 Value checked for change.
  12444. * @param i4 Static value used for concatenation only.
  12445. * @param v5 Value checked for change.
  12446. * @param i5 Static value used for concatenation only.
  12447. * @param v6 Value checked for change.
  12448. * @param i6 Static value used for concatenation only.
  12449. * @param v7 Value checked for change.
  12450. * @param suffix Static value used for concatenation only.
  12451. * @param sanitizer An optional sanitizer function
  12452. * @returns itself, so that it may be chained.
  12453. * @codeGenApi
  12454. */
  12455. 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): TsickleIssue1009;
  12456. /**
  12457. * Update an interpolated property on an element with 8 or more bound values surrounded by text.
  12458. *
  12459. * Used when the number of interpolated values exceeds 7.
  12460. *
  12461. * ```html
  12462. * <div
  12463. * title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"></div>
  12464. * ```
  12465. *
  12466. * Its compiled representation is::
  12467. *
  12468. * ```ts
  12469. * ɵɵpropertyInterpolateV(
  12470. * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
  12471. * 'suffix']);
  12472. * ```
  12473. *
  12474. * If the property name also exists as an input property on one of the element's directives,
  12475. * the component property will be set instead of the element property. This check must
  12476. * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
  12477. *
  12478. * @param propName The name of the property to update.
  12479. * @param values The a collection of values and the strings inbetween those values, beginning with a
  12480. * string prefix and ending with a string suffix.
  12481. * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
  12482. * @param sanitizer An optional sanitizer function
  12483. * @returns itself, so that it may be chained.
  12484. * @codeGenApi
  12485. */
  12486. export declare function ɵɵpropertyInterpolateV(propName: string, values: any[], sanitizer?: SanitizerFn): TsickleIssue1009;
  12487. /**
  12488. * This feature resolves the providers of a directive (or component),
  12489. * and publish them into the DI system, making it visible to others for injection.
  12490. *
  12491. * For example:
  12492. * ```ts
  12493. * class ComponentWithProviders {
  12494. * constructor(private greeter: GreeterDE) {}
  12495. *
  12496. * static ngComponentDef = defineComponent({
  12497. * type: ComponentWithProviders,
  12498. * selectors: [['component-with-providers']],
  12499. * factory: () => new ComponentWithProviders(directiveInject(GreeterDE as any)),
  12500. * consts: 1,
  12501. * vars: 1,
  12502. * template: function(fs: RenderFlags, ctx: ComponentWithProviders) {
  12503. * if (fs & RenderFlags.Create) {
  12504. * ɵɵtext(0);
  12505. * }
  12506. * if (fs & RenderFlags.Update) {
  12507. * ɵɵselect(0);
  12508. * ɵɵtextBinding(ctx.greeter.greet());
  12509. * }
  12510. * },
  12511. * features: [ProvidersFeature([GreeterDE])]
  12512. * });
  12513. * }
  12514. * ```
  12515. *
  12516. * @param definition
  12517. *
  12518. * @codeGenApi
  12519. */
  12520. export declare function ɵɵProvidersFeature<T>(providers: Provider[], viewProviders?: Provider[]): (definition: ɵDirectiveDef<T>) => void;
  12521. /**
  12522. * Bindings for pure functions are stored after regular bindings.
  12523. *
  12524. * |------consts------|---------vars---------| |----- hostVars (dir1) ------|
  12525. * ------------------------------------------------------------------------------------------
  12526. * | nodes/refs/pipes | bindings | fn slots | injector | dir1 | host bindings | host slots |
  12527. * ------------------------------------------------------------------------------------------
  12528. * ^ ^
  12529. * TView.bindingStartIndex TView.expandoStartIndex
  12530. *
  12531. * Pure function instructions are given an offset from the binding root. Adding the offset to the
  12532. * binding root gives the first index where the bindings are stored. In component views, the binding
  12533. * root is the bindingStartIndex. In host bindings, the binding root is the expandoStartIndex +
  12534. * any directive instances + any hostVars in directives evaluated before it.
  12535. *
  12536. * See VIEW_DATA.md for more information about host binding resolution.
  12537. */
  12538. /**
  12539. * If the value hasn't been saved, calls the pure function to store and return the
  12540. * value. If it has been saved, returns the saved value.
  12541. *
  12542. * @param slotOffset the offset from binding root to the reserved slot
  12543. * @param pureFn Function that returns a value
  12544. * @param thisArg Optional calling context of pureFn
  12545. * @returns value
  12546. *
  12547. * @codeGenApi
  12548. */
  12549. export declare function ɵɵpureFunction0<T>(slotOffset: number, pureFn: () => T, thisArg?: any): T;
  12550. /**
  12551. * If the value of the provided exp has changed, calls the pure function to return
  12552. * an updated value. Or if the value has not changed, returns cached value.
  12553. *
  12554. * @param slotOffset the offset from binding root to the reserved slot
  12555. * @param pureFn Function that returns an updated value
  12556. * @param exp Updated expression value
  12557. * @param thisArg Optional calling context of pureFn
  12558. * @returns Updated or cached value
  12559. *
  12560. * @codeGenApi
  12561. */
  12562. export declare function ɵɵpureFunction1(slotOffset: number, pureFn: (v: any) => any, exp: any, thisArg?: any): any;
  12563. /**
  12564. * If the value of any provided exp has changed, calls the pure function to return
  12565. * an updated value. Or if no values have changed, returns cached value.
  12566. *
  12567. * @param slotOffset the offset from binding root to the reserved slot
  12568. * @param pureFn
  12569. * @param exp1
  12570. * @param exp2
  12571. * @param thisArg Optional calling context of pureFn
  12572. * @returns Updated or cached value
  12573. *
  12574. * @codeGenApi
  12575. */
  12576. export declare function ɵɵpureFunction2(slotOffset: number, pureFn: (v1: any, v2: any) => any, exp1: any, exp2: any, thisArg?: any): any;
  12577. /**
  12578. * If the value of any provided exp has changed, calls the pure function to return
  12579. * an updated value. Or if no values have changed, returns cached value.
  12580. *
  12581. * @param slotOffset the offset from binding root to the reserved slot
  12582. * @param pureFn
  12583. * @param exp1
  12584. * @param exp2
  12585. * @param exp3
  12586. * @param thisArg Optional calling context of pureFn
  12587. * @returns Updated or cached value
  12588. *
  12589. * @codeGenApi
  12590. */
  12591. export declare function ɵɵpureFunction3(slotOffset: number, pureFn: (v1: any, v2: any, v3: any) => any, exp1: any, exp2: any, exp3: any, thisArg?: any): any;
  12592. /**
  12593. * If the value of any provided exp has changed, calls the pure function to return
  12594. * an updated value. Or if no values have changed, returns cached value.
  12595. *
  12596. * @param slotOffset the offset from binding root to the reserved slot
  12597. * @param pureFn
  12598. * @param exp1
  12599. * @param exp2
  12600. * @param exp3
  12601. * @param exp4
  12602. * @param thisArg Optional calling context of pureFn
  12603. * @returns Updated or cached value
  12604. *
  12605. * @codeGenApi
  12606. */
  12607. 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;
  12608. /**
  12609. * If the value of any provided exp has changed, calls the pure function to return
  12610. * an updated value. Or if no values have changed, returns cached value.
  12611. *
  12612. * @param slotOffset the offset from binding root to the reserved slot
  12613. * @param pureFn
  12614. * @param exp1
  12615. * @param exp2
  12616. * @param exp3
  12617. * @param exp4
  12618. * @param exp5
  12619. * @param thisArg Optional calling context of pureFn
  12620. * @returns Updated or cached value
  12621. *
  12622. * @codeGenApi
  12623. */
  12624. 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;
  12625. /**
  12626. * If the value of any provided exp has changed, calls the pure function to return
  12627. * an updated value. Or if no values have changed, returns cached value.
  12628. *
  12629. * @param slotOffset the offset from binding root to the reserved slot
  12630. * @param pureFn
  12631. * @param exp1
  12632. * @param exp2
  12633. * @param exp3
  12634. * @param exp4
  12635. * @param exp5
  12636. * @param exp6
  12637. * @param thisArg Optional calling context of pureFn
  12638. * @returns Updated or cached value
  12639. *
  12640. * @codeGenApi
  12641. */
  12642. 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;
  12643. /**
  12644. * If the value of any provided exp has changed, calls the pure function to return
  12645. * an updated value. Or if no values have changed, returns cached value.
  12646. *
  12647. * @param slotOffset the offset from binding root to the reserved slot
  12648. * @param pureFn
  12649. * @param exp1
  12650. * @param exp2
  12651. * @param exp3
  12652. * @param exp4
  12653. * @param exp5
  12654. * @param exp6
  12655. * @param exp7
  12656. * @param thisArg Optional calling context of pureFn
  12657. * @returns Updated or cached value
  12658. *
  12659. * @codeGenApi
  12660. */
  12661. 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;
  12662. /**
  12663. * If the value of any provided exp has changed, calls the pure function to return
  12664. * an updated value. Or if no values have changed, returns cached value.
  12665. *
  12666. * @param slotOffset the offset from binding root to the reserved slot
  12667. * @param pureFn
  12668. * @param exp1
  12669. * @param exp2
  12670. * @param exp3
  12671. * @param exp4
  12672. * @param exp5
  12673. * @param exp6
  12674. * @param exp7
  12675. * @param exp8
  12676. * @param thisArg Optional calling context of pureFn
  12677. * @returns Updated or cached value
  12678. *
  12679. * @codeGenApi
  12680. */
  12681. 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;
  12682. /**
  12683. * pureFunction instruction that can support any number of bindings.
  12684. *
  12685. * If the value of any provided exp has changed, calls the pure function to return
  12686. * an updated value. Or if no values have changed, returns cached value.
  12687. *
  12688. * @param slotOffset the offset from binding root to the reserved slot
  12689. * @param pureFn A pure function that takes binding values and builds an object or array
  12690. * containing those values.
  12691. * @param exps An array of binding values
  12692. * @param thisArg Optional calling context of pureFn
  12693. * @returns Updated or cached value
  12694. *
  12695. * @codeGenApi
  12696. */
  12697. export declare function ɵɵpureFunctionV(slotOffset: number, pureFn: (...v: any[]) => any, exps: any[], thisArg?: any): any;
  12698. /**
  12699. * Refreshes a query by combining matches from all active views and removing matches from deleted
  12700. * views.
  12701. *
  12702. * @returns `true` if a query got dirty during change detection or if this is a static query
  12703. * resolving in creation mode, `false` otherwise.
  12704. *
  12705. * @codeGenApi
  12706. */
  12707. export declare function ɵɵqueryRefresh(queryList: QueryList<any>): boolean;
  12708. /**
  12709. * Retrieves a local reference from the current contextViewData.
  12710. *
  12711. * If the reference to retrieve is in a parent view, this instruction is used in conjunction
  12712. * with a nextContext() call, which walks up the tree and updates the contextViewData instance.
  12713. *
  12714. * @param index The index of the local ref in contextViewData.
  12715. *
  12716. * @codeGenApi
  12717. */
  12718. export declare function ɵɵreference<T>(index: number): T;
  12719. /**
  12720. *
  12721. * @codeGenApi
  12722. */
  12723. export declare function ɵɵresolveBody(element: RElement & {
  12724. ownerDocument: Document;
  12725. }): {
  12726. name: string;
  12727. target: HTMLElement;
  12728. };
  12729. /**
  12730. *
  12731. * @codeGenApi
  12732. */
  12733. export declare function ɵɵresolveDocument(element: RElement & {
  12734. ownerDocument: Document;
  12735. }): {
  12736. name: string;
  12737. target: Document;
  12738. };
  12739. /**
  12740. *
  12741. * @codeGenApi
  12742. */
  12743. export declare function ɵɵresolveWindow(element: RElement & {
  12744. ownerDocument: Document;
  12745. }): {
  12746. name: string;
  12747. target: Window | null;
  12748. };
  12749. /**
  12750. * Restores `contextViewData` to the given OpaqueViewState instance.
  12751. *
  12752. * Used in conjunction with the getCurrentView() instruction to save a snapshot
  12753. * of the current view and restore it when listeners are invoked. This allows
  12754. * walking the declaration view tree in listeners to get vars from parent views.
  12755. *
  12756. * @param viewToRestore The OpaqueViewState instance to restore.
  12757. *
  12758. * @codeGenApi
  12759. */
  12760. export declare function ɵɵrestoreView(viewToRestore: OpaqueViewState): void;
  12761. /**
  12762. * An `html` sanitizer which converts untrusted `html` **string** into trusted string by removing
  12763. * dangerous content.
  12764. *
  12765. * This method parses the `html` and locates potentially dangerous content (such as urls and
  12766. * javascript) and removes it.
  12767. *
  12768. * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustHtml}.
  12769. *
  12770. * @param unsafeHtml untrusted `html`, typically from the user.
  12771. * @returns `html` string which is safe to display to user, because all of the dangerous javascript
  12772. * and urls have been removed.
  12773. *
  12774. * @publicApi
  12775. */
  12776. export declare function ɵɵsanitizeHtml(unsafeHtml: any): string;
  12777. /**
  12778. * A `url` sanitizer which only lets trusted `url`s through.
  12779. *
  12780. * This passes only `url`s marked trusted by calling {@link bypassSanitizationTrustResourceUrl}.
  12781. *
  12782. * @param unsafeResourceUrl untrusted `url`, typically from the user.
  12783. * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because
  12784. * only trusted `url`s have been allowed to pass.
  12785. *
  12786. * @publicApi
  12787. */
  12788. export declare function ɵɵsanitizeResourceUrl(unsafeResourceUrl: any): string;
  12789. /**
  12790. * A `script` sanitizer which only lets trusted javascript through.
  12791. *
  12792. * This passes only `script`s marked trusted by calling {@link
  12793. * bypassSanitizationTrustScript}.
  12794. *
  12795. * @param unsafeScript untrusted `script`, typically from the user.
  12796. * @returns `url` string which is safe to bind to the `<script>` element such as `<img src>`,
  12797. * because only trusted `scripts` have been allowed to pass.
  12798. *
  12799. * @publicApi
  12800. */
  12801. export declare function ɵɵsanitizeScript(unsafeScript: any): string;
  12802. /**
  12803. * A `style` sanitizer which converts untrusted `style` **string** into trusted string by removing
  12804. * dangerous content.
  12805. *
  12806. * This method parses the `style` and locates potentially dangerous content (such as urls and
  12807. * javascript) and removes it.
  12808. *
  12809. * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustStyle}.
  12810. *
  12811. * @param unsafeStyle untrusted `style`, typically from the user.
  12812. * @returns `style` string which is safe to bind to the `style` properties, because all of the
  12813. * dangerous javascript and urls have been removed.
  12814. *
  12815. * @publicApi
  12816. */
  12817. export declare function ɵɵsanitizeStyle(unsafeStyle: any): string;
  12818. /**
  12819. * A `url` sanitizer which converts untrusted `url` **string** into trusted string by removing
  12820. * dangerous
  12821. * content.
  12822. *
  12823. * This method parses the `url` and locates potentially dangerous content (such as javascript) and
  12824. * removes it.
  12825. *
  12826. * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustUrl}.
  12827. *
  12828. * @param unsafeUrl untrusted `url`, typically from the user.
  12829. * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because
  12830. * all of the dangerous javascript has been removed.
  12831. *
  12832. * @publicApi
  12833. */
  12834. export declare function ɵɵsanitizeUrl(unsafeUrl: any): string;
  12835. /**
  12836. * Sanitizes URL, selecting sanitizer function based on tag and property names.
  12837. *
  12838. * This function is used in case we can't define security context at compile time, when only prop
  12839. * name is available. This happens when we generate host bindings for Directives/Components. The
  12840. * host element is unknown at compile time, so we defer calculation of specific sanitizer to
  12841. * runtime.
  12842. *
  12843. * @param unsafeUrl untrusted `url`, typically from the user.
  12844. * @param tag target element tag name.
  12845. * @param prop name of the property that contains the value.
  12846. * @returns `url` string which is safe to bind.
  12847. *
  12848. * @publicApi
  12849. */
  12850. export declare function ɵɵsanitizeUrlOrResourceUrl(unsafeUrl: any, tag: string, prop: string): any;
  12851. /**
  12852. * Selects an element for later binding instructions.
  12853. *
  12854. * Used in conjunction with instructions like {@link property} to act on elements with specified
  12855. * indices, for example those created with {@link element} or {@link elementStart}.
  12856. *
  12857. * ```ts
  12858. * (rf: RenderFlags, ctx: any) => {
  12859. * if (rf & 1) {
  12860. * element(0, 'div');
  12861. * }
  12862. * if (rf & 2) {
  12863. * select(0); // Select the <div/> created above.
  12864. * property('title', 'test');
  12865. * }
  12866. * }
  12867. * ```
  12868. * @param index the index of the item to act on with the following instructions
  12869. *
  12870. * @codeGenApi
  12871. */
  12872. export declare function ɵɵselect(index: number): void;
  12873. /**
  12874. * @codeGenApi
  12875. */
  12876. export declare function ɵɵsetComponentScope(type: ɵComponentType<any>, directives: Type<any>[], pipes: Type<any>[]): void;
  12877. /**
  12878. * Adds the module metadata that is necessary to compute the module's transitive scope to an
  12879. * existing module definition.
  12880. *
  12881. * Scope metadata of modules is not used in production builds, so calls to this function can be
  12882. * marked pure to tree-shake it from the bundle, allowing for all referenced declarations
  12883. * to become eligible for tree-shaking as well.
  12884. *
  12885. * @codeGenApi
  12886. */
  12887. export declare function ɵɵsetNgModuleScope(type: any, scope: {
  12888. /** List of components, directives, and pipes declared by this module. */
  12889. declarations?: Type<any>[] | (() => Type<any>[]);
  12890. /** List of modules or `ModuleWithProviders` imported by this module. */
  12891. imports?: Type<any>[] | (() => Type<any>[]);
  12892. /**
  12893. * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this
  12894. * module.
  12895. */
  12896. exports?: Type<any>[] | (() => Type<any>[]);
  12897. }): void;
  12898. /**
  12899. * Registers a QueryList, associated with a static content query, for later refresh
  12900. * (part of a view refresh).
  12901. *
  12902. * @param directiveIndex Current directive index
  12903. * @param predicate The type for which the query will search
  12904. * @param descend Whether or not to descend into children
  12905. * @param read What to save in the query
  12906. * @returns QueryList<T>
  12907. *
  12908. * @codeGenApi
  12909. */
  12910. export declare function ɵɵstaticContentQuery<T>(directiveIndex: number, predicate: Type<any> | string[], descend: boolean, read: any): void;
  12911. /**
  12912. * Creates new QueryList for a static view query.
  12913. *
  12914. * @param predicate The type for which the query will search
  12915. * @param descend Whether or not to descend into children
  12916. * @param read What to save in the query
  12917. *
  12918. * @codeGenApi
  12919. */
  12920. export declare function ɵɵstaticViewQuery<T>(predicate: Type<any> | string[], descend: boolean, read: any): void;
  12921. /**
  12922. * Update style bindings using an object literal on an element.
  12923. *
  12924. * This instruction is meant to apply styling via the `[style]="exp"` template bindings.
  12925. * When styles are applied to the element they will then be updated with respect to
  12926. * any styles/classes set via `styleProp`. If any styles are set to falsy
  12927. * then they will be removed from the element.
  12928. *
  12929. * Note that the styling instruction will not be applied until `stylingApply` is called.
  12930. *
  12931. * @param styles A key/value style map of the styles that will be applied to the given element.
  12932. * Any missing styles (that have already been applied to the element beforehand) will be
  12933. * removed (unset) from the element's styling.
  12934. *
  12935. * Note that this will apply the provided styleMap value to the host element if this function
  12936. * is called within a host binding.
  12937. *
  12938. * @codeGenApi
  12939. */
  12940. export declare function ɵɵstyleMap(styles: {
  12941. [styleName: string]: any;
  12942. } | ɵNO_CHANGE | null): void;
  12943. /**
  12944. * Update a style binding on an element with the provided value.
  12945. *
  12946. * If the style value is falsy then it will be removed from the element
  12947. * (or assigned a different value depending if there are any styles placed
  12948. * on the element with `styleMap` or any static styles that are
  12949. * present from when the element was created with `styling`).
  12950. *
  12951. * Note that the styling element is updated as part of `stylingApply`.
  12952. *
  12953. * @param styleIndex Index of style to update. This index value refers to the
  12954. * index of the style in the style bindings array that was passed into
  12955. * `styling`.
  12956. * @param value New value to write (falsy to remove).
  12957. * @param suffix Optional suffix. Used with scalar values to add unit such as `px`.
  12958. * Note that when a suffix is provided then the underlying sanitizer will
  12959. * be ignored.
  12960. * @param forceOverride Whether or not to update the styling value immediately
  12961. * (despite the other bindings possibly having priority)
  12962. *
  12963. * Note that this will apply the provided style value to the host element if this function is called
  12964. * within a host binding.
  12965. *
  12966. * @codeGenApi
  12967. */
  12968. export declare function ɵɵstyleProp(styleIndex: number, value: string | number | String | ɵPlayerFactory | null, suffix?: string | null, forceOverride?: boolean): void;
  12969. /**
  12970. * Allocates style and class binding properties on the element during creation mode.
  12971. *
  12972. * This instruction is meant to be called during creation mode to register all
  12973. * dynamic style and class bindings on the element. Note that this is only used
  12974. * for binding values (see `elementStart` to learn how to assign static styling
  12975. * values to an element).
  12976. *
  12977. * @param classBindingNames An array containing bindable class names.
  12978. * The `classProp` instruction refers to the class name by index in
  12979. * this array (i.e. `['foo', 'bar']` means `foo=0` and `bar=1`).
  12980. * @param styleBindingNames An array containing bindable style properties.
  12981. * The `styleProp` instruction refers to the class name by index in
  12982. * this array (i.e. `['width', 'height']` means `width=0` and `height=1`).
  12983. * @param styleSanitizer An optional sanitizer function that will be used to sanitize any CSS
  12984. * style values that are applied to the element (during rendering).
  12985. *
  12986. * Note that this will allocate the provided style/class bindings to the host element if
  12987. * this function is called within a host binding.
  12988. *
  12989. * @codeGenApi
  12990. */
  12991. export declare function ɵɵstyling(classBindingNames?: string[] | null, styleBindingNames?: string[] | null, styleSanitizer?: StyleSanitizeFn | null): void;
  12992. /**
  12993. * Apply all style and class binding values to the element.
  12994. *
  12995. * This instruction is meant to be run after `styleMap`, `classMap`,
  12996. * `styleProp` or `classProp` instructions have been run and will
  12997. * only apply styling to the element if any styling bindings have been updated.
  12998. *
  12999. * @codeGenApi
  13000. */
  13001. export declare function ɵɵstylingApply(): void;
  13002. /**
  13003. * Creates an LContainer for an ng-template (dynamically-inserted view), e.g.
  13004. *
  13005. * <ng-template #foo>
  13006. * <div></div>
  13007. * </ng-template>
  13008. *
  13009. * @param index The index of the container in the data array
  13010. * @param templateFn Inline template
  13011. * @param consts The number of nodes, local refs, and pipes for this template
  13012. * @param vars The number of bindings for this template
  13013. * @param tagName The name of the container element, if applicable
  13014. * @param attrs The attrs attached to the container, if applicable
  13015. * @param localRefs A set of local reference bindings on the element.
  13016. * @param localRefExtractor A function which extracts local-refs values from the template.
  13017. * Defaults to the current element associated with the local-ref.
  13018. *
  13019. * @codeGenApi
  13020. */
  13021. export declare function ɵɵtemplate(index: number, templateFn: ComponentTemplate<any> | null, consts: number, vars: number, tagName?: string | null, attrs?: TAttributes | null, localRefs?: string[] | null, localRefExtractor?: LocalRefExtractor): void;
  13022. /**
  13023. * Retrieves `TemplateRef` instance from `Injector` when a local reference is placed on the
  13024. * `<ng-template>` element.
  13025. *
  13026. * @codeGenApi
  13027. */
  13028. export declare function ɵɵtemplateRefExtractor(tNode: TNode, currentView: ɵangular_packages_core_core_bm): TemplateRef<{}> | null;
  13029. /**
  13030. * Create static text node
  13031. *
  13032. * @param index Index of the node in the data array
  13033. * @param value Value to write. This value will be stringified.
  13034. *
  13035. * @codeGenApi
  13036. */
  13037. export declare function ɵɵtext(index: number, value?: any): void;
  13038. /**
  13039. * Create text node with binding
  13040. * Bindings should be handled externally with the proper interpolation(1-8) method
  13041. *
  13042. * @param value Stringified value to write.
  13043. *
  13044. * @codeGenApi
  13045. */
  13046. export declare function ɵɵtextBinding<T>(value: T | ɵNO_CHANGE): void;
  13047. /**
  13048. *
  13049. * Update text content with a lone bound value
  13050. *
  13051. * Used when a text node has 1 interpolated value in it, an no additional text
  13052. * surrounds that interpolated value:
  13053. *
  13054. * ```html
  13055. * <div>{{v0}}</div>
  13056. * ```
  13057. *
  13058. * Its compiled representation is:
  13059. *
  13060. * ```ts
  13061. * ɵɵtextInterpolate(v0);
  13062. * ```
  13063. * @returns itself, so that it may be chained.
  13064. * @see textInterpolateV
  13065. * @codeGenApi
  13066. */
  13067. export declare function ɵɵtextInterpolate(v0: any): TsickleIssue1009;
  13068. /**
  13069. *
  13070. * Update text content with single bound value surrounded by other text.
  13071. *
  13072. * Used when a text node has 1 interpolated value in it:
  13073. *
  13074. * ```html
  13075. * <div>prefix{{v0}}suffix</div>
  13076. * ```
  13077. *
  13078. * Its compiled representation is:
  13079. *
  13080. * ```ts
  13081. * ɵɵtextInterpolate1('prefix', v0, 'suffix');
  13082. * ```
  13083. * @returns itself, so that it may be chained.
  13084. * @see textInterpolateV
  13085. * @codeGenApi
  13086. */
  13087. export declare function ɵɵtextInterpolate1(prefix: string, v0: any, suffix: string): TsickleIssue1009;
  13088. /**
  13089. *
  13090. * Update text content with 2 bound values surrounded by other text.
  13091. *
  13092. * Used when a text node has 2 interpolated values in it:
  13093. *
  13094. * ```html
  13095. * <div>prefix{{v0}}-{{v1}}suffix</div>
  13096. * ```
  13097. *
  13098. * Its compiled representation is:
  13099. *
  13100. * ```ts
  13101. * ɵɵtextInterpolate2('prefix', v0, '-', v1, 'suffix');
  13102. * ```
  13103. * @returns itself, so that it may be chained.
  13104. * @see textInterpolateV
  13105. * @codeGenApi
  13106. */
  13107. export declare function ɵɵtextInterpolate2(prefix: string, v0: any, i0: string, v1: any, suffix: string): TsickleIssue1009;
  13108. /**
  13109. *
  13110. * Update text content with 3 bound values surrounded by other text.
  13111. *
  13112. * Used when a text node has 3 interpolated values in it:
  13113. *
  13114. * ```html
  13115. * <div>prefix{{v0}}-{{v1}}-{{v2}}suffix</div>
  13116. * ```
  13117. *
  13118. * Its compiled representation is:
  13119. *
  13120. * ```ts
  13121. * ɵɵtextInterpolate3(
  13122. * 'prefix', v0, '-', v1, '-', v2, 'suffix');
  13123. * ```
  13124. * @returns itself, so that it may be chained.
  13125. * @see textInterpolateV
  13126. * @codeGenApi
  13127. */
  13128. export declare function ɵɵtextInterpolate3(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): TsickleIssue1009;
  13129. /**
  13130. *
  13131. * Update text content with 4 bound values surrounded by other text.
  13132. *
  13133. * Used when a text node has 4 interpolated values in it:
  13134. *
  13135. * ```html
  13136. * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix</div>
  13137. * ```
  13138. *
  13139. * Its compiled representation is:
  13140. *
  13141. * ```ts
  13142. * ɵɵtextInterpolate4(
  13143. * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
  13144. * ```
  13145. * @returns itself, so that it may be chained.
  13146. * @see ɵɵtextInterpolateV
  13147. * @codeGenApi
  13148. */
  13149. export declare function ɵɵtextInterpolate4(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string): TsickleIssue1009;
  13150. /**
  13151. *
  13152. * Update text content with 5 bound values surrounded by other text.
  13153. *
  13154. * Used when a text node has 5 interpolated values in it:
  13155. *
  13156. * ```html
  13157. * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix</div>
  13158. * ```
  13159. *
  13160. * Its compiled representation is:
  13161. *
  13162. * ```ts
  13163. * ɵɵtextInterpolate5(
  13164. * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
  13165. * ```
  13166. * @returns itself, so that it may be chained.
  13167. * @see textInterpolateV
  13168. * @codeGenApi
  13169. */
  13170. 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): TsickleIssue1009;
  13171. /**
  13172. *
  13173. * Update text content with 6 bound values surrounded by other text.
  13174. *
  13175. * Used when a text node has 6 interpolated values in it:
  13176. *
  13177. * ```html
  13178. * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix</div>
  13179. * ```
  13180. *
  13181. * Its compiled representation is:
  13182. *
  13183. * ```ts
  13184. * ɵɵtextInterpolate6(
  13185. * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
  13186. * ```
  13187. *
  13188. * @param i4 Static value used for concatenation only.
  13189. * @param v5 Value checked for change. @returns itself, so that it may be chained.
  13190. * @see textInterpolateV
  13191. * @codeGenApi
  13192. */
  13193. 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): TsickleIssue1009;
  13194. /**
  13195. *
  13196. * Update text content with 7 bound values surrounded by other text.
  13197. *
  13198. * Used when a text node has 7 interpolated values in it:
  13199. *
  13200. * ```html
  13201. * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix</div>
  13202. * ```
  13203. *
  13204. * Its compiled representation is:
  13205. *
  13206. * ```ts
  13207. * ɵɵtextInterpolate7(
  13208. * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
  13209. * ```
  13210. * @returns itself, so that it may be chained.
  13211. * @see textInterpolateV
  13212. * @codeGenApi
  13213. */
  13214. 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): TsickleIssue1009;
  13215. /**
  13216. *
  13217. * Update text content with 8 bound values surrounded by other text.
  13218. *
  13219. * Used when a text node has 8 interpolated values in it:
  13220. *
  13221. * ```html
  13222. * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix</div>
  13223. * ```
  13224. *
  13225. * Its compiled representation is:
  13226. *
  13227. * ```ts
  13228. * ɵɵtextInterpolate8(
  13229. * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
  13230. * ```
  13231. * @returns itself, so that it may be chained.
  13232. * @see textInterpolateV
  13233. * @codeGenApi
  13234. */
  13235. 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): TsickleIssue1009;
  13236. /**
  13237. * Update text content with 9 or more bound values other surrounded by text.
  13238. *
  13239. * Used when the number of interpolated values exceeds 8.
  13240. *
  13241. * ```html
  13242. * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix</div>
  13243. * ```
  13244. *
  13245. * Its compiled representation is:
  13246. *
  13247. * ```ts
  13248. * ɵɵtextInterpolateV(
  13249. * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
  13250. * 'suffix']);
  13251. * ```
  13252. *.
  13253. * @param values The a collection of values and the strings in between those values, beginning with
  13254. * a string prefix and ending with a string suffix.
  13255. * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
  13256. *
  13257. * @returns itself, so that it may be chained.
  13258. * @codeGenApi
  13259. */
  13260. export declare function ɵɵtextInterpolateV(values: any[]): TsickleIssue1009;
  13261. /**
  13262. * Updates a synthetic host binding (e.g. `[@foo]`) on a component.
  13263. *
  13264. * This instruction is for compatibility purposes and is designed to ensure that a
  13265. * synthetic host binding (e.g. `@HostBinding('@foo')`) properly gets rendered in
  13266. * the component's renderer. Normally all host bindings are evaluated with the parent
  13267. * component's renderer, but, in the case of animation @triggers, they need to be
  13268. * evaluated with the sub component's renderer (because that's where the animation
  13269. * triggers are defined).
  13270. *
  13271. * Do not use this instruction as a replacement for `elementProperty`. This instruction
  13272. * only exists to ensure compatibility with the ViewEngine's host binding behavior.
  13273. *
  13274. * @param index The index of the element to update in the data array
  13275. * @param propName Name of property. Because it is going to DOM, this is not subject to
  13276. * renaming as part of minification.
  13277. * @param value New value to write.
  13278. * @param sanitizer An optional function used to sanitize the value.
  13279. * @param nativeOnly Whether or not we should only set native properties and skip input check
  13280. * (this is necessary for host property bindings)
  13281. *
  13282. * @codeGenApi
  13283. */
  13284. export declare function ɵɵupdateSyntheticHostBinding<T>(propName: string, value: T | ɵNO_CHANGE, sanitizer?: SanitizerFn | null, nativeOnly?: boolean): void;
  13285. /**
  13286. * Creates new QueryList, stores the reference in LView and returns QueryList.
  13287. *
  13288. * @param predicate The type for which the query will search
  13289. * @param descend Whether or not to descend into children
  13290. * @param read What to save in the query
  13291. * @returns QueryList<T>
  13292. *
  13293. * @codeGenApi
  13294. */
  13295. export declare function ɵɵviewQuery<T>(predicate: Type<any> | string[], descend: boolean, read: any): QueryList<T>;
  13296. export { }