Skip to content

Commit

Permalink
improve types
Browse files Browse the repository at this point in the history
  • Loading branch information
HillLiu committed Sep 16, 2023
1 parent 447977f commit caaa46c
Show file tree
Hide file tree
Showing 6 changed files with 245 additions and 225 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ARG VERSION
# apk
COPY ./install-packages.sh /usr/local/bin/install-packages
RUN apk update && apk add bash bc \
&& INSTALL_VERSION=$VERSION install-packages \
&& INSTALL_VERSION=$VERSION INSTALL_TARGETPLATFORM=$TARGETPLATFORM install-packages \
&& rm /usr/local/bin/install-packages;

COPY ./docker/sbin /usr/local/sbin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ apk add --virtual .build-deps $BUILD_DEPS && apk add $INSTALL --upgrade $UPGRADE
#/* put your install code here */#

apk del -f .build-deps && rm -rf /var/cache/apk/* || exit 1
echo $(date +%Y%m%d%S)'-'$TARGETPLATFORM > /build_version

exit 0
2 changes: 1 addition & 1 deletion packages/reshow-flux-base/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.17.46",
"version": "0.17.47",
"name": "reshow-flux-base",
"repository": {
"type": "git",
Expand Down
6 changes: 5 additions & 1 deletion packages/reshow-flux-base/src/type.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@
* @typedef {Object.<string, any>} Payload
*/

/**
* @typedef {import("reshow-constant").SAFE_UNDEFINED} SAFE_UNDEFINED
*/

/**
* @interface
*/
export class ActionObject {
/** @type {string=} */
/** @type {string|SAFE_UNDEFINED=} */
type;
/** @type {Payload=} */
params;
Expand Down
8 changes: 6 additions & 2 deletions packages/reshow-flux-base/types/type.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
/**
* @typedef {Object.<string, any>} Payload
*/
/**
* @typedef {import("reshow-constant").SAFE_UNDEFINED} SAFE_UNDEFINED
*/
/**
* @interface
*/
export class ActionObject {
/** @type {string=} */
type: string | undefined;
/** @type {string|SAFE_UNDEFINED=} */
type: (string | SAFE_UNDEFINED) | undefined;
/** @type {Payload=} */
params: Payload | undefined;
}
Expand Down Expand Up @@ -84,6 +87,7 @@ export class StoreObject<StateType, ActionType> {
export type Payload = {
[x: string]: any;
};
export type SAFE_UNDEFINED = import("reshow-constant").SAFE_UNDEFINED;
export type RefineAction<ActionType = ActionObject> = ActionType;
export type FluxHandler<StateType, ActionType> = (NextState: StateType, Action: RefineAction<ActionType>, PrevState: StateType) => any;
export type EmitterResetCall<StateType, ActionType> = () => FluxHandler<StateType, ActionType>[];
Expand Down
Loading

0 comments on commit caaa46c

Please sign in to comment.