File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @stackflow/react " : patch
3+ ---
4+
5+ fix(react): infer ` BaseActivities ` from given activities
Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ type StackflowPluginsEntry<T extends BaseActivities> =
4646 | StackflowReactPlugin < T >
4747 | StackflowPluginsEntry < T > [ ] ;
4848
49+ type NoInfer < T > = [ T ] [ T extends any ? 0 : never ] ;
50+
4951export type StackflowOptions < T extends BaseActivities > = {
5052 /**
5153 * Register activities used in your app
@@ -61,12 +63,12 @@ export type StackflowOptions<T extends BaseActivities> = {
6163 * Set the first activity to load at the bottom
6264 * (It can be overwritten by plugin)
6365 */
64- initialActivity ?: ( ) => Extract < keyof T , string > ;
66+ initialActivity ?: ( ) => Extract < keyof NoInfer < T > , string > ;
6567
6668 /**
6769 * Inject stackflow plugins
6870 */
69- plugins ?: Array < StackflowPluginsEntry < T > > ;
71+ plugins ?: Array < StackflowPluginsEntry < NoInfer < T > > > ;
7072} ;
7173
7274export type StackflowOutput < T extends BaseActivities > = {
You can’t perform that action at this time.
0 commit comments