Skip to content

Commit 663f8de

Browse files
committed
format code, don't exec sites sql with all
1 parent e9c5348 commit 663f8de

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

src/__tests__/fantasy-test.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import * as React from 'react';
22
import { mount } from 'enzyme';
33
import '@reactivex/rxjs'
4-
import { Plan, X } from '../index'
5-
import { pure, map, lift2, lift, lift3, lift4, lift5, concat } from '../fantasy'
4+
import { Plan, X, pure, map, lift2, lift, lift3, lift4, lift5, concat } from '..'
65
import * as rx from '../xs/rx'
76
import { Observable } from '@reactivex/rxjs'
87
import '@reactivex/rxjs/dist/cjs/add/observable/combineLatest'

src/forms/index.ts

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,16 @@ import { HKTS, streamOps, HKT } from '../xs'
44
import { Update } from '../interfaces'
55
import { FantasyX } from '../fantasy/fantasyx'
66

7-
export interface InputType {
8-
text: string
9-
number: number
10-
email: string
11-
}
12-
13-
export function xinput<K extends keyof InputType,
7+
export function xinput<
148
E extends HKTS,
159
I extends Event,
16-
S extends Partial<InputType>>(name: keyof S) {
10+
S>(name: keyof S) {
1711
return pure<E, I, S>(intent$ => {
1812
return {
1913
update$:
20-
streamOps.map<InputType[K], Update<S>>(
21-
value => (state => ({ [name]: value }) as S),
22-
streamOps.map<Event, InputType[K]>(
14+
streamOps.map<string, Update<S>>(
15+
value => (state => ({ [name]: value }) as Partial<S>),
16+
streamOps.map<Event, string>(
2317
e => (e.target as HTMLFormElement).value,
2418
streamOps.filter<I>(i => {
2519
return i.type == 'change' && (i.target as HTMLFormElement).name == name

0 commit comments

Comments
 (0)