mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-23 11:57:46 +08:00
Clamp typechecks -> Flow
Reviewed By: yungsters Differential Revision: D8219220 fbshipit-source-id: e849d9dae573459e4b09e317cc6dc37bec9ce4e8
This commit is contained in:
committed by
Facebook Github Bot
parent
ec265df1d2
commit
2314c83258
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user