|
|
|
|
|
by DogLover_
1344 days ago
|
|
Typscript:
"function area(left: number, top: number, right: number, bottom: number): number {" Javascript:
"function area(left, top, right, bottom)" In an editor the typescript function would likely be split into five separate lines. "function area( left: number, top: number, right: number, bottom: number) : number {" None of the functions are complex but the the typescript function with the formatter creates a lot of noise. |
|
It also means it's not going to explode when fed the wrong types, because that's not possible.