You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Motivation: to support ts-node-esm, plus improve the API in general.
Should be able to read configuration without creating a Service nor loading any extra dependencies.
While we're at it, we should allow create()ing a service and then passing it to register(). Should not be forced to create and register at once.
import*astsNodefrom'ts-node';// Not to be confused with current, internal readConfig, which is narrower in scopeconstconfig=tsNode.readConfig(/*ReadConfigOptions, similar to CreateOptions*/);constservice=createFromConfig(config);register(service);// Can we do this with overload? Do we need new `registerService()` function?
Will allow ts-node-esm to read config, determine it needs to spawn child process, spawn child, and then for child to skip the config parsing step and call create and register.