opened
AntiAsko
username_0
I'm creating a state in Typescript like this: 

```
 state: {
            name: 'mainState.import',
            url: '/import',
            reloadOnSearch: false,
  onEnter: (['$uibModal', (uibModal: ng.ui.bootstrap.IModalService) => {
                let modalOptions: any = {
                    headerText: 'Import State goes here'
                };
                ...
                uibModal.open(modalConfig);

            }])
}
```

While it works fine I get a typescript compilation error: 
```[0] ERROR in ./webapp/pages.ts
[0] (14,14): error TS2322: Type '({ name: string; icon: string; keyboardShortcut: string; state: { name: string; component: string...' is not assignable to type 'ISidebarPage[]'.
[0]   Type '{ name: string; icon: string; keyboardShortcut: string; state: { name: string; component: string;...' is not assignable to type 'ISidebarPage'.
[0]     Type '{ name: string; icon: string; accessibleForRoles: string[]; state: { name: string; url: string; r...' is not assignable to type 'ISidebarPage'.
[0]       Types of property 'state' are incompatible.
[0]         Type '{ name: string; url: string; reloadOnSearch: boolean; onEnter: (string | ((uibModal: IModalServic...' is not assignable to type 'StateDeclaration & { component?: string; template?: string; }'.
[0]           Type '{ name: string; url: string; reloadOnSearch: boolean; onEnter: (string | ((uibModal: IModalServic...' is not assignable to type 'StateDeclaration'.
[0]             Types of property 'onEnter' are incompatible.
[0]               Type '(string | ((uibModal: IModalService) => void))[]' is not assignable to type 'TransitionStateHookFn'.
[0]                 Type '(string | ((uibModal: IModalService) => void))[]' provides no match for the signature '(transition: Transition, state: State): boolean | TargetState | void | Promise<boolean | TargetState | void>'
```

Is this some sort of bug with the typings?
Typings error when using onEnter in state declaration
issue
created
christopherthielen
username_1
that should be fixed by #3076
What version of angular-ui-router are you using?
comment
created
AntiAsko
username_0
I'm using 1.0.0-rc.1 which should be the latest right? And I still see the error
comment
created
christopherthielen
username_1
Yep rc.1 is latest.  I'll take a look and see if there's still a problem
comment
created
dartzki
username_2
#3076 did not add typings for inline-annotated functions - those are still missing
comment
closed
christopherthielen
username_1
issue