Answer the question
In order to leave comments, you need to log in
TypeScript import from subdirectory?
There is a module with the following folder structure: (module1)
This module will be imported in another module (module2)
How to make it so that only a single file can be imported from the Navigator/index.ts folder
module2
import { someFunc } from 'module1/Navigator'
Answer the question
In order to leave comments, you need to log in
If `someFunc` is supposed to be stored in its own file, then `Navigator/index.ts` should contain the line `export * from './some-func'`. Where some-func is the name of the file.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question