多个文件 #1

Open
yystopf wants to merge 38 commits from API-2.0 into master
1 changed files with 1 additions and 5 deletions
Showing only changes of commit 7b4c3a35d0 - Show all commits

View File

@ -3,10 +3,6 @@ import * as babel from '@babel/core';
import { Option } from './types'; import { Option } from './types';
import type { Scope } from '@babel/traverse'; import type { Scope } from '@babel/traverse';
const DECORATOR_PROPS = 'Prop';
const DECORATOR_CHILDREN = 'Children';
const DECORATOR_WATCH = 'Watch';
function replaceFnWithClass(path: NodePath<t.FunctionDeclaration>, classTransformer: ClassComponentTransformer) { function replaceFnWithClass(path: NodePath<t.FunctionDeclaration>, classTransformer: ClassComponentTransformer) {
const originalName = path.node.id.name; const originalName = path.node.id.name;
const tempName = path.node.id.name + 'Temp'; const tempName = path.node.id.name + 'Temp';
@ -208,7 +204,7 @@ class ClassComponentTransformer {
/** /**
* transform node to watch label to watch decorator * transform node to watch label to watch decorator
* e.g. * e.g.
* *
* watch: console.log(state) * watch: console.log(state)
* // transform into * // transform into
* @Watch * @Watch