feat: add source maps#6
Conversation
- add source maps to help developers to debug problems - upgrade direct & indirect dependencies - specify stricter interface types
| Object.freeze(this) | ||
| } | ||
|
|
||
| static fromInteger(amount: number|any, currency?: string): Money { |
There was a problem hiding this comment.
It's a "minor" breaking change, but we're still below 1.x.x, and I bumped versions. This change it might seem too radical 2 years ago, but today most TypeScript code bases are much stricter than before, and this can help developers to spot bugs at "build time", instead of runtime.
There was a problem hiding this comment.
No controversy at all, I think it's a very welcomed change!
|
Thanks for the contribution @castarco ! I just came back from vacation and should be able to review the PR over the weekend. |
macor161
left a comment
There was a problem hiding this comment.
Thanks again for your PR! The added interface makes the library much cleaner!
I suggested a minor change, let me know what you think.
| } | ||
|
|
||
| static fromDecimal(amount: number|any, currency: string|any, rounder?: string|Function): Money { | ||
| static fromDecimal(amount: number | Partial<IMoney>, currency: string|any, rounder?: string|Function): Money { |
There was a problem hiding this comment.
I would probably use IMoney directly since none of its properties are optional for this function.
| static fromDecimal(amount: number | Partial<IMoney>, currency: string|any, rounder?: string|Function): Money { | |
| static fromDecimal(amount: number | IMoney, currency: string|any, rounder?: string|Function): Money { |
| } | ||
|
|
||
| static fromInteger(amount: number|any, currency?: string): Money { | ||
| static fromInteger(amount: number | Partial<IMoney>, currency?: string): Money { |
There was a problem hiding this comment.
I would probably use IMoney directly since none of its properties are optional for this function. (See line 87)
| static fromInteger(amount: number | Partial<IMoney>, currency?: string): Money { | |
| static fromInteger(amount: number | IMoney, currency?: string): Money { |
| Object.freeze(this) | ||
| } | ||
|
|
||
| static fromInteger(amount: number|any, currency?: string): Money { |
There was a problem hiding this comment.
No controversy at all, I think it's a very welcomed change!
constwhen possible