typescript - d.ts declaration for R.js framework -


i need create declaration file of https://github.com/keithamus/r.js

i don't know how solve r('item') problem. need .d.ts file external commonjs module able use this:

import r = require("/i18n/r"); r('item'); // problem r.setlocale("en"); 

declare module "r" {   interface r {     (name: string): void;     setlocale(locale: string): void;   }   var rmodule: r;   export = rmodule; } 

Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Magento/PHP - Get phones on all members in a customer group -

session - Logging Out Using PHP -