Skip to content

Commit

Permalink
Merge pull request #89 from chancancode/fix-ember-on-helper
Browse files Browse the repository at this point in the history
Fix ember-on-helper internal types
  • Loading branch information
bakerac4 authored Feb 1, 2024
2 parents 0f12e89 + e044def commit a4ab245
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
24 changes: 11 additions & 13 deletions types/ember-on-helper/-private/shared.d.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
declare module 'ember-on-helper/helpers/on' {
export interface OnArgs {
/** To fire an event listener only once pass true */
once?: boolean;
export interface OnArgs {
/** To fire an event listener only once pass true */
once?: boolean;

/**
* If true, you promise to not call event.preventDefault(). This allows the browser to optimize the processing of this event and not block the UI thread. This prevent scroll jank.
*
* If you still call event.preventDefault(), an assertion will be raised.
*/
passive?: boolean;
/**
* If true, you promise to not call event.preventDefault(). This allows the browser to optimize the processing of this event and not block the UI thread. This prevent scroll jank.
*
* If you still call event.preventDefault(), an assertion will be raised.
*/
passive?: boolean;

/** To listen for an event during the capture phase already, use the capture option */
capture?: boolean;
}
/** To listen for an event during the capture phase already, use the capture option */
capture?: boolean;
}
2 changes: 1 addition & 1 deletion types/ember-on-helper/on-document.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
declare module 'ember-on-helper/helpers/on-document' {
import Helper from '@ember/component/helper';

import { OnArgs } from 'ember-on-helper/helpers/on';
import { OnArgs } from '@gavant/glint-template-types/types/ember-on-helper/-private/shared';

interface OnDocumentHelperSignature<K extends keyof DocumentEventMap> {
Args: { Named: OnArgs; Positional: [eventName: K, handler: (event: DocumentEventMap[K]) => void] };
Expand Down
2 changes: 1 addition & 1 deletion types/ember-on-helper/on-window.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
declare module 'ember-on-helper/helpers/on-window' {
import Helper from '@ember/component/helper';

import { OnArgs } from 'ember-on-helper/helpers/on';
import { OnArgs } from '@gavant/glint-template-types/types/ember-on-helper/-private/shared';

interface OnWindowHelperSignature<K extends keyof WindowEventMap> {
Args: { Named: OnArgs; Positional: [eventName: K, handler: (event: WindowEventMap[K]) => void] };
Expand Down

0 comments on commit a4ab245

Please sign in to comment.