Giter Club home page Giter Club logo

Comments (5)

ckknight avatar ckknight commented on July 24, 2024 2

Fixed in #47

from relay-compiler-language-typescript.

alloy avatar alloy commented on July 24, 2024

AFAIK this logic has been ported directly from the Flow type generator. I hear what you’re saying, but I’d prefer that this would be discussed upstream first and see if the Relay team had a specific reason in mind for designing it this way. Could you please file a ticket in the Relay repo with an example of what you’d like to see changed for discussion and link it here?

from relay-compiler-language-typescript.

waterfoul avatar waterfoul commented on July 24, 2024

I just ran the alloy's 1.5.0-plugin.5 build of the compiler without the language flag and the flow types are using mabye types and optional properties which would be equivalent to a nullable, optional property in typescript

This was copied directly from the output

export type SqlString = {
  eq?: ?string,
  ne?: ?string,
  like?: ?string,
  notLike?: ?string,
};

And this is what --language typescript kicks out

export type matterQueryVariables = {
    readonly matterId: {
        readonly eq: string | null;
        readonly ne: string | null;
        readonly like: string | null;
        readonly notLike: string | null;
    };
};

from relay-compiler-language-typescript.

alloy avatar alloy commented on July 24, 2024

Aha, so we did indeed not port that fully. Good catch and thanks for the details!

from relay-compiler-language-typescript.

alloy avatar alloy commented on July 24, 2024

Finally merged.

from relay-compiler-language-typescript.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.