diff --git a/src/ext.d.ts b/src/ext.d.ts index 2c951220..a558aea3 100644 --- a/src/ext.d.ts +++ b/src/ext.d.ts @@ -2,35 +2,6 @@ import type { DebugPacket } from './app/state/debugPackets'; -declare module 'browser-encrypt-attachment' { - export interface EncryptedAttachmentInfo { - v: string; - key: { - alg: string; - key_ops: string[]; - kty: string; - k: string; - ext: boolean; - }; - iv: string; - hashes: { - [alg: string]: string; - }; - } - - export interface EncryptedAttachment { - data: ArrayBuffer; - info: EncryptedAttachmentInfo; - } - - export function encryptAttachment(dataBuffer: ArrayBuffer): Promise; - - export function decryptAttachment( - dataBuffer: ArrayBuffer, - info: EncryptedAttachmentInfo, - ): Promise; -} - declare module '*.svg' { const content: string; export default content; diff --git a/src/types/browser-encrypt-attachment.d.ts b/src/types/browser-encrypt-attachment.d.ts new file mode 100644 index 00000000..d3d63010 --- /dev/null +++ b/src/types/browser-encrypt-attachment.d.ts @@ -0,0 +1,28 @@ +declare module 'browser-encrypt-attachment' { + export interface EncryptedAttachmentInfo { + v: string; + key: { + alg: string; + key_ops: string[]; + kty: string; + k: string; + ext: boolean; + }; + iv: string; + hashes: { + [alg: string]: string; + }; + } + + export interface EncryptedAttachment { + data: ArrayBuffer; + info: EncryptedAttachmentInfo; + } + + export function encryptAttachment(dataBuffer: ArrayBuffer): Promise; + + export function decryptAttachment( + dataBuffer: ArrayBuffer, + info: EncryptedAttachmentInfo, + ): Promise; +}