-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
86 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[tools] | ||
rojo = { source = "rojo-rbx/rojo", version = "6.2.0" } | ||
selene = { source = "Kampfkarren/selene", version = "0.14" } | ||
stylua = { source = "JohnnyMorganz/StyLua", version = "0.11" } | ||
selene = { source = "Kampfkarren/selene", version = "0.18.1" } | ||
stylua = { source = "JohnnyMorganz/StyLua", version = "0.13.1" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
export type Action<Type = string> = { | ||
type: Type, | ||
} | ||
|
||
export type AnyAction = Action & { | ||
[string]: any, | ||
} | ||
|
||
export type ActionCreator<Type, Action, Args...> = typeof(setmetatable( | ||
{} :: { name: Type }, | ||
{} :: { __call: (any, Args...) -> (Action & { type: Type }) } | ||
)) | ||
|
||
return nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
local actions = require(script.Parent.actions) | ||
|
||
type AnyAction = actions.AnyAction | ||
|
||
export type Reducer<State = any, Action = AnyAction> = (State?, Action) -> State | ||
|
||
export type ReducersMapObject<State = any, Action = AnyAction> = { | ||
-- TODO Luau: used to be [K in keyof S]: K[S] | ||
[string]: Reducer<State, Action>, | ||
} | ||
|
||
return nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
type EmptyObject = {} | ||
|
||
export type CombinedState<State> = EmptyObject & State | ||
|
||
return nil |