I'm trying to do simple import/export in TypeScript as follows:
animals.ts
export const someVar=5;
main.ts
import {someVar} from './animals';
But compiler is saying:
Below are my typescript compiler options:
-t ES6 -m commonjs
I've tried amd in module options as well but with no luck. RequireJs seems to be working fine though.
My TypeScript version is 2.2.2 and using WebStorm IDE.
What am I missing here? Please bear with me as I am new to this.
Edit
tsc main.ts compiles perfectly fine. But WebStorm still whining about compilation errors.

tscoutside it, from a command line, and check to see it works. - Horia Coman