Skip to content

Commit

Permalink
Tell prop's type with generic (#4597)
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikra authored and guyca committed Jan 20, 2019
1 parent 2b0871f commit bc23fba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/Navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,15 @@ export class NavigationRoot {
/**
* Sets new root component to stack.
*/
public setStackRoot(componentId: string, layout: Layout | Layout[]): Promise<any> {
public setStackRoot<P>(componentId: string, layout: Layout<P> | Array<Layout<P>>): Promise<any> {
const children: Layout[] = isArray(layout) ? layout : [layout];
return this.commands.setStackRoot(componentId, children);
}

/**
* Show overlay on top of the entire app
*/
public showOverlay(layout: Layout): Promise<any> {
public showOverlay<P>(layout: Layout<P>): Promise<any> {
return this.commands.showOverlay(layout);
}

Expand Down

0 comments on commit bc23fba

Please sign in to comment.