-
Notifications
You must be signed in to change notification settings - Fork 16
Cannot find name 'ProxyHandler'. #24
Comments
That's totally fine since class ProxyHandler is part of standard library and it's location in file like that can tell you about it. |
Yes but i am getting this as error and it interceptor is not working. i am getting this error as well in browser cannot find name proxyhandler. i am using webpack. |
Well that's interesting. Are you using it in project generated via angular-cli? |
I'm getting same issue - using Angular 2.1.1... can't build either.. can't build with either tsc or visual studio TS compiler. node_modules/ng2-http-interceptor/dist/http/interceptable-http-proxy.service.d.ts(3,63): error TS2304: Cannot find name 'ProxyHandler'. |
Well as far as I can see it seems that your TS compiler does not support ES6 typings. |
I'm targeting es5. I have tried to target es6 but it seems to be many issues with that so till they are resolved i have to stick to es5. |
@jorawarsingh so if you target ES5 this issue gone? |
No, still remain. |
Can you please try to compile with next options in tsconfig.json: I'm also targeting ES5 but don't have this issue so probably those settings might resolve them. |
Today I made use of this library in different project and experienced same issue so was able to check by myself how to fix this. However in my particular case there where some external libs which were not able to compile with this configuration so in this case I left config as is and added next line to my custom definitions file: declare interface ProxyHandler<T> {} That fixed issue as well. |
Any guess what it can be? i am using webstorm and if i do ctrl+click on ProxyHandler i can go to the declaration in typescript/lib/lib.es2015.proxy.d.ts
The text was updated successfully, but these errors were encountered: