Skip to content
This repository was archived by the owner on May 26, 2023. It is now read-only.

Commit d7f71f8

Browse files
chore(directives): fix directives broken during linting
1 parent ed6127b commit d7f71f8

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/directives/stateDirectives.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
RawParams, PathNode, StateOrName, StateService, StateDeclaration, UIRouter,
1717
} from '@uirouter/core';
1818
import { UIViewData } from './viewDirective';
19+
import EventHandler = JQuery.EventHandler;
1920

2021
/** @hidden Used for typedoc */
2122
export interface ng1_directive {} // tslint:disable-line:class-name
@@ -98,7 +99,7 @@ function defaultOpts(el: IAugmentedJQuery, $state: StateService) {
9899
}
99100

100101
/** @hidden */
101-
function bindEvents(element: IAugmentedJQuery, scope: IScope, hookFn: (e: JQueryMouseEventObject) => void, uiStateOpts: any): void {
102+
function bindEvents(element: IAugmentedJQuery, scope: IScope, hookFn: EventHandler<any>, uiStateOpts: any): void {
102103
let events;
103104

104105
if (uiStateOpts) {

src/directives/viewDirective.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,16 +194,16 @@ function $ViewDirective($view: ViewService, $animate: any, $uiViewScroll: any, $
194194
compile: function (tElement: JQuery, tAttrs: Obj, $transclude: ITranscludeFunction) {
195195

196196
return function (scope: IScope, $element: IAugmentedJQuery, attrs: Obj) {
197-
const onloadExp = attrs['onload'] || '',
197+
const onloadExp = attrs['onload'] || '',
198198
autoScrollExp = attrs['autoscroll'],
199-
renderer = getRenderer(attrs, scope),
200-
viewConfig = undefined as Ng1ViewConfig,
201-
inherited = $element.inheritedData('$uiView') || rootData,
202-
name = $interpolate(attrs['uiView'] || attrs['name'] || '')(scope) || '$default';
199+
renderer = getRenderer(attrs, scope),
200+
inherited = $element.inheritedData('$uiView') || rootData,
201+
name = $interpolate(attrs['uiView'] || attrs['name'] || '')(scope) || '$default';
203202

204203
let previousEl: JQuery,
205204
currentEl: JQuery,
206205
currentScope: IScope,
206+
viewConfig: Ng1ViewConfig,
207207
unregister: Function;
208208

209209
const activeUIView: ActiveUIView = {

0 commit comments

Comments
 (0)