items in arrays are automatically stringified

This commit is contained in:
Claas Ahlrichs 2019-03-30 11:34:32 +01:00
parent 45fc145478
commit e23c909bb5
2 changed files with 7 additions and 1 deletions

View File

@ -32,6 +32,6 @@ interface Callback {
}
declare function align_text(text: string, fn?: number | Callback): string;
declare function align_text(text: string[], fn?: number | Callback): string[];
declare function align_text(text: any[], fn?: number | Callback): string[];
export = align_text;

View File

@ -0,0 +1,6 @@
import align from "align-text";
const text = ["abc", true, 123456, { hello: "world" }];
align(text, 4);
align(text);