From c461f71ee94309ae366f4217609b90fc64b18600 Mon Sep 17 00:00:00 2001 From: Brian Gorman Date: Mon, 13 Jul 2020 21:55:52 -0700 Subject: [PATCH] Document removing this binding from objects --- docs/object.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/object.md b/docs/object.md index b00dfa4450..c8fc983ebd 100644 --- a/docs/object.md +++ b/docs/object.md @@ -95,3 +95,12 @@ You can use the above object like so: ```reason obj#doYouWant(); ``` + +To disable the `this` binding you can use `as`. +```reason +let makeMyObject () => +{ + as _; + pub = doYouWant () => true; +} +```