mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
remove mali as it is not needed any more because we publish the module with type definitions
This commit is contained in:
parent
b32edf9453
commit
d7b9199894
@ -930,6 +930,12 @@
|
||||
"sourceRepoURL": "https://github.com/blakeembrey/lower-case-first",
|
||||
"asOfVersion": "1.0.1"
|
||||
},
|
||||
{
|
||||
"libraryName": "mali",
|
||||
"typingsPackageName": "mali",
|
||||
"sourceRepoURL": "https://github.com/malijs/mali",
|
||||
"asOfVersion": "0.9.2"
|
||||
},
|
||||
{
|
||||
"libraryName": "maquette",
|
||||
"typingsPackageName": "maquette",
|
||||
|
||||
95
types/mali/index.d.ts
vendored
95
types/mali/index.d.ts
vendored
@ -1,95 +0,0 @@
|
||||
// Type definitions for mali 0.9
|
||||
// Project: https://github.com/malijs/mali
|
||||
// Definitions by: Daniel Byrne <https://github.com/danwbyrne>
|
||||
// Bojan D. <https://github.com/bojand>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.1
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
import { EventEmitter } from "events";
|
||||
import { Stream } from "stream";
|
||||
import * as grpc from "grpc";
|
||||
|
||||
type GrpcRequest =
|
||||
| grpc.ServerUnaryCall<any>
|
||||
| grpc.ServerReadableStream<any>
|
||||
| grpc.ServerWriteableStream<any>
|
||||
| grpc.ServerDuplexStream<any, any>;
|
||||
|
||||
type GrpcResponse =
|
||||
| grpc.ClientUnaryCall
|
||||
| grpc.ClientReadableStream<any>
|
||||
| grpc.ClientWritableStream<any>
|
||||
| grpc.ClientDuplexStream<any, any>;
|
||||
|
||||
declare class Mali extends EventEmitter {
|
||||
constructor(path: any, name?: string | ReadonlyArray<string>, options?: any);
|
||||
name: string;
|
||||
env: string;
|
||||
ports: ReadonlyArray<number>;
|
||||
silent: boolean;
|
||||
|
||||
addService(
|
||||
path: any,
|
||||
name: string | ReadonlyArray<string>,
|
||||
options?: any
|
||||
): void;
|
||||
use(service?: any, name?: any, fns?: any): void;
|
||||
start(port: number | string, creds?: any, options?: any): grpc.Server;
|
||||
toJSON(): any;
|
||||
close(): Promise<void>;
|
||||
inspect(): any;
|
||||
}
|
||||
|
||||
declare namespace Mali {
|
||||
interface Context {
|
||||
name: string;
|
||||
fullName: string;
|
||||
service: string;
|
||||
package: string;
|
||||
app: Mali;
|
||||
call: any;
|
||||
request: Request;
|
||||
response: Response;
|
||||
req: GrpcRequest;
|
||||
res: GrpcResponse;
|
||||
type: string;
|
||||
metadata: any;
|
||||
get(field: string): any;
|
||||
set(field: any, val?: any): void;
|
||||
sendMetadata(md: any): void;
|
||||
getStatus(field: string): any;
|
||||
setStatus(field: any, val?: any): void;
|
||||
}
|
||||
|
||||
class Request {
|
||||
constructor(call: any, type: string);
|
||||
call: any;
|
||||
type: string;
|
||||
metadata: any;
|
||||
req: GrpcRequest;
|
||||
|
||||
getMetadata(): grpc.Metadata;
|
||||
get(field: string): any;
|
||||
}
|
||||
|
||||
class Response {
|
||||
constructor(call: any, type: string);
|
||||
call: any;
|
||||
type: string;
|
||||
metadata: any;
|
||||
status: any;
|
||||
res: GrpcResponse;
|
||||
set(field: any, val?: any): void;
|
||||
get(field: string): any;
|
||||
getMetadata(): grpc.Metadata;
|
||||
sendMetadata(md?: any): void;
|
||||
getStatus(field: string): any;
|
||||
setStatus(field: any, val?: any): void;
|
||||
}
|
||||
|
||||
function exec(ctx: Context, handler: any, cb?: any): void;
|
||||
}
|
||||
|
||||
export = Mali;
|
||||
@ -1,16 +0,0 @@
|
||||
// example from https://github.com/malijs/mali#example
|
||||
|
||||
import Mali = require('mali');
|
||||
import path = require('path');
|
||||
|
||||
const PROTO_PATH = path.resolve(__dirname, '../protos/helloworld.proto');
|
||||
|
||||
async function sayHello(ctx: Mali.Context) {
|
||||
ctx.res = { message: 'Hello '.concat(ctx.req.name) };
|
||||
}
|
||||
|
||||
const app = new Mali(PROTO_PATH);
|
||||
// $ExpectType void
|
||||
app.use({sayHello});
|
||||
// $ExpectType any
|
||||
app.start('127.0.0.1:50051');
|
||||
@ -1,5 +0,0 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"grpc": "^1.0.0"
|
||||
}
|
||||
}
|
||||
@ -1,19 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": ["es6"],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": ["../"],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"mali-tests.ts"
|
||||
]
|
||||
}
|
||||
@ -1,3 +0,0 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user