@vue-macros/api
Advanced tools
Comparing version 0.1.2 to 0.2.0
@@ -44,4 +44,4 @@ import { MagicString, SFC } from '@vue-macros/common'; | ||
}): Promise<TSEmits>; | ||
declare type Emits = TSEmits | undefined; | ||
declare type DefineEmitsStatement = VariableDeclaration | ExpressionStatement; | ||
type Emits = TSEmits | undefined; | ||
type DefineEmitsStatement = VariableDeclaration | ExpressionStatement; | ||
interface EmitsBase { | ||
@@ -96,5 +96,5 @@ declId?: LVal; | ||
}): Promise<TSProps>; | ||
declare type Props = /* ReferenceProps | ObjectProps | */ TSProps | undefined; | ||
declare type DefinePropsStatement = VariableDeclaration | ExpressionStatement; | ||
declare type DefaultsASTRaw = CallExpression['arguments'][number]; | ||
type Props = /* ReferenceProps | ObjectProps | */ TSProps | undefined; | ||
type DefinePropsStatement = VariableDeclaration | ExpressionStatement; | ||
type DefaultsASTRaw = CallExpression['arguments'][number]; | ||
interface PropsBase { | ||
@@ -101,0 +101,0 @@ declId?: LVal; |
@@ -61,4 +61,16 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); | ||
return ["Object"]; | ||
case "TSTypeLiteral": | ||
return ["Object"]; | ||
case "TSTypeLiteral": { | ||
const types = /* @__PURE__ */ new Set(); | ||
for (const m of node.type.members) { | ||
switch (m.type) { | ||
case "TSCallSignatureDeclaration": | ||
case "TSConstructSignatureDeclaration": | ||
types.add("Function"); | ||
break; | ||
default: | ||
types.add("Object"); | ||
} | ||
} | ||
return Array.from(types); | ||
} | ||
case "TSFunctionType": | ||
@@ -344,7 +356,3 @@ return ["Function"]; | ||
return {}; | ||
const isStatic = defaultsAst2.type === "ObjectExpression" && _common.isStaticExpression.call(void 0, defaultsAst2, { | ||
array: true, | ||
object: true, | ||
objectMethod: true | ||
}); | ||
const isStatic = defaultsAst2.type === "ObjectExpression" && _common.isStaticObjectKey.call(void 0, defaultsAst2); | ||
if (!isStatic) | ||
@@ -351,0 +359,0 @@ return { defaultsAst: defaultsAst2 }; |
import { TSDeclareFunction, TSInterfaceDeclaration, TSTypeAliasDeclaration, TSEnumDeclaration, TSModuleDeclaration, Statement, TSModuleBlock, TSCallSignatureDeclaration, TSConstructSignatureDeclaration, TSMethodSignature, TSType, TSPropertySignature, TSInterfaceBody, TSTypeLiteral, TSIntersectionType, TSTypeElement, TSParenthesizedType, Identifier, TSEntityName } from '@babel/types'; | ||
declare type TSDeclaration = TSDeclareFunction | TSInterfaceDeclaration | TSTypeAliasDeclaration | TSEnumDeclaration | TSModuleDeclaration; | ||
type TSDeclaration = TSDeclareFunction | TSInterfaceDeclaration | TSTypeAliasDeclaration | TSEnumDeclaration | TSModuleDeclaration; | ||
interface TSFile { | ||
@@ -9,3 +9,3 @@ filePath: string; | ||
} | ||
declare type TSScope = TSFile | TSResolvedType<TSModuleBlock>; | ||
type TSScope = TSFile | TSResolvedType<TSModuleBlock>; | ||
interface TSProperties { | ||
@@ -54,3 +54,3 @@ callSignatures: Array<TSResolvedType<TSCallSignatureDeclaration>>; | ||
declare const exportsSymbol: unique symbol; | ||
declare type TSExports = { | ||
type TSExports = { | ||
[K in string]: TSResolvedType | TSExports | undefined; | ||
@@ -70,3 +70,3 @@ } & { | ||
declare function resolveTSExports(scope: TSScope): Promise<TSExports>; | ||
declare type ResolveTSFileIdImpl = (id: string, importer: string) => Promise<string | undefined> | string | undefined; | ||
type ResolveTSFileIdImpl = (id: string, importer: string) => Promise<string | undefined> | string | undefined; | ||
declare function resolveTSFileId(id: string, importer: string): string | Promise<string | undefined> | undefined; | ||
@@ -73,0 +73,0 @@ /** |
{ | ||
"name": "@vue-macros/api", | ||
"version": "0.1.2", | ||
"packageManager": "pnpm@7.14.1", | ||
"version": "0.2.0", | ||
"packageManager": "pnpm@7.16.1", | ||
"license": "MIT", | ||
@@ -29,4 +29,4 @@ "homepage": "https://github.com/sxzz/unplugin-vue-macros#readme", | ||
"dependencies": { | ||
"@babel/types": "^7.20.0", | ||
"@vue-macros/common": "~0.13.3" | ||
"@babel/types": "^7.20.2", | ||
"@vue-macros/common": "~0.13.4" | ||
}, | ||
@@ -33,0 +33,0 @@ "engines": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
74743
2231
Updated@babel/types@^7.20.2
Updated@vue-macros/common@~0.13.4