Skip to content

Commit f5fd578

Browse files
chore(core): Export all symbols into global namespace for typescript importing
chore(*): Remove /// <ref path='...d.ts'>
1 parent b7da092 commit f5fd578

24 files changed

+56
-94
lines changed

Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ module.exports = function (grunt) {
170170

171171
grunt.registerTask('docs', 'Generate documentation to _doc', function() {
172172
promising(this,
173-
system('./node_modules/typedoc/bin/typedoc --experimentalDecorators --readme ./README.md --name "UI-Router" --theme ./typedoctheme --mode modules --module commonjs --target es5 --out _doc src')
173+
system('./node_modules/typedoc/bin/typedoc --experimentalDecorators --readme ./README.md --name "UI-Router" --theme ./typedoctheme --mode modules --module commonjs --target es5 --out _doc src typings/es6-shim/es6-shim.d.ts typings/angularjs/angular.d.ts')
174174
);
175175
});
176176

src/core.ts

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
/// <reference path='../typings/angularjs/angular.d.ts' />
2-
/// <reference path='../typings/es6-shim/es6-shim.d.ts' />
31
/** @module core */ /** */
42

5-
import * as common from "./common/module";
6-
import * as params from "./params/module";
7-
import * as path from "./path/module";
8-
import * as resolve from "./resolve/module";
9-
import * as state from "./state/module";
10-
import * as transition from "./transition/module";
11-
import * as url from "./url/module";
12-
import * as view from "./view/module";
3+
export * from "./common/module";
4+
export * from "./params/module";
5+
export * from "./path/module";
6+
export * from "./resolve/module";
7+
export * from "./state/module";
8+
export * from "./transition/module";
9+
export * from "./url/module";
10+
export * from "./view/module";
1311

14-
export { common, params, path, resolve, state, transition, url, view };
1512
export { UIRouter } from "./router";

src/ng1.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/// <reference path='../typings/angularjs/angular.d.ts' />
2-
/// <reference path='../typings/es6-shim/es6-shim.d.ts' />
31
/**
42
* Main entry point for angular 1.x build
53
* @module ng1

src/ng1/services.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
* @preferred
1010
*/
1111

12-
/// <reference path='../../typings/angularjs/angular.d.ts' />
13-
/// <reference path='../../typings/es6-shim/es6-shim.d.ts' />
14-
1512
/** for typedoc */
1613
import {UIRouter} from "../router";
1714
import {services} from "../common/coreservices";

src/ng1/stateDirectives.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/** @module state */ /** for typedoc */
2-
/// <reference path='../../typings/angularjs/angular.d.ts' />
32
import {extend, forEach, toJson} from "../common/common";
43
import {isString, isObject} from "../common/predicates";
54
import {UIViewData} from "./viewDirective";

src/ng1/stateEvents.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919

2020
/** for typedoc */
2121
import {IServiceProviderFactory} from "angular";
22-
import {StateService, StateProvider} from "../state/interface";
23-
import {TargetState} from "../state/module";
22+
import {TargetState, StateService, StateProvider} from "../state/module";
2423
import {Transition} from "../transition/transition";
2524

2625
/**
@@ -211,7 +210,7 @@ var $stateNotFound;
211210

212211
if (e.defaultPrevented) {
213212
return false;
214-
} else if (e.retry || $state.get(redirect.to)) {
213+
} else if (e.retry || !!$state.get(redirect.to)) {
215214
return e.retry && isFunction(e.retry.then) ? e.retry.then(redirectFn) : redirectFn();
216215
}
217216
}

src/ng2.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// <reference path='../typings/es6-shim/es6-shim.d.ts' />
21
/**
32
* Main entry point for angular 2.x build
43
* @module ng2

src/params/module.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* @preferred doc
77
*/
88
/** for typedoc */
9+
export * from "./interface";
910
export * from "./param";
1011
export * from "./paramTypes";
1112
export * from "./stateParams";

src/path/node.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import {RawParams} from "../params/interface";
66
import {Param} from "../params/module";
77
import {Resolvable, ResolveContext, ResolveInjector} from "../resolve/module";
88
import {ViewConfig} from "../view/interface";
9-
10-
export type Resolvables = { [key: string]: Resolvable };
9+
import {Resolvables} from "../resolve/interface";
1110

1211
export class Node {
1312
public paramSchema: Param[];

src/resolve/module.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/** @module path */ /** for typedoc */
2+
export * from "./interface";
23
export * from "./resolvable";
34
export * from "./resolveContext";
45
export * from "./resolveInjector";

0 commit comments

Comments
 (0)