是<any,any =“”>同一作为&lt; {},{}&gt;在打字稿?

时间:2018-04-25 20:00:34

标签: reactjs typescript

我正在尝试使用Typescript with react(javascript)我一直在看这两种形式的例子:

<plugin>
    <groupId>org.codehaus.gmaven</groupId>
    <artifactId>gmaven-plugin</artifactId>
    <version>1.5</version>
    <executions>
        <execution>
            <phase>validate</phase>
            <goals>
                <goal>execute</goal>
            </goals>
            <configuration>
                <providerSelection>2.0</providerSelection>
                <properties>
                    <script>git rev-list master --count</script>
                </properties>
                <source>
                    def command = project.properties.script
                    def process = command.execute()
                    process.waitFor()

                    def describe = process.in.text.trim()
                    println "setting revision to: " + describe

                    project.properties.setProperty('gitVersion',describe)
                </source>
            </configuration>
        </execution>
    </executions>
</plugin>

1和2等效吗?
哪一个是首选的风格?

随访: 我正在读这本书:charleslbryant.gitbooks.io/hello-react-and-typescript/content/...此代码使用React.Component&lt; {},{}&gt;。这是否意味着null,null,因此没有此组件的状态或属性?

0 个答案:

没有答案