You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Roelof Naude (Jira)" <ji...@apache.org> on 2022/04/12 09:49:00 UTC

[jira] [Created] (THRIFT-5554) Typescript does not import all types

Roelof Naude created THRIFT-5554:
------------------------------------

             Summary: Typescript does not import all types
                 Key: THRIFT-5554
                 URL: https://issues.apache.org/jira/browse/THRIFT-5554
             Project: Thrift
          Issue Type: Bug
          Components: TypeScript - Library
    Affects Versions: 0.16.0
            Reporter: Roelof Naude


The generated typescript service file does not include types from included definitions.

An example of this is the Service.thrift in the test directory:

 
{code:java}

import { Service } from "./Service_types";


export declare class ServiceClient {
.
.
.
testEpisode(arg: Type1): Type1;
}
{code}
In the above Type1 is not known.

t_js_generator::render_ts_includes perform a node test and bails out if not test. 

if this test is removed we get the required behavior:
{code:java}
import Types_ttypes = require('./Types_types');
import { Service } from "./Service_types";

export declare class ServiceClient {
.
.
.
testEpisode(arg: Types_ttypes.Type1): Types_ttypes.Type1;
} {code}
Not sure if we are just using it wrong?

 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)