Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Cache' refers to a value, but is being used as a type here. Did you mean 'typeof Cache'? #45

Closed
haneenmahd opened this issue May 20, 2021 · 3 comments

Comments

@haneenmahd
Copy link

While using resolve-package-path insise A Typescript we get an error

node_modules/resolve-package-path/lib/cache-group.d.ts:4:23 - error TS2749: 'Cache' refers to a value, but is being used as a type here. Did you mean 'typeof Cache'?

4         MODULE_ENTRY: Cache;
                        ~~~~~

node_modules/resolve-package-path/lib/cache-group.d.ts:5:15 - error TS2749: 'Cache' refers to a value, but is being used as a type here. Did you mean 'typeof Cache'?

5         PATH: Cache;
                ~~~~~

node_modules/resolve-package-path/lib/cache-group.d.ts:6:25 - error TS2749: 'Cache' refers to a value, but is being used as a type here. Did you mean 'typeof Cache'?   
... And More 

Found 8 errors.

I don't know why it is throwing and error

@stefanpenner
Copy link
Owner

I believe this is resolved with 4.0.0, specifically this pr #38 If the problem persists with 4.0.0 please feel free to reopen.

@corevo
Copy link

corevo commented May 4, 2022

Still reproducing on 4.0.3

node_modules/resolve-package-path/lib/cache-group.d.ts:4:23 - error TS2749: 'Cache' refers to a value, but is being used as a type here. Did you mean 'typeof Cache'?

4         MODULE_ENTRY: Cache;
                        ~~~~~

node_modules/resolve-package-path/lib/cache-group.d.ts:5:15 - error TS2749: 'Cache' refers to a value, but is being used as a type here. Did you mean 'typeof Cache'?

5         PATH: Cache;
                ~~~~~

node_modules/resolve-package-path/lib/cache-group.d.ts:6:25 - error TS2749: 'Cache' refers to a value, but is being used as a type here. Did you mean 'typeof Cache'?

6         REAL_FILE_PATH: Cache;
                          ~~~~~

node_modules/resolve-package-path/lib/cache-group.d.ts:7:30 - error TS2749: 'Cache' refers to a value, but is being used as a type here. Did you mean 'typeof Cache'?

7         REAL_DIRECTORY_PATH: Cache;
                               ~~~~~

node_modules/resolve-package-path/lib/index.d.ts:18:63 - error TS2749: 'Cache' refers to a value, but is being used as a type here. Did you mean 'typeof Cache'?

18 declare function _findUpPackagePath(baseDir: string, _cache?: Cache | boolean): string | null;
                                                                 ~~~~~

node_modules/resolve-package-path/lib/index.d.ts:20:79 - error TS2749: 'CacheGroup' refers to a value, but is being used as a type here. Did you mean 'typeof CacheGroup'?

20 declare function resolvePackagePath(target: string, baseDir: string, _cache?: CacheGroup | boolean): string | null;
                                                                                 ~~~~~~~~~~

node_modules/resolve-package-path/lib/index.d.ts:27:17 - error TS2749: 'CacheGroup' refers to a value, but is being used as a type here. Did you mean 'typeof CacheGroup'?

27     let _CACHE: CacheGroup;
                   ~~~~~~~~~~

node_modules/resolve-package-path/lib/index.d.ts:28:25 - error TS2749: 'Cache' refers to a value, but is being used as a type here. Did you mean 'typeof Cache'?

28     let _FIND_UP_CACHE: Cache;
                           ~~~~~
                           

@haneenmahd
Copy link
Author

Can we introduce a fix for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants