@quenty/baseobject 10.8.0 → 10.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 +11 -0
- package/package.json +4 -4
- package/src/Shared/BaseObject.lua +14 -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
|
+
## [10.8.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/baseobject@10.8.0...@quenty/baseobject@10.8.1) (2025-04-05)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Add types to packages ([2374fb2](https://github.com/Quenty/NevermoreEngine/commit/2374fb2b043cfbe0e9b507b3316eec46a4e353a0))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [10.8.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/baseobject@10.7.1...@quenty/baseobject@10.8.0) (2025-02-18)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @quenty/baseobject
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/baseobject",
|
|
3
|
-
"version": "10.8.
|
|
3
|
+
"version": "10.8.1",
|
|
4
4
|
"description": "BaseObject implementation with Maid attached for Roblox",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
"Quenty"
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@quenty/loader": "^10.8.
|
|
28
|
-
"@quenty/maid": "^3.4.
|
|
27
|
+
"@quenty/loader": "^10.8.1",
|
|
28
|
+
"@quenty/maid": "^3.4.1"
|
|
29
29
|
},
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "78c3ac0ab08dd18085b6e6e6e4f745e76ed99f68"
|
|
34
34
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
--!strict
|
|
1
2
|
--[=[
|
|
2
3
|
A BaseObject basically just adds the :Destroy() interface, and a _maid, along with an optional object it references.
|
|
3
4
|
@class BaseObject
|
|
@@ -11,25 +12,33 @@ local BaseObject = {}
|
|
|
11
12
|
BaseObject.ClassName = "BaseObject"
|
|
12
13
|
BaseObject.__index = BaseObject
|
|
13
14
|
|
|
15
|
+
export type BaseObject = typeof(setmetatable(
|
|
16
|
+
{} :: {
|
|
17
|
+
_obj: Instance?,
|
|
18
|
+
_maid: Maid.Maid,
|
|
19
|
+
},
|
|
20
|
+
{ __index = BaseObject }
|
|
21
|
+
))
|
|
22
|
+
|
|
14
23
|
--[=[
|
|
15
24
|
Constructs a new BaseObject
|
|
16
25
|
|
|
17
26
|
@param obj? Instance
|
|
18
27
|
@return BaseObject
|
|
19
28
|
]=]
|
|
20
|
-
function BaseObject.new(obj)
|
|
29
|
+
function BaseObject.new(obj: Instance?): BaseObject
|
|
21
30
|
return setmetatable({
|
|
22
|
-
_maid = Maid.new()
|
|
23
|
-
_obj = obj
|
|
31
|
+
_maid = Maid.new(),
|
|
32
|
+
_obj = obj,
|
|
24
33
|
}, BaseObject)
|
|
25
34
|
end
|
|
26
35
|
|
|
27
36
|
--[=[
|
|
28
37
|
Cleans up the BaseObject and sets the metatable to nil
|
|
29
38
|
]=]
|
|
30
|
-
function BaseObject
|
|
39
|
+
function BaseObject.Destroy(self: BaseObject): ()
|
|
31
40
|
self._maid:DoCleaning()
|
|
32
|
-
setmetatable(self, nil)
|
|
41
|
+
setmetatable(self :: any, nil)
|
|
33
42
|
end
|
|
34
43
|
|
|
35
44
|
return BaseObject
|