Skip to content

Commit adc7f78

Browse files
committed
Migrating from TSD to typings
TSD has been deprecated (DefinitelyTyped/tsd#269), with typings suggested as the replacement. These changes migrate the code from TSD to typings.
1 parent c7b452a commit adc7f78

34 files changed

+1075
-447
lines changed

lib/typings.json

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "ionic-cross-platform-boilerplate",
3+
"version": false,
4+
"globalDependencies": {
5+
"angular": "registry:dt/angular#1.5.0+20160602160139",
6+
"angular-ui-router": "registry:dt/angular-ui-router#1.1.5+20160521151413",
7+
"cordova": "registry:dt/cordova#0.0.0+20160510234918",
8+
"cordova-plugin-spinner": "registry:dt/cordova-plugin-spinner#1.0.0+20160317120654",
9+
"cordova/plugins/batterystatus": "registry:dt/cordova/plugins/batterystatus#0.0.0+20160316155526",
10+
"cordova/plugins/camera": "registry:dt/cordova/plugins/camera#0.0.0+20160316155526",
11+
"cordova/plugins/networkinformation": "registry:dt/cordova/plugins/networkinformation#0.0.0+20160514150524",
12+
"ionic": "registry:dt/ionic#0.0.0+20160501155303",
13+
"jquery": "registry:dt/jquery#1.10.0+20160417213236",
14+
"ng-cordova/camera": "registry:dt/ng-cordova/camera#0.0.0+20160316171810",
15+
"ng-cordova/network": "registry:dt/ng-cordova/network#0.0.0+20160316171810",
16+
"ng-cordova/tsd": "registry:dt/ng-cordova/tsd#0.0.0+20151202000610",
17+
"require": "registry:dt/require#2.1.20+20160316155526"
18+
}
19+
}

lib/typings/angular-ui-router/angular-ui-router.d.ts lib/typings/globals/angular-ui-router/index.d.ts

+22-13
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
// Type definitions for Angular JS 1.1.5+ (ui.router module)
2-
// Project: https://github.com/angular-ui/ui-router
3-
// Definitions by: Michel Salib <https://github.com/michelsalib>
4-
// Definitions: https://github.com/borisyankov/DefinitelyTyped
5-
6-
// Support for AMD require and CommonJS
1+
// Generated by typings
2+
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/41f31600a1bff1adef3c76642183b20ec97aa81e/angular-ui-router/angular-ui-router.d.ts
73
declare module 'angular-ui-router' {
84
// Since angular-ui-router adds providers for a bunch of
95
// injectable dependencies, it doesn't really return any
@@ -26,14 +22,14 @@ declare module 'angular-ui-router' {
2622
export type IType = angular.ui.IType;
2723
}
2824

29-
declare module angular.ui {
25+
declare namespace angular.ui {
3026

3127
interface IState {
3228
name?: string;
3329
/**
3430
* String HTML content, or function that returns an HTML string
3531
*/
36-
template?: any | string | {(): string};
32+
template?: string | {(params: IStateParamsService): string};
3733
/**
3834
* String URL path to template file OR Function, returns URL path string
3935
*/
@@ -98,6 +94,12 @@ declare module angular.ui {
9894
cache?: boolean;
9995
}
10096

97+
interface IUnfoundState {
98+
to: string,
99+
toParams: {},
100+
options: IStateOptions
101+
}
102+
101103
interface IStateProvider extends angular.IServiceProvider {
102104
state(name:string, config:IState): IStateProvider;
103105
state(config:IState): IStateProvider;
@@ -221,9 +223,9 @@ declare module angular.ui {
221223
*/
222224
notify?: boolean;
223225
/**
224-
* {boolean=false}, If true will force transition even if the state or params have not changed, aka a reload of the same state. It differs from reloadOnSearch because you'd use this when you want to force a reload when everything is the same, including search params.
226+
* {boolean=false|string|IState}, If true will force transition even if the state or params have not changed, aka a reload of the same state. It differs from reloadOnSearch because you'd use this when you want to force a reload when everything is the same, including search params.
225227
*/
226-
reload?: boolean;
228+
reload?: boolean | string | IState;
227229
}
228230

229231
interface IHrefOptions {
@@ -255,11 +257,15 @@ declare module angular.ui {
255257
transitionTo(state: string, params?: {}, options?: IStateOptions): angular.IPromise<any>;
256258
transitionTo(state: IState, params?: {}, options?: IStateOptions): angular.IPromise<any>;
257259
includes(state: string, params?: {}): boolean;
260+
includes(state: string, params?: {}, options?:any): boolean;
258261
is(state:string, params?: {}): boolean;
259262
is(state: IState, params?: {}): boolean;
260263
href(state: IState, params?: {}, options?: IHrefOptions): string;
261264
href(state: string, params?: {}, options?: IHrefOptions): string;
262-
get(state: string): IState;
265+
get(state: string, context?: string): IState;
266+
get(state: IState, context?: string): IState;
267+
get(state: string, context?: IState): IState;
268+
get(state: IState, context?: IState): IState;
263269
get(): IState[];
264270
/** A reference to the state's config object. However you passed it in. Useful for accessing custom data. */
265271
current: IState;
@@ -298,7 +304,10 @@ declare module angular.ui {
298304
*
299305
*/
300306
sync(): void;
301-
listen(): void;
307+
listen(): Function;
308+
href(urlMatcher: IUrlMatcher, params?: IStateParamsService, options?: IHrefOptions): string;
309+
update(read?: boolean): void;
310+
push(urlMatcher: IUrlMatcher, params?: IStateParamsService, options?: IHrefOptions): void;
302311
}
303312

304313
interface IUiViewScrollProvider {
@@ -351,4 +360,4 @@ declare module angular.ui {
351360
*/
352361
pattern?: RegExp;
353362
}
354-
}
363+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"resolution": "main",
3+
"tree": {
4+
"src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/41f31600a1bff1adef3c76642183b20ec97aa81e/angular-ui-router/angular-ui-router.d.ts",
5+
"raw": "registry:dt/angular-ui-router#1.1.5+20160521151413",
6+
"typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/41f31600a1bff1adef3c76642183b20ec97aa81e/angular-ui-router/angular-ui-router.d.ts"
7+
}
8+
}

0 commit comments

Comments
 (0)