Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Typescript vscode中tensorflowjs的智能感知_Typescript_Visual Studio Code_Intellisense_Jsdoc_Tensorflow.js - Fatal编程技术网

Typescript vscode中tensorflowjs的智能感知

Typescript vscode中tensorflowjs的智能感知,typescript,visual-studio-code,intellisense,jsdoc,tensorflow.js,Typescript,Visual Studio Code,Intellisense,Jsdoc,Tensorflow.js,npm模块@tensorflow/tfjs具有声明文件,其注释结构如下: /** * Creates a new array with randomized indicies to a given quantity. * * ```js * const randomTen = tf.util.createShuffledIndices(10); * console.log(randomTen); * ``` * * @param number Quantity of how ma

npm模块@tensorflow/tfjs具有声明文件,其注释结构如下:

/**
 * Creates a new array with randomized indicies to a given quantity.
 *
 * ```js
 * const randomTen = tf.util.createShuffledIndices(10);
 * console.log(randomTen);
 * ```
 *
 * @param number Quantity of how many shuffled indicies to create.
 */
/** @doc {heading: 'Util', namespace: 'util'} */
export declare function createShuffledIndices(n: number): Uint32Array;
这导致我的vs代码的intellisense显示如下内容:

/**
 * Creates a new array with randomized indicies to a given quantity.
 *
 * ```js
 * const randomTen = tf.util.createShuffledIndices(10);
 * console.log(randomTen);
 * ```
 *
 * @param number Quantity of how many shuffled indicies to create.
 */
/** @doc {heading: 'Util', namespace: 'util'} */
export declare function createShuffledIndices(n: number): Uint32Array;

文档看起来有点像jsdoc,只是关闭并重新打开注释可能会破坏它

由于tensorflowjs不太可能破坏文档,我可能只是犯了一些非常简单的错误。这很可能是个骗局。遗憾的是,我所有的搜索都失败了

仅仅关闭并重新打开评论可能会破坏它

百分之百。它需要是单个注释块

应该是:

/**
 * Creates a new array with randomized indicies to a given quantity.
 *
 * ```js
 * const randomTen = tf.util.createShuffledIndices(10);
 * console.log(randomTen);
 * ```
 *
 * @param n Quantity of how many shuffled indicies to create.
 */
export declare function createShuffledIndices(n: number): Uint32Array;

它在TFJS2.4.0中得到了修复,高兴吧

因为tensorflowjs不太可能破坏文档
每个人都会因此而犯错误。我猜是时候对正则表达式进行搜索和销毁了,直到它被修复,并且新版本是稳定的。您可能已经注意到我将
@param number
(没有名为number的参数)也修复为
@param n