Skip to content

Commit bf54583

Browse files
authored
Move type-only imports to comments (#924)
1 parent 40b170a commit bf54583

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

create_import_list.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,14 @@ const createLayerlist = async () => {
189189
}
190190
types.sort((a, b) => (a.type < b.type ? -1 : 1))
191191
let typeCode = `
192-
import Matrix from '../../../util/matrix.js'
193-
import Tensor from '../../../util/tensor.js'
192+
/**
193+
* @ignore
194+
* @typedef {import("../../../util/matrix").default} Matrix
195+
* @ignore
196+
* @typedef {import("../../../util/tensor").default} Tensor
197+
* @ignore
198+
* @typedef {import("../../neuralnetwork").default} NeuralNetwork
199+
*/
194200
/**
195201
* @typedef {(
196202
`

lib/model/nns/layer/index.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,14 @@ export { default as TransposeLayer } from './transpose.js'
102102
export { default as VariableLayer } from './variable.js'
103103
export { default as VarLayer } from './variance.js'
104104

105-
import Matrix from '../../../util/matrix.js'
106-
import Tensor from '../../../util/tensor.js'
105+
/**
106+
* @ignore
107+
* @typedef {import("../../../util/matrix").default} Matrix
108+
* @ignore
109+
* @typedef {import("../../../util/tensor").default} Tensor
110+
* @ignore
111+
* @typedef {import("../../neuralnetwork").default} NeuralNetwork
112+
*/
107113
/**
108114
* @typedef {(
109115
* { type: 'abs' } |

0 commit comments

Comments
 (0)