Search code examples
node.jstypescriptsystemjsdefinitelytyped

DefinitelyTyped for systemjs-builder


Is there a DefinitelyTyped for systemjs-builder? https://github.com/systemjs/builder

Because systemjs.d.ts does not seem to include it, and I get a "cannot find module" error when I try to import it:

import Builder = require('systemjs-builder');

And I couldn't find a systemjs-builder.d.ts file on the internet.

If there isn't a DefinitelyTyped for that library, how can I use it with TypeScript?

Any help will be profoundly appreciated!


Solution

  • This one https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/systemjs/systemjs.d.ts should includes Type definifions for the builder.

    edit: it seems like there are no typings avalible (maybe most use it with js). When you dont want to create the typings yourself you can put this in a systemjs-builder.d.ts:

    declare module "systemjs-builder" {
      var builder: any;
      export = builder;
    }
    

    and write /// <reference path="../yourpath/systemjs-builder.d.ts" /> in your main typings.