Skip to content

Commit

Permalink
refactor(binary): update imports, internal restruct
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Feb 23, 2020
1 parent cfdcd3a commit aea5e6b
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/binary/src/align.ts
@@ -1,4 +1,4 @@
import { Pow2 } from "./api";
import type { Pow2 } from "./api";

/**
* Aligns `addr` to next multiple of `size`. The latter must be a power
Expand Down
2 changes: 0 additions & 2 deletions packages/binary/src/api.ts
Expand Up @@ -89,5 +89,3 @@ export type Pow2 =
| 0x20000000
| 0x40000000
| 0x80000000;

export const MASKS = new Array(33).fill(0).map((_, i) => Math.pow(2, i) - 1);
1 change: 1 addition & 0 deletions packages/binary/src/constants.ts
@@ -0,0 +1 @@
export const MASKS = new Array(33).fill(0).map((_, i) => Math.pow(2, i) - 1);
2 changes: 1 addition & 1 deletion packages/binary/src/edit.ts
@@ -1,5 +1,5 @@
import { Bit } from "./api";
import { defMask } from "./mask";
import type { Bit } from "./api";

/**
* Clears bit in given uint `x`.
Expand Down
3 changes: 2 additions & 1 deletion packages/binary/src/index.ts
@@ -1,6 +1,7 @@
export * from "./api";
export type * from "./api";
export * from "./align";
export * from "./bytes";
export * from "./constants";
export * from "./count";
export * from "./edit";
export * from "./float";
Expand Down
2 changes: 1 addition & 1 deletion packages/binary/src/mask.ts
@@ -1,4 +1,4 @@
import { MASKS } from "./api";
import { MASKS } from "./constants";

/**
* Creates bit mask by enabling bit `a` to bit `b-1`, both in range
Expand Down
2 changes: 1 addition & 1 deletion packages/binary/src/pow.ts
@@ -1,4 +1,4 @@
import { Pow2 } from "./api";
import type { Pow2 } from "./api";

// http://graphics.stanford.edu/~seander/bithacks.html

Expand Down
2 changes: 1 addition & 1 deletion packages/binary/src/rotate.ts
@@ -1,4 +1,4 @@
import { Bit } from "./api";
import type { Bit } from "./api";

/**
* Rotates `x` `n` bits to the left.
Expand Down
2 changes: 1 addition & 1 deletion packages/binary/src/swizzle.ts
@@ -1,4 +1,4 @@
import {
import type {
Lane16,
Lane2,
Lane4,
Expand Down

0 comments on commit aea5e6b

Please sign in to comment.