Skip to content

Commit

Permalink
Add back type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
vocksel committed Sep 8, 2024
1 parent 4a1cef0 commit 7067c0e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ModuleLoader.luau
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ end
@private
]=]
function ModuleLoader:_trackChanges(module)
function ModuleLoader:_trackChanges(module: ModuleScript)
local existingJanitor = self._janitors[module:GetFullName()]
local janitor = if existingJanitor then existingJanitor else Janitor.new()

Expand Down Expand Up @@ -184,7 +184,7 @@ end
loader:cache(moduleInstance, module)
```
]=]
function ModuleLoader:cache(module, result)
function ModuleLoader:cache(module: ModuleScript, result: any)
local cachedModule: CachedModule = {
module = module,
result = result,
Expand All @@ -208,7 +208,7 @@ end
local module = loader:require(script.Parent.ModuleScript)
```
]=]
function ModuleLoader:require(module)
function ModuleLoader:require(module: ModuleScript)
local cachedModule = self._cache[module:GetFullName()]
local callerPath = getCallerPath()

Expand Down Expand Up @@ -260,7 +260,7 @@ function ModuleLoader:require(module)
return self:_loadCachedModule(module)
end

function ModuleLoader:_getConsumers(module)
function ModuleLoader:_getConsumers(module: ModuleScript): { ModuleScript }
local function getConsumersRecursively(cachedModule: CachedModule, found: { [ModuleScript]: true })
for consumer in cachedModule.consumers do
local cachedConsumer = self._cache[consumer]
Expand Down

0 comments on commit 7067c0e

Please sign in to comment.