Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/current.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { camelize } from "./util"

type CurrentValueObject = { [key: string]: string }
type CurrentValue = string | CurrentValueObject
type CurrentType = { [key: string]: CurrentValue | undefined }

const currentProxy = {
get(_target: object, propertyName: string): CurrentValue {
Expand All @@ -25,7 +26,7 @@ const currentProxy = {
},
}

export const Current = new Proxy({}, currentProxy)
export const Current: CurrentType = new Proxy({}, currentProxy)
export const config = {
prefix: "current",
}
5 changes: 4 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@
"typeRoots": [
"./node_modules/@types"
]
}
},
"include": [
"src/**/*"
],
}