Skip to content

Commit

Permalink
refactor: update type-only imports in remaining pkgs
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Dec 7, 2020
1 parent 2037326 commit b22aa30
Show file tree
Hide file tree
Showing 15 changed files with 21 additions and 16 deletions.
2 changes: 1 addition & 1 deletion packages/dgraph-dot/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Fn, IObjectOf } from "@thi.ng/api";
import { DGraph } from "@thi.ng/dgraph";
import type { DGraph } from "@thi.ng/dgraph";
import { Edge, Graph, GraphAttribs, Node, serializeGraph } from "@thi.ng/dot";

export interface DGraphDotOpts<T> {
Expand Down
2 changes: 1 addition & 1 deletion packages/dsp/src/gen/iterable.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IGen } from "../api";
import type { IGen } from "../api";

/**
* Wraps given ES6 iterable to provide full {@link IGen} implementation.
Expand Down
2 changes: 1 addition & 1 deletion packages/ecs/src/ecs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { isArray, isString } from "@thi.ng/checks";
import { IDGen } from "@thi.ng/idgen";
import { IMemPoolArray, NativePool } from "@thi.ng/malloc";
import { filter } from "@thi.ng/transducers";
import {
import type {
ComponentID,
ECSOpts,
GroupOpts,
Expand Down
2 changes: 1 addition & 1 deletion packages/geom-hull/test/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// import * as assert from "assert";
// import * as gh from "../src/index";
// import * as gh from "../src";

describe("geom-hull", () => {
it("tests pending");
Expand Down
4 changes: 2 additions & 2 deletions packages/geom-io-obj/src/parser.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assert } from "@thi.ng/api";
import { Vec } from "@thi.ng/vectors";
import type { Vec } from "@thi.ng/vectors";
import type { OBJFace, OBJGroup, OBJModel, ParseOpts } from "./api";

export const parseOBJ = (src: string, opts?: Partial<ParseOpts>) => {
Expand Down Expand Up @@ -35,7 +35,7 @@ export const parseOBJ = (src: string, opts?: Partial<ParseOpts>) => {
(currGroup = {
id,
smooth: false,
faces: faces = [],
faces: (faces = []),
lines: [],
mtl: currGroup ? currGroup.mtl : undefined,
})
Expand Down
2 changes: 1 addition & 1 deletion packages/geom-isec/src/line-poly.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IntersectionResult } from "@thi.ng/geom-api";
import type { IntersectionResult } from "@thi.ng/geom-api";
import { mag, normalize, ReadonlyVec, sub } from "@thi.ng/vectors";
import { intersectRayPolylineAll } from "./ray-poly";

Expand Down
2 changes: 1 addition & 1 deletion packages/geom-subdiv-curve/src/subdivide.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type { SubdivKernel } from "@thi.ng/geom-api";
import {
comp,
mapcatIndexed,
partition,
push,
transduce,
} from "@thi.ng/transducers";
import type { SubdivKernel } from "@thi.ng/geom-api";
import type { ReadonlyVec, Vec } from "@thi.ng/vectors";

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/geom-voronoi/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { IObjectOf, Pair } from "@thi.ng/api";
import { isNumber } from "@thi.ng/checks";
import { liangBarsky2 } from "@thi.ng/geom-clip-line";
import { sutherlandHodgeman } from "@thi.ng/geom-clip-poly";
Expand All @@ -17,7 +18,6 @@ import {
VecPair,
ZERO2,
} from "@thi.ng/vectors";
import type { IObjectOf, Pair } from "@thi.ng/api";

export type Visitor<T> = (
e: Edge<Vertex<T>>,
Expand Down
2 changes: 1 addition & 1 deletion packages/hdiff/src/theme.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { css } from "@thi.ng/hiccup-css";
import { BgFg, BgFgBorder, Theme } from "./api";
import type { BgFg, BgFgBorder, Theme } from "./api";

const block = { display: "block" };
const none = { display: "none" };
Expand Down
7 changes: 6 additions & 1 deletion packages/hiccup-html/src/table.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { Attribs, AttribVal, MultiStringAttrib, NumericAttrib } from "./api";
import type {
Attribs,
AttribVal,
MultiStringAttrib,
NumericAttrib,
} from "./api";
import { defElement, defElements } from "./def";

export const [table, tbody, tfoot, thead, tr, caption] = defElements([
Expand Down
2 changes: 1 addition & 1 deletion packages/iges/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
wordWrap,
wrapSides,
} from "@thi.ng/transducers";
import type { ReadonlyVec } from "@thi.ng/vectors";
import {
BooleanNode,
BooleanTree,
Expand All @@ -28,7 +29,6 @@ import {
Type,
Unit,
} from "./api";
import type { ReadonlyVec } from "@thi.ng/vectors";

// https://wiki.eclipse.org/IGES_file_Specification
// http://paulbourke.net/dataformats/iges/IGES.pdf
Expand Down
2 changes: 1 addition & 1 deletion packages/memoize/src/do-once.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Fn } from "@thi.ng/api";
import { MapLike } from "./api";
import type { MapLike } from "./api";

/**
* Similar to {@link memoize1}, however optimized for side effects only, i.e.
Expand Down
2 changes: 1 addition & 1 deletion packages/pixel/src/float.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { assert, Fn, NumericArray } from "@thi.ng/api";
import { isNumber } from "@thi.ng/checks";
import { clamp01 } from "@thi.ng/math";
import {
import type {
BlendFnFloat,
BlitOpts,
FloatFormat,
Expand Down
2 changes: 1 addition & 1 deletion packages/shader-ast-js/src/env/bvec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
some3,
some4,
} from "@thi.ng/vectors";
import { JSBuiltinsBool } from "../api";
import type { JSBuiltinsBool } from "../api";

export const BVEC2: JSBuiltinsBool = {
all: every2,
Expand Down
2 changes: 1 addition & 1 deletion packages/system/src/api.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Keys, Fn } from "@thi.ng/api";
import type { Fn, Keys } from "@thi.ng/api";

export interface ILifecycle {
/**
Expand Down

0 comments on commit b22aa30

Please sign in to comment.