Looks like you forgot to return value from factory:
export function init(config: ConfigService) {
return () => {
return config.load(); // add return
};
}
or the same code can be written a bit shortly:
export function init(config: ConfigService) {
return () => config.load();
}