From e4bb6b488c04987826627bf647f658c887493e8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charles=20Assun=C3=A7=C3=A3o?= Date: Tue, 27 Apr 2021 21:54:16 +0200 Subject: [PATCH] docs(pattern-matching-destructuring): update compiled example Update complied example to match what is really generated see in the playground: https://rescript-lang.org/try?code=C4TwDgpgBGCGIBsD2sAmUC8AoKUA+UA4kkqgEoQDOArgsABSXABOAlgHYDmAlDvlACE0FGnXodgvXASHkqtYACZx7SXwIA5JCIVYsCCMCipYwWJiIk5ohgCIACs1LUAxkcoALVmEioAhLa8BkYmZooWsjpiikGGxqawAMwWWlHAepQA7qzALh7xZlAA3lgExKRp9MAeEACyVJSwnBDcmAB8fABSlAB0yJz0tgDKri4NflC2UADU01DVdQ1NLaWCwvJiEMxOzADCpC3tXb39g0NIALaGXlwA5JRQmU5cPVAAKjVQWztQLgdQrEoAC5JjM5t0egBJVQ9YBIIYsDgDb5IPYHbi8GTrGzKFFo1CHDAdXAQ07DS6GTxI+6PZ6cV4faB437-QEgqazKAQ6HAWHwxFceh4-YEjGrVIbIxE459JADWxCDw9QJYAC+QA --- pages/docs/manual/latest/pattern-matching-destructuring.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/docs/manual/latest/pattern-matching-destructuring.mdx b/pages/docs/manual/latest/pattern-matching-destructuring.mdx index 634ca4836..ac09f9c3a 100644 --- a/pages/docs/manual/latest/pattern-matching-destructuring.mdx +++ b/pages/docs/manual/latest/pattern-matching-destructuring.mdx @@ -189,10 +189,10 @@ var data = { if (typeof data === "number") { console.log("Bah."); -} else if (data.TAG) { - console.log("Success! Product shipped!"); -} else { +} else if (data.TAG === /* BadResult */ 0) { console.log("Something's wrong. The error code is: " + "Product shipped!".toString()); +} else { + console.log("Success! Product shipped!"); } ```