diff --git a/lune.yml b/lune.yml index 32a09cb..7c19bf1 100644 --- a/lune.yml +++ b/lune.yml @@ -78,17 +78,17 @@ globals: task.defer: args: - type: thread | function - # - type: "..." + - type: "..." task.delay: args: - required: false type: number - type: thread | function - # - type: "..." + - type: "..." task.spawn: args: - type: thread | function - # - type: "..." + - type: "..." task.wait: args: - required: false diff --git a/luneTypes.d.luau b/luneTypes.d.luau index c2312bf..9345c57 100644 --- a/luneTypes.d.luau +++ b/luneTypes.d.luau @@ -52,15 +52,6 @@ declare process: { }, } -declare task: { - cancel: (thread: thread) -> (), - defer: (functionOrThread: thread | (...any) -> (...any)) -> thread, - delay: (duration: number?, functionOrThread: thread | (...any) -> (...any)) -> thread, - spawn: (functionOrThread: thread | (...any) -> (...any)) -> thread, - wait: (duration: number?) -> (number), -} - ---[[ declare task: { cancel: (thread: thread) -> (), defer: (functionOrThread: thread | (T...) -> (...any), T...) -> thread, @@ -68,4 +59,3 @@ declare task: { spawn: (functionOrThread: thread | (T...) -> (...any), T...) -> thread, wait: (duration: number?) -> (number), } -]] diff --git a/src/tests/task/defer.luau b/src/tests/task/defer.luau index 6fa2a77..4766f18 100644 --- a/src/tests/task/defer.luau +++ b/src/tests/task/defer.luau @@ -40,8 +40,6 @@ assert(not flag2, "Defer should run after spawned threads") -- Varargs should get passed correctly --- TODO: Uncomment when vararg support is added ---[[ local function f(arg1: string, arg2: number, f2: (...any) -> ...any) assert(type(arg1) == "string", "Invalid arg 1 passed to function") assert(type(arg2) == "number", "Invalid arg 2 passed to function") @@ -51,4 +49,3 @@ end task.defer(f, "", 1, f) task.defer(f, "inf", math.huge, f) task.defer(f, "NaN", 0 / 0, f) -]] diff --git a/src/tests/task/delay.luau b/src/tests/task/delay.luau index 724f924..393cf73 100644 --- a/src/tests/task/delay.luau +++ b/src/tests/task/delay.luau @@ -28,8 +28,6 @@ assert(not flag2, "Delay should work with yielding (2)") -- Varargs should get passed correctly --- TODO: Uncomment when vararg support is added ---[[ local function f(arg1: string, arg2: number, f2: (...any) -> ...any) assert(type(arg1) == "string", "Invalid arg 1 passed to function") assert(type(arg2) == "number", "Invalid arg 2 passed to function") @@ -39,4 +37,3 @@ end task.delay(0, f, "", 1, f) task.delay(0, f, "inf", math.huge, f) task.delay(0, f, "NaN", 0 / 0, f) -]] diff --git a/src/tests/task/spawn.luau b/src/tests/task/spawn.luau index a91a94b..121981d 100644 --- a/src/tests/task/spawn.luau +++ b/src/tests/task/spawn.luau @@ -33,8 +33,6 @@ assert(flag3, "Spawn should run threads made from coroutine.create") -- Varargs should get passed correctly --- TODO: Uncomment when vararg support is added ---[[ local function f(arg1: string, arg2: number, f2: (...any) -> ...any) assert(type(arg1) == "string", "Invalid arg 1 passed to function") assert(type(arg2) == "number", "Invalid arg 2 passed to function") @@ -44,4 +42,3 @@ end task.spawn(f, "", 1, f) task.spawn(f, "inf", math.huge, f) task.spawn(f, "NaN", 0 / 0, f) -]]