Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
docs: Add missing tsdoc for some exported members
Browse files Browse the repository at this point in the history
  • Loading branch information
Alorel committed Jul 15, 2019
1 parent 3f41b93 commit 442be19
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 9 deletions.
3 changes: 2 additions & 1 deletion projects/demo/tslint.json
@@ -1,6 +1,7 @@
{
"extends": "../../tslint.json",
"rules": {
"no-implicit-dependencies": false
"no-implicit-dependencies": false,
"completed-docs": false
}
}
5 changes: 1 addition & 4 deletions projects/ngforage/src/lib/cache/cached-item.ts
@@ -1,7 +1,4 @@
/**
* Cached data
* @param T Data type
*/
/** Cached data */
export interface CachedItem<T> {
/** The data */
readonly data: T;
Expand Down
5 changes: 2 additions & 3 deletions projects/ngforage/src/lib/config/ng-forage-options.ts
Expand Up @@ -2,13 +2,12 @@ import 'localforage';
import {DriverType} from '../misc/driver-type.type';
import {Omit} from '../misc/omit.type';

/** Localforage options with ngforage formatting */
export type FormattedLocalForageOptions = Omit<LocalForageOptions, 'driver'> & {
driver?: DriverType | DriverType[];
};

/**
* NgForage configuration
*/
/** NgForage configuration */
export type NgForageOptions = FormattedLocalForageOptions & {
/**
* Cache time in milliseconds
Expand Down
1 change: 1 addition & 0 deletions projects/ngforage/src/lib/misc/driver-type.type.ts
@@ -1,3 +1,4 @@
import {Driver} from './driver.enum';

/** Reference to a driver definition */
export type DriverType = Driver | string;
6 changes: 5 additions & 1 deletion projects/ngforage/src/lib/misc/driver.enum.ts
@@ -1,6 +1,7 @@
import {localForage as lf} from '../imports/localforage';

export enum Driver {
/** ngforage abstraction over localforage driver names */
enum Driver {
/** The IndexedDB driver */
INDEXED_DB = <any>lf.INDEXEDDB,
/** The localStorage driver */
Expand All @@ -9,8 +10,11 @@ export enum Driver {
WEB_SQL = <any>lf.WEBSQL
}

// Clean up after Typescript's two-way enum transpilig
for (const d of [lf.INDEXEDDB, lf.LOCALSTORAGE, lf.WEBSQL]) {
delete Driver[d];
}

Object.freeze(Driver);

export {Driver};
1 change: 1 addition & 0 deletions projects/ngforage/src/lib/misc/injection-tokens.ts
@@ -1,4 +1,5 @@
import {InjectionToken} from '@angular/core';
import {NgForageOptions} from '../config/ng-forage-options';

/** Default ngforage configuration */
export const DEFAULT_CONFIG = new InjectionToken<NgForageOptions>('Default NgForage config');
1 change: 1 addition & 0 deletions projects/ngforage/src/lib/misc/omit.type.ts
@@ -1 +1,2 @@
/** Omit the given properties from the given type */
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;

0 comments on commit 442be19

Please sign in to comment.