rename Response to RangeResponse; fix lastUsed increment in header cache

This commit is contained in:
Brandon Liu
2022-10-04 10:57:32 +08:00
parent 2a805b0f40
commit 93ff392e6f
2 changed files with 9 additions and 8 deletions

View File

@@ -14,7 +14,7 @@ import {
Cache,
BufferPosition,
Source,
SourceData,
RangeResponse,
VersionMismatch,
PMTiles,
} from "./v3";
@@ -135,7 +135,7 @@ class TestNodeFileSource implements Source {
async getBytes(
offset: number,
length: number
): Promise<SourceData> {
): Promise<RangeResponse> {
const slice = new Uint8Array(this.buffer.slice(offset, offset + length))
.buffer;
return {data:slice, etag:this.etag};