diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-03-14 19:17:52 -0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-03-18 17:17:08 -0400 |
commit | 44773c9b0fe4ae90089c87aa46d049a0a58cccce (patch) | |
tree | 34bd66dc66dd59b9acd4bb0a48ea576610187e05 /js/core.ts | |
parent | 33438b83a2a2597c2b9918475dd5362faa5c1728 (diff) |
Integrate //core into existing code base
This disables a few tests which are broken still:
- tests/error_004_missing_module.test
- tests/error_005_missing_dynamic_import.test
- tests/error_006_import_ext_failure.test
- repl_test test_set_timeout
- repl_test test_async_op
- repl_test test_set_timeout_interlaced
- all of permission_prompt_test
Diffstat (limited to 'js/core.ts')
-rw-r--r-- | js/core.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/js/core.ts b/js/core.ts new file mode 100644 index 000000000..9e94ffdbb --- /dev/null +++ b/js/core.ts @@ -0,0 +1,13 @@ +// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. +import { window } from "./window"; + +type MessageCallback = (msg: Uint8Array) => void; + +// Declared in core/shared_queue.js. +interface DenoCore { + setAsyncHandler(cb: MessageCallback): void; + dispatch(control: Uint8Array, zeroCopy?: Uint8Array): null | Uint8Array; +} + +// TODO(ry) Rename to Deno.core.shared and Deno.core.setAsyncHandler. +export const DenoCore = window.DenoCore as DenoCore; |