jetify-com / tyson Goto Github PK
View Code? Open in Web Editor NEW๐ฅ TypeScript as a Configuration Language. TySON stands for TypeScript Object Notation
License: Apache License 2.0
๐ฅ TypeScript as a Configuration Language. TySON stands for TypeScript Object Notation
License: Apache License 2.0
It seems like typically configuration languages come with a terraform provider which I think unlocks a lot of potential.
It'd be really cool to see the same for a project like this!
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.
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/
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.
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.