Skip to content

Commit

Permalink
fix(examples): update/fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Mar 25, 2020
1 parent 9df543f commit 9aa634c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions examples/interceptor-basics2/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AtomPath, defView, defViewUnsafe } from "@thi.ng/atom";
import { defView, defViewUnsafe } from "@thi.ng/atom";
import { start } from "@thi.ng/hdom";
import {
EffectDef,
Expand All @@ -13,7 +13,7 @@ import {
IDispatch,
trace,
} from "@thi.ng/interceptors";
import type { IObjectOf } from "@thi.ng/api";
import type { IObjectOf, Path } from "@thi.ng/api";

///////////////////////////////////////////////////////////////////////
// event name and handler definitions
Expand Down Expand Up @@ -91,7 +91,7 @@ const button = (bus: IDispatch, event: Event, label: string, id?: string) => [
// counter component function
// calls to this function will be triggered via the "addCounter" event and its side effect
// (see further below)
const counter = (bus: IDispatch, path: AtomPath, start = 0, color: string) => {
const counter = (bus: IDispatch, path: Path, start = 0, color: string) => {
const view = defViewUnsafe(bus.state, path);
bus.dispatch([EV_SET_VALUE, [path, start]]);
return [
Expand Down
6 changes: 3 additions & 3 deletions examples/router-basics/src/api.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { EffectDef, EventBus, EventDef } from "@thi.ng/interceptors";
import type { IObjectOf, Fn } from "@thi.ng/api";
import type { IView, AtomPath } from "@thi.ng/atom";
import type { Fn, IObjectOf, Path } from "@thi.ng/api";
import type { IView } from "@thi.ng/atom";
import type { HTMLRouterConfig, RouteMatch } from "@thi.ng/router";

// general types defined for the base app
Expand All @@ -14,7 +14,7 @@ export type AppComponent = (ctx: AppContext, ...args: any[]) => any;
/**
* Derived view configurations.
*/
export type ViewSpec = string | AtomPath | [string | AtomPath, Fn<any, any>];
export type ViewSpec = string | Path | [string | Path, Fn<any, any>];

/**
* Structure of the overall application config object.
Expand Down
6 changes: 3 additions & 3 deletions examples/rstream-grid/src/api.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { EffectDef, EventBus, EventDef } from "@thi.ng/interceptors";
import type { IObjectOf, Fn } from "@thi.ng/api";
import type { IView, AtomPath } from "@thi.ng/atom";
import type { Fn, IObjectOf, Path } from "@thi.ng/api";
import type { IView } from "@thi.ng/atom";

/**
* Function signature for main app components.
Expand All @@ -11,7 +11,7 @@ export type AppComponent = (ctx: AppContext, ...args: any[]) => any;
/**
* Derived view configurations.
*/
export type ViewSpec = string | AtomPath | [string | AtomPath, Fn<any, any>];
export type ViewSpec = string | Path | [string | Path, Fn<any, any>];

/**
* Structure of the overall application config object.
Expand Down
6 changes: 3 additions & 3 deletions examples/svg-waveform/src/api.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { EffectDef, EventBus, EventDef } from "@thi.ng/interceptors";
import type { IObjectOf, Fn } from "@thi.ng/api";
import type { IView, AtomPath } from "@thi.ng/atom";
import type { Fn, IObjectOf, Path } from "@thi.ng/api";
import type { IView } from "@thi.ng/atom";

/**
* Function signature for main app components.
Expand All @@ -10,7 +10,7 @@ export type AppComponent = (ctx: AppContext, ...args: any[]) => any;
/**
* Derived view configurations.
*/
export type ViewSpec = string | AtomPath | [string | AtomPath, Fn<any, any>];
export type ViewSpec = string | Path | [string | Path, Fn<any, any>];

/**
* Structure of the overall application config object.
Expand Down
6 changes: 3 additions & 3 deletions examples/triple-query/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
EventDef,
InterceptorContext,
} from "@thi.ng/interceptors";
import type { IObjectOf, Fn } from "@thi.ng/api";
import type { IView, AtomPath } from "@thi.ng/atom";
import type { Fn, IObjectOf, Path } from "@thi.ng/api";
import type { IView } from "@thi.ng/atom";

/**
* Function signature for main app components.
Expand All @@ -16,7 +16,7 @@ export type AppComponent = (ctx: AppContext, ...args: any[]) => any;
/**
* Derived view configurations.
*/
export type ViewSpec = string | AtomPath | [string | AtomPath, Fn<any, any>];
export type ViewSpec = string | Path | [string | Path, Fn<any, any>];

/**
* Structure of the overall application config object.
Expand Down

0 comments on commit 9aa634c

Please sign in to comment.