quickwin 1.0.2 → 1.1.0
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/README.en.md +204 -204
- package/README.md +203 -203
- package/examples/PdfCanvas.tsx +83 -83
- package/examples/exec_server.ts +35 -35
- package/examples/pdf_preview2.ts +375 -375
- package/examples/pdf_viewer.tsx +279 -279
- package/examples/test_gallery.tsx +285 -285
- package/examples/test_react_lazy.tsx +63 -63
- package/examples/test_react_listbox.tsx +71 -71
- package/examples/test_root_window.tsx +41 -41
- package/examples/test_tab.tsx +75 -75
- package/examples/tray_demo.tsx +81 -81
- package/lib/assert.ts +6 -6
- package/lib/cache-utils.ts +40 -40
- package/lib/dumpRects.ts +25 -25
- package/lib/fetch.ts +502 -502
- package/lib/http-common.ts +399 -399
- package/lib/http-server.ts +424 -424
- package/lib/polyfill.ts +171 -171
- package/lib/react-qw/components/index.ts +17 -17
- package/lib/react-qw/index.ts +90 -90
- package/lib/react-qw/jsx.d.ts +34 -34
- package/lib/react-qw/layout.ts +111 -111
- package/lib/react-qw/props.ts +36 -36
- package/lib/react-qw/reconciler.ts +373 -373
- package/lib/stream.ts +21 -21
- package/lib/text-codec.ts +171 -171
- package/lib/text-measure.ts +54 -54
- package/lib/url.ts +201 -201
- package/lib/vendor/web-streams/ponyfill.d.mts +829 -829
- package/lib/vendor/web-streams/ponyfill.mjs +8 -8
- package/lib/websocket.js +8 -0
- package/lib/websocket.ts +563 -555
- package/package.json +50 -44
- package/qwin-nowasm-x86.exe +0 -0
- package/qwin-nowasm.exe +0 -0
- package/qwin-x86.exe +0 -0
- package/qwin.exe +0 -0
- package/test/run.ts +96 -96
- package/test/test_basic.ts +9 -9
- package/test/test_basic_fetch.ts +33 -33
- package/test/test_brotli.ts +52 -52
- package/test/test_fetch_cache.ts +187 -187
- package/test/test_ffi.ts +174 -174
- package/test/test_frame_encoding.ts +132 -132
- package/test/test_helper.ts +80 -80
- package/test/test_http_import.ts +74 -74
- package/test/test_http_server.ts +136 -136
- package/test/test_import_dir.ts +5 -5
- package/test/test_ipv6.ts +129 -129
- package/test/test_meta_url.ts +4 -4
- package/test/test_mupdf_render.ts +74 -74
- package/test/test_mupdf_twice.ts +81 -81
- package/test/test_mupdf_wasm.ts +30 -30
- package/test/test_net_event.ts +55 -55
- package/test/test_net_fetch.ts +238 -238
- package/test/test_net_websocket.ts +164 -164
- package/test/test_polyfill.ts +159 -159
- package/test/test_url.ts +183 -183
- package/test/test_wasm_basic.ts +73 -73
- package/test/test_wasm_import_global.ts +45 -45
- package/test/test_wasm_sjlj.ts +125 -125
- package/test/test_wasm_types.ts +124 -124
- package/test/test_worker.ts +24 -24
- package/test/test_worker_fetch.ts +27 -27
- package/test/test_worker_net.ts +54 -54
- package/test/test_worker_wasm_concurrent.ts +45 -45
- package/test/worker_fetch.ts +13 -13
- package/test/worker_helper.ts +1 -1
- package/test/worker_http.ts +20 -20
- package/test/worker_import_lib.ts +13 -13
- package/test/worker_module.ts +17 -17
- package/test/worker_wasm_concurrent.ts +22 -22
- package/tsconfig.json +27 -27
- package/vendor/mupdf-wasm/mupdf-wasm.d.ts +571 -571
- package/vendor/mupdf-wasm/mupdf-wasm.js +2749 -2749
- package/vendor/mupdf-wasm/mupdf.d.ts +939 -939
- package/vendor/mupdf-wasm/mupdf.js +3317 -3317
package/test/test_worker_net.ts
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import { Tester } from './test_helper.js'
|
|
2
|
-
import * as os from 'os'
|
|
3
|
-
|
|
4
|
-
export const suite = {
|
|
5
|
-
name: 'worker-http',
|
|
6
|
-
run: async (t: Tester) => {
|
|
7
|
-
t.section('import-inside')
|
|
8
|
-
let worker1: any
|
|
9
|
-
const { data: r1 } = await new Promise<any>((resolve, reject) => {
|
|
10
|
-
worker1 = new os.Worker('./worker_http.js')
|
|
11
|
-
const timer = os.setTimeout(() => reject(new Error('timeout')), 15000)
|
|
12
|
-
worker1.onmessage = (e: any) => {
|
|
13
|
-
os.clearTimeout(timer)
|
|
14
|
-
resolve({ worker: worker1, data: e.data })
|
|
15
|
-
}
|
|
16
|
-
worker1.postMessage({ type: 'start' })
|
|
17
|
-
})
|
|
18
|
-
t.check('message type', 'result', r1.type)
|
|
19
|
-
t.checkTrue('isArray([])', r1.isArrayWorks)
|
|
20
|
-
t.checkTrue('isArray({}) rejects', r1.isArrayRejects)
|
|
21
|
-
|
|
22
|
-
worker1.postMessage({ type: 'done' })
|
|
23
|
-
worker1.onmessage = null
|
|
24
|
-
|
|
25
|
-
t.section('http-entry')
|
|
26
|
-
try {
|
|
27
|
-
new os.Worker('https://esm.sh/isarray')
|
|
28
|
-
await new Promise<void>(resolve => os.setTimeout(() => resolve(), 3000))
|
|
29
|
-
t.checkTrue('worker created with http url', true)
|
|
30
|
-
} catch (e) {
|
|
31
|
-
t.checkTrue('worker creation failed: ' + e, false)
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
t.section('npm-package')
|
|
35
|
-
let worker3: any
|
|
36
|
-
try {
|
|
37
|
-
const { data: r3 } = await new Promise<any>((resolve, reject) => {
|
|
38
|
-
worker3 = new os.Worker('https://cdn.jsdelivr.net/npm/quickwin/test/worker_module.js')
|
|
39
|
-
const timer = os.setTimeout(() => reject(new Error('timeout')), 15000)
|
|
40
|
-
worker3.onmessage = (e: any) => {
|
|
41
|
-
os.clearTimeout(timer)
|
|
42
|
-
resolve({ worker: worker3, data: e.data })
|
|
43
|
-
}
|
|
44
|
-
worker3.postMessage({ type: 'start' })
|
|
45
|
-
})
|
|
46
|
-
t.check('npm worker message type', 'result', r3.type)
|
|
47
|
-
t.check('npm worker imported value', 42, r3.value)
|
|
48
|
-
worker3.postMessage({ type: 'done' })
|
|
49
|
-
worker3.onmessage = null
|
|
50
|
-
} catch (e) {
|
|
51
|
-
t.checkTrue('npm worker failed: ' + e, false)
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
1
|
+
import { Tester } from './test_helper.js'
|
|
2
|
+
import * as os from 'os'
|
|
3
|
+
|
|
4
|
+
export const suite = {
|
|
5
|
+
name: 'worker-http',
|
|
6
|
+
run: async (t: Tester) => {
|
|
7
|
+
t.section('import-inside')
|
|
8
|
+
let worker1: any
|
|
9
|
+
const { data: r1 } = await new Promise<any>((resolve, reject) => {
|
|
10
|
+
worker1 = new os.Worker('./worker_http.js')
|
|
11
|
+
const timer = os.setTimeout(() => reject(new Error('timeout')), 15000)
|
|
12
|
+
worker1.onmessage = (e: any) => {
|
|
13
|
+
os.clearTimeout(timer)
|
|
14
|
+
resolve({ worker: worker1, data: e.data })
|
|
15
|
+
}
|
|
16
|
+
worker1.postMessage({ type: 'start' })
|
|
17
|
+
})
|
|
18
|
+
t.check('message type', 'result', r1.type)
|
|
19
|
+
t.checkTrue('isArray([])', r1.isArrayWorks)
|
|
20
|
+
t.checkTrue('isArray({}) rejects', r1.isArrayRejects)
|
|
21
|
+
|
|
22
|
+
worker1.postMessage({ type: 'done' })
|
|
23
|
+
worker1.onmessage = null
|
|
24
|
+
|
|
25
|
+
t.section('http-entry')
|
|
26
|
+
try {
|
|
27
|
+
new os.Worker('https://esm.sh/isarray')
|
|
28
|
+
await new Promise<void>(resolve => os.setTimeout(() => resolve(), 3000))
|
|
29
|
+
t.checkTrue('worker created with http url', true)
|
|
30
|
+
} catch (e) {
|
|
31
|
+
t.checkTrue('worker creation failed: ' + e, false)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
t.section('npm-package')
|
|
35
|
+
let worker3: any
|
|
36
|
+
try {
|
|
37
|
+
const { data: r3 } = await new Promise<any>((resolve, reject) => {
|
|
38
|
+
worker3 = new os.Worker('https://cdn.jsdelivr.net/npm/quickwin/test/worker_module.js')
|
|
39
|
+
const timer = os.setTimeout(() => reject(new Error('timeout')), 15000)
|
|
40
|
+
worker3.onmessage = (e: any) => {
|
|
41
|
+
os.clearTimeout(timer)
|
|
42
|
+
resolve({ worker: worker3, data: e.data })
|
|
43
|
+
}
|
|
44
|
+
worker3.postMessage({ type: 'start' })
|
|
45
|
+
})
|
|
46
|
+
t.check('npm worker message type', 'result', r3.type)
|
|
47
|
+
t.check('npm worker imported value', 42, r3.value)
|
|
48
|
+
worker3.postMessage({ type: 'done' })
|
|
49
|
+
worker3.onmessage = null
|
|
50
|
+
} catch (e) {
|
|
51
|
+
t.checkTrue('npm worker failed: ' + e, false)
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { Tester, readWasmFile } from './test_helper.js'
|
|
2
|
-
import * as os from 'os'
|
|
3
|
-
|
|
4
|
-
export const suite = {
|
|
5
|
-
name: 'worker-wasm',
|
|
6
|
-
run: async (t: Tester) => {
|
|
7
|
-
const wasmBuf = readWasmFile('./add.wasm')
|
|
8
|
-
if (!wasmBuf) { t.fail++; return }
|
|
9
|
-
|
|
10
|
-
const complexBuf = readWasmFile('./complex.wasm')
|
|
11
|
-
if (!complexBuf) { t.fail++; return }
|
|
12
|
-
|
|
13
|
-
t.section('concurrent')
|
|
14
|
-
|
|
15
|
-
const worker = new os.Worker('./worker_wasm_concurrent.js')
|
|
16
|
-
const workerResult = new Promise<any>((resolve, reject) => {
|
|
17
|
-
const timer = os.setTimeout(() => reject(new Error('worker timeout')), 5000)
|
|
18
|
-
worker.onmessage = (e: any) => {
|
|
19
|
-
os.clearTimeout(timer)
|
|
20
|
-
resolve(e.data)
|
|
21
|
-
}
|
|
22
|
-
worker.postMessage({
|
|
23
|
-
type: 'start',
|
|
24
|
-
wasmBuf,
|
|
25
|
-
calls: [['add', [1, 2]], ['add', [10, 20]]]
|
|
26
|
-
})
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
const mainMod = new WebAssembly.Module(wasmBuf)
|
|
30
|
-
const mainInst = new WebAssembly.Instance<{ add: (a: number, b: number) => number }>(mainMod)
|
|
31
|
-
const mainExp = mainInst.exports
|
|
32
|
-
const mainR1 = mainExp.add(1, 2)
|
|
33
|
-
const mainR2 = mainExp.add(10, 20)
|
|
34
|
-
|
|
35
|
-
const wr = await workerResult
|
|
36
|
-
t.check('main add(1, 2)', 3, mainR1)
|
|
37
|
-
t.check('main add(10, 20)', 30, mainR2)
|
|
38
|
-
t.check('worker ok', true, wr.ok)
|
|
39
|
-
t.check('worker add(1, 2)', 3, wr.results[0])
|
|
40
|
-
t.check('worker add(10, 20)', 30, wr.results[1])
|
|
41
|
-
|
|
42
|
-
worker.postMessage({ type: 'done' })
|
|
43
|
-
worker.onmessage = null
|
|
44
|
-
}
|
|
45
|
-
}
|
|
1
|
+
import { Tester, readWasmFile } from './test_helper.js'
|
|
2
|
+
import * as os from 'os'
|
|
3
|
+
|
|
4
|
+
export const suite = {
|
|
5
|
+
name: 'worker-wasm',
|
|
6
|
+
run: async (t: Tester) => {
|
|
7
|
+
const wasmBuf = readWasmFile('./add.wasm')
|
|
8
|
+
if (!wasmBuf) { t.fail++; return }
|
|
9
|
+
|
|
10
|
+
const complexBuf = readWasmFile('./complex.wasm')
|
|
11
|
+
if (!complexBuf) { t.fail++; return }
|
|
12
|
+
|
|
13
|
+
t.section('concurrent')
|
|
14
|
+
|
|
15
|
+
const worker = new os.Worker('./worker_wasm_concurrent.js')
|
|
16
|
+
const workerResult = new Promise<any>((resolve, reject) => {
|
|
17
|
+
const timer = os.setTimeout(() => reject(new Error('worker timeout')), 5000)
|
|
18
|
+
worker.onmessage = (e: any) => {
|
|
19
|
+
os.clearTimeout(timer)
|
|
20
|
+
resolve(e.data)
|
|
21
|
+
}
|
|
22
|
+
worker.postMessage({
|
|
23
|
+
type: 'start',
|
|
24
|
+
wasmBuf,
|
|
25
|
+
calls: [['add', [1, 2]], ['add', [10, 20]]]
|
|
26
|
+
})
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
const mainMod = new WebAssembly.Module(wasmBuf)
|
|
30
|
+
const mainInst = new WebAssembly.Instance<{ add: (a: number, b: number) => number }>(mainMod)
|
|
31
|
+
const mainExp = mainInst.exports
|
|
32
|
+
const mainR1 = mainExp.add(1, 2)
|
|
33
|
+
const mainR2 = mainExp.add(10, 20)
|
|
34
|
+
|
|
35
|
+
const wr = await workerResult
|
|
36
|
+
t.check('main add(1, 2)', 3, mainR1)
|
|
37
|
+
t.check('main add(10, 20)', 30, mainR2)
|
|
38
|
+
t.check('worker ok', true, wr.ok)
|
|
39
|
+
t.check('worker add(1, 2)', 3, wr.results[0])
|
|
40
|
+
t.check('worker add(10, 20)', 30, wr.results[1])
|
|
41
|
+
|
|
42
|
+
worker.postMessage({ type: 'done' })
|
|
43
|
+
worker.onmessage = null
|
|
44
|
+
}
|
|
45
|
+
}
|
package/test/worker_fetch.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import '../lib/fetch.js'
|
|
2
|
-
import * as os from 'os'
|
|
3
|
-
const parent = os.Worker.parent
|
|
4
|
-
|
|
5
|
-
parent.onmessage = (e: any) => {
|
|
6
|
-
if (e.data.type === 'start') {
|
|
7
|
-
fetch('http://localhost:18923/')
|
|
8
|
-
.then(r => parent.postMessage({ type: 'result', ok: r.ok, status: r.status }))
|
|
9
|
-
.catch(err => parent.postMessage({ type: 'error', msg: String(err) }))
|
|
10
|
-
} else if (e.data.type === 'done') {
|
|
11
|
-
parent.onmessage = null
|
|
12
|
-
}
|
|
13
|
-
}
|
|
1
|
+
import '../lib/fetch.js'
|
|
2
|
+
import * as os from 'os'
|
|
3
|
+
const parent = os.Worker.parent
|
|
4
|
+
|
|
5
|
+
parent.onmessage = (e: any) => {
|
|
6
|
+
if (e.data.type === 'start') {
|
|
7
|
+
fetch('http://localhost:18923/')
|
|
8
|
+
.then(r => parent.postMessage({ type: 'result', ok: r.ok, status: r.status }))
|
|
9
|
+
.catch(err => parent.postMessage({ type: 'error', msg: String(err) }))
|
|
10
|
+
} else if (e.data.type === 'done') {
|
|
11
|
+
parent.onmessage = null
|
|
12
|
+
}
|
|
13
|
+
}
|
package/test/worker_helper.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const value = 42
|
|
1
|
+
export const value = 42
|
package/test/worker_http.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import * as os from 'os'
|
|
2
|
-
|
|
3
|
-
// Use variable to bypass compiler's static module resolution
|
|
4
|
-
const url = 'https://esm.sh/' + 'isarray'
|
|
5
|
-
const { default: isArray } = await import(url)
|
|
6
|
-
|
|
7
|
-
const parent = os.Worker.parent
|
|
8
|
-
|
|
9
|
-
parent.onmessage = (e) => {
|
|
10
|
-
const d = e.data as { type: string; [key: string]: unknown }
|
|
11
|
-
if (d.type === 'start') {
|
|
12
|
-
parent.postMessage({
|
|
13
|
-
type: 'result',
|
|
14
|
-
isArrayWorks: isArray([]) === true,
|
|
15
|
-
isArrayRejects: isArray({}) === false,
|
|
16
|
-
})
|
|
17
|
-
} else if (d.type === 'done') {
|
|
18
|
-
parent.onmessage = null
|
|
19
|
-
}
|
|
20
|
-
}
|
|
1
|
+
import * as os from 'os'
|
|
2
|
+
|
|
3
|
+
// Use variable to bypass compiler's static module resolution
|
|
4
|
+
const url = 'https://esm.sh/' + 'isarray'
|
|
5
|
+
const { default: isArray } = await import(url)
|
|
6
|
+
|
|
7
|
+
const parent = os.Worker.parent
|
|
8
|
+
|
|
9
|
+
parent.onmessage = (e) => {
|
|
10
|
+
const d = e.data as { type: string; [key: string]: unknown }
|
|
11
|
+
if (d.type === 'start') {
|
|
12
|
+
parent.postMessage({
|
|
13
|
+
type: 'result',
|
|
14
|
+
isArrayWorks: isArray([]) === true,
|
|
15
|
+
isArrayRejects: isArray({}) === false,
|
|
16
|
+
})
|
|
17
|
+
} else if (d.type === 'done') {
|
|
18
|
+
parent.onmessage = null
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import * as os from 'os'
|
|
2
|
-
import { value } from './worker_helper.js'
|
|
3
|
-
|
|
4
|
-
const parent = os.Worker.parent
|
|
5
|
-
|
|
6
|
-
parent.onmessage = (e) => {
|
|
7
|
-
const d = e.data as { type: string }
|
|
8
|
-
if (d.type === 'start') {
|
|
9
|
-
parent.postMessage({ type: 'result', value })
|
|
10
|
-
} else if (d.type === 'done') {
|
|
11
|
-
parent.onmessage = null
|
|
12
|
-
}
|
|
13
|
-
}
|
|
1
|
+
import * as os from 'os'
|
|
2
|
+
import { value } from './worker_helper.js'
|
|
3
|
+
|
|
4
|
+
const parent = os.Worker.parent
|
|
5
|
+
|
|
6
|
+
parent.onmessage = (e) => {
|
|
7
|
+
const d = e.data as { type: string }
|
|
8
|
+
if (d.type === 'start') {
|
|
9
|
+
parent.postMessage({ type: 'result', value })
|
|
10
|
+
} else if (d.type === 'done') {
|
|
11
|
+
parent.onmessage = null
|
|
12
|
+
}
|
|
13
|
+
}
|
package/test/worker_module.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import * as os from 'os'
|
|
2
|
-
import { value } from './worker_helper.js'
|
|
3
|
-
|
|
4
|
-
const parent = os.Worker.parent
|
|
5
|
-
// @ts-ignore
|
|
6
|
-
// console.log('Hello from worker', globalThis)
|
|
7
|
-
|
|
8
|
-
parent.onmessage = (e) => {
|
|
9
|
-
console.log(e)
|
|
10
|
-
const d = e.data as { type: string }
|
|
11
|
-
if (d.type === 'start') {
|
|
12
|
-
console.log(d.type)
|
|
13
|
-
parent.postMessage({ type: 'result', value })
|
|
14
|
-
} else if (d.type === 'done') {
|
|
15
|
-
parent.onmessage = null
|
|
16
|
-
}
|
|
17
|
-
}
|
|
1
|
+
import * as os from 'os'
|
|
2
|
+
import { value } from './worker_helper.js'
|
|
3
|
+
|
|
4
|
+
const parent = os.Worker.parent
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
// console.log('Hello from worker', globalThis)
|
|
7
|
+
|
|
8
|
+
parent.onmessage = (e) => {
|
|
9
|
+
console.log(e)
|
|
10
|
+
const d = e.data as { type: string }
|
|
11
|
+
if (d.type === 'start') {
|
|
12
|
+
console.log(d.type)
|
|
13
|
+
parent.postMessage({ type: 'result', value })
|
|
14
|
+
} else if (d.type === 'done') {
|
|
15
|
+
parent.onmessage = null
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import * as os from 'os'
|
|
2
|
-
|
|
3
|
-
const parent = os.Worker.parent
|
|
4
|
-
|
|
5
|
-
parent.onmessage = (e) => {
|
|
6
|
-
const d = e.data as { type: string; wasmBuf: ArrayBuffer; imports?: Record<string, unknown>; calls: [string, unknown[]][] }
|
|
7
|
-
if (d.type === 'start') {
|
|
8
|
-
try {
|
|
9
|
-
const mod = new WebAssembly.Module(d.wasmBuf)
|
|
10
|
-
const inst = new WebAssembly.Instance(mod, d.imports || {})
|
|
11
|
-
const results: number[] = []
|
|
12
|
-
for (const [name, args] of d.calls) {
|
|
13
|
-
results.push((inst.exports[name] as Function)(...args))
|
|
14
|
-
}
|
|
15
|
-
parent.postMessage({ ok: true, results })
|
|
16
|
-
} catch (err) {
|
|
17
|
-
parent.postMessage({ ok: false, error: String(err) })
|
|
18
|
-
}
|
|
19
|
-
} else if (d.type === 'done') {
|
|
20
|
-
parent.onmessage = null
|
|
21
|
-
}
|
|
22
|
-
}
|
|
1
|
+
import * as os from 'os'
|
|
2
|
+
|
|
3
|
+
const parent = os.Worker.parent
|
|
4
|
+
|
|
5
|
+
parent.onmessage = (e) => {
|
|
6
|
+
const d = e.data as { type: string; wasmBuf: ArrayBuffer; imports?: Record<string, unknown>; calls: [string, unknown[]][] }
|
|
7
|
+
if (d.type === 'start') {
|
|
8
|
+
try {
|
|
9
|
+
const mod = new WebAssembly.Module(d.wasmBuf)
|
|
10
|
+
const inst = new WebAssembly.Instance(mod, d.imports || {})
|
|
11
|
+
const results: number[] = []
|
|
12
|
+
for (const [name, args] of d.calls) {
|
|
13
|
+
results.push((inst.exports[name] as Function)(...args))
|
|
14
|
+
}
|
|
15
|
+
parent.postMessage({ ok: true, results })
|
|
16
|
+
} catch (err) {
|
|
17
|
+
parent.postMessage({ ok: false, error: String(err) })
|
|
18
|
+
}
|
|
19
|
+
} else if (d.type === 'done') {
|
|
20
|
+
parent.onmessage = null
|
|
21
|
+
}
|
|
22
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
// "incremental": true,
|
|
4
|
-
"target": "es2022",
|
|
5
|
-
"module": "esnext",
|
|
6
|
-
"strict": true,
|
|
7
|
-
"noImplicitAny": true,
|
|
8
|
-
"noFallthroughCasesInSwitch": true,
|
|
9
|
-
"noImplicitReturns": true,
|
|
10
|
-
"noUncheckedIndexedAccess": true,
|
|
11
|
-
"noImplicitOverride": true,
|
|
12
|
-
"noUncheckedSideEffectImports": true,
|
|
13
|
-
"noUnusedLocals": true,
|
|
14
|
-
"noUnusedParameters": true,
|
|
15
|
-
"esModuleInterop": true,
|
|
16
|
-
// "skipLibCheck": true,
|
|
17
|
-
"allowJs": false,
|
|
18
|
-
"lib": ["ES2020"],
|
|
19
|
-
"types": ["./quickwin.d.ts"],
|
|
20
|
-
"rootDir": ".",
|
|
21
|
-
"outDir": "_build",
|
|
22
|
-
"jsx": "react-jsx",
|
|
23
|
-
"jsxImportSource": "react",
|
|
24
|
-
},
|
|
25
|
-
"include": ["test/**/*.ts", "test/**/*.tsx", "examples/**/*.ts", "examples/**/*.tsx", "main.ts", "quickwin.d.ts", "lib/**/*.ts", "lib/**/*.tsx "],
|
|
26
|
-
"exclude": []
|
|
27
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
// "incremental": true,
|
|
4
|
+
"target": "es2022",
|
|
5
|
+
"module": "esnext",
|
|
6
|
+
"strict": true,
|
|
7
|
+
"noImplicitAny": true,
|
|
8
|
+
"noFallthroughCasesInSwitch": true,
|
|
9
|
+
"noImplicitReturns": true,
|
|
10
|
+
"noUncheckedIndexedAccess": true,
|
|
11
|
+
"noImplicitOverride": true,
|
|
12
|
+
"noUncheckedSideEffectImports": true,
|
|
13
|
+
"noUnusedLocals": true,
|
|
14
|
+
"noUnusedParameters": true,
|
|
15
|
+
"esModuleInterop": true,
|
|
16
|
+
// "skipLibCheck": true,
|
|
17
|
+
"allowJs": false,
|
|
18
|
+
"lib": ["ES2020"],
|
|
19
|
+
"types": ["./quickwin.d.ts"],
|
|
20
|
+
"rootDir": ".",
|
|
21
|
+
"outDir": "_build",
|
|
22
|
+
"jsx": "react-jsx",
|
|
23
|
+
"jsxImportSource": "react",
|
|
24
|
+
},
|
|
25
|
+
"include": ["test/**/*.ts", "test/**/*.tsx", "examples/**/*.ts", "examples/**/*.tsx", "main.ts", "quickwin.d.ts", "lib/**/*.ts", "lib/**/*.tsx "],
|
|
26
|
+
"exclude": []
|
|
27
|
+
}
|