内容简介
ProgrammingwithTypesteachesyoutodesignsafe,resilient,correctsoftwarethat’seasytomaintainandunderstandbytakingadvantageofthepowerofstrongtypesystems.Designedtoprovidepractical,instantly-usefultechniquesforworkingdevelopers,thisclearly-writtentutorialintroducesyoutousingtypesystemstosupporteverydayprogrammingtasks.Init,you’llexploretheimpacttypeshaveonfunctions,inheritance,andcomposition,andyou’lltakeacloselookatgenerics,whichenablegreaterabstraction.You’llalsodiscoverfoldingdatastructuresandapplyingfunctionstocontainerswithhigherkindedtypes.Alongtheway,you’llexplorereal-worldusecasesandpracticalexamplesinTypeScriptasyoubuildyourskillsfromprimitivetypesuptomoreadvancedconceptslikefunctorsandmonads.what'sinsideAnintroductiontotypesystemsandtheirbenefitsDesigningfunctionsthatdon’treturnvaluesEncodingtextBuildingdatastructureswitharraysandreferencesTypecompositionFunctiontypesTypesafetyAsynchronousfunctionsSubtypingObject-orientedprogrammingwithtypesGenericdatastructuresandalgorithms