Open chuanqisun opened 5 months ago
I noticed that current IDB interface had two errors:
IDB
readFile
loadFile
/lightning-fs/index.d.ts
export interface IDB { - constructor(dbname: string, storename: string): IDB + new (dbname: string, storename: string): IDB saveSuperblock(sb: Uint8Array): TypeOrPromise<void> loadSuperblock(): TypeOrPromise<FS.SuperBlock> - loadFile(inode: number): TypeOrPromise<Uint8Array> + readFile(inode: number): TypeOrPromise<Uint8Array> writeFile(inode: number, data: Uint8Array): TypeOrPromise<void> wipe(): TypeOrPromise<void> close(): TypeOrPromise<void> }
Do you want to add a PR?
See #127. Note that I removed the constructor instead of using new. I realized that my originally proposed fix was wrong as well and the constructor interface was unnecessary.
constructor
new
I noticed that current
IDB
interface had two errors:readFile
was mis-typed asloadFile
/lightning-fs/index.d.ts