creditkarma / thrift-typescript

Generate TypeScript from Thrift IDL files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

code in README for express server setup issues errors

Choongkyu opened this issue · comments

The code in the README:

app.use(
    '/thrift',
    bodyParser.raw(),
    ThriftServerExpress(Calculator.Processor, serviceHandlers),
)

issues this error:

const serviceHandlers: Calculator.IHandler<express.Request<ParamsDictionary, any, any, QueryString.ParsedQs, Record<string, any>>>
Expected 1 arguments, but got 2.ts(2554)

Also import * as express from 'express' should be import express from 'express', otherwise an error is issued.

I've got the same error. It seems that the code in the readme is not up-to-date. You look here to find you answers https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express