From b3f1017c61399d480d542fd7b044e1aacb3cc18e Mon Sep 17 00:00:00 2001 From: Andy Date: Mon, 28 Aug 2017 07:19:59 -0700 Subject: [PATCH] pad: Allow to use a string instead of an options object (#19208) --- types/pad/index.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/types/pad/index.d.ts b/types/pad/index.d.ts index f169c8b564..9bf8a32dad 100644 --- a/types/pad/index.d.ts +++ b/types/pad/index.d.ts @@ -6,6 +6,10 @@ export = pad; /** left pad */ +declare function pad(length: number, text: string, char?: string): string; +// tslint:disable-next-line unified-signatures declare function pad(length: number, text: string, options?: { char?: string, colors?: boolean, strip?: boolean }): string; /** Right pad */ +declare function pad(text: string, length: number, char?: string): string; +// tslint:disable-next-line unified-signatures declare function pad(text: string, length: number, options?: { char?: string, colors?: boolean, strip?: boolean }): string;