From b8c07d6343cf6b82806cbd8f421ba45fbabb3a79 Mon Sep 17 00:00:00 2001 From: Kevin Moutet Date: Sat, 27 Mar 2021 22:22:33 +0100 Subject: [PATCH] Fix createMessage return type in type definitions (#1276) --- openpgp.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openpgp.d.ts b/openpgp.d.ts index 81cf5060..bfa90700 100644 --- a/openpgp.d.ts +++ b/openpgp.d.ts @@ -146,8 +146,8 @@ export class CleartextMessage { export function readMessage>(options: { armoredMessage: T, config?: PartialConfig }): Promise>; export function readMessage>(options: { binaryMessage: T, config?: PartialConfig }): Promise>; -export function createMessage>(options: { text: T, filename?: string, date?: Date, type?: DataPacketType }): Message; -export function createMessage>(options: { binary: T, filename?: string, date?: Date, type?: DataPacketType }): Message; +export function createMessage>(options: { text: T, filename?: string, date?: Date, type?: DataPacketType }): Promise>; +export function createMessage>(options: { binary: T, filename?: string, date?: Date, type?: DataPacketType }): Promise>; export function encrypt>(options: EncryptOptions & { message: Message, armor: false }): Promise< T extends WebStream ? WebStream :