Skip to content

Commit 8a5eefc

Browse files
authored
Merge pull request #158 from Suzanna-Linn/patch-2
Fixing a few fields in metamethods
2 parents 80d74fc + 31e831e commit 8a5eefc

1 file changed

Lines changed: 31 additions & 31 deletions

File tree

slua_definitions.yaml

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2944,7 +2944,7 @@ metamethods:
29442944
type: "(left: any, right: any) -> any"
29452945
parameters:
29462946
- name: left
2947-
type: me
2947+
type: any
29482948
comment: "The left operand of the addition."
29492949
- name: right
29502950
type: any
@@ -2953,10 +2953,10 @@ metamethods:
29532953
- name: __call
29542954
comment: "Called when the table or object is called as if it were a function."
29552955
type-parameters: [A..., R...]
2956-
type: "<A..., R...>(self: any, A...) -> R..."
2956+
type: "<A..., R...>(self: {}, A...) -> R..."
29572957
parameters:
29582958
- name: self
2959-
type: table
2959+
type: '{}'
29602960
comment: "The table being invoked."
29612961
- name: ...
29622962
type: "A..."
@@ -2986,13 +2986,13 @@ metamethods:
29862986
return-type: any
29872987
- name: __eq
29882988
comment: "Defines behavior for the equality (==) operator."
2989-
type: "(left: any, right: any) -> boolean"
2989+
type: "(left: {}, right: {}) -> boolean"
29902990
parameters:
29912991
- name: left
2992-
type: any
2992+
type: '{}'
29932993
comment: "The first value to compare."
29942994
- name: right
2995-
type: any
2995+
type: '{}'
29962996
comment: "The second value to compare."
29972997
return-type: boolean
29982998
- name: __idiv
@@ -3008,21 +3008,21 @@ metamethods:
30083008
return-type: any
30093009
- name: __index
30103010
comment: "Called when looking up a key that does not exist in the table."
3011-
type: "((self: table, key: any) -> any) | { [any]: any }"
3011+
type: "((self: {}, key: any) -> any) | { [any]: any }"
30123012
parameters:
30133013
- name: self
3014-
type: table
3014+
type: '{}'
30153015
comment: "The table being accessed."
30163016
- name: key
30173017
type: any
30183018
comment: "The key that was not found in the table."
30193019
return-type: any
30203020
variants:
30213021
- comment: "Called as a function fallback when looking up a key that does not exist in the table."
3022-
type: "(self: table, key: any) -> any"
3022+
type: "(self: {}, key: any) -> any"
30233023
parameters:
30243024
- name: self
3025-
type: table
3025+
type: '{}'
30263026
comment: "The table being accessed."
30273027
- name: key
30283028
type: any
@@ -3034,43 +3034,43 @@ metamethods:
30343034
- name: __iter
30353035
comment: "Called before generalized iteration begins on a table or userdata. Returns an iterator generator function, a state object, and an initial control variable."
30363036
type-parameters: [S, K, V...]
3037-
type: "<S, K, V...>(self: any) -> ((S, K) -> (K?, V...), S, K)"
3037+
type: "<S, K, V...>(self: {}) -> ((state: S, index: K) -> (K?, V...), S, K)"
30383038
parameters:
30393039
- name: self
3040-
type: table
3040+
type: '{}'
30413041
comment: "The table or object being iterated."
30423042
return-type: "((state: S, index: K) -> (K?, V...), S, K)"
30433043
- name: __jsonhint
30443044
comment: "String property used by lljson.encode to enforce table formatting rules."
30453045
type: '"array" | "object"'
30463046
- name: __le
30473047
comment: "Defines behavior for the less-than-or-equal-to (<=) operator."
3048-
type: "(left: any, right: any) -> boolean"
3048+
type: "(left: {}, right: {}) -> boolean"
30493049
parameters:
30503050
- name: left
3051-
type: any
3051+
type: '{}'
30523052
comment: "The left operand of the comparison."
30533053
- name: right
3054-
type: any
3054+
type: '{}'
30553055
comment: "The right operand of the comparison."
30563056
return-type: boolean
30573057
- name: __len
30583058
comment: "Defines behavior for the length (#) operator."
3059-
type: "(self: any) -> number"
3059+
type: "(self: {}) -> number"
30603060
parameters:
30613061
- name: self
3062-
type: any
3062+
type: '{}'
30633063
comment: "The object whose length is being measured."
30643064
return-type: number
30653065
- name: __lt
30663066
comment: "Defines behavior for the less-than (<) operator."
3067-
type: "(left: any, right: any) -> boolean"
3067+
type: "(left: {}, right: {}) -> boolean"
30683068
parameters:
30693069
- name: left
3070-
type: any
3070+
type: '{}'
30713071
comment: "The left operand of the comparison."
30723072
- name: right
3073-
type: any
3073+
type: '{}'
30743074
comment: "The right operand of the comparison."
30753075
return-type: boolean
30763076
- name: __metatable
@@ -3089,7 +3089,7 @@ metamethods:
30893089
return-type: any
30903090
- name: __mode
30913091
comment: "Controls weak mapping of table elements. Valid values are 'k' (weak keys), 'v' (weak values), or 'kv' (both)."
3092-
type: '"k" | "v" | "kv" | "vk"'
3092+
type: '"k" | "v" | "kv"'
30933093
- name: __mul
30943094
comment: "Defines behavior for the multiplication (*) operator."
30953095
type: "(left: any, right: any) -> any"
@@ -3103,10 +3103,10 @@ metamethods:
31033103
return-type: any
31043104
- name: __newindex
31053105
comment: "Called when assigning a value to a key that does not exist in the table."
3106-
type: "((self: table, key: any, value: any) -> ()) | { [any]: any }"
3106+
type: "((self: {}, key: any, value: any) -> ()) | { [any]: any }"
31073107
parameters:
31083108
- name: self
3109-
type: table
3109+
type: '{}'
31103110
comment: "The table being assigned."
31113111
- name: key
31123112
type: any
@@ -3117,10 +3117,10 @@ metamethods:
31173117
return-type: "()"
31183118
variants:
31193119
- comment: "Called as a function fallback when assigning a value to a key that does not exist in the table."
3120-
type: "(self: table, key: any, value: any) -> ()"
3120+
type: "(self: {}, key: any, value: any) -> ()"
31213121
parameters:
31223122
- name: self
3123-
type: table
3123+
type: '{}'
31243124
comment: "The table being assigned."
31253125
- name: key
31263126
type: any
@@ -3156,28 +3156,28 @@ metamethods:
31563156
return-type: any
31573157
- name: __tojson
31583158
comment: "Called during JSON serialization (with lljson.encode or lljson.slencode). Returns an alternative representation of the table to be serialized in its place."
3159-
type: '(self: table, ctx: { mode: "json" | "sljson", tight: boolean }) -> any'
3159+
type: '(self: {}, ctx: { mode: "json" | "sljson", tight: boolean }) -> any'
31603160
parameters:
31613161
- name: self
3162-
type: table
3162+
type: '{}'
31633163
comment: "The table being serialized."
31643164
- name: ctx
31653165
type: '{ mode: "json" | "sljson", tight: boolean }'
31663166
comment: "Context table containing metadata about the current serialization process, including 'mode' ('json' or 'sljson') and 'tight' (boolean)."
31673167
return-type: any
31683168
- name: __tostring
31693169
comment: "Called by tostring to convert the value to a string."
3170-
type: "(self: any) -> string"
3170+
type: "(self: {}) -> string"
31713171
parameters:
31723172
- name: self
3173-
type: any
3173+
type: '{}'
31743174
comment: "The object being converted to a string."
31753175
return-type: string
31763176
- name: __unm
31773177
comment: "Defines behavior for the unary negation (-) operator."
3178-
type: "(self: any) -> any"
3178+
type: "(self: {}) -> any"
31793179
parameters:
31803180
- name: self
3181-
type: any
3181+
type: '{}'
31823182
comment: "The value being negated."
31833183
return-type: any

0 commit comments

Comments
 (0)