Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
config
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libs
config
Commits
cec3a017
Commit
cec3a017
authored
1 year ago
by
Sigmund, Dominik
Browse files
Options
Downloads
Plain Diff
Merge branch '2-add-optional-prefix-for-env-variables' into 'main'
add factory function Closes
#2
See merge request
!6
parents
b77a07a7
907e39ef
No related branches found
Branches containing commit
Tags
1.13.4
Tags containing commit
1 merge request
!6
add factory function
Pipeline
#65502
passed
1 year ago
Stage: test
Stage: publish
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
index.d.ts
+12
-7
12 additions, 7 deletions
index.d.ts
package.json
+1
-1
1 addition, 1 deletion
package.json
with
13 additions
and
8 deletions
index.d.ts
+
12
−
7
View file @
cec3a017
export
class
Config
{
// Define the shape of the return type of the config function
constructor
(
basePath
?:
string
,
envPrefix
?:
string
);
interface
Config
{
_reload
():
void
;
_reload
():
void
;
_show
():
any
;
_show
():
any
;
// Index signature
[
key
:
string
]:
any
;
// Index signature for dynamic properties
[
key
:
string
]:
any
;
}
}
\ No newline at end of file
// Declare the function that returns a Config object
declare
function
createConfig
(
basePath
?:
string
,
envPrefix
?:
string
):
Config
;
// Export the declared function
export
=
createConfig
;
This diff is collapsed.
Click to expand it.
package.json
+
1
−
1
View file @
cec3a017
{
{
"name"
:
"@libs/config"
,
"name"
:
"@libs/config"
,
"version"
:
"1.13.
3
"
,
"version"
:
"1.13.
4
"
,
"description"
:
"Simple Config with ENV Support"
,
"description"
:
"Simple Config with ENV Support"
,
"main"
:
"index.js"
,
"main"
:
"index.js"
,
"scripts"
:
{
"scripts"
:
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment