@quenty/optional 11.8.3 → 11.8.4-canary.559.339cfa7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/package.json +3 -3
- package/src/Shared/optional.lua +8 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [11.8.4-canary.559.339cfa7.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/optional@11.8.3...@quenty/optional@11.8.4-canary.559.339cfa7.0) (2025-05-10)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* Add even more types ([b31717d](https://github.com/Quenty/NevermoreEngine/commit/b31717d8c9f7620c457f5018a2affa760a65334a))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [11.8.3](https://github.com/Quenty/NevermoreEngine/compare/@quenty/optional@11.8.2...@quenty/optional@11.8.3) (2025-04-10)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @quenty/optional
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/optional",
|
|
3
|
-
"version": "11.8.
|
|
3
|
+
"version": "11.8.4-canary.559.339cfa7.0",
|
|
4
4
|
"description": "Adds the optional function to Roblox for Nevermore require",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"Quenty"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@quenty/loader": "
|
|
28
|
+
"@quenty/loader": "10.8.4-canary.559.339cfa7.0"
|
|
29
29
|
},
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "339cfa778736f08768ed7305041f6221faa35bfc"
|
|
34
34
|
}
|
package/src/Shared/optional.lua
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
--!strict
|
|
1
2
|
--[=[
|
|
2
3
|
Sets up `require.optional("Name")`.
|
|
3
4
|
|
|
@@ -23,10 +24,12 @@ local BasicPane = require.optional("BasicPane")
|
|
|
23
24
|
]=]
|
|
24
25
|
return function(_require, _module: string | number | Instance)
|
|
25
26
|
assert(_require, "Bad _require function")
|
|
26
|
-
assert(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
assert(
|
|
28
|
+
type(_module) == "string"
|
|
29
|
+
or type(_module) == "number"
|
|
30
|
+
or (typeof(_module) == "Instance" and _module:IsA("ModuleScript")),
|
|
31
|
+
"Bad module identifier"
|
|
32
|
+
)
|
|
30
33
|
|
|
31
34
|
local result
|
|
32
35
|
local ok, _ = pcall(function()
|
|
@@ -38,4 +41,4 @@ return function(_require, _module: string | number | Instance)
|
|
|
38
41
|
end
|
|
39
42
|
|
|
40
43
|
return result
|
|
41
|
-
end
|
|
44
|
+
end
|