summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--typescript.html.markdown4
1 files changed, 2 insertions, 2 deletions
diff --git a/typescript.html.markdown b/typescript.html.markdown
index 7e857cc0..f7a41ce1 100644
--- a/typescript.html.markdown
+++ b/typescript.html.markdown
@@ -114,7 +114,7 @@ class Point {
}
// Functions
- dist() { return Math.sqrt(this.x * this.x + this.y * this.y); }
+ dist(): number { return Math.sqrt(this.x * this.x + this.y * this.y); }
// Static members
static origin = new Point(0, 0);
@@ -137,7 +137,7 @@ class Point3D extends Point {
}
// Overwrite
- dist() {
+ dist(): number {
let d = super.dist();
return Math.sqrt(d * d + this.z * this.z);
}