thekevinscott / UpscalerJS

async function should have await expression JS-0116
Bug risk
Minor
1 occurrence in this check
Found async function without any await expressions
61export type Input = tf.Tensor3D | tf.Tensor4D | string | Uint8Array | Buffer;
62
63/* eslint-disable @typescript-eslint/require-await */
64export const getImageAsTensor = async (65  input: Input,66): Promise<tf.Tensor4D> => {67  const tensor = getTensorFromInput(input);6869  if (!hasValidChannels(tensor)) {70    throw getInvalidChannelsOfTensor(tensor);71  }7273  if (isThreeDimensionalTensor(tensor)) {74    const expandedTensor: tf.Tensor4D = tensor.expandDims(0);75    tensor.dispose();76    return expandedTensor;77  }7879  if (isFourDimensionalTensor(tensor)) {80    return tensor;81  }8283  throw getInvalidTensorError(tensor);84};85
86export const tensorAsBase64 = (tensor: tf.Tensor3D): string => {
87  const arr = tensorAsClampedArray(tensor);