Skip to content

Commit 2f7a3f2

Browse files
fix(typings): Allow views: { foo: 'string' } in Ng1StateDeclaration
Closes #3539 Closes #3538
1 parent 6b690bd commit 2f7a3f2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/interface.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ export interface _Ng1StateDeclaration extends StateDeclaration {
5757
onExit?: any;
5858
onRetain?: any;
5959
onEnter?: any;
60+
views?: any;
6061
}
6162

6263
/**
@@ -272,7 +273,7 @@ export interface Ng1StateDeclaration extends _Ng1StateDeclaration, Ng1ViewDeclar
272273
* - controllerAs
273274
* - controllerProvider
274275
*/
275-
views?: { [key: string]: Ng1ViewDeclaration; };
276+
views?: { [key: string]: string | Ng1ViewDeclaration; };
276277

277278
/**
278279
* A state hook invoked when a state is being entered.
@@ -745,4 +746,4 @@ declare module "@uirouter/core/lib/state/stateRegistry" {
745746
interface StateRegistry {
746747
register(state: Ng1StateDeclaration);
747748
}
748-
}
749+
}

0 commit comments

Comments
 (0)