The Wayback Machine - https://web.archive.org/web/20180320114548/https://github.com/Microsoft/TypeScript
Skip to content
Learn more
Please note that GitHub no longer supports your web browser.

We recommend upgrading to the latest Google Chrome or Firefox.

TypeScript is a superset of JavaScript that compiles to clean JavaScript output. http://www.typescriptlang.org
TypeScript HTML PowerShell Groovy Shell Batchfile
Switch branches/tags
2.1 6229-known-length-tuples AddJavaScriptSemanticErrorsToSyntacticErrors Fix20333 ImprovePerfRulesProvider IsValidSnippetInsertionAtPosition JSDocFunctionDescriptions add-semicolon-to-unused-class-members align analyzer andy-ms-codefix-async andyms-curly-around-jsdoc-optional aozgaa/nonRelativeImportCompletions aquiredts asyncGeneratorsUpLevel asyncSimpleArrow await_undefined awaited becauseItsLiterallyTheWorst billti/typingForInferredProject bindOperator callback-this-parameters-in-lib chooseOverload circleci-timeout codegen-extensions commonjs_node comparability-spec-update comparabilitySpecUpdate completionsCombineOverloads completionsDefaultExport_WIP completionsInterfaceElement computed-property-union-lifting configFileErrors configFileWithIncorrectProjectRoot contextually-type-inherited-properties-WIP contextuallyTypeImplementedProperties2 controlFlowImplicitAny convertExportsDotXEquals correctlyScopedtaggedTemplates-release-2.6 createChildren createNodeArray dbaeumer/9125 decl-maps declare decoratorClassification decoratorsExperiment dev/aozgaa/IncreaseErrStackSize dev/aozgaa/eventPortTelemetry-IOSessionSocket dev/aozgaa/eventPortTelemetry-deferCallback dev/aozgaa/tsserverVersion difference-type-WIP documentHighlights_modifiers documentHighlights_moduleImport_filesToSearch dontUseThisBranchForExperimentalPipelineInProductionOrYouWillBeFired downWithDreadedCurlyCurly draft-spec-keyof-index-access-types draft-spec-literal-types draft-spec-non-primitive-object draft-spec-spread-signature dts-first duplicate-lib emit-names-for-methods enumFoo experimentalTransforms export_default_enum exportsincompletionlist exportsincompletionlist3 extend_abstract extensibility-model extract_wip fa factories factoryPerf failBadSyntaxKind failedTestTracking fileRenameCase findAllRefs_jsdoc findAllRefsDefault_wip findAllRefsDefinition2 fix-jsdoc-parsing fix-tsc-instrumented fix_tests fix13117 fixAllDescription fixCircularContextualType fixClassExtendsNullDeclEmit2 fixIndexedAccessInConditionalType fixUnclosedJsxDebugFailure fixed-length-tuples format formattingFoo fourslash_symbolatlocation generic-completions getContextualSignature getContextualType_checker getContextualType getIndentationAccountsForJSDoc getLastChild getTouchingX getuniontype2 gh-pages giveUpSpeculation_wip globalSizeLimit-2.1.6 go_to_implementation_work3 goto_this harnessCleanup helpers highFructoseAcornSyrup idName_wip idPairMap import_code_action importOption importTracker_clean improveMappedTypeInference improved-relation-for-recursive-mapped-types incompleteObjectBindingPatterns indent indexersAndContextualTypesAndStuff inferFromRelatedTypesOnly inherit-construct-signature-from-extended-interface install_types_fix instrumentModuleResolution internalModifier is_union_type isolateObjectSpread issourcefilejavascript js-constructor-function-fixes jsInference jsdoc_tags jsdocparam jsonParsing jsx_quick_info jsxPreceding jsxtagnameexpression lego/hb_998_20171019221032960 lhsImportFix libReferenceDirective lineEndingsAreAnUnsolvedProblemInComputing lintByDefault lshost_realpath_test makeGetNewLineRequired map_wip map4_work mapped-types-allow-numeric-constraint-types mappedObjectTypesSpec master-11046 master-fix7185 master matchableRelation mergeCommentWriter mergedClassFunction nameSuggest narrow-by-property-assignment narrow-constraint-of-type-in-switch no-object-literal-type-assertion-2 no-widening-function-expressions2 nonstrict-undefined-narrows-entire-union notDisplayJSLibTODOs nounused null_or_number nullishCoalesceStage1 objectify-intersections-on-creation-WIP optionalChainingStage1 parallel-lint parseError pathCompletions pipelineStage1 preAllocateMap pretty promised promisedType properties pvb/codeactionclienttest quickFixImplIntAmbientContexts rbuckton/WIP-extractPrinter rbuckton/WIP-parser rbuckton/WIP-vifs rbuckton/matchType rbuckton/pipeline rbuckton/promisedTypeWIP react_emit_entities_wip readdir readonlyTypes readonlyarray real_path recursiveConditionalTypes reduceStackDepth refactor_module_resolution_wip referencesInferrredObjectTypeProperty release-1.0.3 release-1.1 release-1.3 release-1.4 release-1.5 release-1.6 release-1.7 release-1.8 release-2.0 release-2.0.5 release-2.1 release-2.2 release-2.3 release-2.4 release-2.5 release-2.6 release-2.7 release-2.8 release-.20 remove-update-template-parts rename-index-types-to-keyof replaceNode_end requireJson rest-type-WIP rest-type rest_param_trailing_comma revert-17870-fix-getConstraintOfIndexedAccess rm_cast rm_isExpression safeNavigation sandersn/base-type-as-assertion sandersn/did-you-mean sandersn/js-we-could-better sandersn/jsdoc-param-type-literals sandersn/parse-jsdoc-types sandersn/refactor-jsdoc-to-types sandersn/skip-repeated-comparisons sandersn/spread-fixed-length-tuples sandersn/throw-on-high-memory-usage services_settings sharedTypes simple-js-typeToString-WIP skip-nested-references-in-assignability slice_node_array smartModuleResolutionCache spec-literal-types spec-mixins spec-overload-resolution spec-update-mapped-object-types spec-update specUpdate splitAbstractTest02 spread-tuples spread-type spreadOperatorSourceMap statement_parent strictModeInBinder string_literal_completions stringLiteralDetails symbol_table_map symbolLiterals symlink_tests symlinks symlinks2 the_undefinedening thisTypesInBasePropAndContainerOfBase thisless throwOperator toTry track-recursive-calls-to-compareSignaturesRelated transforms-merge transforms-minGenerators transforms-transformer-es6-generators tsconfigMixedContentSupportRedux type-relationship-api type_roots typeAtLocation typeGuardsViaPropertyAccess typeOperations typePredicateChanges typePredicateOverloadCompat typePreviews typepredicate_BACKUP typingsInstaller_dependencies uncore undefinedzilla unforeachentry unknown_identifier_imports unused_suggestion unused_wip useBeforeDeclaration_superCLass useCheckCache vfs vladima/extractMethod-WIP vladima/insertNode-WIP vladima/render-flow vladima/structured-printer-WIP vladima/12205-WIP vs/release-2.1 vue-hacks-WIP vue-plugin-WIP widen-inference-candidates-for-error-reporting wip yieldExpressionInFlowLoop
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.circleci Update circle config to build all branches Mar 14, 2018
.vscode Extract Method (squash) Aug 4, 2017
bin Moved LKG folder to lib Jul 27, 2015
doc Update the logo to the one which our website uses. Mar 17, 2017
lib Update LKG (#22085) Feb 21, 2018
scripts Apply 'no-unnecessary-type-assertion' lint rule (#22005) Feb 17, 2018
src LEGO: check in for master to temporary branch. Mar 20, 2018
tests Combine keyof T inferences (#22525) Mar 19, 2018
.editorconfig Use CRLF, not LF. Mar 2, 2015
.gitattributes Never normalize end-of-lines on clone/commit. May 31, 2015
.gitignore configureNightly -> configurePrerelease Jan 20, 2018
.gitmodules Unshallow submodule clones, update submodule ref (#20636) Dec 12, 2017
.mailmap Update authors Jan 30, 2018
.npmignore Update .npmignore (#22318) Mar 5, 2018
.travis.yml update branch list Mar 9, 2018
AUTHORS.md Update authors Jan 30, 2018
CONTRIBUTING.md Update CONTRIBUTING.md Jan 8, 2018
CopyrightNotice.txt Baseline public API (#18897) Oct 3, 2017
Gulpfile.ts Change esnext.promise to es2018.promise (#22292) Mar 3, 2018
Jakefile.js Change esnext.promise to es2018.promise (#22292) Mar 3, 2018
LICENSE.txt Add snapshot of compiler sources Jul 13, 2014
README.md Update README.md Sep 7, 2017
ThirdPartyNoticeText.txt [Transforms] Merge master 07/11 into transform (#9697) Jul 18, 2016
issue_template.md Update issue_template.md Jan 17, 2018
jenkins.sh Update build scripts for npm5 May 30, 2017
netci.groovy Drop node 4, add node 8 for CI (#19617) Oct 31, 2017
package-lock.json type-operator-spacing: Just check for presence of space, not double-s… Jan 8, 2018
package.json Update version (#21319) Jan 24, 2018
pull_request_template.md PR template typo: labeled / labelled (#21854) Feb 10, 2018
tslint.json Apply 'no-unnecessary-initializer' lint rule (#22014) Mar 6, 2018

README.md

Build Status npm version Downloads

TypeScript

Join the chat at https://gitter.im/Microsoft/TypeScript

TypeScript is a language for application-scale JavaScript. TypeScript adds optional types, classes, and modules to JavaScript. TypeScript supports tools for large-scale JavaScript applications for any browser, for any host, on any OS. TypeScript compiles to readable, standards-based JavaScript. Try it out at the playground, and stay up to date via our blog and Twitter account.

Installing

For the latest stable version:

npm install -g typescript

For our nightly builds:

npm install -g typescript@next

Contribute

There are many ways to contribute to TypeScript.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Building

In order to build the TypeScript compiler, ensure that you have Git and Node.js installed.

Clone a copy of the repo:

git clone https://github.com/Microsoft/TypeScript.git

Change to the TypeScript directory:

cd TypeScript

Install Gulp tools and dev dependencies:

npm install -g gulp
npm install

Use one of the following to build and test:

gulp local            # Build the compiler into built/local 
gulp clean            # Delete the built compiler 
gulp LKG              # Replace the last known good with the built one.
                      # Bootstrapping step to be executed when the built compiler reaches a stable state.
gulp tests            # Build the test infrastructure using the built compiler. 
gulp runtests         # Run tests using the built compiler and test infrastructure. 
                      # You can override the host or specify a test for this command. 
                      # Use host=<hostName> or tests=<testPath>. 
gulp runtests-browser # Runs the tests using the built run.js file. Syntax is gulp runtests. Optional
                        parameters 'host=', 'tests=[regex], reporter=[list|spec|json|<more>]'.
gulp baseline-accept  # This replaces the baseline test results with the results obtained from gulp runtests.
gulp lint             # Runs tslint on the TypeScript source.
gulp help             # List the above commands. 

Usage

node built/local/tsc.js hello.ts

Roadmap

For details on our planned features and future direction please refer to our roadmap.

You can't perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.