fix type error
This commit is contained in:
parent
1ea8ceca7a
commit
0c3fe43be7
@ -53,6 +53,7 @@
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@louislam/sqlite3": "^6.0.0",
|
||||
"@types/koa-compose": "^3.2.5",
|
||||
"chokidar": "^3.5.1",
|
||||
"jsonschema": "^1.4.0",
|
||||
"jsonwebtoken": "^8.5.1",
|
||||
|
@ -33,7 +33,7 @@ export function ReaderPage(props?: {}) {
|
||||
if (match == null) {
|
||||
throw new Error("unreachable");
|
||||
}
|
||||
const id = Number.parseInt(match.id);
|
||||
const id = Number.parseInt(match.id ?? "NaN");
|
||||
const [info, setInfo] = useState<DocumentState>({ doc: undefined, notfound: false });
|
||||
const menu_list = (link?: string) => <CommonMenuList url={link}></CommonMenuList>;
|
||||
|
||||
|
@ -37,7 +37,7 @@ export class ComicReferrer extends createDefaultClass("comic"){
|
||||
if(this.desc === undefined)
|
||||
throw new Error(`??? JSON.parse is returning undefined. ${this.path} desc.json format error`);
|
||||
}
|
||||
|
||||
|
||||
async createDocumentBody(): Promise<DocumentBody>{
|
||||
await this.initDesc();
|
||||
const basebody = await super.createDocumentBody();
|
||||
|
@ -9,6 +9,12 @@ export class WatcherFilter extends EventEmitter implements IDiffWatcher{
|
||||
on<U extends keyof DiffWatcherEvent>(event:U,listener:DiffWatcherEvent[U]): this{
|
||||
return super.on(event,listener);
|
||||
}
|
||||
/**
|
||||
* emit event
|
||||
* @param event
|
||||
* @param arg
|
||||
* @returns `true` if the event had listeners, `false` otherwise.
|
||||
*/
|
||||
emit<U extends keyof DiffWatcherEvent>(event:U,...arg:Parameters<DiffWatcherEvent[U]>): boolean{
|
||||
if(event === "change"){
|
||||
const prev = arg[0];
|
||||
|
Loading…
Reference in New Issue
Block a user