GithubHelp home page GithubHelp logo

Comments (2)

sinclairzx81 avatar sinclairzx81 commented on September 25, 2024 2

@aleclarson Hi! :) Hey, this is super cool!

I really like this type and can definitely see it being useful for safely transferring schematics across the wire. At this stage though, I don't think I can introduce it as a standard type today, but can work towards introducing it in future (there would need to be work done elsewhere before introducing it). I do think though that this type aligns well with future plans for the library.

So, all new types usually go through a vetting phase before introduction into the library. It would be cool if you can include the Schema type here which means it will get maintained into the future.

https://github.com/sinclairzx81/typebox/tree/master/example/prototypes

In terms of the work that would need to be done to introduce the type. I have been considering trying to remove the [Kind], [Hint], [Optional], [Readonly] and [Recursive] symbols used for composition and differentiation of schematics at runtime (and statically). These symbols are non-serializable which means TB types cannot be transferred "in full" over a network. Because of this, introducing the Schema() type now would have an expectation that users "could" transfer TB schematics for remote validation (via the Compiler and Value modules). As this currently isn't the case, this aspect is a bit of a blocker.

This said, I am very interested in supporting this type "somehow". If you could submit a PR to the /examples/prototypes, will continue to maintain this type into the future, with it's inclusion happening in tandem with the removal of these Symbol properties.

Awesome work!
S

from typebox.

sinclairzx81 avatar sinclairzx81 commented on September 25, 2024

@aleclarson Hi,

Heya, will close off this issue for now, but can re-open at a later time. Happy to review a prototype PR for this as couple of people have asked about this functionality recently, having a reference implementation would be quite helpful :)

Cheers!
S

from typebox.

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.