forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🤖 Merge PR DefinitelyTyped#52826 fix(number-to-words): UMD support an…
…d input type fix by @peterblazejewicz - this library suppots string numeric values as inputs. It's event documented in the source code: https://github.com/marlun78/number-to-words/blob/master/numberToWords.js#L146 - add proper UMD support to use in the browsers: https://github.com/marlun78/number-to-words/blob/master/numberToWords.js#L252-L259 - tests amended Thanks!
- Loading branch information
1 parent
4b34964
commit 4eeb93a
Showing
2 changed files
with
14 additions
and
7 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
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,7 +1,10 @@ | ||
import * as converter from 'number-to-words'; | ||
import numberToWords = require("number-to-words"); | ||
|
||
converter.toOrdinal(21); | ||
numberToWords.toOrdinal(21); // $ExpectType string | ||
numberToWords.toOrdinal("21"); // $ExpectType string | ||
|
||
converter.toWords(13); | ||
numberToWords.toWords(13); // $ExpectType string | ||
numberToWords.toWords("13"); // $ExpectType string | ||
|
||
converter.toWordsOrdinal(21); | ||
numberToWords.toWordsOrdinal(21); // $ExpectType string | ||
numberToWords.toWordsOrdinal("21"); // $ExpectType string |