Clamp typechecks -> Flow

Reviewed By: yungsters

Differential Revision: D8219220

fbshipit-source-id: e849d9dae573459e4b09e317cc6dc37bec9ce4e8
This commit is contained in:
Eli White
2018-06-01 10:11:12 -07:00
committed by Facebook Github Bot
parent ec265df1d2
commit 2314c83258

View File

@@ -5,18 +5,12 @@
* LICENSE file in the root directory of this source tree.
*
* @format
* @typechecks
* @flow
*/
'use strict';
/**
* @param {number} min
* @param {number} value
* @param {number} max
* @return {number}
*/
function clamp(min, value, max) {
function clamp(min: number, value: number, max: number): number {
if (value < min) {
return min;
}