Skip to content

Commit

Permalink
refactor(arrays): update imports
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Feb 23, 2020
1 parent b8c7681 commit 35765a8
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/arrays/src/api.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Fn3, TypedArray } from "@thi.ng/api";
import type { Fn3, TypedArray } from "@thi.ng/api";

export type AnyArray = any[] | TypedArray;

Expand Down
2 changes: 1 addition & 1 deletion packages/arrays/src/binary-search.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Comparator, Fn } from "@thi.ng/api";
import { compare, compareNumAsc } from "@thi.ng/compare";
import type { Comparator, Fn } from "@thi.ng/api";

/**
* Returns the supposed index of `x` in pre-sorted array-like collection
Expand Down
2 changes: 1 addition & 1 deletion packages/arrays/src/find.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Predicate2 } from "@thi.ng/api";
import { equiv as _equiv } from "@thi.ng/equiv";
import type { Predicate2 } from "@thi.ng/api";

/**
* Similar to `Array.find()`, but uses {@link @thi.ng/equiv#equiv} as
Expand Down
2 changes: 1 addition & 1 deletion packages/arrays/src/fuzzy-match.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Predicate2 } from "@thi.ng/api";
import { equiv as _eq } from "@thi.ng/equiv";
import type { Predicate2 } from "@thi.ng/api";

/**
* Performs a fuzzy search of `query` in `domain` and returns `true` if
Expand Down
1 change: 1 addition & 0 deletions packages/arrays/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export type * from "./api";
export * from "./binary-search";
export * from "./ends-with";
export * from "./ensure-array";
Expand Down
2 changes: 1 addition & 1 deletion packages/arrays/src/is-sorted.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Comparator } from "@thi.ng/api";
import { compare } from "@thi.ng/compare";
import type { Comparator } from "@thi.ng/api";

/**
* Returns true if the given array and its elements in the selected
Expand Down
2 changes: 1 addition & 1 deletion packages/arrays/src/iterator.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Nullable } from "@thi.ng/api";
import type { Nullable } from "@thi.ng/api";

/**
* Returns iterator of nullable array w/ optional index range support
Expand Down
2 changes: 1 addition & 1 deletion packages/arrays/src/quicksort.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Comparator, Fn3, TypedArray } from "@thi.ng/api";
import { compare } from "@thi.ng/compare";
import { swap } from "./swap";
import type { Comparator, Fn3, TypedArray } from "@thi.ng/api";

/**
* In-place quicksort implementation with optional comparator & index
Expand Down
8 changes: 5 additions & 3 deletions packages/arrays/src/shuffle.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { assert, TypedArray } from "@thi.ng/api";
import { IRandom, SYSTEM } from "@thi.ng/random";
import { AnyArray } from "./api";
import { assert } from "@thi.ng/api";
import { SYSTEM } from "@thi.ng/random";
import type { TypedArray } from "@thi.ng/api";
import type { IRandom } from "@thi.ng/random";
import type { AnyArray } from "./api";

/**
* Shuffles the items in the given index range of array `buf` using
Expand Down
2 changes: 1 addition & 1 deletion packages/arrays/src/swap.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AnyArray, SwapFn } from "./api";
import type { AnyArray, SwapFn } from "./api";

/**
* Swaps values at index `x`/`y` in given array.
Expand Down
2 changes: 1 addition & 1 deletion packages/arrays/src/swizzle.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Fn } from "@thi.ng/api";
import type { Fn } from "@thi.ng/api";

/**
* Returns optimized function to immutably select, repeat, reshape and /
Expand Down

0 comments on commit 35765a8

Please sign in to comment.