I'm trying to export a simple class, like so:
foo.ts
export class Foo {...}
I'm getting the following error message:
A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled.
I'm using verbatimModuleSyntax based on advice from here: https://www.totaltypescript.com/tsconfig-cheat-sheet
I read the description of it (https://www.typescriptlang.org/tsconfig/#verbatimModuleSyntax) and it seems like a good idea, but I do not understand why it would cause this error. I am not trying to create a CommonJS module, I'm just trying to create a normal Typescript module.
I've also tried to read up on Typescript modules, but haven't found anything relating to my problem. I have seen several examples like export class Foo with no mention of any caveats or catches.