Answer the question
In order to leave comments, you need to log in
Why doesn't import class import work in ts?
I have code
// src/index.ts
export class A {
constructor(public type) {}
}
// index.ts
import { A } from './src/index.ts'
export class B {
static C = A
}
// index.js
import { B } from './index'
let obj = new B.C('my obj')
console.log(obj.type)
// Cannot find module '.\src\array\array' imported from .\index.js
// Did you mean to import ../src/array.js?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question