UNPKG

nuxt

Version:

Nuxt is a free and open-source framework with an intuitive and extendable way to create type-safe, performant and production-grade full-stack web applications and websites with Vue.js.

19 lines (18 loc) 548 B
import { appDiagnostics } from "../../app/diagnostics/core.js"; //#region src/compiler/runtime/index.ts /** * Define a factory for a function that should be registered for automatic key injection. * @since 4.2.0 * @param factory */ function defineKeyedFunctionFactory(factory) { const placeholder = function() { throw appDiagnostics.NUXT_E1007({ name: factory.name }); }; return Object.defineProperty(placeholder, "__nuxt_factory", { enumerable: false, get: () => factory.factory }); } //#endregion export { defineKeyedFunctionFactory };