-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(typings): add types for hybrid state declaration
- Loading branch information
Showing
4 changed files
with
53 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export * from './angular-hybrid'; | ||
export * from './intefaces'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { ModuleWithProviders } from '@angular/core'; | ||
import { Ng2StateDeclaration, RootModule, StatesModule, UIRouterModule } from '@uirouter/angular'; | ||
import { Ng1StateTransitionHook } from '@uirouter/angularjs'; | ||
import { IInjectable } from '@uirouter/core'; | ||
|
||
export interface _Ng2HybridStateDeclaration extends Ng2StateDeclaration { | ||
onExit?: any; | ||
onRetain?: any; | ||
onEnter?: any; | ||
} | ||
|
||
export interface _HybridStateModule extends StatesModule { | ||
states?: any; | ||
} | ||
|
||
export interface _HybridRootModule extends RootModule { | ||
states?: any | ||
} | ||
|
||
export interface Ng2HybridStateDeclaration extends _Ng2HybridStateDeclaration { | ||
onEnter?: Ng1StateTransitionHook | IInjectable; | ||
onRetain?: Ng1StateTransitionHook | IInjectable; | ||
onExit?: Ng1StateTransitionHook | IInjectable; | ||
} | ||
|
||
export interface HybridStateModule extends _HybridStateModule { | ||
states?: Ng2HybridStateDeclaration[]; | ||
} | ||
|
||
export interface HybridRootModule extends _HybridRootModule { | ||
states?: Ng2HybridStateDeclaration[]; | ||
} | ||
|
||
export interface IUIRouterHybridModule extends UIRouterModule { | ||
forRoot(config?: HybridRootModule): ModuleWithProviders | ||
|
||
forChild(module?: HybridStateModule): ModuleWithProviders; | ||
} |