Skip to content

Commit 4c4862b

Browse files
committed
docs: deprecate loading subset of features
1 parent fc36ce7 commit 4c4862b

File tree

1 file changed

+4
-21
lines changed

1 file changed

+4
-21
lines changed

README.md

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,7 @@ Currently supported values of `VERSION` are:
3737
- `5.4`
3838
- `jit`
3939

40-
## Loading only a subset of features
41-
42-
Some Lua environments are sandboxed and don't have some globals declared, like `io`, `os` and
43-
`debug`. To avoid registering these globals, you can import core files separately. For example:
44-
45-
```json
46-
{
47-
"compilerOptions": {
48-
"types": [
49-
"lua-types/core/coroutine",
50-
"lua-types/core/global",
51-
"lua-types/core/math",
52-
"lua-types/core/metatable",
53-
"lua-types/core/modules",
54-
"lua-types/core/string",
55-
"lua-types/core/table",
56-
"lua-types/special/jit"
57-
]
58-
}
59-
}
60-
```
40+
> NOTE: All other files in this module shouldn't be considered public. Do not import them manually,
41+
> as they may change in non-major updates. If your environment doesn't provide all of standard Lua
42+
> features, consider banning them with a
43+
> [no-restricted-globals](https://eslint.org/docs/rules/no-restricted-globals) eslint rule.

0 commit comments

Comments
 (0)