Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions dist/caching.d.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// Generated by dts-bundle v0.7.3

declare module 'caching' {
export { Cache } from "caching/cache";
export { cacheFor } from "caching/helpers";
export { MemoryCache } from "caching/memory-cache";
export { CookieCache } from "caching/cookie-cache";
export { LocalStorageCache } from "caching/local-storage-cache";
export { SessionStorageCache } from "caching/session-storage-cache";
export { ScopedCache } from "caching/scoped-cache";
declare module '@learningmachine/caching' {
export { Cache } from "@learningmachine/caching/cache";
export { cacheFor } from "@learningmachine/caching/helpers";
export { MemoryCache } from "@learningmachine/caching/memory-cache";
export { CookieCache } from "@learningmachine/caching/cookie-cache";
export { LocalStorageCache } from "@learningmachine/caching/local-storage-cache";
export { SessionStorageCache } from "@learningmachine/caching/session-storage-cache";
export { ScopedCache } from "@learningmachine/caching/scoped-cache";
}

declare module 'caching/cache' {
declare module '@learningmachine/caching/cache' {
export interface cacheValue {
value: any;
expire: number;
Expand All @@ -25,8 +25,8 @@ declare module 'caching/cache' {
}
}

declare module 'caching/helpers' {
import { cacheValue } from "caching/cache";
declare module '@learningmachine/caching/helpers' {
import { cacheValue } from "@learningmachine/caching/cache";
export function isExpired(val: cacheValue): boolean;
export function cacheFor(n: number): {
minutes: number;
Expand All @@ -35,8 +35,8 @@ declare module 'caching/helpers' {
};
}

declare module 'caching/memory-cache' {
import { Cache } from "caching/cache";
declare module '@learningmachine/caching/memory-cache' {
import { Cache } from "@learningmachine/caching/cache";
export class MemoryCache implements Cache {
set<T>(key: string, value: T, durationMS?: any): void;
get<T>(key: string): T;
Expand All @@ -45,8 +45,8 @@ declare module 'caching/memory-cache' {
}
}

declare module 'caching/cookie-cache' {
import { Cache } from "caching/cache";
declare module '@learningmachine/caching/cookie-cache' {
import { Cache } from "@learningmachine/caching/cache";
export class CookieCache implements Cache {
constructor(CookieName?: string);
set<T>(key: string, value: T, durationMS?: any): void;
Expand All @@ -55,26 +55,26 @@ declare module 'caching/cookie-cache' {
}
}

declare module 'caching/local-storage-cache' {
import { Cache } from "caching/cache";
declare module '@learningmachine/caching/local-storage-cache' {
import { Cache } from "@learningmachine/caching/cache";
export class LocalStorageCache implements Cache {
set<T>(key: string, value: T, durationMS?: number): void;
get<T>(key: string): T;
remove(key: string): void;
}
}

declare module 'caching/session-storage-cache' {
import { Cache } from "caching/cache";
declare module '@learningmachine/caching/session-storage-cache' {
import { Cache } from "@learningmachine/caching/cache";
export class SessionStorageCache implements Cache {
set<T>(key: string, value: T, durationMS?: number): void;
get<T>(key: string): T;
remove(key: string): void;
}
}

declare module 'caching/scoped-cache' {
import { Cache } from "caching/cache";
declare module '@learningmachine/caching/scoped-cache' {
import { Cache } from "@learningmachine/caching/cache";
export class ScopedCache implements Cache {
constructor(scope: string, cache: Cache);
setScope(scope: string): void;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"module": "dist/index.js",
"typings": "./dist/caching.d.ts",
"scripts": {
"build": "rm -Rf build-temp && ./node_modules/.bin/tsc --module commonjs --target es6 --outDir build-temp -d && ./node_modules/.bin/dts-bundle --name caching --main build-temp/index.d.ts && ./node_modules/.bin/rollup -c && ./node_modules/.bin/rollup -c --format cjs -o dist/index-cjs.js && cp build-temp/caching.d.ts dist/"
"build": "rm -Rf build-temp && ./node_modules/.bin/tsc --module commonjs --target es6 --outDir build-temp -d && ./node_modules/.bin/dts-bundle --name @learningmachine/caching --out caching.d.ts --main build-temp/index.d.ts && ./node_modules/.bin/rollup -c && ./node_modules/.bin/rollup -c --format cjs -o dist/index-cjs.js && cp build-temp/caching.d.ts dist/"
},
"author": "",
"license": "ISC",
Expand Down
Loading