Skip to content
This repository was archived by the owner on Dec 4, 2021. It is now read-only.

Commit e687cd2

Browse files
committed
fix: lint
1 parent 33bee0e commit e687cd2

2 files changed

Lines changed: 19 additions & 3 deletions

File tree

src/lib/flusso/deep-proxy.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ export enum ActionType {
66

77
type Path = string[]
88

9-
export interface Modify {
10-
(type: ActionType, target, path: Path, val): void
11-
}
9+
type Modify = (type: ActionType, target, path: Path, val) => void
1210

1311
export default function deepProxy (obj, cb: Modify, path: Path) {
1412
if (_.isObjectLike(obj) && !_.isDate(obj)) {
@@ -21,6 +19,7 @@ export default function deepProxy (obj, cb: Modify, path: Path) {
2119
} else if (_.isSet(obj) || _.isMap(obj)) {
2220
throw new TypeError('object Set and Map is not allowed')
2321
} else if (_.isPlainObject(obj)) {
22+
// tslint:disable-next-line:forin
2423
for (const key in obj) {
2524
obj[key] = deepProxy(obj[key], cb, <Path> path.concat(key))
2625
}

src/typings/index.d.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
declare module 'yaku/lib/Observable' {
2+
interface Next<T> {
3+
(val: T): PromiseLike<any> | any
4+
}
5+
6+
class Observable<T> {
7+
constructor ()
8+
subscribe (onNext?: Next<T>, onError?: Next<T>): Observable<T>
9+
next (val?: T): void
10+
error (reason?): void
11+
publisher: Observable<T>
12+
subscribers: [Observable<T>]
13+
unsubscribe (): void
14+
}
15+
16+
export = Observable
17+
}

0 commit comments

Comments
 (0)