You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What properties can be configured in this configuration file?
What type of value does a property require?
What does this attribute do?
I hope that when I write json5, if a property requires a value of type number and I write a string to it, VS code will tell me there is an error, and this property requires a value of type number.
When writing json, vs code will not prompt me.
I hope that when writing json5, if a property requires a certain type of Object, I press ctrl + space vs code to remind me which properties it has that I need to assign to it.
Solution:
json5 adds the 'import' function, such as this:
// import "github.com/chen-bbao-x/typedefine.ts"
// implement.json5
// After importing `type-define.ts`, you can do type checking.
// import "github.com/chen-bbao-x/typedefine.ts"
{
value_1: 1111,
value_2: "str",
value_3: {
value_1: ["element1"],
},
}
In this way, the json5 language server can remind me what attributes I need to fill in and what types of these attributes are.
Yes, I can view the comment on a certain attribute in the type definition.
This will save a lot of time for me to check documents.
The text was updated successfully, but these errors were encountered:
Problem
Difficulties I often encounter when writing json:
What properties can be configured in this configuration file?
What type of value does a property require?
What does this attribute do?
I hope that when I write json5, if a property requires a value of type number and I write a string to it, VS code will tell me there is an error, and this property requires a value of type number.
When writing json, vs code will not prompt me.
I hope that when writing json5, if a property requires a certain type of Object, I press ctrl + space vs code to remind me which properties it has that I need to assign to it.
Solution:
json5 adds the 'import' function, such as this:
// import "github.com/chen-bbao-x/typedefine.ts"
In this way, the json5 language server can remind me what attributes I need to fill in and what types of these attributes are.
Yes, I can view the comment on a certain attribute in the type definition.
This will save a lot of time for me to check documents.
The text was updated successfully, but these errors were encountered: