jayphelps / core-decorators

Library of stage-0 JavaScript decorators (aka ES2016/ES7 decorators but not accurate) inspired by languages that come with built-ins like @​override, @​deprecate, @​autobind, @​mixin and more. Popular with React/Angular, but is framework agnostic.
MIT License
4.51k stars 263 forks source link

Module ''*'' has no exported member 'debounce'. #95

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hey guys I'm receiving this error when I've tried to use your library, I'm using Angular 2.1.0

jayphelps commented 7 years ago

Can you provide more context? How are you importing it?

ghost commented 7 years ago

Hi, @jayphelps

Thanks for the quick response, like this:

import { debounce } from 'core-decorators';

class Editor {

content = '';

@debounce(500) updateContent(content) { this.content = content; } }

I'm using Angular2 with webpack, other imports works fine.

jayphelps commented 7 years ago

Other imports for core-decorators, or do you mean other imports for libraries other than core-decorators? Are you using a type definition for core-decorators? (we don't include one). Which one?

I'm not an ng2 user, so I'm not familiar with Module "*", it being a star/asterisk. That looks wrong, shouldn't it say Module "core-decorators" if it was having a problem with core-decorators?

ghost commented 7 years ago

Other imports like, for example: import { MdCheckboxModule } from '@angular2-material/checkbox';

And the error arise when I'm adding the core-decorators import...

jayphelps commented 7 years ago

Are you using a type definition for core-decorators? (we don't include one). Which one?

I'm not an ng2 user, so I'm not familiar with Module "*", it being a star/asterisk. That looks wrong, shouldn't it say Module "core-decorators" if it was having a problem with core-decorators?

BurtHarris commented 7 years ago

Just a heads-up, the @debounce decorator has been deprecated from this package and will be removed in the near future.

jayphelps commented 7 years ago

Closing due to inactivity from OP