Generic type for test callback functions
This commit is contained in:
@@ -15,4 +15,6 @@ export type opts = {
|
|||||||
|
|
||||||
export type model = {Instance}
|
export type model = {Instance}
|
||||||
|
|
||||||
|
export type callbackFunction = (file: string, opts: opts) -> string | boolean
|
||||||
|
|
||||||
return types
|
return types
|
||||||
+1
-1
@@ -5,7 +5,7 @@ local compression = require("../lib/compression")
|
|||||||
local types = require("../lib/types")
|
local types = require("../lib/types")
|
||||||
|
|
||||||
|
|
||||||
function testFolder(callback: (file: string, opts: types.opts) -> string | boolean, opts: types.opts, folderPath: string): {boolean}
|
function testFolder(callback: types.callbackFunction, opts: types.opts, folderPath: string): {boolean}
|
||||||
local results = {}
|
local results = {}
|
||||||
local folder = fs.readDir(folderPath)
|
local folder = fs.readDir(folderPath)
|
||||||
for _, file in pairs(folder) do
|
for _, file in pairs(folder) do
|
||||||
|
|||||||
Reference in New Issue
Block a user