Update angular-ui-router-default for types-2.0 (#12479)

This commit is contained in:
Andy
2016-11-07 07:16:58 -08:00
committed by Masahiro Wakame
parent b8f50c92ee
commit e32ebf0ee4
4 changed files with 41 additions and 19 deletions

View File

@@ -1,10 +1,11 @@
/// <reference path="./angular-ui-router-default.d.ts" />
import * as angular from "angular";
import { ui } from "angular";
angular.module("test", [
"ui.router",
"ui.router.default"
])
.config(function($stateProvider: angular.ui.IStateProvider) {
.config(function($stateProvider: ui.IStateProvider) {
$stateProvider
.state('concrete', {
// no abstract or default

View File

@@ -1,17 +0,0 @@
// Type definitions for angular-ui-router-default 0.5+
// Project: https://github.com/nonplus/angular-ui-router-default
// Definitions by: Stepan Riha <https://github.com/nonplus>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../angular-ui-router/angular-ui-router.d.ts" />
declare namespace angular.ui {
export type StateDefaultSpecifier = string
| ((...args: any[]) => string)
| ((...args: any[]) => ng.IPromise<string>)
| (string | ((...args: any[]) => string))[]
| (string | ((...args: any[]) => ng.IPromise<string>))[];
interface IState {
default?: StateDefaultSpecifier
}
}

19
angular-ui-router-default/index.d.ts vendored Normal file
View File

@@ -0,0 +1,19 @@
// Type definitions for angular-ui-router-default 0.5+
// Project: https://github.com/nonplus/angular-ui-router-default
// Definitions by: Stepan Riha <https://github.com/nonplus>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import * as aur from "angular-ui-router";
declare module "angular" {
namespace ui {
export type StateDefaultSpecifier = string
| ((...args: any[]) => string)
| ((...args: any[]) => ng.IPromise<string>)
| (string | ((...args: any[]) => string))[]
| (string | ((...args: any[]) => ng.IPromise<string>))[];
interface IState {
default?: StateDefaultSpecifier
}
}
}

View File

@@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"angular-ui-router-default-tests.ts"
]
}