lifeart/ember-click-outside-modifier

Types aren't working

Opened this issue · 6 comments

Hi @evoactivity, thank you for report!
Looks like it's not working because there is no type definitions created for entrypoint https://www.npmjs.com/package/ember-click-outside-modifier?activeTab=code
I think fix may be a simple index.d.ts and related types reference in package.json
image

@evoactivity do you mind checking #41 ?

Doesn't seem to help unfortunately.

I have it working with this

In my component

import clickOutside from 'ember-click-outside-modifier';

In your package.json

"exports": {
  ".": {
    "types": "./types/modifiers/click-outside.d.ts",
    "default": "./dist/modifiers/click-outside.js"
  },
  "./addon-main.js": "./addon-main.js"
}

@evoactivity ya, it should work, but I'm not a fan of changing public API

I tried getting it working without changing the import to be default, but no matter the combination I tried it just wouldn't see the actual class, it only saw the type definition. I'll play with it some more later on. In a cafe with bad wifi at the moment 😅

@evoactivity it may be TS issue (glint is very bad with typings update if not restarted).