summaryrefslogtreecommitdiff
path: root/CONTRIBUTING.md
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2019-04-13 14:37:45 +0900
committersyuilo <syuilotan@yahoo.co.jp>2019-04-13 14:37:45 +0900
commit084135141fcbc4a7d17128d7dcc4a4de696deb8c (patch)
tree5828e5f595b14bd9596bb19afc5da580ca45717e /CONTRIBUTING.md
parentUpdate CONTRIBUTING.md (diff)
downloadsharkey-084135141fcbc4a7d17128d7dcc4a4de696deb8c.tar.gz
sharkey-084135141fcbc4a7d17128d7dcc4a4de696deb8c.tar.bz2
sharkey-084135141fcbc4a7d17128d7dcc4a4de696deb8c.zip
typo
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r--CONTRIBUTING.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 44501cbbc5..6825225e0e 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -152,13 +152,13 @@ if (user == null) {
```
という処理を`ensure`を使うと
``` ts
-const user = await Users.findOne(userId).then(esure);
+const user = await Users.findOne(userId).then(ensure);
// この時点で user の型は User
```
という風に書けます。
もちろん`ensure`内部でエラーを握りつぶすようなことはしておらず、万が一`undefined`だった場合はPromiseがRejectされ後続の処理は実行されません。
``` ts
-const user = await Users.findOne(userId).then(esure);
+const user = await Users.findOne(userId).then(ensure);
// 万が一 Users.findOne の結果が undefined だったら、ensure でエラーが発生するので
// この行に到達することは無い
// なので、.then(ensure) は