mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
refactor(core): simplify component manifests
This commit is contained in:
@@ -49,11 +49,7 @@ export function defineComponentsConfig<const Config extends ComponentsConfig | r
|
||||
function isDefineComponentCall(node: ts.Node): node is ts.CallExpression {
|
||||
if (!ts.isCallExpression(node)) return false;
|
||||
const callee = node.expression;
|
||||
if (ts.isIdentifier(callee) && callee.text === 'defineComponent') return true;
|
||||
// Curried form: defineComponent<Props>()({ ... }).
|
||||
return (
|
||||
ts.isCallExpression(callee) && ts.isIdentifier(callee.expression) && callee.expression.text === 'defineComponent'
|
||||
);
|
||||
return ts.isIdentifier(callee) && callee.text === 'defineComponent';
|
||||
}
|
||||
|
||||
function findDefaultExportCall(sourceFile: ts.SourceFile): ts.CallExpression | null {
|
||||
|
||||
Reference in New Issue
Block a user