Skip to content

Commit

Permalink
Fixed lin
Browse files Browse the repository at this point in the history
  • Loading branch information
wessberg committed Dec 19, 2018
1 parent 8c688cb commit bb354cc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
10 changes: 6 additions & 4 deletions src/overwrite-targets-for-event.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import {SHARED_DESCRIPTOR_OPTIONS} from "./shared-descriptor-options";

type NullableEventTarget = EventTarget|undefined|null;

/**
* Overwrites the targets for the given event
* @param {Event} e
* @param {EventTarget | undefined} target
* @param {EventTarget | undefined} currentTarget
* @param {EventTarget | undefined} relatedTarget
* @param {NullableEventTarget} target
* @param {NullableEventTarget} currentTarget
* @param {NullableEventTarget} relatedTarget
*/
export function overwriteTargetsForEvent (e: Event, target?: EventTarget|undefined|null, currentTarget?: EventTarget|undefined|null, relatedTarget?: EventTarget|undefined|null): void {
export function overwriteTargetsForEvent (e: Event, target?: NullableEventTarget, currentTarget?: NullableEventTarget, relatedTarget?: NullableEventTarget): void {
// Set the original target and currentTarget on the cancel event
Object.defineProperties(e, {
...(target === undefined ? {} : {
Expand Down
6 changes: 5 additions & 1 deletion tslint.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{
"extends": "./node_modules/@wessberg/ts-config/tslint/tslint.json"
"extends": "./node_modules/@wessberg/ts-config/tslint/tslint.json",
"rules": {
"completed-docs": false,
"no-gratuitous-expressions": false
}
}

0 comments on commit bb354cc

Please sign in to comment.