Skip to content

Commit d0cdc87

Browse files
committed
added return types for constructors
1 parent f08ddca commit d0cdc87

File tree

4 files changed

+6
-0
lines changed

4 files changed

+6
-0
lines changed

src/Battery.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class Battery {
3030

3131
/**
3232
* Takes no parameters, and initializes a fresh battery object.
33+
* @return {Battery}
3334
*/
3435
constructor() {
3536

src/Wavelength.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ class Wavelength {
1919
*
2020
* @param {number} frequencyInMegahertz - The given frequency for the wavelength.
2121
* @param {number} [precision = 4] - The float precision for returned values.
22+
* @returns {Wavelength}
23+
*
2224
*/
2325
constructor(frequencyInMegahertz, precision = 4) {
2426
if (typeof frequencyInMegahertz === 'undefined') {

src/objects/BatteryRuntime.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ class BatteryRuntime {
99
* @param {number} totalMin
1010
* @param {number} totalHours
1111
* @param {number} totalSeconds
12+
* @return {BatteryRuntime}
1213
*/
1314

1415
constructor(totalMin = 0, totalHours = 0, totalSeconds = 0) {

src/objects/BatteryStorage.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ class BatteryStorage {
88
*
99
* @param {number} coulombs
1010
* @param {number} ampHours
11+
* @return {BatteryStorage}
12+
*
1113
*/
1214

1315
constructor(coulombs = 0, ampHours = 0) {

0 commit comments

Comments
 (0)