From: Evan You Date: Tue, 10 Dec 2024 13:45:50 +0000 (+0800) Subject: chore: make compile type consistent X-Git-Tag: v3.6.0-alpha.1~16^2~164 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbdc0aa9ddb9b41cce5a6edca5c7144085c4e02d;p=thirdparty%2Fvuejs%2Fcore.git chore: make compile type consistent --- diff --git a/packages/vue/src/runtime.ts b/packages/vue/src/runtime.ts index 76f5fc74e2..af1ffe7a12 100644 --- a/packages/vue/src/runtime.ts +++ b/packages/vue/src/runtime.ts @@ -1,7 +1,8 @@ // This entry exports the runtime only, and is built as // `dist/vue.esm-bundler.js` which is used by default for bundlers. +import { NOOP } from '@vue/shared' import { initDev } from './dev' -import { warn } from '@vue/runtime-dom' +import { type RenderFunction, warn } from '@vue/runtime-dom' if (__DEV__) { initDev() @@ -9,7 +10,7 @@ if (__DEV__) { export * from '@vue/runtime-dom' -export const compile = (): void => { +export const compile = (_template: string): RenderFunction => { if (__DEV__) { warn( `Runtime compilation is not supported in this build of Vue.` + @@ -22,4 +23,5 @@ export const compile = (): void => { : ``) /* should not happen */, ) } + return NOOP }