Set noImplicitAny true for tsc
This commit is contained in:
parent
1f3fe32a0a
commit
3cb62e56c0
@ -17,8 +17,8 @@ export class Calendar {
|
|||||||
private today: Date;
|
private today: Date;
|
||||||
private month: number;
|
private month: number;
|
||||||
private year: number;
|
private year: number;
|
||||||
private calendarDays;
|
private calendarDays: Array<Array<string>>;
|
||||||
private tasks;
|
private tasks: Array<any>; // TODO: Use Task model when created
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.today = new Date();
|
this.today = new Date();
|
||||||
@ -71,7 +71,7 @@ export class Calendar {
|
|||||||
this.generateCalendar();
|
this.generateCalendar();
|
||||||
}
|
}
|
||||||
|
|
||||||
private getColor(task) {
|
private getColor(task: any) { // TODO: Use Task model
|
||||||
return task.color;
|
return task.color;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,11 +85,11 @@ export class Calendar {
|
|||||||
this.calendarDays = [];
|
this.calendarDays = [];
|
||||||
|
|
||||||
for (let i = 0; i < rows; ++i) {
|
for (let i = 0; i < rows; ++i) {
|
||||||
let weekDays = [];
|
let weekDays: Array<string> = [];
|
||||||
|
|
||||||
for (let j = 0; j < 7; ++j) {
|
for (let j = 0; j < 7; ++j) {
|
||||||
if (day <= monthLength && (j >= startingDay || i > 0)) {
|
if (day <= monthLength && (j >= startingDay || i > 0)) {
|
||||||
weekDays.push(day);
|
weekDays.push('' + day);
|
||||||
day++;
|
day++;
|
||||||
} else {
|
} else {
|
||||||
weekDays.push('');
|
weekDays.push('');
|
||||||
|
@ -41,7 +41,7 @@ export class Charts implements AfterViewInit {
|
|||||||
options = {
|
options = {
|
||||||
donut: true,
|
donut: true,
|
||||||
donutWidth: 100,
|
donutWidth: 100,
|
||||||
labelInterpolationFnc: (label, index) => {
|
labelInterpolationFnc: (label: string, index: number) => {
|
||||||
let value = this.data[index],
|
let value = this.data[index],
|
||||||
percent = Math.round(value /
|
percent = Math.round(value /
|
||||||
this.data.reduce(Chartist.sum) * 100);
|
this.data.reduce(Chartist.sum) * 100);
|
||||||
@ -79,7 +79,7 @@ export class Charts implements AfterViewInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private convertToNumberArray(arr: string[]): number[] {
|
private convertToNumberArray(arr: string[]): number[] {
|
||||||
let nums = [];
|
let nums: Array<number> = [];
|
||||||
|
|
||||||
for (let i = 0, len = arr.length; i < len; ++i) {
|
for (let i = 0, len = arr.length; i < len; ++i) {
|
||||||
nums.push(Number(arr[i]));
|
nums.push(Number(arr[i]));
|
||||||
|
@ -94,7 +94,7 @@ export class BoardAdmin {
|
|||||||
let ul = document.getElementsByClassName('modal-list')[0];
|
let ul = document.getElementsByClassName('modal-list')[0];
|
||||||
|
|
||||||
this.dragula.setOptions('columns-bag', {
|
this.dragula.setOptions('columns-bag', {
|
||||||
moves: (el, container, handle) => {
|
moves: (el: any, container: any, handle: any) => {
|
||||||
return handle.classList.contains('icon-resize-vertical');
|
return handle.classList.contains('icon-resize-vertical');
|
||||||
},
|
},
|
||||||
mirrorContainer: ul
|
mirrorContainer: ul
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
|
import { User } from '../../shared/index';
|
||||||
|
|
||||||
export class BoardData {
|
export class BoardData {
|
||||||
constructor(public title = '',
|
constructor(public title = '',
|
||||||
public id = 0,
|
public id = 0,
|
||||||
public boardName = '',
|
public boardName = '',
|
||||||
public columns = [],
|
public columns: Array<any> = [],
|
||||||
public categories = [],
|
public categories: Array<any> = [],
|
||||||
public issueTrackers = [],
|
public issueTrackers: Array<any> = [],
|
||||||
public users = [],
|
public users: Array<User> = [],
|
||||||
public categoryDefaultColor = '#ffffe0',
|
public categoryDefaultColor = '#ffffe0',
|
||||||
public newColumnName = '',
|
public newColumnName = '',
|
||||||
public newCategoryName = '',
|
public newCategoryName = '',
|
||||||
@ -21,7 +23,7 @@ export class BoardData {
|
|||||||
this.newColumnName = '';
|
this.newColumnName = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
removeColumn(column): void {
|
removeColumn(column: any): void {
|
||||||
let index = this.columns.indexOf(column);
|
let index = this.columns.indexOf(column);
|
||||||
|
|
||||||
if (index === -1) {
|
if (index === -1) {
|
||||||
@ -43,7 +45,7 @@ export class BoardData {
|
|||||||
this.newCategoryName = '';
|
this.newCategoryName = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
removeCategory(category): void {
|
removeCategory(category: any): void {
|
||||||
let index = this.categories.indexOf(category);
|
let index = this.categories.indexOf(category);
|
||||||
|
|
||||||
if (index === -1) {
|
if (index === -1) {
|
||||||
@ -66,7 +68,7 @@ export class BoardData {
|
|||||||
this.issueTrackerBugId = '';
|
this.issueTrackerBugId = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
removeIssueTracker(tracker): void {
|
removeIssueTracker(tracker: any): void {
|
||||||
let index = this.issueTrackers.indexOf(tracker);
|
let index = this.issueTrackers.indexOf(tracker);
|
||||||
|
|
||||||
if (index === -1) {
|
if (index === -1) {
|
||||||
|
@ -18,7 +18,7 @@ export class Modal implements OnInit {
|
|||||||
@Input() blocking = false;
|
@Input() blocking = false;
|
||||||
@Input() wide = false;
|
@Input() wide = false;
|
||||||
|
|
||||||
@ContentChild('focusMe') focusElement;
|
@ContentChild('focusMe') focusElement: any;
|
||||||
|
|
||||||
isOpen = false;
|
isOpen = false;
|
||||||
animate = true;
|
animate = true;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { Column } from './column.model';
|
import { Column } from './column.model';
|
||||||
import { Category } from './category.model';
|
import { Category } from './category.model';
|
||||||
import { IssueTracker } from './issue-tracker.model';
|
import { IssueTracker } from './issue-tracker.model';
|
||||||
|
import { User } from './user.model';
|
||||||
|
|
||||||
export class Board {
|
export class Board {
|
||||||
constructor(public id: number = 0,
|
constructor(public id: number = 0,
|
||||||
@ -8,9 +9,9 @@ export class Board {
|
|||||||
public is_active: boolean = true,
|
public is_active: boolean = true,
|
||||||
public columns: Array<Column> = [],
|
public columns: Array<Column> = [],
|
||||||
public categories: Array<Category> = [],
|
public categories: Array<Category> = [],
|
||||||
public auto_actions = [], // TODO: Add typing
|
public auto_actions: Array<any> = [], // TODO: Add typing
|
||||||
public issue_trackers: Array<IssueTracker> = [],
|
public issue_trackers: Array<IssueTracker> = [],
|
||||||
public users = []) {
|
public users: Array<User> = []) {
|
||||||
}
|
}
|
||||||
|
|
||||||
addColumn(name: string): void {
|
addColumn(name: string): void {
|
||||||
|
@ -3,7 +3,7 @@ export class Column {
|
|||||||
public name: string = '',
|
public name: string = '',
|
||||||
public position: number = 0,
|
public position: number = 0,
|
||||||
public board_id: number = 0,
|
public board_id: number = 0,
|
||||||
public tasks = []) {
|
public tasks: Array<any> = []) { // TODO: Use Task model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"emitDecoratorMetadata": true,
|
"emitDecoratorMetadata": true,
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
"noImplicitAny": false,
|
"noImplicitAny": true,
|
||||||
"suppressImplicitAnyIndexErrors": true,
|
"suppressImplicitAnyIndexErrors": true,
|
||||||
"typeRoots": [ "node_modules/@types" ],
|
"typeRoots": [ "node_modules/@types" ],
|
||||||
"types": [ "chartist", "core-js" ]
|
"types": [ "chartist", "core-js" ]
|
||||||
|
Reference in New Issue
Block a user