I'm having trouble trying to import types in my TypeScript project. I'm not entirely sure how import works...
File foo.ts
module Foo {
export class Bar {
}
}
File bar.ts
import { Bar } from "Foo";
Cannot find module 'Foo'.
import { Bar } from "../scripts/Foo";
File '/scripts/foo.ts' is not a module.
So, what am I misunderstanding here? Also, should I be using module or namespace, and what is the difference?
Note foo.ts and bar.ts are in the same location...can I omit ../scripts/?