Skip to content
This repository was archived by the owner on Nov 25, 2025. It is now read-only.

QOL Changes#1

Open
Newexotik wants to merge 6 commits into
revvy02:mainfrom
Newexotik:public-types
Open

QOL Changes#1
Newexotik wants to merge 6 commits into
revvy02:mainfrom
Newexotik:public-types

Conversation

@Newexotik

Copy link
Copy Markdown

Types

  • typed System and Loop
    intended to only be used by users, so it doesnt include any of the values that start with '_'
  • typed parameters for the following functions: useHookState useEvent useThrottle

Changes

  • state gets passed to systems
    local loop = Jam.Loop.new({ ... }, "Hello", 9999)
    
    loop:schedule(function(arg0: string, arg1: number)
        print(arg0, arg1) -- Hello 9999
    end)
    
    loop:schedule(function(arg0: number, arg1: {}) -- will TypeError
    
    end)

Breaking Changes

  • users must specify system names when using tables to pass their systems
    loop:schedule({ system = function() end, name = "system name" })
    names returned by the SystemName function can be quite long, this change allows users to set a short and readable name for their system

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant