Comparison

teal-src/util/serialization.d.tl @ 12616:6b70d1af1fe3

util.serialization: Add Teal type specification
author Kim Alvefur <zash@zash.se>
date Wed, 01 Dec 2021 15:05:06 +0100
comparison
equal deleted inserted replaced
12615:b2047b82ec85 12616:6b70d1af1fe3
1 local record _M
2 enum preset
3 "debug"
4 "oneline"
5 "compact"
6 end
7 type fallback = function (any, string) : string
8 record config
9 preset : preset
10 fallback : fallback
11 fatal : boolean
12 keywords : { string : boolean }
13 indentwith : string
14 itemstart : string
15 itemsep : string
16 itemlast : string
17 tstart : string
18 tend : string
19 kstart : string
20 kend : string
21 equals : string
22 unquoted : boolean | string
23 hex : string
24 freeze : boolean
25 maxdepth : integer
26 multirefs : boolean
27 table_pairs : function
28 end
29 type serializer = function (any) : string
30 new : function (config|preset) : serializer
31 serialize : function (any, config|preset) : string
32 end
33 return _M