From 221dabc823c84a16fa2b90ac04cdbdd93686ed5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90=20Kevin=20Deng?= Date: Fri, 31 Mar 2023 22:21:20 +0800 Subject: [PATCH] wip: defineModel --- packages/compiler-sfc/src/compileScript.ts | 6 ++++ packages/dts-test/setupHelpers.test-d.ts | 25 +++++++++++++- packages/runtime-core/src/apiSetupHelpers.ts | 33 +++++++++++++++++-- packages/runtime-core/src/index.ts | 1 + .../types/scriptSetupHelpers.d.ts | 2 ++ 5 files changed, 64 insertions(+), 3 deletions(-) diff --git a/packages/compiler-sfc/src/compileScript.ts b/packages/compiler-sfc/src/compileScript.ts index 8d22d7e1348..d980835044f 100644 --- a/packages/compiler-sfc/src/compileScript.ts +++ b/packages/compiler-sfc/src/compileScript.ts @@ -151,6 +151,11 @@ type EmitsDeclType = FromNormalScript< TSFunctionType | TSTypeLiteral | TSInterfaceBody > +export interface ModelDecl { + type: TSType + option: Node +} + /** * Compile `