Skip to content

Commit

Permalink
Migrating from TSD to typings
Browse files Browse the repository at this point in the history
TSD has been deprecated
(DefinitelyTyped/tsd#269), with typings
suggested as the replacement.  These changes migrate the code from TSD
to typings.
  • Loading branch information
rinogo committed Jun 8, 2016
1 parent c7b452a commit adc7f78
Show file tree
Hide file tree
Showing 34 changed files with 1,075 additions and 447 deletions.
19 changes: 19 additions & 0 deletions lib/typings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "ionic-cross-platform-boilerplate",
"version": false,
"globalDependencies": {
"angular": "registry:dt/angular#1.5.0+20160602160139",
"angular-ui-router": "registry:dt/angular-ui-router#1.1.5+20160521151413",
"cordova": "registry:dt/cordova#0.0.0+20160510234918",
"cordova-plugin-spinner": "registry:dt/cordova-plugin-spinner#1.0.0+20160317120654",
"cordova/plugins/batterystatus": "registry:dt/cordova/plugins/batterystatus#0.0.0+20160316155526",
"cordova/plugins/camera": "registry:dt/cordova/plugins/camera#0.0.0+20160316155526",
"cordova/plugins/networkinformation": "registry:dt/cordova/plugins/networkinformation#0.0.0+20160514150524",
"ionic": "registry:dt/ionic#0.0.0+20160501155303",
"jquery": "registry:dt/jquery#1.10.0+20160417213236",
"ng-cordova/camera": "registry:dt/ng-cordova/camera#0.0.0+20160316171810",
"ng-cordova/network": "registry:dt/ng-cordova/network#0.0.0+20160316171810",
"ng-cordova/tsd": "registry:dt/ng-cordova/tsd#0.0.0+20151202000610",
"require": "registry:dt/require#2.1.20+20160316155526"
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
// Type definitions for Angular JS 1.1.5+ (ui.router module)
// Project: https://github.com/angular-ui/ui-router
// Definitions by: Michel Salib <https://github.com/michelsalib>
// Definitions: https://github.com/borisyankov/DefinitelyTyped

// Support for AMD require and CommonJS
// Generated by typings
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/41f31600a1bff1adef3c76642183b20ec97aa81e/angular-ui-router/angular-ui-router.d.ts
declare module 'angular-ui-router' {
// Since angular-ui-router adds providers for a bunch of
// injectable dependencies, it doesn't really return any
Expand All @@ -26,14 +22,14 @@ declare module 'angular-ui-router' {
export type IType = angular.ui.IType;
}

declare module angular.ui {
declare namespace angular.ui {

interface IState {
name?: string;
/**
* String HTML content, or function that returns an HTML string
*/
template?: any | string | {(): string};
template?: string | {(params: IStateParamsService): string};
/**
* String URL path to template file OR Function, returns URL path string
*/
Expand Down Expand Up @@ -98,6 +94,12 @@ declare module angular.ui {
cache?: boolean;
}

interface IUnfoundState {
to: string,
toParams: {},
options: IStateOptions
}

interface IStateProvider extends angular.IServiceProvider {
state(name:string, config:IState): IStateProvider;
state(config:IState): IStateProvider;
Expand Down Expand Up @@ -221,9 +223,9 @@ declare module angular.ui {
*/
notify?: boolean;
/**
* {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.
* {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.
*/
reload?: boolean;
reload?: boolean | string | IState;
}

interface IHrefOptions {
Expand Down Expand Up @@ -255,11 +257,15 @@ declare module angular.ui {
transitionTo(state: string, params?: {}, options?: IStateOptions): angular.IPromise<any>;
transitionTo(state: IState, params?: {}, options?: IStateOptions): angular.IPromise<any>;
includes(state: string, params?: {}): boolean;
includes(state: string, params?: {}, options?:any): boolean;
is(state:string, params?: {}): boolean;
is(state: IState, params?: {}): boolean;
href(state: IState, params?: {}, options?: IHrefOptions): string;
href(state: string, params?: {}, options?: IHrefOptions): string;
get(state: string): IState;
get(state: string, context?: string): IState;
get(state: IState, context?: string): IState;
get(state: string, context?: IState): IState;
get(state: IState, context?: IState): IState;
get(): IState[];
/** A reference to the state's config object. However you passed it in. Useful for accessing custom data. */
current: IState;
Expand Down Expand Up @@ -298,7 +304,10 @@ declare module angular.ui {
*
*/
sync(): void;
listen(): void;
listen(): Function;
href(urlMatcher: IUrlMatcher, params?: IStateParamsService, options?: IHrefOptions): string;
update(read?: boolean): void;
push(urlMatcher: IUrlMatcher, params?: IStateParamsService, options?: IHrefOptions): void;
}

interface IUiViewScrollProvider {
Expand Down Expand Up @@ -351,4 +360,4 @@ declare module angular.ui {
*/
pattern?: RegExp;
}
}
}
8 changes: 8 additions & 0 deletions lib/typings/globals/angular-ui-router/typings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"resolution": "main",
"tree": {
"src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/41f31600a1bff1adef3c76642183b20ec97aa81e/angular-ui-router/angular-ui-router.d.ts",
"raw": "registry:dt/angular-ui-router#1.1.5+20160521151413",
"typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/41f31600a1bff1adef3c76642183b20ec97aa81e/angular-ui-router/angular-ui-router.d.ts"
}
}
Loading

0 comments on commit adc7f78

Please sign in to comment.