Comments (10)
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.
And yes compilerOptions -> lib: ["es6"]
is the key point here - it tells TS compiler to include es6 type definitions in the project.
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.
from ng-http-interceptor.
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.
from ng-http-interceptor.
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.
from ng-http-interceptor.
Well that's interesting. Are you using it in project generated via angular-cli?
Maybe you can share your tsconfig.json?
from ng-http-interceptor.
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'.
from ng-http-interceptor.
Well as far as I can see it seems that your TS compiler does not support ES6 typings.
You can try to upgrade it to version 2.0.1.
Or if that does not help you can go and get this typing file, put it in your project and reference in your entry point *.ts file.
from ng-http-interceptor.
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.
microsoft/TypeScript#3215
angular/angular#4882
from ng-http-interceptor.
@jorawarsingh so if you target ES5 this issue gone?
from ng-http-interceptor.
No, still remain.
from ng-http-interceptor.
Can you please try to compile with next options in tsconfig.json:
compilerOptions -> lib: ["es6", "dom"]
compilerOptions -> module: "es6"
I'm also targeting ES5 but don't have this issue so probably those settings might resolve them.
from ng-http-interceptor.
Related Issues (20)
- Get headers on response HOT 1
- Intercept responseError HOT 1
- ng build --prod fails when HttpInterceptorModule imported in app.module HOT 6
- Don't require RxJS version higher than what Angular requires HOT 2
- How to handle http request cancellation in http-interceptor HOT 3
- Interceptor not seeing all headers HOT 5
- (do) function not working in TypeScript 2.3.4 HOT 2
- IE11 Shims/Polyfills issue HOT 10
- Cancelling request type HOT 3
- Interceptors not running HOT 8
- Property 'do' does not exist on type 'Observable<Response>'. HOT 2
- Response interceptor is not called on error HOT 6
- Interceptors can only use in app moudle,could it import once use all moudle HOT 2
- Intercept header parameters at app run HOT 2
- Requests are send twice HOT 1
- Interceptor getting called only in preflight request not in subsequent call HOT 4
- Add support for new HttpClient HOT 5
- Interceptor is making service sending requests twice in lazy loaded module HOT 3
- keep seeing __extends is not defined HOT 2
- I think we should support angular8 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ng-http-interceptor.