From 515a34b4de222e35c7ade1b92614d746e73d4c2e Mon Sep 17 00:00:00 2001 From: Kenta Moriuchi Date: Thu, 11 Jan 2024 07:37:25 +0900 Subject: refactor: use `core.ensureFastOps()` (#21888) --- ext/node/polyfills/internal_binding/util.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ext/node/polyfills/internal_binding/util.ts') diff --git a/ext/node/polyfills/internal_binding/util.ts b/ext/node/polyfills/internal_binding/util.ts index 721d0964f..b4bcdaef4 100644 --- a/ext/node/polyfills/internal_binding/util.ts +++ b/ext/node/polyfills/internal_binding/util.ts @@ -29,11 +29,13 @@ // deno-lint-ignore-file prefer-primordials import { core } from "ext:core/mod.js"; -const ops = core.ops; +const { + op_node_guess_handle_type, +} = core.ensureFastOps(); const handleTypes = ["TCP", "TTY", "UDP", "FILE", "PIPE", "UNKNOWN"]; export function guessHandleType(fd: number): string { - const type = ops.op_node_guess_handle_type(fd); + const type = op_node_guess_handle_type(fd); return handleTypes[type]; } -- cgit v1.2.3