Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Fix TS errors with 3.7

Oliver Güntherc448b9392b10
diff --git a/frontend/src/app/components/resizer/wp-resizer.component.ts b/frontend/src/app/components/resizer/wp-resizer.component.ts
index 9751e41782b..08243608cec 100644
--- a/frontend/src/app/components/resizer/wp-resizer.component.ts
+++ b/frontend/src/app/components/resizer/wp-resizer.component.ts
@@ -99,7 +99,7 @@ export class WpResizerDirective implements OnInit, OnDestroy {
ngOnDestroy() {
// Reset the style when killing this directive, otherwise the style remains
- this.resizingElement.style.flexBasis = null;
+ this.resizingElement.style.flexBasis = '';
}
@HostListener('mousedown', ['$event'])
diff --git a/frontend/src/app/components/wp-table/timeline/cells/timeline-cell-renderer.ts b/frontend/src/app/components/wp-table/timeline/cells/timeline-cell-renderer.ts
index 3eec14036b2..13f22d6140c 100644
--- a/frontend/src/app/components/wp-table/timeline/cells/timeline-cell-renderer.ts
+++ b/frontend/src/app/components/wp-table/timeline/cells/timeline-cell-renderer.ts
@@ -252,11 +252,11 @@ export class TimelineCellRenderer {
protected checkForActiveSelectionMode(renderInfo:RenderInfo, element:HTMLElement) {
if (renderInfo.viewParams.activeSelectionMode) {
- element.style.backgroundImage = null; // required! unable to disable "fade out bar" with css
+ element.style.backgroundImage = ''; // required! unable to disable "fade out bar" with css
if (renderInfo.viewParams.selectionModeStart === '' + renderInfo.workPackage.id!) {
jQuery(element).addClass(timelineMarkerSelectionStartClass);
- element.style.background = null;
+ element.style.background = 'none';
}
}
}
diff --git a/frontend/src/app/modules/a11y/keyboard-shortcut-service.ts b/frontend/src/app/modules/a11y/keyboard-shortcut-service.ts
index d6f2431bffb..cd0d835d2ff 100644
--- a/frontend/src/app/modules/a11y/keyboard-shortcut-service.ts
+++ b/frontend/src/app/modules/a11y/keyboard-shortcut-service.ts
@@ -130,7 +130,7 @@ export class KeyboardShortcutService {
clickLink(link:any) {
var cancelled = false;
- if (document.createEvent) {
+ if (!!document.createEvent) {
var event = new MouseEvent('click', {
view: window,
bubbles: true,
diff --git a/frontend/src/app/modules/calendar/openproject-calendar.module.ts b/frontend/src/app/modules/calendar/openproject-calendar.module.ts
index e299dd35395..ab436b6356f 100644
--- a/frontend/src/app/modules/calendar/openproject-calendar.module.ts
+++ b/frontend/src/app/modules/calendar/openproject-calendar.module.ts
@@ -78,7 +78,7 @@ export const CALENDAR_ROUTES:Ng2StateDeclaration[] = [
WorkPackagesCalendarEntryComponent,
WorkPackagesCalendarController,
TimeEntryCalendarComponent,
- ]
+ ],
exports: [
WorkPackagesCalendarController,
TimeEntryCalendarComponent,
diff --git a/frontend/src/app/modules/fields/display/field-types/highlightable-display-field.module.ts b/frontend/src/app/modules/fields/display/field-types/highlightable-display-field.module.ts
index 1aa59b543eb..8c36a0e65b0 100644
--- a/frontend/src/app/modules/fields/display/field-types/highlightable-display-field.module.ts
+++ b/frontend/src/app/modules/fields/display/field-types/highlightable-display-field.module.ts
@@ -32,7 +32,7 @@ import {WorkPackageViewHighlightingService} from "core-app/modules/work_packages
export class HighlightableDisplayField extends DisplayField {
/** Optionally test if we can inject highlighting service */
- protected readonly viewHighlighting:WorkPackageViewHighlightingService = this.$injector.get(WorkPackageViewHighlightingService, null);
+ protected readonly viewHighlighting:WorkPackageViewHighlightingService|null = this.$injector.get(WorkPackageViewHighlightingService, null);
public get shouldHighlight() {
if (this.context.options.colorize === false) {
diff --git a/frontend/src/tsconfig.app.json b/frontend/src/tsconfig.app.json
index 77e8277776e..9231c6e3125 100644
--- a/frontend/src/tsconfig.app.json
+++ b/frontend/src/tsconfig.app.json
@@ -5,10 +5,8 @@
"baseUrl": "./",
"types": []
},
- "files": [
- "main.ts",
- "polyfills.ts",
- "typings.d.ts",
- "typings/*.d.ts"
+ "exclude": [
+ "test.ts",
+ "**/*.spec.ts"
]
}