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.52k stars 263 forks source link

Cannot resolve symbol 'applyDecorators' Validate ES6 imports #149

Open sajjadrobin opened 6 years ago

sajjadrobin commented 6 years ago

I was trying to use autobind decorator. It's Babel 6 without .babelrc file. So I am unable to use decorator legacy plugin. Anyway this code below works with a warning.

import { applyDecorators } from "core-decorators"

Why? Warning is: Cannot resolve symbol 'applyDecorators' Validate ES6 imports I am using: "core-decorators": "0.20.0".

jayphelps commented 6 years ago

Sorry for the delay, making my way through a huge backlog. I'm not sure why that happens. Does any of the other imports work? If you're using the ESM build it seems to be exported correctly: https://unpkg.com/core-decorators@0.20.0/es/core-decorators.js

sajjadrobin commented 6 years ago

I am using it with Create-React-APP. It complains always in Webstorm about applyDecorators. Also, I don't see that in exported list either. Thanks for replying.

On Wed, May 9, 2018 at 7:48 PM, Jay Phelps notifications@github.com wrote:

Sorry for the delay, making my way through a huge backlog. I'm not sure why that happens. Does any of the other imports work? If you're using the ESM build it seems to be exported correctly: https://unpkg.com/core- decorators@0.20.0/es/core-decorators.js

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jayphelps/core-decorators/issues/149#issuecomment-387820374, or mute the thread https://github.com/notifications/unsubscribe-auth/ABiUiPu6msByUSfGH9CjM9pgGqPDKTz1ks5twyv_gaJpZM4Skjz4 .

-- ROBIN +46738741993 https://wwwsajjadrobin.com https://www.sajjadrobin.com

jayphelps commented 6 years ago

I don't see that in exported list either.

Can you clarify? it shows up here: https://unpkg.com/core-decorators@0.20.0/es/core-decorators.js

sajjadrobin commented 6 years ago

I’ll check my npm package and version number also. I’ll update

On Wed, 9 May 2018 at 21:51, Jay Phelps notifications@github.com wrote:

I don't see that in exported list either.

Can you clarify? it shows up here: https://unpkg.com/core-decorators@0.20.0/es/core-decorators.js

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jayphelps/core-decorators/issues/149#issuecomment-387855193, or mute the thread https://github.com/notifications/unsubscribe-auth/ABiUiEYZPJMNIc1vr-OApGPhb03wcl-8ks5tw0ivgaJpZM4Skjz4 .

sajjadrobin commented 6 years ago

Hi Jay, I am using version 20 also. Is applyDecorator exported from https://github.com/jayphelps/core-decorators/blob/master/index.d.ts like https://unpkg.com/core-decorators@0.20.0/es/core-decorators.js ?

On Wed, May 9, 2018 at 10:03 PM, Md Sajjad Robin wrote:

I’ll check my npm package and version number also. I’ll update

On Wed, 9 May 2018 at 21:51, Jay Phelps notifications@github.com wrote:

I don't see that in exported list either.

Can you clarify? it shows up here: https://unpkg.com/core- decorators@0.20.0/es/core-decorators.js

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jayphelps/core-decorators/issues/149#issuecomment-387855193, or mute the thread https://github.com/notifications/unsubscribe-auth/ABiUiEYZPJMNIc1vr-OApGPhb03wcl-8ks5tw0ivgaJpZM4Skjz4 .

--