You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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] (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?
The text was updated successfully, but these errors were encountered:
I'm creating a state in Typescript like this:
While it works fine I get a typescript compilation error:
Is this some sort of bug with the typings?
The text was updated successfully, but these errors were encountered: