File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { klona as clone } from "klona/json";
33
44type JsonValue = boolean | number | string | null ;
55
6- type Json = JsonValue | JsonValue [ ] | { [ key : string ] : Json } ;
6+ type Json = JsonValue | JsonValue [ ] | { [ key : string ] : Json } | Json [ ] ;
77
88export type UseReplicantOptions < T > = {
99 defaultValue ?: T ;
Original file line number Diff line number Diff line change @@ -72,10 +72,16 @@ interface RunnerNameProps {
7272 prefix ?: string ;
7373}
7474
75+ type RunnerNameReplicant = {
76+ runner : {
77+ name : string ;
78+ } ;
79+ } ;
80+
7581const RunnerName : React . FC < RunnerNameProps > = ( props ) => {
7682 const { prefix } = props ;
7783 const repName = `${ prefix ?? "default" } :currentRun` ;
78- const [ currentRun ] = useReplicant ( repName , {
84+ const [ currentRun ] = useReplicant < RunnerNameReplicant > ( repName , {
7985 defaultValue : { runner : { name : "foo" } } ,
8086 } ) ;
8187 if ( ! currentRun ) {
You can’t perform that action at this time.
0 commit comments