File tree Expand file tree Collapse file tree 3 files changed +4
-6
lines changed
packages/quickjs-for-quickjs Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 44
44
[ values ] : #interfacing-with-the-interpreter
45
45
[ asyncify ] : #asyncify
46
46
[ functions ] : #exposing-apis
47
- [ quickjs-for-quickjs ] : https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-for-quickjs
47
+ [ quickjs-for-quickjs ] : https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-for-quickjs
48
48
49
49
- [ quickjs-emscripten] ( #quickjs-emscripten )
50
50
- [ Usage] ( #usage )
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ const context = QuickJS.createContext()
40
40
setUpContext (context)
41
41
42
42
// allow the host QuickJS to import quickjs-for-quickjs module
43
- context .runtime .setModuleLoader (name => {
43
+ context .runtime .setModuleLoader (( name ) => {
44
44
if (name === " quickjs-for-quickjs" ) {
45
45
return quickjsSource
46
46
}
@@ -60,9 +60,7 @@ export const result = innerResult.consume(context.dump)
60
60
`
61
61
62
62
// eval the quickjs host
63
- const handle = context
64
- .evalCode (quickjsHost, " quickjs-host.mjs" )
65
- .unwrap ()
63
+ const handle = context .evalCode (quickjsHost, " quickjs-host.mjs" ).unwrap ()
66
64
67
65
// get the result
68
66
context .runtime .executePendingJob ()
Original file line number Diff line number Diff line change 1
- import { extendConfig } from "@jitl/tsconfig/tsup.base.config.js"
1
+ import { extendConfig } from "@jitl/tsconfig/tsup.base.config.js"
2
2
3
3
export default extendConfig ( {
4
4
entry : [ "src/index.mts" ] ,
You can’t perform that action at this time.
0 commit comments