@hazae41/stdbob 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,10 +8,11 @@ name: release
|
|
|
8
8
|
jobs:
|
|
9
9
|
compare:
|
|
10
10
|
name: compare
|
|
11
|
-
runs-on: ubuntu-
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
12
|
steps:
|
|
13
|
-
-
|
|
14
|
-
- uses: actions/
|
|
13
|
+
- run: "sleep 5m"
|
|
14
|
+
- uses: actions/checkout@v7
|
|
15
|
+
- uses: actions/setup-node@v7
|
|
15
16
|
with:
|
|
16
17
|
node-version: latest
|
|
17
18
|
- run: "npm ci && npm run prepack"
|
package/package.json
CHANGED
package/src/mods/blobs/mod.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { textref } from "../texts/mod"
|
|
2
|
-
import { wrapref } from "../wraps/mod"
|
|
3
2
|
|
|
4
3
|
export type blobref = externref
|
|
5
4
|
|
|
@@ -109,10 +108,10 @@ export namespace blobs {
|
|
|
109
108
|
export declare function encode<T>(value: T): blobref
|
|
110
109
|
|
|
111
110
|
/**
|
|
112
|
-
* Decode the given blob into a value of type T (assuming it was encoded from a value of type T)
|
|
111
|
+
* Decode the given blob into a value of type T (assuming it was encoded from a value of type T)
|
|
113
112
|
*/
|
|
114
113
|
// @ts-ignore: decorator
|
|
115
114
|
@external("blobs", "decode")
|
|
116
|
-
export declare function decode(blob: blobref):
|
|
115
|
+
export declare function decode<T>(blob: blobref): T
|
|
117
116
|
|
|
118
117
|
}
|
package/src/mods/modules/mod.ts
CHANGED
|
@@ -23,7 +23,7 @@ export namespace modules {
|
|
|
23
23
|
export declare function load(module: textref): blobref
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
|
-
* Call the given method of the given module with the given parameters then return the result in a wrapref
|
|
26
|
+
* Call the given method of the given module with the given parameters then return the result in a wrapref
|
|
27
27
|
*/
|
|
28
28
|
// @ts-ignore: decorator
|
|
29
29
|
@external("modules", "call")
|
package/src/mods/pointers/mod.ts
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
|
+
import { wrapref } from "../wraps/mod";
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
|
-
* Convert between
|
|
4
|
+
* Convert between values and local i32 indices (for use in data structures)
|
|
3
5
|
*/
|
|
4
6
|
export namespace pointers {
|
|
5
7
|
|
|
6
8
|
/**
|
|
7
|
-
* Convert
|
|
9
|
+
* Convert a value to an i32 index
|
|
8
10
|
*/
|
|
9
11
|
// @ts-ignore: decorator
|
|
10
12
|
@external("pointers", "numerize")
|
|
11
|
-
export declare function numerize(
|
|
13
|
+
export declare function numerize<T>(value: T): i32
|
|
12
14
|
|
|
13
15
|
/**
|
|
14
|
-
* Convert an i32 index back to
|
|
16
|
+
* Convert an i32 index back to a value in a wrapref or null if not found
|
|
15
17
|
*/
|
|
16
18
|
// @ts-ignore: decorator
|
|
17
19
|
@external("pointers", "denumerize")
|
|
18
|
-
export declare function denumerize(index: i32):
|
|
20
|
+
export declare function denumerize(index: i32): wrapref
|
|
19
21
|
|
|
20
22
|
}
|
package/src/mods/tuples/mod.ts
CHANGED
|
@@ -85,7 +85,7 @@ export namespace tuples {
|
|
|
85
85
|
export declare function length(tuple: tupleref): i32
|
|
86
86
|
|
|
87
87
|
/**
|
|
88
|
-
* Get the value at the given index in the given tuple
|
|
88
|
+
* Get the value at the given index in the given tuple in a wrapref or null if not found
|
|
89
89
|
*/
|
|
90
90
|
// @ts-ignore: decorator
|
|
91
91
|
@external("tuples", "get")
|