Options
All
  • Public
  • Public/Protected
  • All
Menu

Module Driver<Controller, Parametric>

Driver RFC (Remote Function Call).

The Controller is an interface who defines provided functions from the remote system. The Driver is an object who makes to call remote functions, defined in the Controller and provided by Provider in the remote system, possible.

In other words, calling a functions in the Driver<Controller>, it means to call a matched function in the remote system's Provider object.

  • Controller: Definition only
  • Driver: Remote Function Call
author

Jeongho Nam http://samchon.org

Type parameters

  • Controller: object

    An interface defining features (functions & objects) provided from the remote system.

  • Parametric: boolean

Index

Type aliases

Functional

Functional: Method extends (...args: infer Params) => infer Ret ? Ret extends Promise<infer PromiseRet> ? (...args: FunctionalParams<Params, UseParametric>) => Promise<Primitive<PromiseRet>> : (...args: FunctionalParams<Params, UseParametric>) => Promise<...> : (...args: any[]) => Promise<...> & IRemoteFunction

Promisify a function type.

Return type of the target function would be promisified and primitified.

  • T: Promise<Primitifier<T>>
  • Promise<T>: Promise<Primitifer<T>>

IRemoteFunction

IRemoteFunction: object

Restrictions for Remote Function

Type declaration

Parametric

Parametric: object

Convert parameters to be compatible with primitive.

type

Arguments List of parameters

todo

Considering whether this type is an over-spec or not.

Type declaration

Primitive

Primitive: Primitive<Instance>

Primitify a type.

If target type is an object, all methods defined in the object would be removed. Also, if the target type has a toJSON() method, its return type would be chosen.

typeparam

A type to be primitive

Promisive

Promisive: object & IRemoteObject

Promisify an object type.

It promisifies all member types. When a member type is:

  • function: returns Promise (R -> Promise<R>).
  • object: promisifies recursively (O -> Promisify<O>).
  • atomic value: be ignored (be never type).

Generated using TypeDoc