mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Including types from angular-ui-router
This change to the module definition allows both classic CommonJS imports
as well as new ES6 style imports, e.g. import { IState } from 'angular-ui-router';
This commit is contained in:
+20
-3
@@ -5,10 +5,27 @@
|
||||
|
||||
/// <reference path="../angularjs/angular.d.ts" />
|
||||
|
||||
// Support for AMD require
|
||||
// Support for AMD require and CommonJS
|
||||
declare module 'angular-ui-router' {
|
||||
var _: string;
|
||||
export = _;
|
||||
// Since angular-ui-router adds providers for a bunch of
|
||||
// injectable dependencies, it doesn't really return any
|
||||
// actual data except the plain string 'ui.router'.
|
||||
//
|
||||
// As such, I don't think anybody will ever use the actual
|
||||
// default value of the module. So I've only included the
|
||||
// the types. (@xogeny)
|
||||
export type IState = angular.ui.IState;
|
||||
export type IStateProvider = angular.ui.IStateProvider;
|
||||
export type IUrlMatcher = angular.ui.IUrlMatcher;
|
||||
export type IUrlRouterProvider = angular.ui.IUrlRouterProvider;
|
||||
export type IStateOptions = angular.ui.IStateOptions;
|
||||
export type IHrefOptions = angular.ui.IHrefOptions;
|
||||
export type IStateService = angular.ui.IStateService;
|
||||
export type IResolvedState = angular.ui.IResolvedState;
|
||||
export type IStateParamsService = angular.ui.IStateParamsService;
|
||||
export type IUrlRouterService = angular.ui.IUrlRouterService;
|
||||
export type IUiViewScrollProvider = angular.ui.IUiViewScrollProvider;
|
||||
export type IType = angular.ui.IType;
|
||||
}
|
||||
|
||||
declare module angular.ui {
|
||||
|
||||
Reference in New Issue
Block a user