Skip to content
An AMD loader plugin for TypeScript


require-ts is a Require.js plugin that allows you to require TypeScript dependencies into your project.



You leverage require-ts like any other require.js plugin! Simply place "ts!" before your dependency path, make sure to leave off the file extension.

define(['ts!a/typescript/dep'], function(dep) {
  // dep is compiled to JS at this point.

You can also see the "example" folder, where require-ts is being used to run the Microsoft provided greeter sample.

Type Declarations

You can load in TypeScript type declaration files by adding some configuration to your require.js configuration. Ultimately a a string of the source needs to be passed into the compiler and for the time being you can use the text! plugin.

  ts: {
    declarations: [


npm install && grunt build

Implementation Details

This project leverages git submodules to embed the TypeScript project. This allows us to automate the build for a new version of the plugin as the TypeScript project moves forward. We leverage grunt and rigger to build the plugin.



The text loading mechanisms is extracted from require-cs, the work done by James Burke.


Available via the MIT or new BSD license.

Something went wrong with that request. Please try again.