Skip to content

Commit

Permalink
refactor(atom): re-use Path from @thi.ng/api
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Nov 30, 2019
1 parent a142655 commit 5476fc9
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/atom/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import {
INotify,
IRelease,
IWatch,
Path,
Predicate
} from "@thi.ng/api";
import { Path } from "@thi.ng/paths";

export type SwapFn<T> = (curr: T, ...args: any[]) => T;

Expand Down
3 changes: 2 additions & 1 deletion packages/atom/src/atom.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import {
IEquiv,
IWatchMixin,
Path,
Predicate,
Watch
} from "@thi.ng/api";
import { illegalState } from "@thi.ng/errors";
import { Path, setIn, updateIn } from "@thi.ng/paths";
import { setIn, updateIn } from "@thi.ng/paths";
import {
IAtom,
IView,
Expand Down
3 changes: 2 additions & 1 deletion packages/atom/src/cursor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ import {
Fn2,
IID,
IRelease,
Path,
Predicate,
Watch
} from "@thi.ng/api";
import { isArray, isFunction } from "@thi.ng/checks";
import { illegalArgs, illegalArity } from "@thi.ng/errors";
import { getter, Path, setter } from "@thi.ng/paths";
import { getter, setter } from "@thi.ng/paths";
import {
CursorOpts,
IAtom,
Expand Down
8 changes: 2 additions & 6 deletions packages/atom/src/history.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@ import {
Event,
INotifyMixin,
Listener,
Path,
Predicate2,
Watch
} from "@thi.ng/api";
import { equiv } from "@thi.ng/equiv";
import {
getIn,
Path,
setIn,
updateIn
} from "@thi.ng/paths";
import { getIn, setIn, updateIn } from "@thi.ng/paths";
import {
IAtom,
IHistory,
Expand Down
3 changes: 2 additions & 1 deletion packages/atom/src/view.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Path } from "@thi.ng/api";
import { equiv as _equiv } from "@thi.ng/equiv";
import { getter, Path, toPath } from "@thi.ng/paths";
import { getter, toPath } from "@thi.ng/paths";
import { IView, ReadonlyAtom, ViewTransform } from "./api";
import { nextID } from "./idgen";

Expand Down

0 comments on commit 5476fc9

Please sign in to comment.