mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-24 10:01:38 +00:00
Update typescript.html.markdown
This will overcome TSError:2362 : "The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type"
This commit is contained in:
parent
2e04696cf7
commit
5a57d01d05
@ -139,7 +139,7 @@ class Point3D extends Point {
|
|||||||
// Overwrite
|
// Overwrite
|
||||||
dist() {
|
dist() {
|
||||||
let d = super.dist();
|
let d = super.dist();
|
||||||
return Math.sqrt(d * d + this.z * this.z);
|
return Math.sqrt(d() * d() + this.z * this.z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user