#Why is ts a array and not a string (Typechecker)

1 messages · Page 1 of 1 (latest)

sacred fractal
#

Here it says that inputFolder is a array

local inputFolder, outputFolders = getFolders(descendants)

inputFolder = removeLocks(inputFolder)

But here it gets returned as a Folder

local function getFolders(descendants : {any}) : (Folder, {})
    local inputFolder
    local outputFolders = {}

    for _, descendant : any in descendants do
        if not descendant:IsA("Folder") then continue end

        if descendant.Name == "Inputs" then
            inputFolder = descendant
        end

        if descendant.Name == "Outputs" then
            table.insert(outputFolders, descendant)
        end
    end

    return inputFolder, outputFolders
end
#

wait it even gets recognized as a folder im stupid

#

nvm I don't get it