-
Notifications
You must be signed in to change notification settings - Fork 780
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add App interface #727
Add App interface #727
Conversation
Codecov Report
@@ Coverage Diff @@
## master #727 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 1 1
Lines 166 166
Branches 52 52
=====================================
Hits 166 166 Continue to review full report at Codecov.
|
@joseluisq Can you create a PR for the V1 branch? I plan to use master for 2.0 after I merge the V2 branch. |
@jorgebucaran looks like the base branch was changed to |
@okwolf How? |
|
🤯 |
@jorgebucaran great! |
Why no-one pinged me 😞? The return type for |
@alber70g The un-wired actions are called |
@alber70g I think that right return type could be something like: export function app<State, Actions>(
state: State,
- actions: ActionsType<State, Actions>,
+ actions: Actions,
view: View<State, Actions>,
container: Element | null
- ): Actions;
+ ): ActionsType<State, Actions>; That means the same for |
This PR proposes to add an
App
Typescript interface, which we will allow us to add type checking of someapp()
function as param. For example if we use hyperapp/render package.This is motivated by this hyperapp/render PR by @frenzzy that it needs an interface to check the
app()
function param.E.g:
Ref: kriasoft/hyperapp-render#10