mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-03 14:59:18 +02:00
Lint
This commit is contained in:
parent
f09089cf77
commit
7c7c554ee7
84 changed files with 13879 additions and 14510 deletions
67
types/annotations.d.ts
vendored
67
types/annotations.d.ts
vendored
|
@ -1,53 +1,60 @@
|
|||
import Rendition from "./rendition";
|
||||
import View from "./managers/view";
|
||||
import Rendition from "./rendition";
|
||||
|
||||
export default class Annotations {
|
||||
constructor(rendition: Rendition);
|
||||
|
||||
add(type: string, cfiRange: string, data?: object, cb?: Function, className?: string, styles?: object): Annotation;
|
||||
|
||||
add(
|
||||
type: string,
|
||||
cfiRange: string,
|
||||
data?: object,
|
||||
cb?: Function,
|
||||
className?: string,
|
||||
styles?: object
|
||||
): Annotation;
|
||||
remove(cfiRange: string, type: string): void;
|
||||
highlight(
|
||||
cfiRange: string,
|
||||
data?: object,
|
||||
cb?: Function,
|
||||
className?: string,
|
||||
styles?: object
|
||||
): void;
|
||||
underline(
|
||||
cfiRange: string,
|
||||
data?: object,
|
||||
cb?: Function,
|
||||
className?: string,
|
||||
styles?: object
|
||||
): void;
|
||||
mark(cfiRange: string, data?: object, cb?: Function): void;
|
||||
each(): Array<Annotation>;
|
||||
|
||||
highlight(cfiRange: string, data?: object, cb?: Function, className?: string, styles?: object): void;
|
||||
|
||||
underline(cfiRange: string, data?: object, cb?: Function, className?: string, styles?: object): void;
|
||||
|
||||
mark(cfiRange: string, data?: object, cb?: Function): void;
|
||||
|
||||
each(): Array<Annotation>
|
||||
|
||||
private _removeFromAnnotationBySectionIndex(sectionIndex: number, hash: string): void;
|
||||
|
||||
private _removeFromAnnotationBySectionIndex(
|
||||
sectionIndex: number,
|
||||
hash: string
|
||||
): void;
|
||||
private _annotationsAt(index: number): void;
|
||||
|
||||
private inject(view: View): void;
|
||||
|
||||
private clear(view: View): void;
|
||||
}
|
||||
|
||||
declare class Annotation {
|
||||
constructor(options: {
|
||||
type: string,
|
||||
cfiRange: string,
|
||||
data?: object,
|
||||
sectionIndex?: number,
|
||||
cb?: Function,
|
||||
className?: string,
|
||||
styles?: object
|
||||
});
|
||||
|
||||
type: string;
|
||||
cfiRange: string;
|
||||
data?: object;
|
||||
sectionIndex?: number;
|
||||
cb?: Function;
|
||||
className?: string;
|
||||
styles?: object;
|
||||
});
|
||||
update(data: object): void;
|
||||
|
||||
attach(view: View): any;
|
||||
|
||||
detach(view: View): any;
|
||||
|
||||
// Event emitters
|
||||
emit(type: any, ...args: any[]): void;
|
||||
|
||||
off(type: any, listener: any): any;
|
||||
|
||||
on(type: any, listener: any): any;
|
||||
|
||||
once(type: any, listener: any, ...args: any[]): any;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue