diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-03-10 19:24:46 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-03-10 19:24:46 +0800 |
commit | e4cde62b83fef2e507027c7ce47ba01a4ea5af99 (patch) | |
tree | c016f7240f670d94e22d09de2e1e55531d2ada08 | |
parent | a2ffffd2ce22c9ec7a85fc13046922c23d8e8cc4 (diff) | |
download | lua-language-server-e4cde62b83fef2e507027c7ce47ba01a4ea5af99.zip |
cleanup
-rw-r--r-- | BreakChanges.md | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/BreakChanges.md b/BreakChanges.md index bf44b7b7..9747b52c 100644 --- a/BreakChanges.md +++ b/BreakChanges.md @@ -1,4 +1,4 @@ -# Always trace local set +## Always trace local set ```lua local x @@ -15,7 +15,7 @@ x = true print(x) --> x is `string` ``` -# Dose not trace field inject +## Dose not trace field inject ```lua local x = {} @@ -25,7 +25,7 @@ y.field = 1 print(x.field) --> undefined field `field` ``` -# Dose not search metatable in this case +## Dose not search metatable in this case ```lua setmetatable(object, { __index = { @@ -45,7 +45,7 @@ object = setmetatable(object, { __index = { print(object.default) --> this is OK ``` -# Finding definition does not recurse +## Finding definition does not recurse ```lua local t = {} @@ -67,14 +67,14 @@ local o Find definition of `o` will not find out `mt` -# Type `unknown` +## Type `unknown` ```lua local t = {} print(t.x) --> t.x is `unknown` instead of `any` ``` -# Types can be used in doc-table keys +## Types can be used in doc-table keys ```lua ---@type { [number]: string } @@ -84,7 +84,7 @@ print(t[1]) --> t[1] is `string` print(t.x) --> t.x is `unknown` ``` -# Type `true` and `false` +## Type `true` and `false` ```lua ---@class true: boolean --> this is builtin @@ -93,7 +93,7 @@ print(t.x) --> t.x is `unknown` You can use `---@type { [string]: true }` now. -# `class` and `alias` support generic inheritance +## `class` and `alias` support generic inheritance ```lua ---@class table<K, V>: { [K]: V } --> this is builtin @@ -101,7 +101,7 @@ You can use `---@type { [string]: true }` now. ---@alias mark<K> { [K]: true } ``` -# `table<integer, string>` can not convert to `string[]` +## `table<integer, string>` can not convert to `string[]` ```lua ---@type table<integer, string> @@ -111,7 +111,7 @@ for k, v in ipairs(t) do --> v is `unknown` end ``` -# Default value of `unrary` and `binary` +## Default value of `unrary` and `binary` ```lua ---@type unknown @@ -120,7 +120,7 @@ local x local y = - x --> y is `number` instead of `unknown` ``` -# `unknown` can form union types with other types +## `unknown` can form union types with other types ```lua function f() |