From d03c3073debcb93d421531fe3b2f0530e58b7790 Mon Sep 17 00:00:00 2001 From: emoralesb05 Date: Tue, 6 Feb 2018 16:38:33 -0800 Subject: [PATCH] fix(lib): fix covalent build in case typeCheck is used in apps --- package.json | 5 ++--- src/app/components/layouts/card-over/card-over.component.ts | 2 +- src/platform/core/common/pipes/time-ago/time-ago.pipe.ts | 2 +- .../common/pipes/time-difference/time-difference.pipe.ts | 2 +- .../data-table-column/data-table-column.component.ts | 2 +- .../data-table/data-table-row/data-table-row.component.ts | 2 +- tsconfig.json | 1 + 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 6a30ed9cb0..5c36d95c13 100644 --- a/package.json +++ b/package.json @@ -13,9 +13,8 @@ "lint": "npm run tslint && npm run stylelint", "tslint": "./node_modules/.bin/tslint --format codeFrame -c ./tslint.json \"./src/**/*.ts\" -e \"./src/**/typings.d.ts\" -e \"./src/environments/**\"", "stylelint": "./node_modules/.bin/stylelint 'src/**/*.scss' '!**/_layout.scss' '!**/markdown.component.scss' --config .stylelintrc.json --syntax scss", - "postinstall": "webdriver-manager update", - "reinstall": "rm -rf node_modules tmp deploy dist && yarn install && npm rebuild node-sass", - "reinstall:latest": "rm -rf node_modules tmp deploy dist && npm install", + "preinstall": "rm -rf node_modules tmp deploy dist", + "postinstall": "npm rebuild node-sass && webdriver-manager update", "test": "ng test --code-coverage --single-run --sourcemap=false", "coverage:win": "start chrome ./coverage/index.html", "coverage:mac": "open -a \"Google Chrome\" coverage/index.html", diff --git a/src/app/components/layouts/card-over/card-over.component.ts b/src/app/components/layouts/card-over/card-over.component.ts index d8d86ab267..a69d6f9a7c 100644 --- a/src/app/components/layouts/card-over/card-over.component.ts +++ b/src/app/components/layouts/card-over/card-over.component.ts @@ -8,7 +8,7 @@ import { Component, HostBinding, ChangeDetectionStrategy } from '@angular/core'; }) export class CardOverComponent { - routes: Object[] = [{ + routes: any[] = [{ icon: 'home', route: '.', title: 'Home', diff --git a/src/platform/core/common/pipes/time-ago/time-ago.pipe.ts b/src/platform/core/common/pipes/time-ago/time-ago.pipe.ts index eef8a860fe..f7cdc21aee 100644 --- a/src/platform/core/common/pipes/time-ago/time-ago.pipe.ts +++ b/src/platform/core/common/pipes/time-ago/time-ago.pipe.ts @@ -4,7 +4,7 @@ import { Pipe, PipeTransform } from '@angular/core'; name: 'timeAgo', }) export class TdTimeAgoPipe implements PipeTransform { - transform(time: any, reference: any): string { + transform(time: any, reference?: any): string { // Convert time to date object if not already time = new Date(time); let ref: Date = new Date(reference); diff --git a/src/platform/core/common/pipes/time-difference/time-difference.pipe.ts b/src/platform/core/common/pipes/time-difference/time-difference.pipe.ts index ebcab42f78..4033bd5ee9 100644 --- a/src/platform/core/common/pipes/time-difference/time-difference.pipe.ts +++ b/src/platform/core/common/pipes/time-difference/time-difference.pipe.ts @@ -5,7 +5,7 @@ import { Pipe, PipeTransform } from '@angular/core'; }) export class TdTimeDifferencePipe implements PipeTransform { - transform(start: any, end: any): string { + transform(start: any, end?: any): string { let startTime: Date = new Date(start); let endTime: Date; diff --git a/src/platform/core/data-table/data-table-column/data-table-column.component.ts b/src/platform/core/data-table/data-table-column/data-table-column.component.ts index 3f89333f09..c7d42a235c 100644 --- a/src/platform/core/data-table/data-table-column/data-table-column.component.ts +++ b/src/platform/core/data-table/data-table-column/data-table-column.component.ts @@ -104,7 +104,7 @@ export class TdDataTableColumnComponent { /** * Listening to click event on host to throw a sort event */ - @HostListener('click', ['event']) + @HostListener('click') handleClick(): void { if (this.sortable) { this.onSortChange.emit({name: this.name, order: this._sortOrder}); diff --git a/src/platform/core/data-table/data-table-row/data-table-row.component.ts b/src/platform/core/data-table/data-table-row/data-table-row.component.ts index 6d3b65455f..7833272a3f 100644 --- a/src/platform/core/data-table/data-table-row/data-table-row.component.ts +++ b/src/platform/core/data-table/data-table-row/data-table-row.component.ts @@ -55,7 +55,7 @@ export class TdDataTableRowComponent { /** * Listening to click event to explicitly focus the row element. */ - @HostListener('click', ['$event']) + @HostListener('click') clickListener(): void { this.focus(); } diff --git a/tsconfig.json b/tsconfig.json index 990f0cf283..0b30aa309a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,7 @@ { "compileOnSave": false, "compilerOptions": { + "baseUrl": "./src", "declaration": false, "emitDecoratorMetadata": true, "experimentalDecorators": true,