Skip to content

Commit c0d6f28

Browse files
authored
fix: typings for extensions (#109)
* fix: typings for extensions * chore: version bumps for release
1 parent 5140d26 commit c0d6f28

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 6.0.4 (04/03/20)
2+
* Fix compilation error caused by typings generic issue.
3+
14
## 6.0.3 (03/03/20)
25
* Fix typings to support `required()`, `convertFromBase64()`, etc. with `ExtensionFn`.
36

env-var.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import { Url } from 'url';
55

6-
interface IPresentVariable<Extensions> {
6+
interface IPresentVariable<Extensions = {}> {
77
/**
88
* Converts a bas64 environment variable to ut8
99
*/
@@ -120,7 +120,7 @@ interface IPresentVariable<Extensions> {
120120
asEnum: (validValues: string[]) => string;
121121
}
122122

123-
interface IOptionalVariable<Extensions> {
123+
interface IOptionalVariable<Extensions = {}> {
124124
/**
125125
* Decodes a base64-encoded environment variable
126126
*/

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "env-var",
3-
"version": "6.0.3",
3+
"version": "6.0.4",
44
"description": "Verification, sanatization, and type coercion for environment variables in Node.js",
55
"main": "env-var.js",
66
"typings": "env-var.d.ts",

tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"compilerOptions": {
3-
"sourceMap": true,
4-
"noImplicitAny": true,
3+
"sourceMap": false,
54
"target": "es5",
65
"moduleResolution": "node",
76
"skipLibCheck": true,
87
"strict": true,
8+
"noImplicitAny": true,
99
"strictNullChecks": true
1010
},
1111
"files": ["test/types/index.ts", "example/typescript.ts"]

0 commit comments

Comments
 (0)