samchon / tgrid

TypeScript RPC (Remote Procedure Call) for WebSocket and Worker protocols
https://tgrid.com/
MIT License
146 stars 19 forks source link

Support Driver type checking #24

Closed samchon closed 5 years ago

samchon commented 5 years ago

The Driver should support its type checking.

import { WebConnector } from "tgrid/protocols/web/WebConnector";
import { Driver } from "tgrid/components/Driver";

async function main(): Promise<void>
{
    let connector: WebConnector;
    let driver: Driver<IController> = connector.getDriver();

    // not supported yet, but should be possible
    console.log(driver instanceof Driver); // true
}