tstree-json-schema

5.59.11 • Public • Published

JSON Schema for ESTree-compatible Typescript AST generated from @typescript-eslint/types.

Notably omitted from the schema is RegExpLiterals and BigIntLiterals because there is no JSON Schema representation for RegExp or BigInt as well as NodeOrTokenData because source code is unlikely to be available.

Please make a pull request with necessary changes if either of the above observations change.

Example

{
  "$schema": "https://raw.githubusercontent.com/ssttevee/tstree-json-schema/v5.41.0/ast-spec.json",
  "type": "Program",
  "body": [
    {
      "type": "ExpressionStatement",
      "expression": {
        "type": "CallExpression",
        "optional": false,
        "callee": {
          "type": "MemberExpression",
          "optional": false,
          "computed": false,
          "object": {
            "type": "Identifier",
            "name": "console"
          },
          "property": {
            "type": "Identifier",
            "name": "log"
          }
        },
        "arguments": [
          {
            "type": "Literal",
            "value": "hello world"
          }
        ]
      }
    }
  ]
}

Readme

Keywords

none

Package Sidebar

Install

npm i tstree-json-schema

Weekly Downloads

1

Version

5.59.11

License

MIT

Unpacked Size

175 kB

Total Files

4

Last publish

Collaborators

  • ssttevee