wip: types
This commit is contained in:
		
							parent
							
								
									fce6a8fa51
								
							
						
					
					
						commit
						2230917ab4
					
				@ -68,7 +68,7 @@ interface ComponentOptionsWithoutProps<Props = Data, RawBindings = Data> {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
interface ComponentOptionsWithArrayProps<
 | 
					interface ComponentOptionsWithArrayProps<
 | 
				
			||||||
  PropNames extends string,
 | 
					  PropNames extends string = string,
 | 
				
			||||||
  RawBindings = Data,
 | 
					  RawBindings = Data,
 | 
				
			||||||
  Props = { [key in PropNames]?: any }
 | 
					  Props = { [key in PropNames]?: any }
 | 
				
			||||||
> {
 | 
					> {
 | 
				
			||||||
@ -80,7 +80,10 @@ interface ComponentOptionsWithArrayProps<
 | 
				
			|||||||
  render?: RenderFunctionWithThis<Props, RawBindings>
 | 
					  render?: RenderFunctionWithThis<Props, RawBindings>
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type ComponentOptions = ComponentOptionsWithProps | ComponentOptionsWithoutProps
 | 
					type ComponentOptions =
 | 
				
			||||||
 | 
					  | ComponentOptionsWithProps
 | 
				
			||||||
 | 
					  | ComponentOptionsWithoutProps
 | 
				
			||||||
 | 
					  | ComponentOptionsWithArrayProps
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export interface FunctionalComponent<P = {}> extends RenderFunction<P> {
 | 
					export interface FunctionalComponent<P = {}> extends RenderFunction<P> {
 | 
				
			||||||
  props?: ComponentPropsOptions<P>
 | 
					  props?: ComponentPropsOptions<P>
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user