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