0.8.6 • Published 6 months ago
@types/falcor-router v0.8.6
Installation
npm install --save @types/falcor-router
Summary
This package contains type definitions for falcor-router (https://github.com/Netflix/falcor-router).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/falcor-router.
index.d.ts
// Type definitions for falcor-router 0.8
// Project: https://github.com/Netflix/falcor-router
// Definitions by: Quramy <https://github.com/Quramy>
// cdhgee <https://github.com/cdhgee>
// LukeRielley <https://github.com/lukerielley>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.4
/// <reference types="falcor" />
import * as FalcorModel from 'falcor';
import * as FalcorJsonGraph from 'falcor-json-graph';
import DataSource = FalcorModel.DataSource;
import { Observable } from 'rx';
declare class FalcorRouter extends DataSource {
constructor(routes: Array<FalcorRouter.RouteDefinition>, options?: FalcorRouter.RouterOptions);
/**
* When a route misses on a call, get, or set the unhandledDataSource will
* have a chance to fulfill that request.
**/
routeUnhandledPathsTo(dataSource: DataSource): void;
static createClass(routes?: Array<FalcorRouter.RouteDefinition>): typeof FalcorRouter.CreatedRouter;
}
declare namespace FalcorRouter {
class CreatedRouter extends FalcorRouter {
constructor(options?: RouterOptions);
}
interface Route {
route: string;
}
type RoutePathSet = FalcorJsonGraph.PathSet;
interface CallRoute extends Route {
call(callPath: RoutePathSet, args: Array<any>): CallRouteResult | Promise<CallRouteResult> | Observable<CallRouteResult>;
}
interface GetRoute extends Route {
get(pathset: RoutePathSet): RouteResult | Promise<RouteResult> | Observable<RouteResult>;
}
interface SetRoute extends Route {
set(jsonGraph: FalcorJsonGraph.JSONGraph): RouteResult | Promise<RouteResult> | Observable<RouteResult>;
}
type RouteDefinition = GetRoute | SetRoute | CallRoute;
type RouteResult = FalcorJsonGraph.PathValue | Array<FalcorJsonGraph.PathValue> | FalcorJsonGraph.JSONEnvelope<any>;
type CallRouteResult = FalcorJsonGraph.PathValue | FalcorJsonGraph.InvalidPath | Array<FalcorJsonGraph.PathValue | FalcorJsonGraph.InvalidPath> | FalcorJsonGraph.JSONGraphEnvelope;
interface RouterOptions {
debug?: boolean | undefined;
maxPaths?: number | undefined;
maxRefFollow?: number | undefined;
}
}
export = FalcorRouter;
Additional Details
- Last updated: Fri, 09 Jul 2021 02:32:26 GMT
- Dependencies: @types/falcor, @types/falcor-json-graph, @types/rx
- Global values: none
Credits
These definitions were written by Quramy, cdhgee, and LukeRielley.
0.8.5
7 months ago
0.8.4
7 months ago
0.8.6
6 months ago
0.8.3
8 months ago
0.8.2
3 years ago
0.8.1
3 years ago
0.8.0
5 years ago
0.4.17
7 years ago
0.4.16
7 years ago
0.4.15
8 years ago
0.4.14
8 years ago
0.4.13-alpha
8 years ago
0.4.12-alpha
8 years ago
0.4.11-alpha
8 years ago
0.4.10-alpha
8 years ago
0.4.9-alpha
8 years ago
0.4.8-alpha
8 years ago
0.4.3-alpha
8 years ago
0.4.2-alpha
8 years ago