如何使用<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>${maven.assembly.version}</version>
<executions>
</executions>
<!-- added this configuration tag -->
<configuration>
<descriptors>
<descriptor>src/assembly/distribution.xml</descriptor>
</descriptors>
<tarLongFileMode>posix</tarLongFileMode>
<outputDirectory>${project.build.directory}</outputDirectory>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
向mapDispatchToProps
添加正确的键入?
typesafe-actions
问题:
interface ActionAsyncRequest {
a: string;
b: number;
}
interface ActionAsyncSuccess {
a: number;
}
interface ActionAsyncFailure { }
const actionAsync = createAsyncAction(
'@namespace/REQUEST',
'@namespace/SUCCESS',
'@namespace/FAILURE'
)<
ActionAsyncRequest,
ActionAsyncSuccess,
ActionAsyncFailure
>();
interface DispatchProps {
myFunction: ActionType<typeof actionAsync.request> // this row should be fixed
}
const mapDispatchToProps: DispatchProps = {
myFunction: actionAsync.request, // issue arises here
};
更新:
我已经设法解决了。不知道这是否是一个完美的解决方案,但是它可行。
Type 'PayloadAC<"@namespace/REQUEST", ActionAsyncRequest>' is missing the following properties from type 'PayloadAction<"@namespace/REQUEST", ActionAsyncRequest>': type, payload