TypeScript是JavaScript类型的超集,它可以编译成纯JavaScript。
TypeScript可以在任何浏览器、任何计算机和任何操作系统上运行,并且是开源的。
typescripthassomereallygreat,usefulerrormessagesthatgiveyoufeedbackonallowedtypes,etc.
Butseriously,ineveryprojectI'veconverted,TypeScripthasfoundbugs.Andrationalizingthetypesleadstomuchclearercode.
TypeScript从今天数以百万计的JavaScript开发者所熟悉的语法和语义开始。使用现有的JavaScript代码,包括流行的JavaScript库,并从JavaScript代码中调用TypeScript代码。
TypeScript可以编译出纯净、简洁的JavaScript代码,并且可以运行在任何浏览器上、Node.js环境中和任何支持ECMAScript3(或更高版本)的JavaScript引擎中。
类型允许JavaScript开发者在开发JavaScript应用程序时使用高效的开发工具和常用操作比如静态检查和代码重构。
类型是可选的,类型推断让一些类型的注释使你的代码的静态验证有很大的不同。类型让你定义软件组件之间的接口和洞察现有JavaScript库的行为。
TypeScript提供最新的和不断发展的JavaScript特性,包括那些来自2015年的ECMAScript和未来的提案中的特性,比如异步功能和Decorators,以帮助建立健壮的组件。
这些特性为高可信应用程序开发时是可用的,但是会被编译成简洁的ECMAScript3(或更新版本)的JavaScript。
命令行的TypeScript编译器可以使用Node.js包来安装。
TypeScript已经构建在GitHub上了。TypeScript编译器已经在TypeScript中实现,并且可以运行在任何JavaScript计算机中。
WeloveTypeScriptformanythings…WithTypeScript,severalofourteammembershavesaidthingslike'Inowactuallyunderstandmostofourowncode!'becausetheycaneasilytraverseitandunderstandrelationshipsmuchbetter.Andwe’vefoundseveralbugsviaTypeScript’schecks.”
—BradGreen,EngineeringDirector-AngularJS
“OneofIonic'smaingoalsistomakeappdevelopmentasquickandeasyaspossible,andthetoolingsupportTypeScriptgivesuswithautocompletion,typecheckingandsourcedocumentationreallyalignswiththat.”
—TimLancina,ToolingDeveloper-Ionic
“TypeScripthelpedustoreusetheteam’sknowledgeandtokeepthesameteamvelocitybyprovidingthesameexcellentdeveloperexperienceasC#...AhugeimprovementoverplainJavaScript.”
—ValioStoychev,PMLead-NativeScript
“BycombiningAureliawithTypeScriptformodernweb,mobileanddesktopdevelopment,we'veseenwhatisperhapsthemostbeautifulandelegantappdevelopmentworkflowtodate.”
—RobEisenberg,Architect-Aurelia
TypeScripthashelpedensurethatDojo2willbebuiltonrocksolidfoundations,whichwillmakeenterprisedevelopmentbetter.TypeScriptgivesusallthebenefitsofES6,plusmoreproductivity,…andresponsivesupportfromtheTypeScriptteam.”
—DylanSchiemann,Co-founder-DojoToolkit,CEO-SitePen
“TypeScriptisasmartchoicewhenwritingamodernweb-orJavaScript-basedapplication.TypeScript’scarefullyconsideredlanguagefeaturesandfunctionality,anditsconsistentlyimprovingtools,resultinaterrificallyproductivedevelopmentexperience.”