summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-07-01 16:10:26 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-07-01 16:10:33 +0800
commit87e0a180f97cd6bc31909b60228f1148c0289529 (patch)
treeda72f156113a156b960018ec352196823fe28649 /doc
parentcbcac3afc40268eae82a41a82248d912b1cfeeb6 (diff)
downloadlua-language-server-87e0a180f97cd6bc31909b60228f1148c0289529.zip
#1260 `type.weakNilCheck`
Diffstat (limited to 'doc')
-rw-r--r--doc/en-us/config.md19
-rw-r--r--doc/pt-br/config.md19
-rw-r--r--doc/zh-cn/config.md19
-rw-r--r--doc/zh-tw/config.md19
4 files changed, 76 insertions, 0 deletions
diff --git a/doc/en-us/config.md b/doc/en-us/config.md
index 2a76be14..7317271d 100644
--- a/doc/en-us/config.md
+++ b/doc/en-us/config.md
@@ -1472,6 +1472,25 @@ boolean
false
```
+# type.weakNilCheck
+
+When checking the type of union type, ignore the `nil` in it.
+
+When this setting is `false`, the `number|nil` type cannot be assigned to the `number` type. It can be with `true`.
+
+
+## type
+
+```ts
+boolean
+```
+
+## default
+
+```jsonc
+false
+```
+
# type.weakUnionCheck
Once one subtype of a union type meets the condition, the union type also meets the condition.
diff --git a/doc/pt-br/config.md b/doc/pt-br/config.md
index 55604b55..9cbefc2b 100644
--- a/doc/pt-br/config.md
+++ b/doc/pt-br/config.md
@@ -1472,6 +1472,25 @@ boolean
false
```
+# type.weakNilCheck
+
+When checking the type of union type, ignore the `nil` in it.
+
+When this setting is `false`, the `number|nil` type cannot be assigned to the `number` type. It can be with `true`.
+
+
+## type
+
+```ts
+boolean
+```
+
+## default
+
+```jsonc
+false
+```
+
# type.weakUnionCheck
Once one subtype of a union type meets the condition, the union type also meets the condition.
diff --git a/doc/zh-cn/config.md b/doc/zh-cn/config.md
index 77f9b74d..cbf12bb1 100644
--- a/doc/zh-cn/config.md
+++ b/doc/zh-cn/config.md
@@ -1471,6 +1471,25 @@ boolean
false
```
+# type.weakNilCheck
+
+对联合类型进行类型检查时,忽略其中的 `nil`。
+
+此设置为 `false` 时,`numer|nil` 类型无法赋给 `number` 类型;为 `true` 是则可以。
+
+
+## type
+
+```ts
+boolean
+```
+
+## default
+
+```jsonc
+false
+```
+
# type.weakUnionCheck
联合类型中只要有一个子类型满足条件,则联合类型也满足条件。
diff --git a/doc/zh-tw/config.md b/doc/zh-tw/config.md
index 62a76e57..6d0325b9 100644
--- a/doc/zh-tw/config.md
+++ b/doc/zh-tw/config.md
@@ -1471,6 +1471,25 @@ boolean
false
```
+# type.weakNilCheck
+
+When checking the type of union type, ignore the `nil` in it.
+
+When this setting is `false`, the `number|nil` type cannot be assigned to the `number` type. It can be with `true`.
+
+
+## type
+
+```ts
+boolean
+```
+
+## default
+
+```jsonc
+false
+```
+
# type.weakUnionCheck
同位類型中只要有一個子類型滿足條件,則同位類型也滿足條件。