Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- getDataParam(url: any, params: any) {
- return this.http
- .get(url, { params: params })
- .pipe(catchError(this.handleError))
- .subscribe(response => response);
- }
- createData(url: any, data: any) {
- return this.http
- .post(url, data)
- .pipe(catchError(this.handleError))
- .subscribe(response => response);
- }
- export class LegalorderService extends BaseService {
- private token: string;
- constructor(http: HttpClient, auth: AuthService) {
- super(http);
- auth.isAuthenticated();
- this.token = auth.token;
- }
- getCart() {
- let params = { access_token: this.token };
- return this.getDataParam(
- Configuration.BASE_URL + Configuration.GET_SAVED_CART,
- params
- );
- }
- }
- updateValue() {
- this.legalOrderService.getCart().subscribe(response => {
- if (response.message != "ERROR") {
- this.localStorageService.store("legalOrder", response.result);
- this.localStorageService.store(
- "cartItems",
- response.result.order_details
- );
- this.cartTotal = this.localStorageService.retrieve("cartItems");
- }
- });
- }
- ERROR in node_modules/rxjs/internal/Subscription.d.ts(16,3): error TS2374: Duplicate string index signature.
- node_modules/rxjs/internal/Subscription.d.ts(17,3): error TS2393: Duplicate function implementation.
- node_modules/rxjs/internal/Subscription.d.ts(17,44): error TS1183: An implementation cannot be declared in ambient contexts.
- node_modules/rxjs/internal/Subscription.d.ts(20,3): error TS2393: Duplicate function implementation.
- node_modules/rxjs/internal/Subscription.d.ts(20,44): error TS1183: An implementation cannot be declared in ambient contexts.
- node_modules/typescript/lib/lib.es5.d.ts(124,5): error TS2411: Property 'constructor' of type 'Function' is not assignable to string index type 'string'.
- node_modules/typescript/lib/lib.es5.d.ts(127,5): error TS2411: Property 'toString' of type '() => string' is not assignable to string index type 'string'.
- node_modules/typescript/lib/lib.es5.d.ts(130,5): error TS2411: Property 'toLocaleString' of type '() => string' is not assignable to string index type 'string'.
- node_modules/typescript/lib/lib.es5.d.ts(133,5): error TS2411: Property 'valueOf' of type '() => Object' is not assignable to string index type 'string'.
- node_modules/typescript/lib/lib.es5.d.ts(139,5): error TS2411: Property 'hasOwnProperty' of type '(v: string | number | symbol) => boolean' is not assignable to string index type 'string'.
- node_modules/typescript/lib/lib.es5.d.ts(145,5): error TS2411: Property 'isPrototypeOf' of type '(v: Object) => boolean' is not assignable to string index type 'string'.
- node_modules/typescript/lib/lib.es5.d.ts(151,5): error TS2411: Property 'propertyIsEnumerable' of type '(v: string | number | symbol) => boolean' is not assignable to string index type 'string'.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement