Generic type for test callback functions

This commit is contained in:
2025-09-26 13:37:21 -04:00
parent 5b6a73b20c
commit 1b882bb715
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -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
View File
@@ -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