Skip to content

Commit

Permalink
Fix type of ChangeTracker
Browse files Browse the repository at this point in the history
  • Loading branch information
Ukendio committed Jul 28, 2024
1 parent ab3023b commit 5fd7e19
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/tests.luau
Original file line number Diff line number Diff line change
Expand Up @@ -573,10 +573,10 @@ type Tracker<T> = { track: (world: World, fn: (changes: {

type Entity<T = any> = number & { __nominal_type_dont_use: T }

local ChangeTracker: <T>(component: Entity<T>) -> Tracker<T>
local ChangeTracker: <T>(world: World, component: Entity<T>) -> Tracker<T>

do
local world: World
local world
local T
local PreviousT
local addedComponents
Expand Down Expand Up @@ -689,7 +689,7 @@ do

local tracker = { track = track }

function ChangeTracker<T>(worldToTrack: World, component: Entity<T>): Tracker<T>
function ChangeTracker<T>(worldToTrack, component: Entity<T>): Tracker<T>
world = worldToTrack
T = component
-- We just use jecs.Rest because people will probably not use it anyways
Expand Down

0 comments on commit 5fd7e19

Please sign in to comment.