Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Eliminates most of the TypeScript compiler errors.
Consolidates external references into `_references.d.ts`. This avoids some repetition of the same references in every single `.ts` file. This seems to be a common convention, although it seems it's not without its drawbacks; see this thread: https://typescript.codeplex.com/discussions/507413 Note that I made it a definitions file instead of a typescript file so it doesn't generate an unnecessary JavaScript file. Many of the `tsc` errors were simply due to insufficient specification of types. Others, like events in views, were more about where they were declared (at the level of class properties versus inside the constructor). The project still does not compile, due to a mismatch between the type returned by a jQuery selector and the expected type of HTMLInputElement. I haven't yet figured out how to resolve this. I wonder if we shouldn't be using `document.getElementsByClassName` instead. This commit also adds a tsconfig.js file, which is used when `tsc` is invoked with no arguments. This avoids having to always invoke `tsc` with `--module amd`.
- Loading branch information