Skip to content

Commit

Permalink
fix(typings): Allow views: { foo: 'string' } in Ng1StateDeclaration
Browse files Browse the repository at this point in the history
Closes #3539
Closes #3538
  • Loading branch information
christopherthielen committed Sep 30, 2017
1 parent 6b690bd commit 2f7a3f2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export interface _Ng1StateDeclaration extends StateDeclaration {
onExit?: any;
onRetain?: any;
onEnter?: any;
views?: any;
}

/**
Expand Down Expand Up @@ -272,7 +273,7 @@ export interface Ng1StateDeclaration extends _Ng1StateDeclaration, Ng1ViewDeclar
* - controllerAs
* - controllerProvider
*/
views?: { [key: string]: Ng1ViewDeclaration; };
views?: { [key: string]: string | Ng1ViewDeclaration; };

/**
* A state hook invoked when a state is being entered.
Expand Down Expand Up @@ -745,4 +746,4 @@ declare module "@uirouter/core/lib/state/stateRegistry" {
interface StateRegistry {
register(state: Ng1StateDeclaration);
}
}
}

0 comments on commit 2f7a3f2

Please sign in to comment.