summaryrefslogtreecommitdiff
path: root/ext/websocket/00_ops.js
diff options
context:
space:
mode:
authorMatt Mastracci <matthew@mastracci.com>2023-12-24 06:04:32 -0700
committerGitHub <noreply@github.com>2023-12-24 13:04:32 +0000
commit92b2e28c6491f339124ec5851173ac0aaef93908 (patch)
tree3910827b2772379054c15c4c3f133175138baf36 /ext/websocket/00_ops.js
parent1297c9a8f379d89691522c5cc0c6071c479e95a1 (diff)
chore: ensure that each op provided to ensureFastOps is only used once (#21689)
When we migrate to op-import-per-extension, we will want to ensure that ops have one and only one place where they are imported. This tackles the ops that are imported via `ensureFastOps`, but does not yet tackle direct `ops` imports. Landing ahead of https://github.com/denoland/deno_core/pull/393
Diffstat (limited to 'ext/websocket/00_ops.js')
-rw-r--r--ext/websocket/00_ops.js35
1 files changed, 35 insertions, 0 deletions
diff --git a/ext/websocket/00_ops.js b/ext/websocket/00_ops.js
new file mode 100644
index 000000000..38628f8c3
--- /dev/null
+++ b/ext/websocket/00_ops.js
@@ -0,0 +1,35 @@
+// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
+import { core } from "ext:core/mod.js";
+const {
+ op_ws_create,
+ op_ws_close,
+ op_ws_send_binary,
+ op_ws_send_binary_ab,
+ op_ws_send_text,
+ op_ws_next_event,
+ op_ws_get_buffer,
+ op_ws_get_buffer_as_string,
+ op_ws_get_error,
+ op_ws_send_ping,
+ op_ws_get_buffered_amount,
+ op_ws_send_text_async,
+ op_ws_send_binary_async,
+ op_ws_check_permission_and_cancel_handle,
+} = core.ensureFastOps();
+
+export {
+ op_ws_check_permission_and_cancel_handle,
+ op_ws_close,
+ op_ws_create,
+ op_ws_get_buffer,
+ op_ws_get_buffer_as_string,
+ op_ws_get_buffered_amount,
+ op_ws_get_error,
+ op_ws_next_event,
+ op_ws_send_binary,
+ op_ws_send_binary_ab,
+ op_ws_send_binary_async,
+ op_ws_send_ping,
+ op_ws_send_text,
+ op_ws_send_text_async,
+};