Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: migrate random.js to typescript (#2164)

Abdulrehman-Jaferf5ac51db1363
diff --git a/apps/web/src/utils/random.js b/apps/web/src/utils/random.ts
similarity index 89%
rename from apps/web/src/utils/random.js
rename to apps/web/src/utils/random.ts
index 1e9cdeee9..f7949e4f5 100644
--- a/apps/web/src/utils/random.js
+++ b/apps/web/src/utils/random.ts
@@ -17,11 +17,11 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-function getRandom(min, max) {
+function getRandom(min: number, max: number) {
return Math.round(Math.random() * (max - min) + min);
}
-function getRandomArbitrary(min, max) {
+function getRandomArbitrary(min: number, max: number) {
return Math.random() * (max - min) + min;
}
export { getRandom, getRandomArbitrary };