How can I import object of object from file in typescript. I know I can import like import house from 'a/b/c/house'. but can I just import parent? so I do not need to write the code like
house.grandparent.parent.xxx
#filepath: a/b/c/house.ts
const house = {
grandparent: {
parent: {
childa: (text: string) => `s'${text}')`,
childb: 'b',
childc: 'c',
},
},
};
export default house;
You could split the objects.