mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
marked callback parameter as optional
This commit is contained in:
parent
0341d2d082
commit
45fc145478
4
types/align-text/index.d.ts
vendored
4
types/align-text/index.d.ts
vendored
@ -31,7 +31,7 @@ interface Callback {
|
||||
| TransformResult;
|
||||
}
|
||||
|
||||
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: string, fn?: number | Callback): string;
|
||||
declare function align_text(text: string[], fn?: number | Callback): string[];
|
||||
|
||||
export = align_text;
|
||||
|
||||
@ -4,3 +4,5 @@ const text = ["abc", "abc", "abc"];
|
||||
align(text, 4);
|
||||
|
||||
align("abc", 2);
|
||||
|
||||
align("abc");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user