Just like everyone said when we have import
and export
in same file we get this TS error.
Sometimes I want to aggregate all file exports in index.ts
file and export them again in one place (index.ts
)
In this case exporting as default will fix the problem.
import {CONFIG} from './config.ts';
import {COLORS} from './colors.ts';
// and other imports
export default {
CONFIG,
COLORS
}