Skip to content

Commit 2ec85be

Browse files
committed
update typescript used during build to v5.9.3
1 parent 154a5d4 commit 2ec85be

File tree

4 files changed

+22
-20
lines changed

4 files changed

+22
-20
lines changed

package-lock.json

Lines changed: 9 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@
4040
"license": "SEE LICENSE IN LICENSE.txt",
4141
"devDependencies": {
4242
"esbuild": "^0.25.0",
43-
"typescript": "^4.5.4"
43+
"typescript": "^5.9.3"
4444
}
4545
}

src/file_handlers.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ export const downloader = create_downloader();
5252
export async function to_blob(hdf5_file: H5WasmFile) {
5353
const { FS } = await ready;
5454
hdf5_file.flush();
55-
return new Blob([FS.readFile(hdf5_file.filename)], {type: 'application/x-hdf5'});
55+
const data = FS.readFile(hdf5_file.filename);
56+
return new Blob([data.slice()], {type: 'application/x-hdf5'});
5657
}
5758

5859
export async function download(hdf5_file: H5WasmFile) {
@@ -70,4 +71,4 @@ export function dirlisting(path: string, FS: FS.FileSystemType): {files: string[
7071
else {
7172
return {}
7273
}
73-
}
74+
}

src/hdf5_hl.d.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,26 @@ export declare const ACCESS_MODES: {
1111
readonly Sw: "H5F_ACC_SWMR_WRITE";
1212
readonly Sr: "H5F_ACC_SWMR_READ";
1313
};
14-
declare type ACCESS_MODESTRING = keyof typeof ACCESS_MODES;
15-
export declare type OutputData = TypedArray | string | number | bigint | boolean | Reference | RegionReference | OutputData[];
16-
export declare type JSONCompatibleOutputData = string | number | boolean | JSONCompatibleOutputData[];
17-
export declare type Dtype = string | {
14+
type ACCESS_MODESTRING = keyof typeof ACCESS_MODES;
15+
export type OutputData = TypedArray | string | number | bigint | boolean | Reference | RegionReference | OutputData[];
16+
export type JSONCompatibleOutputData = string | number | boolean | JSONCompatibleOutputData[];
17+
export type Dtype = string | {
1818
compound_type: CompoundTypeMetadata;
1919
} | {
2020
array_type: Metadata;
2121
};
2222
export type { Metadata, Filter, CompoundMember, CompoundTypeMetadata, EnumTypeMetadata };
23-
declare type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | BigInt64Array | BigUint64Array | Float32Array | Float64Array;
23+
type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | BigInt64Array | BigUint64Array | Float32Array | Float64Array;
2424
/**
2525
* Describes an array slice.
2626
* `[]` - all data
2727
* `[i0]` - select all data starting from the index `i0`
2828
* `[i0, i1]` - select all data in the range `i0` to `i1`
2929
* `[i0, i1, s]` - select every `s` values in the range `i0` to `i1`
3030
**/
31-
declare type SliceElement = number | null;
32-
declare type Slice = [] | [SliceElement] | [SliceElement, SliceElement] | [SliceElement, SliceElement, SliceElement];
33-
export declare type GuessableDataTypes = TypedArray | number | number[] | string | string[] | Reference | Reference[] | RegionReference | RegionReference[];
31+
type SliceElement = number | null;
32+
type Slice = [] | [SliceElement] | [SliceElement, SliceElement] | [SliceElement, SliceElement, SliceElement];
33+
export type GuessableDataTypes = TypedArray | number | number[] | string | string[] | Reference | Reference[] | RegionReference | RegionReference[];
3434
declare enum OBJECT_TYPE {
3535
DATASET = "Dataset",
3636
GROUP = "Group",
@@ -40,7 +40,7 @@ declare enum OBJECT_TYPE {
4040
REFERENCE = "Reference",
4141
REGION_REFERENCE = "RegionReference"
4242
}
43-
export declare type Entity = Dataset | Group | BrokenSoftLink | ExternalLink | Datatype | Reference | RegionReference;
43+
export type Entity = Dataset | Group | BrokenSoftLink | ExternalLink | Datatype | Reference | RegionReference;
4444
export declare class BrokenSoftLink {
4545
target: string;
4646
type: OBJECT_TYPE;

0 commit comments

Comments
 (0)