fix(typings): repair broken type-checking for StringMap

Note that the previous type of StringMap was overly permissive and didn't catch errors.
Also we have to explicitly type empty objects, which is explained here:
https://github.com/Microsoft/TypeScript/issues/5089

Closes #4487
This commit is contained in:
Alex Eagle
2015-10-02 17:33:21 -07:00
committed by Alex Eagle
parent 7c4199cd1c
commit 208f3d4c65
16 changed files with 36 additions and 36 deletions

View File

@ -187,7 +187,7 @@ export function main() {
}
];
browsers.forEach((browser) => {
browsers.forEach((browser: {[key: string]: any}) => {
it(`should detect ${StringMapWrapper.get(browser, 'name')}`, () => {
var bd = new BrowserDetection(<string>StringMapWrapper.get(browser, 'ua'));
expect(bd.isFirefox).toBe(StringMapWrapper.get(browser, 'isFirefox'));