1

I am new to typescript and need help getting a thrift-generated module to import into my Angular 7 project. I get an error when I compile:

ERROR in src/app/user.service.ts(5,33): error TS2306: File '/Users/xxxx/projects/tct-client/src/app/gen-js/TestModule_types.d.ts' is not a module.

The thrift:

  namespace js Test
  struct TestModuleClass
  {
    1: required string somestring
  }

The generated typescript:

  declare module Test {
    class TestModuleClass {
      somestring: string;

        constructor(args?: { somestring: string; });
    }
  }

The import line:

  import { TestModuleClass } from './gen-js/TestModule_types';

Thanks in advance for any help here!

ohthepain
  • 2,004
  • 3
  • 19
  • 30
  • https://stackoverflow.com/questions/49526681/how-to-call-javascript-functions-from-typescript-in-angular-5 – dota2pro May 31 '19 at 22:05

0 Answers0