-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #264 from BoussonKarel/master
add typescript declarations (for Glint)
- Loading branch information
Showing
3 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,8 @@ | |
"author": "Gabor Babicz <[email protected]>", | ||
"files": [ | ||
"addon-main.js", | ||
"dist" | ||
"dist", | ||
"types" | ||
], | ||
"scripts": { | ||
"build": "rollup --config", | ||
|
@@ -63,7 +64,17 @@ | |
}, | ||
"exports": { | ||
".": "./dist/index.js", | ||
"./*": "./dist/*.js", | ||
"./*": { | ||
"types": "./types/*.d.ts", | ||
"default": "./dist/*.js" | ||
}, | ||
"./addon-main.js": "./addon-main.js" | ||
}, | ||
"typesVersions": { | ||
"*": { | ||
"*": [ | ||
"types/*" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import type Modifier from 'ember-modifier'; | ||
|
||
export interface ClickOutsideSignature { | ||
Element?: HTMLElement; | ||
Args: { | ||
Positional: [action: (event: Event) => unknown]; | ||
Named: | ||
| never | ||
| { | ||
capture?: boolean; | ||
eventType?: keyof DocumentEventMap; | ||
exceptSelector?: string; | ||
}; | ||
}; | ||
} | ||
|
||
export default class ClickOutsideModifier extends Modifier<ClickOutsideSignature> {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import OnClickOutside from './modifiers/on-click-outside'; | ||
|
||
export default class EmberClickOutsideRegistry { | ||
'on-click-outside': typeof OnClickOutside; | ||
} |