summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorlemusthelroy <lewis.john.thorley@gmail.com>2019-12-13 07:43:47 +0000
committerGitHub <noreply@github.com>2019-12-13 07:43:47 +0000
commit5a57d01d05d1b53a8e2eb267ecc56ddbd75a6d46 (patch)
treefe4c8d7e77561daa94de36fa1244fa2bc90587df
parent2e04696cf7637b10fdf3d25ac9f47623beeb9b0d (diff)
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"
-rw-r--r--typescript.html.markdown2
1 files changed, 1 insertions, 1 deletions
diff --git a/typescript.html.markdown b/typescript.html.markdown
index 00f0cbc5..eeda0b7b 100644
--- a/typescript.html.markdown
+++ b/typescript.html.markdown
@@ -139,7 +139,7 @@ class Point3D extends Point {
// Overwrite
dist() {
let d = super.dist();
- return Math.sqrt(d * d + this.z * this.z);
+ return Math.sqrt(d() * d() + this.z * this.z);
}
}