I am trying to change from using external (export
) modules, to using internal modules. But I am getting an error when I remove the "export".
I have a file like this:
box.ts:
import {computedFrom} from 'aurelia-framework';
module Entities {
export class Box { .. Stuff }
I use this in another file.
service-actions.ts:
/// <reference path="../entities/box.ts" />
....
var box = new Entities.Box();
This gives me the following error:
Property 'Box' does not exist on 'typeof(Entities)'
But if I take out import {computedFrom} from 'aurelia-framework';
then the error is gone (it works fine).
I tried moving the import {computedFrom} from 'aurelia-framework';
into the module. When I do that the error is gone, but I get a new one:
Import declarations in a namespace cannot reference a module.
What can I do to be able to use the computedFrom
module in my class? (Does it have to be an external module for it to work?)