0

Actually I write a frontend and backend for my game. I have problem with declarations of namespace in other folder locations.

I have two classes in my namespace:

namespace Quests {
export abstract class AbstractQuest {...

namespace Quests {
export class KillWorms extends Quests.AbstractQuest { ...

In backend I want get value from static value of KillWorms. I trying like that:

import * as worms from "./../src/quests/list/KillWorms";
namespace Server {
    export class QuestManager {


        constructor() {
            console.log(worms);
        }
    }
}

It doesn't work, can you help me?

neuro
  • 14,948
  • 3
  • 36
  • 59
  • Add export to namespace and import in the Server – Sreemat Sep 20 '17 at 12:47
  • Do not use _namespaces_ at all. The right way is _ES6 modules_. – Paleo Sep 20 '17 at 14:38
  • Possible duplicate of [How to use namespaces with import in TypeScript](https://stackoverflow.com/questions/37565709/how-to-use-namespaces-with-import-in-typescript) – Paleo Sep 20 '17 at 14:41

0 Answers0