aboutsummaryrefslogtreecommitdiffstats
path: root/teal-src/util/serialization.d.tl
blob: 27f100c0dedafb8e161e1d236461b150a1ee4749 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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