“$schema”属性在tsconfig.json中的用途是什么?

huangapple go评论48阅读模式
英文:

What is the use of $schema property use in the tsconfig.json

问题

我看到一些最佳实践工具使用了 $schema 属性,比如 @tsconfigs/node16 等。

这个属性的用途是什么?指向 $schema 属性的 URL 内容包含了在 tsconfig.json 中并不直接存在,但似乎会影响 tsconfig 属性定义本身的键。

例如,https://json.schemastore.org/tsconfig。

我尝试查看了 TypeScript 文档,但没有找到相关信息。

英文:

I see $schema property used by some best practice tools like @tsconfigs/node16 etc.

What is the use of this property? The contents of the URL pointing to the $schema property has keys that are not directly present in tsconfig.json but rather seems to influence the definition of the tsconfig properties itself.

Eg. https://json.schemastore.org/tsconfig

I tried exploring the property typescript documentation but did not find any there.

答案1

得分: 1

这是关于文档遵循的JSON Schema的引用。

该模式描述了JSON文档的结构和格式,并可用于验证文档。

英文:

It's a reference to the JSON Schema that the document adheres to.

The schema describes the structure and format of the JSON document, and can also be used to validate the document.

huangapple
  • 本文由 发表于 2023年4月4日 12:52:53
  • 转载请务必保留本文链接:https://go.coder-hub.com/75925624.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定