Update index.ts
This commit is contained in:
parent
608f35a9f7
commit
4f54ae1d40
@ -151,7 +151,7 @@ export function cloneJSON(json: JSON): JSON {
|
|||||||
* // => 8.31 (Maybe)
|
* // => 8.31 (Maybe)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export function getRandom(min, max, decimals=0) {
|
export function getRandom(min: number, max: number, decimals: number=0): number {
|
||||||
const minRandom = Math.ceil(min);
|
const minRandom = Math.ceil(min);
|
||||||
const maxRandom = Math.floor(max);
|
const maxRandom = Math.floor(max);
|
||||||
return (Math.random() * (maxRandom - minRandom + 1) + minRandom).toFixed(decimals);
|
return (Math.random() * (maxRandom - minRandom + 1) + minRandom).toFixed(decimals);
|
||||||
@ -189,7 +189,7 @@ export function deleteArrayElementByIndex(index: number, list: Array<any>): Arra
|
|||||||
* @param {Array<File>} filesList
|
* @param {Array<File>} filesList
|
||||||
* @return {FileList}
|
* @return {FileList}
|
||||||
*/
|
*/
|
||||||
export function arrayFilesToFileList(filesList) {
|
export function arrayFilesToFileList(filesList): Filelist {
|
||||||
return filesList.reduce(function (dataTransfer, file) {
|
return filesList.reduce(function (dataTransfer, file) {
|
||||||
dataTransfer.items.add(file);
|
dataTransfer.items.add(file);
|
||||||
return dataTransfer;
|
return dataTransfer;
|
||||||
|
Loading…
Reference in New Issue
Block a user