biome_js_parser 0.5.7

Biome's JavaScript parser
Documentation
JsModule {
    bom_token: missing (optional),
    interpreter_token: missing (optional),
    directives: JsDirectiveList [],
    items: JsModuleItemList [
        TsDeclareStatement {
            declare_token: DECLARE_KW@0..8 "declare" [] [Whitespace(" ")],
            declaration: TsModuleDeclaration {
                module_or_namespace: MODULE_KW@8..15 "module" [] [Whitespace(" ")],
                name: TsIdentifierBinding {
                    name_token: IDENT@15..17 "A" [] [Whitespace(" ")],
                },
                body: TsModuleBlock {
                    l_curly_token: L_CURLY@17..18 "{" [] [],
                    items: JsModuleItemList [
                        JsExpressionStatement {
                            expression: JsStringLiteralExpression {
                                value_token: JS_STRING_LITERAL@18..26 "\"name\"" [Newline("\n"), Whitespace(" ")] [],
                            },
                            semicolon_token: missing (optional),
                        },
                        JsBogusStatement {
                            items: [
                                COLON@26..28 ":" [] [Whitespace(" ")],
                                JS_STRING_LITERAL@28..45 "\"troublesome-lib\"" [] [],
                                COMMA@45..46 "," [] [],
                                JS_STRING_LITERAL@46..57 "\"typings\"" [Newline("\n"), Whitespace(" ")] [],
                                COLON@57..59 ":" [] [Whitespace(" ")],
                                JS_STRING_LITERAL@59..75 "\"lib/index.d.ts\"" [] [],
                                COMMA@75..76 "," [] [],
                                JS_STRING_LITERAL@76..87 "\"version\"" [Newline("\n"), Whitespace(" ")] [],
                                COLON@87..89 ":" [] [Whitespace(" ")],
                                JS_STRING_LITERAL@89..96 "\"0.0.1\"" [] [],
                            ],
                        },
                    ],
                    r_curly_token: R_CURLY@96..98 "}" [Newline("\n")] [],
                },
            },
        },
    ],
    eof_token: EOF@98..99 "" [Newline("\n")] [],
}

0: JS_MODULE@0..99
  0: (empty)
  1: (empty)
  2: JS_DIRECTIVE_LIST@0..0
  3: JS_MODULE_ITEM_LIST@0..98
    0: TS_DECLARE_STATEMENT@0..98
      0: DECLARE_KW@0..8 "declare" [] [Whitespace(" ")]
      1: TS_MODULE_DECLARATION@8..98
        0: MODULE_KW@8..15 "module" [] [Whitespace(" ")]
        1: TS_IDENTIFIER_BINDING@15..17
          0: IDENT@15..17 "A" [] [Whitespace(" ")]
        2: TS_MODULE_BLOCK@17..98
          0: L_CURLY@17..18 "{" [] []
          1: JS_MODULE_ITEM_LIST@18..96
            0: JS_EXPRESSION_STATEMENT@18..26
              0: JS_STRING_LITERAL_EXPRESSION@18..26
                0: JS_STRING_LITERAL@18..26 "\"name\"" [Newline("\n"), Whitespace(" ")] []
              1: (empty)
            1: JS_BOGUS_STATEMENT@26..96
              0: COLON@26..28 ":" [] [Whitespace(" ")]
              1: JS_STRING_LITERAL@28..45 "\"troublesome-lib\"" [] []
              2: COMMA@45..46 "," [] []
              3: JS_STRING_LITERAL@46..57 "\"typings\"" [Newline("\n"), Whitespace(" ")] []
              4: COLON@57..59 ":" [] [Whitespace(" ")]
              5: JS_STRING_LITERAL@59..75 "\"lib/index.d.ts\"" [] []
              6: COMMA@75..76 "," [] []
              7: JS_STRING_LITERAL@76..87 "\"version\"" [Newline("\n"), Whitespace(" ")] []
              8: COLON@87..89 ":" [] [Whitespace(" ")]
              9: JS_STRING_LITERAL@89..96 "\"0.0.1\"" [] []
          2: R_CURLY@96..98 "}" [Newline("\n")] []
  4: EOF@98..99 "" [Newline("\n")] []
--
module_closing_curly.ts:2:8 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  × Expected a semicolon or an implicit semicolon after a statement, but found none
  
    1 │ declare module A {
  > 2 │  "name": "troublesome-lib",
      │        ^
    3 │  "typings": "lib/index.d.ts",
    4 │  "version": "0.0.1"
  
  i An explicit or implicit semicolon is expected here...
  
    1 │ declare module A {
  > 2 │  "name": "troublesome-lib",
      │        ^
    3 │  "typings": "lib/index.d.ts",
    4 │  "version": "0.0.1"
  
  i ...Which is required to end this statement
  
    1 │ declare module A {
  > 2 │  "name": "troublesome-lib",
      │  ^^^^^^^
    3 │  "typings": "lib/index.d.ts",
    4 │  "version": "0.0.1"
  
--
declare module A {
 "name": "troublesome-lib",
 "typings": "lib/index.d.ts",
 "version": "0.0.1"
}