I have a typescript module with some functions that i want to export. Lets call that module - service.ts
//service.ts
export const firstFunction = () => {}
export const secondFunction = () => {}
Now i can use those functions in some other file, lets call it consumer.ts
//consumer.ts
import {firstFunction, secondFunction} from 'service.ts'
firstFunction()
secondFunction()
MY WISH to access those functions through an object like this
//consumer.ts
import ??? from 'service.ts'
service.firstFunction()
service.secondFunction()
SOLUTION 1 - asterisk import - i don't want this solution
PROBLEM 1 - visual studio code can't autoimport service when i want to use it
//consumer.ts
import * as service from 'service.ts'
service.firstFunction()
service.secondFunction()
SOLUTION 2 - export object - I like this solution
PROBLEM 2 - i don't know if this is a bad practice
//service.ts
const firstFunction = () => {}
const secondFunction = () => {}
export const service = { firstFunction, secondFunction }
//consumer.ts
import {service} from 'service.ts'
service.firstFunction()
service.secondFunction()