ZNTC0305: 'export' declaration is only allowed in module code
ZNTC0305
Section titled “ZNTC0305”‘export’ declaration is only allowed in module code
Category: Parser: Import/Export
Reproduction
Section titled “Reproduction”export const x = 1;How to fix
Section titled “How to fix”See the error message for cause and resolution.