Fix createMessage return type in type definitions (#1276)

This commit is contained in:
Kevin Moutet 2021-03-27 22:22:33 +01:00 committed by GitHub
parent eb496d2018
commit b8c07d6343
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

4
openpgp.d.ts vendored
View File

@ -146,8 +146,8 @@ export class CleartextMessage {
export function readMessage<T extends MaybeStream<string>>(options: { armoredMessage: T, config?: PartialConfig }): Promise<Message<T>>;
export function readMessage<T extends MaybeStream<Uint8Array>>(options: { binaryMessage: T, config?: PartialConfig }): Promise<Message<T>>;
export function createMessage<T extends MaybeStream<string>>(options: { text: T, filename?: string, date?: Date, type?: DataPacketType }): Message<T>;
export function createMessage<T extends MaybeStream<Uint8Array>>(options: { binary: T, filename?: string, date?: Date, type?: DataPacketType }): Message<T>;
export function createMessage<T extends MaybeStream<string>>(options: { text: T, filename?: string, date?: Date, type?: DataPacketType }): Promise<Message<T>>;
export function createMessage<T extends MaybeStream<Uint8Array>>(options: { binary: T, filename?: string, date?: Date, type?: DataPacketType }): Promise<Message<T>>;
export function encrypt<T extends MaybeStream<Data>>(options: EncryptOptions & { message: Message<T>, armor: false }): Promise<
T extends WebStream<infer X> ? WebStream<Uint8Array> :