Skip to content

Commit 2b0bd3a

Browse files
committed
refactor: remove any
Signed-off-by: Grant Timmerman <timmerman+devrel@google.com>
1 parent 482b172 commit 2b0bd3a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib/formats/json/parser.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ const {
22
isString,
33
isDefinedOrThrow,
44
isStringOrObjectOrThrow
5-
} = require("../../bindings/http/validation/fun.js");
5+
} = require("../../bindings/http/validation/fun");
66
const ValidationError = require("../../bindings/http/validation/validation_error.js");
77

88
const invalidPayloadTypeError = new ValidationError("invalid payload type, allowed are: string or object");
99
const nullOrUndefinedPayload = new ValidationError("null or undefined payload");
1010

11-
const asJSON = (v: any) => (isString(v) ? JSON.parse(v) : v);
11+
const asJSON = (v: object|string) => (isString(v) ? JSON.parse(v as string) : v);
1212

1313
class JSONParser {
1414
decorator: any
15-
constructor(decorator: any) {
15+
constructor(decorator: Base64Parser) {
1616
this.decorator = decorator;
1717
}
1818

0 commit comments

Comments
 (0)