@wailsio/runtime 3.0.0-alpha.23 → 3.0.0-alpha.25
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.
- package/package.json +1 -1
- package/src/create.js +9 -9
- package/src/drag.js +2 -2
package/package.json
CHANGED
package/src/create.js
CHANGED
|
@@ -35,8 +35,8 @@ export function ByteSlice(source) {
|
|
|
35
35
|
* and returns an in-place creation function for an array
|
|
36
36
|
* whose elements are of that type.
|
|
37
37
|
* @template T
|
|
38
|
-
* @param {(any) => T} element
|
|
39
|
-
* @returns {(any) => T[]}
|
|
38
|
+
* @param {(source: any) => T} element
|
|
39
|
+
* @returns {(source: any) => T[]}
|
|
40
40
|
*/
|
|
41
41
|
export function Array(element) {
|
|
42
42
|
if (element === Any) {
|
|
@@ -59,9 +59,9 @@ export function Array(element) {
|
|
|
59
59
|
* and returns an in-place creation function for an object
|
|
60
60
|
* whose keys and values are of those types.
|
|
61
61
|
* @template K, V
|
|
62
|
-
* @param {(any) => K} key
|
|
63
|
-
* @param {(any) => V} value
|
|
64
|
-
* @returns {(any) => { [_: K]: V }}
|
|
62
|
+
* @param {(source: any) => K} key
|
|
63
|
+
* @param {(source: any) => V} value
|
|
64
|
+
* @returns {(source: any) => { [_: K]: V }}
|
|
65
65
|
*/
|
|
66
66
|
export function Map(key, value) {
|
|
67
67
|
if (value === Any) {
|
|
@@ -83,8 +83,8 @@ export function Map(key, value) {
|
|
|
83
83
|
* Nullable takes a creation function for an arbitrary type
|
|
84
84
|
* and returns a creation function for a nullable value of that type.
|
|
85
85
|
* @template T
|
|
86
|
-
* @param {(any) => T} element
|
|
87
|
-
* @returns {(any) => (T | null)}
|
|
86
|
+
* @param {(source: any) => T} element
|
|
87
|
+
* @returns {(source: any) => (T | null)}
|
|
88
88
|
*/
|
|
89
89
|
export function Nullable(element) {
|
|
90
90
|
if (element === Any) {
|
|
@@ -97,10 +97,10 @@ export function Nullable(element) {
|
|
|
97
97
|
/**
|
|
98
98
|
* Struct takes an object mapping field names to creation functions
|
|
99
99
|
* and returns an in-place creation function for a struct.
|
|
100
|
-
* @template {{ [_: string]: ((any) => any) }} T
|
|
100
|
+
* @template {{ [_: string]: ((source: any) => any) }} T
|
|
101
101
|
* @template {{ [Key in keyof T]?: ReturnType<T[Key]> }} U
|
|
102
102
|
* @param {T} createField
|
|
103
|
-
* @returns {(any) => U}
|
|
103
|
+
* @returns {(source: any) => U}
|
|
104
104
|
*/
|
|
105
105
|
export function Struct(createField) {
|
|
106
106
|
let allAny = true;
|
package/src/drag.js
CHANGED
|
@@ -46,7 +46,7 @@ function onMouseDown(e) {
|
|
|
46
46
|
|
|
47
47
|
// Check for resizing
|
|
48
48
|
if (resizeEdge) {
|
|
49
|
-
invoke("resize:" + resizeEdge);
|
|
49
|
+
invoke("wails:resize:" + resizeEdge);
|
|
50
50
|
e.preventDefault();
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
@@ -76,7 +76,7 @@ function onMouseMove(e) {
|
|
|
76
76
|
shouldDrag = false;
|
|
77
77
|
let mousePressed = e.buttons !== undefined ? e.buttons : e.which;
|
|
78
78
|
if (mousePressed > 0) {
|
|
79
|
-
invoke("drag");
|
|
79
|
+
invoke("wails:drag");
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
82
|
}
|