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
All dir functions in path (homeDir, configDir, etc.) are asynchronous. This is great as a default behaviour, but sometimes it's extremely inconvenient.
I'm currently building an app where I define the application's path based on the user's configuration directory and then use it in many different functions, including some synchronous ones. With the current library, this is completely impossible as getting the user's config. directory results in a Promise. So I'm forced to make all these functions asynchronous just because of that.
// This is a Promise<string>, I'd like a string.exportconstDATA_DIR=path.configDir().then((configDir)=>path.join(configDir,'Writer'))
Describe the solution you'd like
Would it be possible to make synchronous counterparts of these methods? This would be quite useful in this scenario, and fetching these directory's path is extremely fast so it wouldn't make the app unresponsive.
Alternatives considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the problem
All dir functions in
path
(homeDir
,configDir
, etc.) are asynchronous. This is great as a default behaviour, but sometimes it's extremely inconvenient.I'm currently building an app where I define the application's path based on the user's configuration directory and then use it in many different functions, including some synchronous ones. With the current library, this is completely impossible as getting the user's config. directory results in a
Promise
. So I'm forced to make all these functions asynchronous just because of that.Describe the solution you'd like
Would it be possible to make synchronous counterparts of these methods? This would be quite useful in this scenario, and fetching these directory's path is extremely fast so it wouldn't make the app unresponsive.
Alternatives considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: