Skip to content

Commit

Permalink
fix: rollback to StackflowReactPlugin<T = never> (#416)
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyfromundefined authored Oct 17, 2023
1 parent 662dca2 commit b5f6a3c
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function googleAnalyticsPlugin<
trackingId,
userInfo,
useTitle = false,
}: GoogleAnalyticsPluginOptions): StackflowReactPlugin {
}: GoogleAnalyticsPluginOptions): StackflowReactPlugin<T> {
return () => ({
key: "@daangn/stackflow-google-analytics-plugin",
onInit() {
Expand Down
2 changes: 1 addition & 1 deletion extensions/plugin-google-analytics-4/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from "./googleAnalyticsPlugin";
export { useGoogleAnalyticsContext } from "./contexts";
export * from "./googleAnalyticsPlugin";
2 changes: 1 addition & 1 deletion extensions/plugin-history-sync/src/historySyncPlugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function historySyncPlugin<
T extends { [activityName: string]: unknown },
>(
options: HistorySyncPluginOptions<Extract<keyof T, string>>,
): StackflowReactPlugin {
): StackflowReactPlugin<T> {
type K = Extract<keyof T, string>;

const history =
Expand Down
2 changes: 1 addition & 1 deletion extensions/plugin-preload/src/pluginPreload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export type PreloadPluginOptions<

export function preloadPlugin<T extends { [activityName: string]: unknown }>(
options: PreloadPluginOptions<T>,
): StackflowReactPlugin {
): StackflowReactPlugin<T> {
return () => ({
key: "plugin-preload",
wrapStack({ stack }) {
Expand Down
2 changes: 1 addition & 1 deletion integrations/react/src/StackflowReactPlugin.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Activity, Stack, StackflowPlugin } from "@stackflow/core";

export type StackflowReactPlugin = () => {
export type StackflowReactPlugin<T = never> = () => {
/**
* Determine how to render by using the stack state
*/
Expand Down
4 changes: 2 additions & 2 deletions integrations/react/src/stackflow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function parseActionOptions(options?: { animate?: boolean }) {
}

const isNullableAnimateOption = options.animate == null;

if (isNullableAnimateOption) {
return { skipActiveState: false };
}
Expand All @@ -43,7 +43,7 @@ export type StackComponentType = React.FC<{
}>;

type StackflowPluginsEntry<T extends BaseActivities> =
| StackflowReactPlugin
| StackflowReactPlugin<T>
| StackflowPluginsEntry<T>[];

export type StackflowOptions<T extends BaseActivities> = {
Expand Down

1 comment on commit b5f6a3c

@vercel
Copy link

@vercel vercel bot commented on b5f6a3c Oct 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.