I have been working on creating a TypeScript definition file for the angular-q-extras library
You can view the full definition file I have written here
This definition file includes a few methods added to the IQService interface:
declare var _: string;
export = _;
import * as angular from 'angular';
declare module 'angular' {
namespace angular {
interface IQService {
allSettled(promises): IPromise<any>;
}
}
}
My approach is heavily influenced by existing Angular plugin definitions.
However, when running the DefinitelyTyped linter or when trying to use the definition, I encounter the following error:
Cannot augment module 'angular' with value exports because it resolves to a non-module entity.
Additionally, I get numerous errors like:
Cannot find name 'IPromise'.
I am puzzled as to why this is causing issues for my definition but not for others. I must have overlooked something obvious, but I am unable to pinpoint what it is.