From d1e0e506720196556a18d76ad3aff27b8bc9f097 Mon Sep 17 00:00:00 2001 From: kungfooman Date: Thu, 14 Sep 2023 12:08:50 +0200 Subject: [PATCH] Fix double AnyTypedArray --- src/transformers.js | 2 -- src/utils/tensor.js | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/transformers.js b/src/transformers.js index d47ed425e..9dcd0160c 100644 --- a/src/transformers.js +++ b/src/transformers.js @@ -1,5 +1,3 @@ -// @ts-nocheck - /** * @file Entry point for the Transformers.js library. Only the exports from this file * are available to the end user, and are grouped as follows: diff --git a/src/utils/tensor.js b/src/utils/tensor.js index 1b78e1675..902fe9f87 100644 --- a/src/utils/tensor.js +++ b/src/utils/tensor.js @@ -16,7 +16,7 @@ import { /** - * @typedef {import('./maths.js').AnyTypedArray} AnyTypedArray + * @typedef {import('./maths.js').AnyTypedArray | any[]} DataArray */ /** @type {Object} */ @@ -25,7 +25,7 @@ const ONNXTensor = ONNX.Tensor; export class Tensor extends ONNXTensor { /** * Create a new Tensor or copy an existing Tensor. - * @param {[string, Array|AnyTypedArray, number[]]|[ONNXTensor]} args + * @param {[string, DataArray, number[]]|[ONNXTensor]} args */ constructor(...args) { if (args[0] instanceof ONNX.Tensor) {