requirejs - How to import a TypeScript file from another directory? -


this code works fine:

import modal = require('./modal');//modal path class index{ constructor(){   var_modal = new modal();   } } export = index 

if change require path "../../widgets/personinfo/viewmodel", after rebuild solution visual studio gives error:

unable resolve external module "../../widgets/personinfo/viewmodel", build: module cannot aliased non-module type, invalid 'new' expression

the problem found. folder name starting uppercase, while require path all-lowercase.

valid code:

import modal = require('../../widgets/personinfo/viewmodel')  

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -