Skip to content

make a new type *.tson #54233

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
takegine opened this issue May 13, 2023 · 2 comments
Closed

make a new type *.tson #54233

takegine opened this issue May 13, 2023 · 2 comments
Labels
Out of Scope This idea sits outside of the TypeScript language design constraints Suggestion An idea for TypeScript

Comments

@takegine
Copy link

takegine commented May 13, 2023

Suggestion

When using a JSON file, we want to limit the parameter content we fill in using the $schema field, and write a complex JSON to restrict it. I want to develop a completely new file that uses an interface instead of the schema's restrictive features. Its extension can be tson. This also makes it easier to convert from interface to and from JSON.In my opinion everyone will think that declare an interface is much simpler than the schema

// Same as above, in my native language
在使用json文件时,我们要限制填写的参数内容使用了“$schema”字段,并写了一个复杂的json去限制。我希望能开发一种全新的文件,使用一个 interface 来代替 schema的限制功能。它的拓展名可以是 tson 。这样也更容易从 interface 和json之间相互转化。我想,大家应该都会觉得 interface 的申明比schema要简单很多

@xiBread
Copy link

xiBread commented May 13, 2023

Seems like a duplicate of #2064

@RyanCavanaugh RyanCavanaugh added Suggestion An idea for TypeScript Out of Scope This idea sits outside of the TypeScript language design constraints labels May 15, 2023
@typescript-bot
Copy link
Collaborator

This issue has been marked as "Out of Scope" and has seen no recent activity. It has been automatically closed for house-keeping purposes.

@typescript-bot typescript-bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Out of Scope This idea sits outside of the TypeScript language design constraints Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

4 participants