diff options
author | Kim Alvefur <zash@zash.se> | 2021-12-01 15:05:06 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-12-01 15:05:06 +0100 |
commit | efb69fa99bc19dc1beab79829bf98987ab5a4a33 (patch) | |
tree | 6ac1da3c866efe00f7ae1aa16a4fda739d211e6f /teal-src | |
parent | 9dc7ac98fa5a71e1e2019dd1b6fefde9a6842b5a (diff) | |
download | prosody-efb69fa99bc19dc1beab79829bf98987ab5a4a33.tar.gz prosody-efb69fa99bc19dc1beab79829bf98987ab5a4a33.zip |
util.serialization: Add Teal type specification
Diffstat (limited to 'teal-src')
-rw-r--r-- | teal-src/util/serialization.d.tl | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/teal-src/util/serialization.d.tl b/teal-src/util/serialization.d.tl new file mode 100644 index 00000000..27f100c0 --- /dev/null +++ b/teal-src/util/serialization.d.tl @@ -0,0 +1,33 @@ +local record _M + enum preset + "debug" + "oneline" + "compact" + end + type fallback = function (any, string) : string + record config + preset : preset + fallback : fallback + fatal : boolean + keywords : { string : boolean } + indentwith : string + itemstart : string + itemsep : string + itemlast : string + tstart : string + tend : string + kstart : string + kend : string + equals : string + unquoted : boolean | string + hex : string + freeze : boolean + maxdepth : integer + multirefs : boolean + table_pairs : function + end + type serializer = function (any) : string + new : function (config|preset) : serializer + serialize : function (any, config|preset) : string +end +return _M |