Skip to content

Commit

Permalink
docs(*): make module headers more consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherthielen committed Aug 11, 2018
1 parent 834ce57 commit f144e8b
Show file tree
Hide file tree
Showing 18 changed files with 35 additions and 46 deletions.
12 changes: 4 additions & 8 deletions src/angular.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
/**
* @hidden
* @module ng1
*/ /** */
declare var angular;
/** @publicapi @module ng1 */ /** */
import * as ng_from_import from 'angular';
const ng_from_global = angular;

export const ng = ng_from_import && ng_from_import.module ? ng_from_import : ng_from_global;
/** @hidden */ declare var angular;
/** @hidden */ const ng_from_global = angular;
/** @hidden */ export const ng = ng_from_import && ng_from_import.module ? ng_from_import : ng_from_global;
6 changes: 2 additions & 4 deletions src/directives/stateDirectives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
* These are the directives included in UI-Router for Angular 1.
* These directives are used in templates to create viewports and link/navigate to states.
*
* @ng1api
* @preferred
* @module directives
*/ /** for typedoc */
* @preferred @publicapi @module directives
*/ /** */
import { ng as angular } from '../angular';
import { IAugmentedJQuery, ITimeoutService, IScope, IInterpolateService } from 'angular';

Expand Down
6 changes: 1 addition & 5 deletions src/directives/viewDirective.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
/**
* @ng1api
* @module directives
*/

/** @publicapi @module directives */ /** */
import {
$QLike,
ActiveUIView,
Expand Down
3 changes: 1 addition & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/**
* Main entry point for angular 1.x build
* @module ng1
* @publicapi @module ng1
*/ /** */

export * from './interface';
export * from './services';
export * from './statebuilders/views';
Expand Down
4 changes: 1 addition & 3 deletions src/injectables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@
* - [[$stateParams]]: State param values for pending Transition (deprecated)
* - Any resolve data defined using [[Ng1StateDeclaration.resolve]]
*
* @ng1api
* @preferred
* @module injectables
* @preferred @publicapi @module injectables
*/ /** */
/* tslint:disable:prefer-const */
import { StateProvider } from './stateProvider';
Expand Down
5 changes: 1 addition & 4 deletions src/interface.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
/**
* @ng1api
* @module ng1
*/ /** */
/** @publicapi @module ng1 */ /** */
import { StateDeclaration, _ViewDeclaration, IInjectable, Transition, HookResult } from '@uirouter/core';

/**
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/resolveService.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @module ng1 */ /** */
/** @publicapi @module ng1 */ /** */
import { StateObject, PathNode, ResolveContext, Obj, mapObj, resolvablesBuilder } from '@uirouter/core';
import * as angular from 'angular';

Expand Down
2 changes: 1 addition & 1 deletion src/legacy/stateEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* angular.module("myApplication", ['ui.router', 'ui.router.state.events']
* ```
*
* @module ng1_state_events
* @publicapi @module ng1_state_events
*/ /** */
import { ng as angular } from '../angular';
import { IScope, IAngularEvent, IServiceProviderFactory } from 'angular';
Expand Down
6 changes: 2 additions & 4 deletions src/locationServices.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
/**
* @internalapi
* @module ng1
*/ /** */
/** @publicapi @module ng1 */ /** */
import { LocationConfig, LocationServices, UIRouter, ParamType, isDefined } from '@uirouter/core';
import { val, createProxyFunctions, removeFrom, isObject } from '@uirouter/core';
import { ILocationService, ILocationProvider, IWindowService } from 'angular';

/**
* Implements UI-Router LocationServices and LocationConfig using Angular 1's $location service
* @internalapi
*/
export class Ng1LocationServices implements LocationConfig, LocationServices {
private $locationProvider: ILocationProvider;
Expand Down
6 changes: 2 additions & 4 deletions src/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@
*
* The optional [[$resolve]] service is also documented here.
*
* @module ng1
* @preferred
*/
/** for typedoc */
* @preferred @publicapi @module ng1
*/ /** */
import { ng as angular } from './angular';
import {
IRootScopeService,
Expand Down
2 changes: 1 addition & 1 deletion src/stateFilters.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @module ng1 */ /** for typedoc */
/** @publicapi @module ng1 */ /** */

import { ng as angular } from './angular';
import { Obj, StateService, StateOrName } from '@uirouter/core';
Expand Down
2 changes: 1 addition & 1 deletion src/stateProvider.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @module ng1 */ /** for typedoc */
/** @publicapi @module ng1 */ /** */
import {
val,
isObject,
Expand Down
4 changes: 3 additions & 1 deletion src/statebuilders/onEnterExitRetain.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @module ng1 */ /** */
/** @publicapi @module ng1 */ /** */
import {
StateObject,
TransitionStateHookFn,
Expand All @@ -18,6 +18,8 @@ import { Ng1StateDeclaration } from '../interface';
*
* When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder
* ensures that those hooks are injectable for @uirouter/angularjs (ng1).
*
* @internalapi
*/
export const getStateHookBuilder = (hookName: 'onEnter' | 'onExit' | 'onRetain') =>
function stateHookBuilder(stateObject: StateObject, parentFn: BuilderFunction): TransitionStateHookFn {
Expand Down
9 changes: 8 additions & 1 deletion src/statebuilders/views.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @module ng1 */ /** */
/** @publicapi @module ng1 */ /** */
import { ng as angular } from '../angular';
import {
StateObject,
Expand All @@ -24,6 +24,7 @@ import { Ng1ViewDeclaration } from '../interface';
import { TemplateFactory } from '../templateFactory';
import IInjectorService = angular.auto.IInjectorService;

/** @internalapi */
export function getNg1ViewConfigFactory(): ViewConfigFactory {
let templateFactory: TemplateFactory = null;
return (path, view) => {
Expand All @@ -32,6 +33,7 @@ export function getNg1ViewConfigFactory(): ViewConfigFactory {
};
}

/** @internalapi */
const hasAnyKey = (keys, obj) => keys.reduce((acc, key) => acc || isDefined(obj[key]), false);

/**
Expand All @@ -42,6 +44,8 @@ const hasAnyKey = (keys, obj) => keys.reduce((acc, key) => acc || isDefined(obj[
*
* If no `views: {}` property exists on the [[StateDeclaration]], then it creates the `views` object
* and applies the state-level configuration to a view named `$default`.
*
* @internalapi
*/
export function ng1ViewsBuilder(state: StateObject) {
// Do not process root state
Expand Down Expand Up @@ -98,7 +102,10 @@ export function ng1ViewsBuilder(state: StateObject) {
return views;
}

/** @hidden */
let id = 0;

/** @internalapi */
export class Ng1ViewConfig implements ViewConfig {
$id = id++;
loaded = false;
Expand Down
3 changes: 1 addition & 2 deletions src/templateFactory.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/** @module view */
/** for typedoc */
/** @publicapi @module view */ /** */
import { ng as angular } from './angular';
import { IAugmentedJQuery } from 'angular';
import {
Expand Down
3 changes: 2 additions & 1 deletion src/urlRouterProvider.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @module url */ /** */
/** @publicapi @module url */ /** */
import {
UIRouter,
LocationServices,
Expand Down Expand Up @@ -27,6 +27,7 @@ export interface RawNg1RuleFunction {
*
* This provider remains for backwards compatibility.
*
* @internalapi
* @deprecated
*/
export class UrlRouterProvider {
Expand Down
2 changes: 1 addition & 1 deletion src/viewScroll.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @module ng1 */ /** */
/** @publicapi @module ng1 */ /** */
import { ng as angular } from './angular';
import { IServiceProviderFactory } from 'angular';
import IAnchorScrollService = angular.IAnchorScrollService;
Expand Down
4 changes: 2 additions & 2 deletions typedoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"name": "@uirouter/angularjs",
"theme": "node_modules/ui-router-typedoc-themes/bin/default",
"out": "_doc",
"internal-aliases": "internal,coreapi,ng1api",
"external-aliases": "internalapi,external",
"internal-aliases": "internal,publicapi,publicapi",
"external-aliases": "external,internalapi",
"navigation-label-globals": "@uirouter/angularjs"
}
}
Expand Down

0 comments on commit f144e8b

Please sign in to comment.