Giter Site home page Giter Site logo

jetify-com / tyson Goto Github PK

View Code? Open in Web Editor NEW
531.0 531.0 4.0 102 KB

๐ŸฅŠ TypeScript as a Configuration Language. TySON stands for TypeScript Object Notation

License: Apache License 2.0

Go 100.00%
config configuration configuration-language data json ts tson typescript tyson

tyson's People

Contributors

dgarc359 avatar gcurtis avatar github-actions[bot] avatar lagoja avatar loreto avatar lucilleh avatar mikeland73 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tyson's Issues

Embeddable configuration types

I've been playing with TySON and I've been liking where this can go. I would like to be able to have my application ship a "config drive" or something in the form of an io.FS/embed.FS that's pre-baked with the type definitions. This would let me ship the types by default so I can write TySON configs like this:

import { Config } from "internal/config.ts";

export default {
  foo: "bar",
} satisfies Config;

What do you think about this? Shipping the types to editors would probably be a little bit hard, but I think it could be doable with some legwork.

First read - random thoughts

Hi,

I have just discovered this project

First of all, it's interesting


The first question that came to my mind was : what features are not supported but are supported by TypeScript ? Then i see that another issue is already open #3


I think JSONC (JSON with Comments) should be listed in the related work section


AFAIU, Tyson will be typed, which will transpile into JSON which is not typed, which will be parsed by a program which will be probably be typed

I think this is not optimal to lose the type in the stream


How will you synchronise the program's type with Tyson's type ?


I feel comfortable with jsonc + JSON Schema or Yaml + schema

Note of humour https://xkcd.com/927/

Continuation Lines

Can we have lines that span multiple lines? I notice your back-tick string allows newlines inside the quoted string, but how can you create values that are longer than a line in the editor?

Classically a line ending with a back-slash would allow line extension. JSON does not allow this and so a very long string spills off the right-hand-side of the editor.

Since TySon generates JSON, continuation lines would translate to very-long-strings.

What is the difference between this and using TypeScript?

I don't really understand which TypeScript features are not supported. Since functions and string interpolation are included, how is this different from TypeScript itself? Maybe it would be helpful to specify what is not included in TSON.

In other words, is a JS runtime needed to parse TSON?

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.