creditkarma / thrift-typescript

Generate TypeScript from Thrift IDL files
Apache License 2.0
155 stars 32 forks source link

Missing Int64 import for function field in apache render #140

Closed juwonjung-hdj closed 5 years ago

juwonjung-hdj commented 5 years ago

Import statement for Int64 is missing in generated typescript when target is apache and Int64 only exists in function field.

Example)

Thrift

namespace js sample

service SampleService {
  string sample(1:required i64 num)
}

Generated typescript

import * as thrift from "thrift";
export namespace SampleService {
    export interface ISampleArgsArgs {
        num: number | Int64;
//                    ^ type error since import is missing
    }
// ...
kevin-greene-ck commented 5 years ago

Fix published in 3.1.1