From 7a23e2b64cec190d8dfd98a5e609906afff884a2 Mon Sep 17 00:00:00 2001 From: Seyyed Morteza Moosavi Date: Thu, 18 Jun 2020 14:56:51 +0430 Subject: [PATCH] fix(wire): add Fns generic to createWire --- index.d.ts | 2 +- src/wire/create-wire.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/index.d.ts b/index.d.ts index de3c222..cdf29b4 100644 --- a/index.d.ts +++ b/index.d.ts @@ -11,7 +11,7 @@ declare type CB = (t: T) => void; declare type CovarianceGuard = [T, unknown]; -export declare function createWire(initialValue: V): Wire; +export declare function createWire(initialValue: V): Wire; declare type Defined = T extends undefined ? never : T; diff --git a/src/wire/create-wire.ts b/src/wire/create-wire.ts index 6fedf12..2b8fff1 100644 --- a/src/wire/create-wire.ts +++ b/src/wire/create-wire.ts @@ -2,8 +2,8 @@ import { createFnsWire } from '../fn-wire/create-fns-wire'; import { createStateWire } from '../state-wire/create-state-wire'; import { Wire } from './wire'; -export function createWire(initialValue: V): Wire { - const [stateWire] = createStateWire({}, initialValue); - const [fnsWire] = createFnsWire({}); +export function createWire(initialValue: V): Wire { + const [stateWire] = createStateWire({}, initialValue); + const [fnsWire] = createFnsWire({}); return { ...fnsWire, ...stateWire }; }