/
githubmirror
/
deno
Обзор
Документация
Войти
/
githubmirror
/
deno
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
ext/node/polyfills/internal/test/binding.ts
41 строка
972 B
Nathan Whitaker
perf: lazy-load more modules in the snapshot (#34061)
19 май 2026, 02:37
Не верифицирован
19 май 2026, 02:37
eb4061f
Код
Авторство
О чём код?
// Copyright 2018-2026 the Deno authors. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. (function () { const { core } = __bootstrap; const lazyBindingMod = core.createLazyLoader( "ext:deno_node/internal_binding/mod.ts", ); let warningEmitted = false; function emitBindingWarning() { if (!warningEmitted) { warningEmitted = true; // deno-lint-ignore no-process-global if (typeof process !== "undefined" && process.emitWarning) { // deno-lint-ignore no-process-global process.emitWarning( "These APIs are for internal testing only. Do not use them.", "internal/test/binding", ); } } } function internalBinding(name) { emitBindingWarning(); return lazyBindingMod().getBinding(name); } // TODO(kt3k): export actual primordials const primordials = {}; return { internalBinding, primordials, default: { internalBinding, primordials, }, }; })();