From 220366da25017dd4b99f2136c1a35a5efc2d3fd8 Mon Sep 17 00:00:00 2001 From: V1K1NGbg Date: Fri, 2 Aug 2024 14:47:21 +0300 Subject: new dependencies --- src/ltn12.d.tl | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/ltn12.d.tl (limited to 'src/ltn12.d.tl') diff --git a/src/ltn12.d.tl b/src/ltn12.d.tl new file mode 100644 index 00000000..cd2375fc --- /dev/null +++ b/src/ltn12.d.tl @@ -0,0 +1,45 @@ + +local record ltn12 + type Filter = function(string): string, string + type Sink = function(string, string): boolean, string + type Source = function(): string, string + + type FancySink = function(string, string): boolean, string | FancySink + type FancySource = function(): string, string | FancySource + + -- Docs just say returns a truthy value on success + -- Since this value should really only be + -- used to check for truthiness, any seems fine here + type Pump = function(Source, Sink): any, string + + record filter + chain: function(Filter, Filter, ...: Filter): Filter + + cycle: function(string, string, any): Filter + end + record pump + all: Pump + step: Pump + end + record sink + chain: function(Filter, Sink): Sink + error: function(string): Sink + file: function(FILE, string): Sink + null: function(): Sink + simplify: function(FancySink): Sink + table: function({string}): Sink, {string} + end + record source + cat: function(Source, ...: Source): Source + chain: function(Source, Filter): Source + empty: function(): Source + error: function(string): Source + file: function(FILE): Source + file: function(FILE, string): Source + simplify: function(FancySource): Source + string: function(string): Source + table: function({string}): Source, {string} + end + end + + return ltn12 \ No newline at end of file -- cgit v1.2.3-55-g6feb