Skip to content

Commit c0db7ff

Browse files
committed
Added valueOf definitions for String and Number
1 parent 24141f0 commit c0db7ff

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/lib/core.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,9 @@ interface String {
410410
*/
411411
substr(from: number, length?: number): string;
412412

413+
/** Returns the primitive value of the specified object. */
414+
valueOf(): string;
415+
413416
[index: number]: string;
414417
}
415418

@@ -462,6 +465,9 @@ interface Number {
462465
* @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
463466
*/
464467
toPrecision(precision?: number): string;
468+
469+
/** Returns the primitive value of the specified object. */
470+
valueOf(): number;
465471
}
466472

467473
interface NumberConstructor {

0 commit comments

Comments
 (0)