brunoborges / toml-schema

MIT License
60 stars 2 forks source link

`sequence` or `tuple` type #10

Open ModProg opened 1 year ago

ModProg commented 1 year ago

This would be an array with a constant size and a specified type for each item.

in typescript this would be:

type a  = [number, string];

in rust

type a = (f64, String);
eksortso commented 1 year ago

@ModProg If you're suggesting these types as a part of the TOML configuration standard, and not essentially just part of this particular schema specification, you can raise the suggestion as a feature request, either on the TOML standard project, or on the project for whichever parser you are utilizing.

ModProg commented 1 year ago

For the schema, the parser I'm using already supports it.

ModProg commented 1 year ago

Probably I wasn't clear enough what the toml side would look like.

The syntax is the same as array and it is therefore already supported by toml. i just wanted a way to specify it using a schema.

a = [1.5, "Hello"]