diff options
| author | V1K1NGbg <victor@ilchev.com> | 2024-08-02 14:47:21 +0300 |
|---|---|---|
| committer | V1K1NGbg <victor@ilchev.com> | 2024-08-05 20:51:31 +0300 |
| commit | 220366da25017dd4b99f2136c1a35a5efc2d3fd8 (patch) | |
| tree | c4b19e6d40bb7e928e9c64fab50161691ebfdafe /src/ltn12.d.tl | |
| parent | afc79ce5bdec2e242ab2d19cdfe236958c7e2275 (diff) | |
| download | luarocks-220366da25017dd4b99f2136c1a35a5efc2d3fd8.tar.gz luarocks-220366da25017dd4b99f2136c1a35a5efc2d3fd8.tar.bz2 luarocks-220366da25017dd4b99f2136c1a35a5efc2d3fd8.zip | |
new dependencies
Diffstat (limited to 'src/ltn12.d.tl')
| -rw-r--r-- | src/ltn12.d.tl | 45 |
1 files changed, 45 insertions, 0 deletions
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 @@ | |||
| 1 | |||
| 2 | local record ltn12 | ||
| 3 | type Filter = function(string): string, string | ||
| 4 | type Sink = function(string, string): boolean, string | ||
| 5 | type Source = function(): string, string | ||
| 6 | |||
| 7 | type FancySink = function(string, string): boolean, string | FancySink | ||
| 8 | type FancySource = function(): string, string | FancySource | ||
| 9 | |||
| 10 | -- Docs just say returns a truthy value on success | ||
| 11 | -- Since this value should really only be | ||
| 12 | -- used to check for truthiness, any seems fine here | ||
| 13 | type Pump = function(Source, Sink): any, string | ||
| 14 | |||
| 15 | record filter | ||
| 16 | chain: function(Filter, Filter, ...: Filter): Filter | ||
| 17 | |||
| 18 | cycle: function(string, string, any): Filter | ||
| 19 | end | ||
| 20 | record pump | ||
| 21 | all: Pump | ||
| 22 | step: Pump | ||
| 23 | end | ||
| 24 | record sink | ||
| 25 | chain: function(Filter, Sink): Sink | ||
| 26 | error: function(string): Sink | ||
| 27 | file: function(FILE, string): Sink | ||
| 28 | null: function(): Sink | ||
| 29 | simplify: function(FancySink): Sink | ||
| 30 | table: function({string}): Sink, {string} | ||
| 31 | end | ||
| 32 | record source | ||
| 33 | cat: function(Source, ...: Source): Source | ||
| 34 | chain: function(Source, Filter): Source | ||
| 35 | empty: function(): Source | ||
| 36 | error: function(string): Source | ||
| 37 | file: function(FILE): Source | ||
| 38 | file: function(FILE, string): Source | ||
| 39 | simplify: function(FancySource): Source | ||
| 40 | string: function(string): Source | ||
| 41 | table: function({string}): Source, {string} | ||
| 42 | end | ||
| 43 | end | ||
| 44 | |||
| 45 | return ltn12 \ No newline at end of file | ||
