diff options
author | Matthew Miller <matthew@millerti.me> | 2020-05-18 08:38:15 -0700 |
---|---|---|
committer | Matthew Miller <matthew@millerti.me> | 2020-05-18 08:44:45 -0700 |
commit | 7217bc9978408e06a8dd446ac7e728ad816463eb (patch) | |
tree | 7f38c99e739cc1bc2f0f6644ab19546bcac073c8 /src/helpers/decodeClientDataJSON.ts | |
parent | b8e10c49c5be2ee3e3e61ebdac1bc0d28809cf15 (diff) |
Move custom type defs into a single file
Diffstat (limited to 'src/helpers/decodeClientDataJSON.ts')
-rw-r--r-- | src/helpers/decodeClientDataJSON.ts | 4 |
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); } |