summaryrefslogtreecommitdiff
path: root/lib/epub.js/types/resources.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'lib/epub.js/types/resources.d.ts')
-rw-r--r--lib/epub.js/types/resources.d.ts33
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/epub.js/types/resources.d.ts b/lib/epub.js/types/resources.d.ts
new file mode 100644
index 0000000..f4bfb37
--- /dev/null
+++ b/lib/epub.js/types/resources.d.ts
@@ -0,0 +1,33 @@
+import { PackagingManifestObject } from "./packaging";
+import Archive from "./archive";
+
+export default class Resources {
+ constructor(manifest: PackagingManifestObject, options: {
+ replacements?: string,
+ archive?: Archive,
+ resolver?: Function,
+ request?: Function
+ });
+
+ process(manifest: PackagingManifestObject): void;
+
+ createUrl(url: string): Promise<string>;
+
+ replacements(): Promise<Array<string>>;
+
+ relativeTo(absolute: boolean, resolver?: Function): Array<string>;
+
+ get(path: string): string;
+
+ substitute(content: string, url?: string): string;
+
+ destroy(): void;
+
+ private split(): void;
+
+ private splitUrls(): void;
+
+ private replaceCss(archive: Archive, resolver?: Function): Promise<Array<string>>;
+
+ private createCssFile(href: string): Promise<string>;
+}