aboutsummaryrefslogtreecommitdiffstats
path: root/teal-src/prosody/util/serialization.d.tl
diff options
context:
space:
mode:
Diffstat (limited to 'teal-src/prosody/util/serialization.d.tl')
-rw-r--r--teal-src/prosody/util/serialization.d.tl34
1 files changed, 34 insertions, 0 deletions
diff --git a/teal-src/prosody/util/serialization.d.tl b/teal-src/prosody/util/serialization.d.tl
new file mode 100644
index 00000000..528c9705
--- /dev/null
+++ b/teal-src/prosody/util/serialization.d.tl
@@ -0,0 +1,34 @@
+local record _M
+ enum preset
+ "debug"
+ "oneline"
+ "compact"
+ "pretty"
+ 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