Closed
Description
The following sample works perfectly in noImplicitAny
unless I turn on strictNullChecks
. In that event, the s
parameter on foo
seems to get an implicit any
.
interface ActionsObject<State> {
[prop: string]: (state: State) => State
}
interface Options<State, Actions> {
state?: State;
view?: (state: State, actions: Actions) => any;
actions?: Actions;
}
declare function app<State, Actions extends ActionsObject<State>>(obj: Options<State, Actions>): void;
app({
state: 100,
actions: {
foo: s => s
},
view: (s, a) => null as any,
})
If I make actions
non-optional, then things work perfectly again.
Context: jorgebucaran/hyperapp#87