@quenty/roblox-api-dump 8.11.1 → 8.11.2
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 +7 -7
- package/src/Server/RobloxApiClass.lua +40 -44
- package/src/Server/RobloxApiDump.lua +48 -51
- package/src/Server/RobloxApiMember.lua +26 -26
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
|
+
## [8.11.2](https://github.com/Quenty/NevermoreEngine/compare/@quenty/roblox-api-dump@8.11.1...@quenty/roblox-api-dump@8.11.2) (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
|
## [8.11.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/roblox-api-dump@8.11.0...@quenty/roblox-api-dump@8.11.1) (2025-03-21)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @quenty/roblox-api-dump
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/roblox-api-dump",
|
|
3
|
-
"version": "8.11.
|
|
3
|
+
"version": "8.11.2",
|
|
4
4
|
"description": "Utility functions for grabbing the Roblox API from the web",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"Quenty"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@quenty/baseobject": "^10.8.
|
|
30
|
-
"@quenty/httppromise": "^10.10.
|
|
31
|
-
"@quenty/loader": "^10.8.
|
|
32
|
-
"@quenty/promise": "^10.10.
|
|
33
|
-
"@quenty/table": "^3.7.
|
|
29
|
+
"@quenty/baseobject": "^10.8.1",
|
|
30
|
+
"@quenty/httppromise": "^10.10.2",
|
|
31
|
+
"@quenty/loader": "^10.8.1",
|
|
32
|
+
"@quenty/promise": "^10.10.2",
|
|
33
|
+
"@quenty/table": "^3.7.2"
|
|
34
34
|
},
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "78c3ac0ab08dd18085b6e6e6e4f745e76ed99f68"
|
|
39
39
|
}
|
|
@@ -86,7 +86,7 @@ end
|
|
|
86
86
|
@param className string
|
|
87
87
|
@return Promise<boolean>
|
|
88
88
|
]=]
|
|
89
|
-
function RobloxApiClass:PromiseIsA(className)
|
|
89
|
+
function RobloxApiClass:PromiseIsA(className: string)
|
|
90
90
|
if self:GetClassName() == className then
|
|
91
91
|
return Promise.resolved(true)
|
|
92
92
|
end
|
|
@@ -103,7 +103,7 @@ end
|
|
|
103
103
|
]=]
|
|
104
104
|
function RobloxApiClass:PromiseIsDescendantOf(className)
|
|
105
105
|
return self:PromiseAllSuperClasses():Then(function(classes)
|
|
106
|
-
for _, class in
|
|
106
|
+
for _, class in classes do
|
|
107
107
|
if class:GetClassName() == className then
|
|
108
108
|
return true
|
|
109
109
|
end
|
|
@@ -125,15 +125,14 @@ function RobloxApiClass:PromiseAllSuperClasses()
|
|
|
125
125
|
local list = {}
|
|
126
126
|
|
|
127
127
|
local function chain(current)
|
|
128
|
-
return current:PromiseSuperClass()
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
end)
|
|
128
|
+
return current:PromiseSuperClass():Then(function(superclass)
|
|
129
|
+
if superclass then
|
|
130
|
+
table.insert(list, superclass)
|
|
131
|
+
return chain(superclass)
|
|
132
|
+
else
|
|
133
|
+
return list
|
|
134
|
+
end
|
|
135
|
+
end)
|
|
137
136
|
end
|
|
138
137
|
|
|
139
138
|
self._allSuperClassesPromise = chain(self)
|
|
@@ -157,7 +156,7 @@ end
|
|
|
157
156
|
Returns whether the class has a super class
|
|
158
157
|
@return boolean
|
|
159
158
|
]=]
|
|
160
|
-
function RobloxApiClass:HasSuperClass()
|
|
159
|
+
function RobloxApiClass:HasSuperClass(): boolean
|
|
161
160
|
return self:GetSuperClassName() ~= nil
|
|
162
161
|
end
|
|
163
162
|
|
|
@@ -174,16 +173,15 @@ end
|
|
|
174
173
|
@return Promise<{ RobloxApiMember }>
|
|
175
174
|
]=]
|
|
176
175
|
function RobloxApiClass:PromiseProperties()
|
|
177
|
-
return self:PromiseMembers()
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
table.insert(result, member)
|
|
183
|
-
end
|
|
176
|
+
return self:PromiseMembers():Then(function(members)
|
|
177
|
+
local result = {}
|
|
178
|
+
for _, member in members do
|
|
179
|
+
if member:IsProperty() then
|
|
180
|
+
table.insert(result, member)
|
|
184
181
|
end
|
|
185
|
-
|
|
186
|
-
|
|
182
|
+
end
|
|
183
|
+
return result
|
|
184
|
+
end)
|
|
187
185
|
end
|
|
188
186
|
|
|
189
187
|
--[=[
|
|
@@ -191,16 +189,15 @@ end
|
|
|
191
189
|
@return Promise<{ RobloxApiMember }>
|
|
192
190
|
]=]
|
|
193
191
|
function RobloxApiClass:PromiseEvents()
|
|
194
|
-
return self:PromiseMembers()
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
table.insert(result, member)
|
|
200
|
-
end
|
|
192
|
+
return self:PromiseMembers():Then(function(members)
|
|
193
|
+
local result = {}
|
|
194
|
+
for _, member in members do
|
|
195
|
+
if member:IsEvent() then
|
|
196
|
+
table.insert(result, member)
|
|
201
197
|
end
|
|
202
|
-
|
|
203
|
-
|
|
198
|
+
end
|
|
199
|
+
return result
|
|
200
|
+
end)
|
|
204
201
|
end
|
|
205
202
|
|
|
206
203
|
--[=[
|
|
@@ -208,23 +205,22 @@ end
|
|
|
208
205
|
@return Promise<{ RobloxApiMember }>
|
|
209
206
|
]=]
|
|
210
207
|
function RobloxApiClass:PromiseFunctions()
|
|
211
|
-
return self:PromiseMembers()
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
table.insert(result, member)
|
|
217
|
-
end
|
|
208
|
+
return self:PromiseMembers():Then(function(members)
|
|
209
|
+
local result = {}
|
|
210
|
+
for _, member in members do
|
|
211
|
+
if member:IsFunction() then
|
|
212
|
+
table.insert(result, member)
|
|
218
213
|
end
|
|
219
|
-
|
|
220
|
-
|
|
214
|
+
end
|
|
215
|
+
return result
|
|
216
|
+
end)
|
|
221
217
|
end
|
|
222
218
|
|
|
223
219
|
--[=[
|
|
224
220
|
Retrieves whether the class is a service
|
|
225
221
|
@return boolean
|
|
226
222
|
]=]
|
|
227
|
-
function RobloxApiClass:IsService()
|
|
223
|
+
function RobloxApiClass:IsService(): boolean
|
|
228
224
|
return self:HasTag("Service")
|
|
229
225
|
end
|
|
230
226
|
|
|
@@ -232,7 +228,7 @@ end
|
|
|
232
228
|
Retrieves whether the class is not creatable
|
|
233
229
|
@return boolean
|
|
234
230
|
]=]
|
|
235
|
-
function RobloxApiClass:IsNotCreatable()
|
|
231
|
+
function RobloxApiClass:IsNotCreatable(): boolean
|
|
236
232
|
return self:HasTag("NotCreatable")
|
|
237
233
|
end
|
|
238
234
|
|
|
@@ -240,7 +236,7 @@ end
|
|
|
240
236
|
Retrieves whether the class is not replicated
|
|
241
237
|
@return boolean
|
|
242
238
|
]=]
|
|
243
|
-
function RobloxApiClass:IsNotReplicated()
|
|
239
|
+
function RobloxApiClass:IsNotReplicated(): boolean
|
|
244
240
|
return self:HasTag("NotReplicated")
|
|
245
241
|
end
|
|
246
242
|
|
|
@@ -249,14 +245,14 @@ end
|
|
|
249
245
|
@param tagName string
|
|
250
246
|
@return boolean
|
|
251
247
|
]=]
|
|
252
|
-
function RobloxApiClass:HasTag(tagName)
|
|
248
|
+
function RobloxApiClass:HasTag(tagName: string): boolean
|
|
253
249
|
if self._tagCache then
|
|
254
250
|
return self._tagCache[tagName] == true
|
|
255
251
|
end
|
|
256
252
|
|
|
257
253
|
self._tagCache = {}
|
|
258
254
|
if type(self._data.Tags) == "table" then
|
|
259
|
-
for _, tag in
|
|
255
|
+
for _, tag in self._data.Tags do
|
|
260
256
|
self._tagCache[tag] = true
|
|
261
257
|
end
|
|
262
258
|
end
|
|
@@ -17,12 +17,14 @@ local RobloxApiDump = setmetatable({}, BaseObject)
|
|
|
17
17
|
RobloxApiDump.ClassName = "RobloxApiDump"
|
|
18
18
|
RobloxApiDump.__index = RobloxApiDump
|
|
19
19
|
|
|
20
|
+
export type RobloxApiDump = typeof(setmetatable({}, { __index = RobloxApiDump }))
|
|
21
|
+
|
|
20
22
|
--[=[
|
|
21
23
|
Constructs a new RobloxApiDump which will cache all results for its lifetime.
|
|
22
24
|
@return RobloxApiDump
|
|
23
25
|
]=]
|
|
24
|
-
function RobloxApiDump.new()
|
|
25
|
-
local self = setmetatable(BaseObject.new(), RobloxApiDump)
|
|
26
|
+
function RobloxApiDump.new(): RobloxApiDump
|
|
27
|
+
local self = setmetatable(BaseObject.new() :: any, RobloxApiDump)
|
|
26
28
|
|
|
27
29
|
self._classMemberPromises = {}
|
|
28
30
|
self._ancestorListPromise = {}
|
|
@@ -36,17 +38,16 @@ end
|
|
|
36
38
|
@param className string
|
|
37
39
|
@return RobloxApiClass
|
|
38
40
|
]=]
|
|
39
|
-
function RobloxApiDump:PromiseClass(className)
|
|
41
|
+
function RobloxApiDump:PromiseClass(className: string)
|
|
40
42
|
assert(type(className) == "string", "Bad className")
|
|
41
43
|
|
|
42
44
|
if self._classPromises[className] then
|
|
43
45
|
return self._classPromises[className]
|
|
44
46
|
end
|
|
45
47
|
|
|
46
|
-
self._classPromises[className] = self:_promiseRawClassData(className)
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
end)
|
|
48
|
+
self._classPromises[className] = self:_promiseRawClassData(className):Then(function(classData)
|
|
49
|
+
return RobloxApiClass.new(self, classData)
|
|
50
|
+
end)
|
|
50
51
|
|
|
51
52
|
return self._classPromises[className]
|
|
52
53
|
end
|
|
@@ -56,78 +57,74 @@ end
|
|
|
56
57
|
@param className string
|
|
57
58
|
@return { RobloxApiMember }
|
|
58
59
|
]=]
|
|
59
|
-
function RobloxApiDump:PromiseMembers(className)
|
|
60
|
+
function RobloxApiDump:PromiseMembers(className: string)
|
|
60
61
|
assert(type(className) == "string", "Bad className")
|
|
61
62
|
|
|
62
63
|
if self._classMemberPromises[className] then
|
|
63
64
|
return self._classMemberPromises[className]
|
|
64
65
|
end
|
|
65
66
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
for _, member in pairs(entry.Members) do
|
|
73
|
-
table.insert(members, RobloxApiMember.new(member))
|
|
74
|
-
end
|
|
67
|
+
self._classMemberPromises[className] = self:_promiseClassDataAndAncestorList(className):Then(function(list)
|
|
68
|
+
local members = {}
|
|
69
|
+
for _, entry in list do
|
|
70
|
+
if entry.Members then
|
|
71
|
+
for _, member in entry.Members do
|
|
72
|
+
table.insert(members, RobloxApiMember.new(member))
|
|
75
73
|
end
|
|
76
74
|
end
|
|
75
|
+
end
|
|
77
76
|
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
return members
|
|
78
|
+
end)
|
|
80
79
|
|
|
81
80
|
return self._classMemberPromises[className]
|
|
82
81
|
end
|
|
83
82
|
|
|
84
|
-
function RobloxApiDump:_promiseClassDataAndAncestorList(className)
|
|
83
|
+
function RobloxApiDump:_promiseClassDataAndAncestorList(className: string)
|
|
85
84
|
assert(type(className) == "string", "Bad className")
|
|
86
85
|
|
|
87
86
|
if self._ancestorListPromise[className] then
|
|
88
87
|
return self._ancestorListPromise[className]
|
|
89
88
|
end
|
|
90
89
|
|
|
91
|
-
self._ancestorListPromise[className] = self:_promiseClassMap()
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
90
|
+
self._ancestorListPromise[className] = self:_promiseClassMap():Then(function(classMap)
|
|
91
|
+
local current = classMap[className]
|
|
92
|
+
if not current then
|
|
93
|
+
return Promise.rejected(string.format("Could not find data for %q", className))
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
local dataList = {}
|
|
97
|
+
while current do
|
|
98
|
+
table.insert(dataList, current)
|
|
97
99
|
|
|
98
|
-
local
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
if superclass and superclass ~= RobloxApiDumpConstants.ROOT_CLASS_NAME then
|
|
104
|
-
current = classMap[superclass]
|
|
105
|
-
if not current then
|
|
106
|
-
return Promise.rejected(string.format("Could not find data for super class %q", superclass))
|
|
107
|
-
end
|
|
108
|
-
else
|
|
109
|
-
current = nil
|
|
100
|
+
local superclass = current.Superclass
|
|
101
|
+
if superclass and superclass ~= RobloxApiDumpConstants.ROOT_CLASS_NAME then
|
|
102
|
+
current = classMap[superclass]
|
|
103
|
+
if not current then
|
|
104
|
+
return Promise.rejected(string.format("Could not find data for super class %q", superclass))
|
|
110
105
|
end
|
|
106
|
+
else
|
|
107
|
+
current = nil
|
|
111
108
|
end
|
|
109
|
+
end
|
|
112
110
|
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
return dataList
|
|
112
|
+
end)
|
|
115
113
|
|
|
116
114
|
return self._ancestorListPromise[className]
|
|
117
115
|
end
|
|
118
116
|
|
|
119
|
-
function RobloxApiDump:_promiseRawClassData(className)
|
|
117
|
+
function RobloxApiDump:_promiseRawClassData(className: string)
|
|
120
118
|
assert(type(className) == "string", "Bad className")
|
|
121
119
|
|
|
122
|
-
return self:_promiseClassMap()
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
end)
|
|
120
|
+
return self:_promiseClassMap():Then(function(classMap)
|
|
121
|
+
local data = classMap[className]
|
|
122
|
+
if data then
|
|
123
|
+
return data
|
|
124
|
+
else
|
|
125
|
+
return Promise.rejected(string.format("Could not find data for %q", className))
|
|
126
|
+
end
|
|
127
|
+
end)
|
|
131
128
|
end
|
|
132
129
|
|
|
133
130
|
function RobloxApiDump:_promiseClassMap()
|
|
@@ -139,7 +136,7 @@ function RobloxApiDump:_promiseClassMap()
|
|
|
139
136
|
assert(dump.Version == 1, "Only able to parse version 1 of the dump")
|
|
140
137
|
|
|
141
138
|
local classMap = {}
|
|
142
|
-
for _, entry in
|
|
139
|
+
for _, entry in dump.Classes do
|
|
143
140
|
assert(type(entry) == "table", "Bad entry")
|
|
144
141
|
assert(type(entry.Name) == "string", "Bad entry.Name")
|
|
145
142
|
|
|
@@ -45,7 +45,7 @@ function RobloxApiMember.new(data)
|
|
|
45
45
|
return self
|
|
46
46
|
end
|
|
47
47
|
|
|
48
|
-
function RobloxApiMember:GetTypeName()
|
|
48
|
+
function RobloxApiMember:GetTypeName(): string?
|
|
49
49
|
local valueType = self._data.ValueType
|
|
50
50
|
if valueType then
|
|
51
51
|
return valueType.Name
|
|
@@ -58,7 +58,7 @@ end
|
|
|
58
58
|
Gets the member name.
|
|
59
59
|
@return string
|
|
60
60
|
]=]
|
|
61
|
-
function RobloxApiMember:GetName()
|
|
61
|
+
function RobloxApiMember:GetName(): string
|
|
62
62
|
assert(type(self._data.Name) == "string", "Bad Name")
|
|
63
63
|
return self._data.Name
|
|
64
64
|
end
|
|
@@ -67,7 +67,7 @@ end
|
|
|
67
67
|
Gets the member category.
|
|
68
68
|
@return string?
|
|
69
69
|
]=]
|
|
70
|
-
function RobloxApiMember:GetCategory()
|
|
70
|
+
function RobloxApiMember:GetCategory(): string
|
|
71
71
|
return self._data.Category -- might be nil, stuff like "Data" or ""
|
|
72
72
|
end
|
|
73
73
|
|
|
@@ -75,7 +75,7 @@ end
|
|
|
75
75
|
Retrieves whether the API member is read only.
|
|
76
76
|
@return boolean
|
|
77
77
|
]=]
|
|
78
|
-
function RobloxApiMember:IsReadOnly()
|
|
78
|
+
function RobloxApiMember:IsReadOnly(): boolean
|
|
79
79
|
return self:HasTag("ReadOnly")
|
|
80
80
|
end
|
|
81
81
|
|
|
@@ -83,7 +83,7 @@ end
|
|
|
83
83
|
Retrieves the member type.
|
|
84
84
|
@return string
|
|
85
85
|
]=]
|
|
86
|
-
function RobloxApiMember:GetMemberType()
|
|
86
|
+
function RobloxApiMember:GetMemberType(): string
|
|
87
87
|
assert(type(self._data.MemberType) == "string", "Bad MemberType")
|
|
88
88
|
return self._data.MemberType
|
|
89
89
|
end
|
|
@@ -92,7 +92,7 @@ end
|
|
|
92
92
|
Returns whether the member is an event.
|
|
93
93
|
@return boolean
|
|
94
94
|
]=]
|
|
95
|
-
function RobloxApiMember:IsEvent()
|
|
95
|
+
function RobloxApiMember:IsEvent(): boolean
|
|
96
96
|
return self:GetMemberType() == "Event"
|
|
97
97
|
end
|
|
98
98
|
|
|
@@ -108,7 +108,7 @@ end
|
|
|
108
108
|
Returns whether this member has write NotAccessibleSecurity
|
|
109
109
|
@return boolean
|
|
110
110
|
]=]
|
|
111
|
-
function RobloxApiMember:IsWriteNotAccessibleSecurity()
|
|
111
|
+
function RobloxApiMember:IsWriteNotAccessibleSecurity(): boolean
|
|
112
112
|
return self:GetWriteSecurity() == "NotAccessibleSecurity"
|
|
113
113
|
end
|
|
114
114
|
|
|
@@ -116,7 +116,7 @@ end
|
|
|
116
116
|
Returns whether this member has write NotAccessibleSecurity
|
|
117
117
|
@return boolean
|
|
118
118
|
]=]
|
|
119
|
-
function RobloxApiMember:IsReadNotAccessibleSecurity()
|
|
119
|
+
function RobloxApiMember:IsReadNotAccessibleSecurity(): boolean
|
|
120
120
|
return self:GetReadSecurity() == "NotAccessibleSecurity"
|
|
121
121
|
end
|
|
122
122
|
|
|
@@ -124,7 +124,7 @@ end
|
|
|
124
124
|
Returns whether this member has write LocalUserSecurity
|
|
125
125
|
@return boolean
|
|
126
126
|
]=]
|
|
127
|
-
function RobloxApiMember:IsWriteLocalUserSecurity()
|
|
127
|
+
function RobloxApiMember:IsWriteLocalUserSecurity(): boolean
|
|
128
128
|
return self:GetWriteSecurity() == "LocalUserSecurity"
|
|
129
129
|
end
|
|
130
130
|
|
|
@@ -132,7 +132,7 @@ end
|
|
|
132
132
|
Returns whether this member has read LocalUserSecurity
|
|
133
133
|
@return boolean
|
|
134
134
|
]=]
|
|
135
|
-
function RobloxApiMember:IsReadLocalUserSecurity()
|
|
135
|
+
function RobloxApiMember:IsReadLocalUserSecurity(): boolean
|
|
136
136
|
return self:GetReadSecurity() == "LocalUserSecurity"
|
|
137
137
|
end
|
|
138
138
|
|
|
@@ -140,7 +140,7 @@ end
|
|
|
140
140
|
Returns whether this member has read RobloxScriptSecurity
|
|
141
141
|
@return boolean
|
|
142
142
|
]=]
|
|
143
|
-
function RobloxApiMember:IsReadRobloxScriptSecurity()
|
|
143
|
+
function RobloxApiMember:IsReadRobloxScriptSecurity(): boolean
|
|
144
144
|
return self:GetReadSecurity() == "RobloxScriptSecurity"
|
|
145
145
|
end
|
|
146
146
|
|
|
@@ -148,7 +148,7 @@ end
|
|
|
148
148
|
Returns whether this member has write RobloxScriptSecurity
|
|
149
149
|
@return boolean
|
|
150
150
|
]=]
|
|
151
|
-
function RobloxApiMember:IsWriteRobloxScriptSecurity()
|
|
151
|
+
function RobloxApiMember:IsWriteRobloxScriptSecurity(): boolean
|
|
152
152
|
return self:GetWriteSecurity() == "RobloxScriptSecurity"
|
|
153
153
|
end
|
|
154
154
|
|
|
@@ -156,7 +156,7 @@ end
|
|
|
156
156
|
Returns whether this can serialize save
|
|
157
157
|
@return boolean?
|
|
158
158
|
]=]
|
|
159
|
-
function RobloxApiMember:CanSerializeSave()
|
|
159
|
+
function RobloxApiMember:CanSerializeSave(): boolean?
|
|
160
160
|
local serialization = self._data.Serialization
|
|
161
161
|
if type(serialization) == "table" then
|
|
162
162
|
return serialization.CanSave
|
|
@@ -169,7 +169,7 @@ end
|
|
|
169
169
|
Returns whether this can serialize save
|
|
170
170
|
@return boolean?
|
|
171
171
|
]=]
|
|
172
|
-
function RobloxApiMember:CanSerializeLoad()
|
|
172
|
+
function RobloxApiMember:CanSerializeLoad(): boolean?
|
|
173
173
|
local serialization = self._data.Serialization
|
|
174
174
|
if type(serialization) == "table" then
|
|
175
175
|
return serialization.CanLoad
|
|
@@ -182,7 +182,7 @@ end
|
|
|
182
182
|
Returns the member's write security as a string
|
|
183
183
|
@return string?
|
|
184
184
|
]=]
|
|
185
|
-
function RobloxApiMember:GetWriteSecurity()
|
|
185
|
+
function RobloxApiMember:GetWriteSecurity(): boolean?
|
|
186
186
|
local security = self._data.Security
|
|
187
187
|
if type(security) == "table" then
|
|
188
188
|
return security.Write
|
|
@@ -195,7 +195,7 @@ end
|
|
|
195
195
|
Returns the member's read security as a string
|
|
196
196
|
@return string?
|
|
197
197
|
]=]
|
|
198
|
-
function RobloxApiMember:GetReadSecurity()
|
|
198
|
+
function RobloxApiMember:GetReadSecurity(): boolean?
|
|
199
199
|
local security = self._data.Security
|
|
200
200
|
if type(security) == "table" then
|
|
201
201
|
return security.Write
|
|
@@ -208,7 +208,7 @@ end
|
|
|
208
208
|
Returns whether the member is a property.
|
|
209
209
|
@return boolean
|
|
210
210
|
]=]
|
|
211
|
-
function RobloxApiMember:IsProperty()
|
|
211
|
+
function RobloxApiMember:IsProperty(): boolean
|
|
212
212
|
return self:GetMemberType() == "Property"
|
|
213
213
|
end
|
|
214
214
|
|
|
@@ -216,7 +216,7 @@ end
|
|
|
216
216
|
Returns whether the member is a function (i.e. method).
|
|
217
217
|
@return boolean
|
|
218
218
|
]=]
|
|
219
|
-
function RobloxApiMember:IsFunction()
|
|
219
|
+
function RobloxApiMember:IsFunction(): boolean
|
|
220
220
|
return self:GetMemberType() == "Function"
|
|
221
221
|
end
|
|
222
222
|
|
|
@@ -224,7 +224,7 @@ end
|
|
|
224
224
|
Returns whether the member is a callback.
|
|
225
225
|
@return boolean
|
|
226
226
|
]=]
|
|
227
|
-
function RobloxApiMember:IsCallback()
|
|
227
|
+
function RobloxApiMember:IsCallback(): boolean
|
|
228
228
|
return self:GetMemberType() == "Callback"
|
|
229
229
|
end
|
|
230
230
|
|
|
@@ -232,7 +232,7 @@ end
|
|
|
232
232
|
Returns whether a script can modify it.
|
|
233
233
|
@return boolean
|
|
234
234
|
]=]
|
|
235
|
-
function RobloxApiMember:IsNotScriptable()
|
|
235
|
+
function RobloxApiMember:IsNotScriptable(): boolean
|
|
236
236
|
return self:HasTag("NotScriptable")
|
|
237
237
|
end
|
|
238
238
|
|
|
@@ -240,14 +240,14 @@ end
|
|
|
240
240
|
Returns whether the member is not replicated.
|
|
241
241
|
@return boolean
|
|
242
242
|
]=]
|
|
243
|
-
function RobloxApiMember:IsNotReplicated()
|
|
243
|
+
function RobloxApiMember:IsNotReplicated(): boolean
|
|
244
244
|
return self:HasTag("NotReplicated")
|
|
245
245
|
end
|
|
246
246
|
|
|
247
247
|
--[=[
|
|
248
248
|
Returns whether the member is deprecated..
|
|
249
249
|
]=]
|
|
250
|
-
function RobloxApiMember:IsDeprecated()
|
|
250
|
+
function RobloxApiMember:IsDeprecated(): boolean
|
|
251
251
|
return self:HasTag("Deprecated")
|
|
252
252
|
end
|
|
253
253
|
|
|
@@ -255,7 +255,7 @@ end
|
|
|
255
255
|
Returns whether this api member is hidden.
|
|
256
256
|
@return boolean
|
|
257
257
|
]=]
|
|
258
|
-
function RobloxApiMember:IsHidden()
|
|
258
|
+
function RobloxApiMember:IsHidden(): boolean
|
|
259
259
|
return self:HasTag("Hidden")
|
|
260
260
|
end
|
|
261
261
|
|
|
@@ -263,7 +263,7 @@ end
|
|
|
263
263
|
Returns a list of tags. Do not modify this list.
|
|
264
264
|
@return {string}
|
|
265
265
|
]=]
|
|
266
|
-
function RobloxApiMember:GetTags()
|
|
266
|
+
function RobloxApiMember:GetTags(): { string }
|
|
267
267
|
return self._data.Tags
|
|
268
268
|
end
|
|
269
269
|
|
|
@@ -272,14 +272,14 @@ end
|
|
|
272
272
|
@param tagName string
|
|
273
273
|
@return boolean
|
|
274
274
|
]=]
|
|
275
|
-
function RobloxApiMember:HasTag(tagName)
|
|
275
|
+
function RobloxApiMember:HasTag(tagName: string): boolean
|
|
276
276
|
if self._tagCache then
|
|
277
277
|
return self._tagCache[tagName] == true
|
|
278
278
|
end
|
|
279
279
|
|
|
280
280
|
self._tagCache = {}
|
|
281
281
|
if type(self._data.Tags) == "table" then
|
|
282
|
-
for _, tag in
|
|
282
|
+
for _, tag in self._data.Tags do
|
|
283
283
|
self._tagCache[tag] = true
|
|
284
284
|
end
|
|
285
285
|
end
|