GithubHelp home page GithubHelp logo

Comments (4)

marcolink avatar marcolink commented on May 18, 2024
  1. Put a PR in to the contentful.js repo to add the strongly typed Entry as an option, something like:

I'm not sure how urgent these changes are for you, but if you can wait, this might be something for you!

  1. Add a method to the CFDefinitionsBuilder which exposes the ts-morph project, so it can be modified before generating the types.

I'd be fine with exposing the ts-morph project 👍

3.Integrate https://github.com/webpack/tapable into the package so the rendering can be modified as needed.

I think tapable is a great and powerfull tool. But it comes with a complex API that we would add on top.

A general question, are you using it as CLI, or do you interact with CFDefinitionsBuilder builder directly?
I could imagine that we can register different types of render callbacks, to transform the input in different situations and for different prop renderers. Would that help to solve your problem?

from cf-content-types-generator.

AndrewLeedham avatar AndrewLeedham commented on May 18, 2024

I'm not sure how urgent these changes are for you

Not an immediate rush, I have things working with my custom fork. But it is not an ideal solution, as updates to the main repo will be difficult to back-port.

this might be something for you!

This seems to be specific to queries against field data right? What I am wanting is sys.contentType.sys.id to be strongly typed as part of Entry, e.g. instead of string it is a literal type of the relevant ID.

A general question, are you using it as CLI, or do you interact with CFDefinitionsBuilder builder directly?

Directly interacting with CFDefinitionsBuilder.

I could imagine that we can register different types of render callbacks, to transform the input in different situations and for different prop renderers. Would that help to solve your problem?

That is essentially what I was getting at with tapable, callbacks would work just as well 👍

from cf-content-types-generator.

marcolink avatar marcolink commented on May 18, 2024

@AndrewLeedham I created a new PR #123 addressing this issue.

Would your case be covered with this? (still WIP though)

from cf-content-types-generator.

marcolink avatar marcolink commented on May 18, 2024

version 2.0.0 which features custom rendering just got released

from cf-content-types-generator.

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.