0

similar https://stackoverflow.com/a/64886843/18384098

I can't use it when code in react-scripts building development web-site.

in b.ts

export namespace B {
  export const val = 'val';
}

in a.ts

import {B as _b} from './b.ts'
export namespace A {
  export import B = _b
}

And finally in C.ts

import { A } from './a.ts'
const b2 = A.B.val;

I got undefined at import object, which as son-namespace, such as _b or B is undefined

0 Answers0