Skip to content

Commit 09f5069

Browse files
committed
Make scratch-parser definition more consistent with other modules
1 parent bdf74f1 commit 09f5069

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ declare module 'scratch-storage' {
3232
}
3333

3434
declare module 'scratch-parser' {
35-
export = ScratchParser.unpack;
35+
export = ScratchParser;
3636
}
3737

3838
declare module 'scratch-blocks' {

types/scratch-parser.d.ts

+8-6
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
/// <reference path="./jszip.d.ts" />
55

66
declare namespace ScratchParser {
7-
/**
8-
* @param input The binary data representing the project or sprite.
9-
* @param isSprite True if this is a sprite, false if this is a project.
10-
* @param callback
11-
*/
12-
function unpack(input: ArrayBuffer | string, isSprite: boolean, callback: (error: unknown, unpacked: [unknown, JSZip | null]) => void): void
7+
138
}
9+
10+
/**
11+
* @param input The binary data representing the project or sprite.
12+
* @param isSprite True if this is a sprite, false if this is a project.
13+
* @param callback
14+
*/
15+
declare function ScratchParser(input: ArrayBuffer | string, isSprite: boolean, callback: (error: unknown, unpacked: [unknown, JSZip | null]) => void): void

0 commit comments

Comments
 (0)