I'm using TypeScript 2.1.5 with Visual Studio 2015. The project is configured to use the "ES 2015" module system and ECMAScript 6.
I'm trying to use the Angular Local Storage module, which is defined by DefinitelyTyped as:
declare module 'angular' {
export namespace local.storage {
interface ILocalStorageService {
}
}
}
In one of my services, I want to import that interface so I can use it, like so:
module Foooooo.Services {
export class FooService {
constructor(private localStorageService: local.storage.ILocalStorageService) {
}
}
}
I've tried everything I can think of after pouring over the documentation:
import local from "angular"; // bzzzzzt
import * as ang from "angular"; // causes all of my other interfaces to no longer resolve
import { local } from "angular"; // doesn't compile
import { ILocalStorageService } from "angular"; // other interfaces don't resolve anymore
import { local.ILocalStorageService } from "angular"; // nopenope
import ILocalStorageService = require("angular"); // error: not compatible with ECMAScript 6 or higher
How do I get this to import properly?