summaryrefslogtreecommitdiffhomepage
path: root/src/helpers/decodeClientDataJSON.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/helpers/decodeClientDataJSON.ts')
-rw-r--r--src/helpers/decodeClientDataJSON.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/helpers/decodeClientDataJSON.ts b/src/helpers/decodeClientDataJSON.ts
index b957d60..2b5bbbd 100644
--- a/src/helpers/decodeClientDataJSON.ts
+++ b/src/helpers/decodeClientDataJSON.ts
@@ -1,3 +1,5 @@
+import { ClientDataJSON } from '@types';
+
import asciiToBinary from './asciiToBinary';
/**
@@ -6,7 +8,7 @@ import asciiToBinary from './asciiToBinary';
* @param data
* @returns {Object} - the data as JSON
*/
-export default function decodeClientDataJSON(data: string) {
+export default function decodeClientDataJSON(data: string): ClientDataJSON {
const toString = asciiToBinary(data);
return JSON.parse(toString);
}