Coder Social home page Coder Social logo

Comments (3)

djbe avatar djbe commented on June 16, 2024 2

Thank you for your feedback!

As you guessed, yes this can be done with a custom template. I don't think we'll change the current templates for this limited purpose.

BUT! I've been thinking about using property wrappers for exactly this purpose. That way the struct representing a file could be a static prop. wrapper, and you could access the filename via the projected value (for example). Slight problem with this is that we'd need to drop support for older Swift versions. Nothing major, as all current Xcodes (needed to publish to the App Store) have a high enough Swift version.

from swiftgen.

shin-carpediem avatar shin-carpediem commented on June 16, 2024

He kindly shows how to access to the file name of JSON by creating custom template.
👉 https://qiita.com/hcrane/items/2e1d28c779cda8de8454

I think it might be a bit tough, because all we just want to do is accessing the file name..

I hope this request comes up on your agenda.

from swiftgen.

shin-carpediem avatar shin-carpediem commented on June 16, 2024

@djbe
Thank you for your reply.
I think your idea is nice that it will be accessing the filename with safe update!

from swiftgen.

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.