CIDARLAB / 3DuF

Detected usage of the any type JS-0323
Anti-pattern
Critical
23 occurrences in this check
Unexpected any. Specify a different type
212        let conn_waypoints;
213        let lowestdist = 1000000000000000000000;
214        let p0: number[], p1: number[], sol: number;
215        const paths =  (connection as any).getPaths();216        const waypoints = [];
217        for (const j in paths) {
218            conn_waypoints = paths[j];
Unexpected any. Specify a different type
140        return rendered;
141    }
142
143    render2DTarget(key: string, params: { [k: string]: any }) {144        const render = this.render2D(params, key);
145        render.fillColor!.alpha = 0.5;
146        return render;
Unexpected any. Specify a different type
114        return ports;
115    }
116
117    render2D(params: { [k: string]: any }, key: string) {118        const position = params.position;
119        const px = position[0];
120        const py = position[1];
Unexpected any. Specify a different type
 97        };
 98    }
 99
100    getPorts(params: { [k: string]: any }) {101        const l = params.length;
102        const w = params.width;
103
Unexpected any. Specify a different type
181        throw new Error("Unknown render key found in IDT: " + key);
182    }
183
184    render2DTarget(key: string, params: { [k: string]: any }) {185        const ret = new paper.CompoundPath("");
186        const flow = this.render2D(params, "FLOW");
187        ret.addChild(flow);
Unexpected any. Specify a different type
174    }
175
176
177    render2D(params: { [k: string]: any }, key = "FLOW") {178        if (key === "FLOW") {
179            return this.__renderFlow(params);
180        } 
Unexpected any. Specify a different type
129        return ports;
130    }
131
132    __renderFlow(params: { [k: string]: any }) {133        const position = params.position;
134        const px = position[0];
135        const py = position[1];
Unexpected any. Specify a different type
102        };
103    }
104
105    getPorts(params: { [k: string]: any }) {106        const position = params.position;
107        const px = position[0];
108        const py = position[1];
Unexpected any. Specify a different type
181        throw new Error("Unknown render key found in IDT: " + key);
182    }
183
184    render2DTarget(key: string, params: { [k: string]: any }) {185        const ret = new paper.CompoundPath("");
186        const flow = this.render2D(params, "FLOW");
187        ret.addChild(flow);
Unexpected any. Specify a different type
174    }
175
176
177    render2D(params: { [k: string]: any }, key = "FLOW") {178        if (key === "FLOW") {
179            return this.__renderFlow(params);
180        } 
Unexpected any. Specify a different type
129        return ports;
130    }
131
132    __renderFlow(params: { [k: string]: any }) {133        const position = params.position;
134        const px = position[0];
135        const py = position[1];
Unexpected any. Specify a different type
102        };
103    }
104
105    getPorts(params: { [k: string]: any }) {106        const position = params.position;
107        const px = position[0];
108        const py = position[1];
Unexpected any. Specify a different type
181        throw new Error("Unknown render key found in IDT: " + key);
182    }
183
184    render2DTarget(key: string, params: { [k: string]: any }) {185        const ret = new paper.CompoundPath("");
186        const flow = this.render2D(params, "FLOW");
187        ret.addChild(flow);
Unexpected any. Specify a different type
174    }
175
176
177    render2D(params: { [k: string]: any }, key = "FLOW") {178        if (key === "FLOW") {
179            return this.__renderFlow(params);
180        } 
Unexpected any. Specify a different type
129        return ports;
130    }
131
132    __renderFlow(params: { [k: string]: any }) {133        const position = params.position;
134        const px = position[0];
135        const py = position[1];
Unexpected any. Specify a different type
102        };
103    }
104
105    getPorts(params: { [k: string]: any }) {106        const position = params.position;
107        const px = position[0];
108        const py = position[1];
Unexpected any. Specify a different type
181        throw new Error("Unknown render key found in IDT: " + key);
182    }
183
184    render2DTarget(key: string, params: { [k: string]: any }) {185        const ret = new paper.CompoundPath("");
186        const flow = this.render2D(params, "FLOW");
187        ret.addChild(flow);
Unexpected any. Specify a different type
174    }
175
176
177    render2D(params: { [k: string]: any }, key = "FLOW") {178        if (key === "FLOW") {
179            return this.__renderFlow(params);
180        } 
Unexpected any. Specify a different type
129        return ports;
130    }
131
132    __renderFlow(params: { [k: string]: any }) {133        const position = params.position;
134        const px = position[0];
135        const py = position[1];
Unexpected any. Specify a different type
102        };
103    }
104
105    getPorts(params: { [k: string]: any }) {106        const position = params.position;
107        const px = position[0];
108        const py = position[1];
Unexpected any. Specify a different type
139        return rendered;
140    }
141
142    render2DTarget(key: string, params: { [k: string]: any }) {143        const render = this.render2D(params, key);
144        render.fillColor!.alpha = 0.5;
145        return render;
Unexpected any. Specify a different type
114        return ports;
115    }
116
117    render2D(params: { [k: string]: any }, key: string) {118        const position = params.position;
119        const px = position[0];
120        const py = position[1];
Unexpected any. Specify a different type
 97        };
 98    }
 99
100    getPorts(params: { [k: string]: any }) {101        const l = params.length;
102        const w = params.width;
103