From 23bfb7e13647b48ab34bd69272169ee8cee48e90 Mon Sep 17 00:00:00 2001 From: Daniel Byrne Date: Mon, 10 Jun 2019 21:55:45 -0700 Subject: [PATCH] Update `KeyPair.getPublic` overloads (#36098) Had some bad overload definitions get through without me realizing. --- types/elliptic/index.d.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/types/elliptic/index.d.ts b/types/elliptic/index.d.ts index 56d1f4521b..59fa2a0da2 100644 --- a/types/elliptic/index.d.ts +++ b/types/elliptic/index.d.ts @@ -252,8 +252,10 @@ export namespace ec { constructor(ec: ec, options: KeyPairOptions); validate(): { readonly result: boolean; readonly reason: string }; - getPublic(compact: boolean, enc: "hex" | "array"): string | number[]; - getPublic(enc: "hex" | "array"): string; + getPublic(compact: boolean, enc: "hex"): string; + getPublic(compact: boolean, enc: "array"): number[]; + getPublic(enc: "hex"): string; + getPublic(enc: "array"): number[]; getPublic(): curve.base.BasePoint; getPrivate(enc: "hex"): string; getPrivate(): BN;