Correct module import of observable-array

pull/8529/head
Oliver Günther 4 years ago
parent 4522b33a05
commit e15595e23c
No known key found for this signature in database
GPG Key ID: A3A8BDAD7C0C552C
  1. 2
      frontend/src/app/modules/hal/helpers/hal-resource-builder.ts
  2. 5
      frontend/src/app/modules/hal/services/hal-resource.service.ts
  3. 59
      frontend/src/typings/observable-array.d.ts

@ -3,7 +3,7 @@ import {OpenprojectHalModuleHelpers} from 'core-app/modules/hal/helpers/lazy-acc
import {HalResourceService} from 'core-app/modules/hal/services/hal-resource.service';
import {HalLink} from 'core-app/modules/hal/hal-link/hal-link';
const ObservableArray:any = require('observable-array');
import * as ObservableArray from 'observable-array';
interface HalSource {
_links:any;

@ -28,13 +28,11 @@
import {Injectable, Injector} from '@angular/core';
import {HttpClient, HttpErrorResponse, HttpParams} from '@angular/common/http';
import {throwError} from 'rxjs/internal/observable/throwError';
import {catchError, map} from 'rxjs/operators';
import {Observable} from 'rxjs';
import {Observable, throwError} from 'rxjs';
import {HalResource, HalResourceClass} from 'core-app/modules/hal/resources/hal-resource';
import {CollectionResource} from 'core-app/modules/hal/resources/collection-resource';
import {HalLink, HalLinkInterface} from 'core-app/modules/hal/hal-link/hal-link';
import {initializeHalProperties} from 'core-app/modules/hal/helpers/hal-resource-builder';
import {URLParamsEncoder} from 'core-app/modules/hal/services/url-params-encoder';
import {ErrorResource} from "core-app/modules/hal/resources/error-resource";
import * as Pako from 'pako';
@ -45,6 +43,7 @@ import {
HTTPSupportedMethods
} from "core-app/modules/hal/http/http.interfaces";
import {whenDebugging} from "core-app/helpers/debug_output";
import {initializeHalProperties} from "../helpers/hal-resource-builder";
export interface HalResourceFactoryConfigInterface {
cls?:any;

@ -1,58 +1 @@
// Declare some globals
// to work around previously magical global constants
// provided by typings@global
// Active issue
// https://github.com/Microsoft/TypeScript/issues/10178
/// <reference path="../../node_modules/@types/jquery/index.d.ts" />
/// <reference path="../../node_modules/@types/jqueryui/index.d.ts" />
/// <reference path="../../node_modules/@types/mousetrap/index.d.ts" />
/// <reference path="../../node_modules/@types/moment-timezone/index.d.ts" />
/// <reference path="../../node_modules/@types/urijs/index.d.ts" />
/// <reference path="../../node_modules/@types/webpack-env/index.d.ts" />
/// <reference path="../../node_modules/@types/es6-shim/index.d.ts" />
/// <reference path="../../node_modules/@types/dragula/index.d.ts" />
import {ErrorReporter} from "core-app/sentry/sentry-reporter";
import {Injector} from '@angular/core';
import {OpenProject} from 'core-app/globals/openproject';
import * as TLodash from 'lodash';
import * as TMoment from 'moment';
import {GlobalI18n} from "core-app/modules/common/i18n/i18n.service";
import {Dragula} from "dragula";
declare module 'observable-array';
declare module 'dom-autoscroller';
declare module 'core-vendor/enjoyhint';
declare global {
const _:typeof TLodash;
const moment:typeof TMoment;
const I18n:GlobalI18n;
const dragula:Dragula;
}
declare global {
interface Window {
appBasePath:string;
ng2Injector:Injector;
OpenProject:OpenProject;
ErrorReporter:ErrorReporter;
onboardingTourInstance:any;
}
interface JQuery {
topShelf:any;
mark:any;
tablesorter:any;
}
interface JQueryStatic {
metadata:any;
tablesorter:any;
}
}
export {};
declare module 'observable-array';
Loading…
Cancel
Save