-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
12 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,14 @@ | ||
/** | ||
* The signature for a function acting as an event handler. | ||
* A class. | ||
*/ | ||
export type EventHandler = ((e: Event) => void); | ||
class MyClass { | ||
/** | ||
* My summary documentation, which is duplicated. | ||
* @param digits - must be a non-negative integer | ||
* @returns a function that converts a string to a string without so many decimals | ||
* @see See string is also duplicated. | ||
*/ | ||
public static stringifyFixed(digits: number): (val: string) => string { | ||
return (val: string) => parseFloat(val).toFixed(digits).toString(); | ||
} | ||
} |