diff --git a/notNeededPackages.json b/notNeededPackages.json index 010aa98828..302eebd335 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -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", diff --git a/types/mali/index.d.ts b/types/mali/index.d.ts deleted file mode 100644 index a3978119aa..0000000000 --- a/types/mali/index.d.ts +++ /dev/null @@ -1,95 +0,0 @@ -// Type definitions for mali 0.9 -// Project: https://github.com/malijs/mali -// Definitions by: Daniel Byrne -// Bojan D. -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 - -/// - -import { EventEmitter } from "events"; -import { Stream } from "stream"; -import * as grpc from "grpc"; - -type GrpcRequest = - | grpc.ServerUnaryCall - | grpc.ServerReadableStream - | grpc.ServerWriteableStream - | grpc.ServerDuplexStream; - -type GrpcResponse = - | grpc.ClientUnaryCall - | grpc.ClientReadableStream - | grpc.ClientWritableStream - | grpc.ClientDuplexStream; - -declare class Mali extends EventEmitter { - constructor(path: any, name?: string | ReadonlyArray, options?: any); - name: string; - env: string; - ports: ReadonlyArray; - silent: boolean; - - addService( - path: any, - name: string | ReadonlyArray, - 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; - 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; diff --git a/types/mali/mali-tests.ts b/types/mali/mali-tests.ts deleted file mode 100644 index d6d33a263f..0000000000 --- a/types/mali/mali-tests.ts +++ /dev/null @@ -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'); diff --git a/types/mali/package.json b/types/mali/package.json deleted file mode 100644 index 5f75e2f944..0000000000 --- a/types/mali/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "grpc": "^1.0.0" - } -} diff --git a/types/mali/tsconfig.json b/types/mali/tsconfig.json deleted file mode 100644 index 1a4f86d02c..0000000000 --- a/types/mali/tsconfig.json +++ /dev/null @@ -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" - ] -} diff --git a/types/mali/tslint.json b/types/mali/tslint.json deleted file mode 100644 index d88586e5bd..0000000000 --- a/types/mali/tslint.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "dtslint/dt.json" -}