🚀 feat(index.d.ts): add ConfigPackage interface to provide utility functions for configuration management
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
The ConfigPackage interface is added to provide utility functions for configuration management. It includes methods to get the current namespace string and the current project object, enhancing the flexibility and ease of managing configurations within the application.
This commit is contained in:
parent
194cd2eba8
commit
380bd89787
17
index.d.ts
vendored
17
index.d.ts
vendored
@ -102,6 +102,22 @@ declare global {
|
||||
job?: JobConfig
|
||||
}
|
||||
|
||||
interface ConfigPackage {
|
||||
/**
|
||||
* get current namespace string
|
||||
*
|
||||
*/
|
||||
namespace(): string
|
||||
|
||||
/**
|
||||
* get current project object
|
||||
*
|
||||
*/
|
||||
project(): {
|
||||
[key: string]: any
|
||||
}
|
||||
}
|
||||
|
||||
interface DbPackage {
|
||||
/**
|
||||
* read results from a collection
|
||||
@ -652,6 +668,7 @@ declare global {
|
||||
[key: string]: any
|
||||
}
|
||||
|
||||
config: ConfigPackage
|
||||
db: DbPackage
|
||||
smtp: SmtpPackage
|
||||
fs: FsPackage
|
||||
|
Loading…
Reference in New Issue
Block a user