Including moment-range typings in typescript project -


i've started new typescript project , want make use of moment-range. i've installed moment-range , @typings/moment-range , i've added these lines top of document:

import * moment 'moment'; import { daterange } 'moment-range';  

however, i'm still presented error: property 'range' not exist on type 'typeof moment'

this tsconfig.json:

{     "compileroptions": {         "module": "commonjs",         "target": "es5",         "experimentaldecorators": true,         "emitdecoratormetadata": true,         "noemithelpers": false,         "noemitonerror": true,         "lib": [             "es6",             "dom",             "es2015.iterable"         ],         "baseurl": ".",         "paths": {             "*": [                 "./node_modules/tns-core-modules/*",                 "./node_modules/*"             ]         }     },     "exclude": [         "node_modules",         "platforms",         "**/*.aot.ts"     ] } 

what step missing?

also, there way globally include moment range typings don't have in each file?

it looks trying call range on moment itself. instead of moment-range.

if @ docs on npmjs says import moment range this:

import moment 'moment'; import { extendmoment } 'moment-range';  const moment = extendmoment(moment); 

are extending moment? kind of project operating in?


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -