I have a Typescript File that looks like this :
export namespace MyNamespace {
export const myFunc = (a:number) => 3;
}
And when I compile it (in my case I am using storybook), I get this error :
Namespace not marked type-only declare. Non-declarative namespaces are only supported experimentally in Babel
. To enable and review caveats see: https://babeljs.io/docs/en/babel-plugin-transform-typescript
This is a babel trying to compile TS error as far as I can tell.
This error "Namespace not marked type-only declare" is puzzling because it doesn't seem to be proper english. Is there supposed to be a comma in there?
Am I supposed to declare something? What is a type only namespace?