@quenty/ducktype 5.8.0 → 5.8.1
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 +8 -0
- package/package.json +2 -2
- package/src/Shared/DuckTypeUtils.lua +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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
|
+
## [5.8.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/ducktype@5.8.0...@quenty/ducktype@5.8.1) (2025-03-21)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @quenty/ducktype
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [5.8.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/ducktype@5.7.1...@quenty/ducktype@5.8.0) (2025-02-18)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @quenty/ducktype
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/ducktype",
|
|
3
|
-
"version": "5.8.
|
|
3
|
+
"version": "5.8.1",
|
|
4
4
|
"description": "Utility functions to duck type a value",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "6b7c3e15e60cdb185986207b574e2b5591261e7a"
|
|
34
34
|
}
|
|
@@ -15,14 +15,14 @@ local DuckTypeUtils = {}
|
|
|
15
15
|
@param target any
|
|
16
16
|
@return boolean
|
|
17
17
|
]=]
|
|
18
|
-
function DuckTypeUtils.isImplementation(template, target)
|
|
18
|
+
function DuckTypeUtils.isImplementation(template: any, target: any): boolean
|
|
19
19
|
assert(type(template) == "table", "Bad template")
|
|
20
20
|
|
|
21
21
|
return type(target) == "table"
|
|
22
22
|
and (getmetatable(target) == template or DuckTypeUtils._checkInterface(template, target))
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
-
function DuckTypeUtils._checkInterface(template, target)
|
|
25
|
+
function DuckTypeUtils._checkInterface(template: any, target: any): boolean
|
|
26
26
|
local targetMetatable = getmetatable(target)
|
|
27
27
|
local templateMetatable = getmetatable(template)
|
|
28
28
|
if targetMetatable and type(targetMetatable.__index) == "function" then
|
|
@@ -48,4 +48,4 @@ function DuckTypeUtils._checkInterface(template, target)
|
|
|
48
48
|
return true
|
|
49
49
|
end
|
|
50
50
|
|
|
51
|
-
return DuckTypeUtils
|
|
51
|
+
return DuckTypeUtils
|