Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Commit

Permalink
fix: allow any array. closes #115
Browse files Browse the repository at this point in the history
  • Loading branch information
scttcper committed Jul 27, 2018
1 parent 7878e0f commit a4531fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib/csv.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { buildURI, HeaderObj } from './util';
@Directive({ selector: 'a[csvLink]' })
export class CsvDirective implements OnChanges {
/** the body of the csv */
@Input() data: string | string[][] | { [key: string]: string }[] = [];
@Input() data: string | string[][] | { [key: string]: string }[] | any[] = [];
/** Set the first line of the csv */
@Input() headers?: string[] | HeaderObj[];
/** Set the seperator between values */
Expand Down
4 changes: 2 additions & 2 deletions src/lib/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function string2csv(
}

export function toCSV(
data: string | string[][] | { [key: string]: string }[],
data: string | string[][] | { [key: string]: string }[] | any[],
headers?: string[] | HeaderObj[],
delimiter?: string,
) {
Expand All @@ -93,7 +93,7 @@ export function toCSV(
}

export function buildURI(
data: string | string[][] | { [key: string]: string }[],
data: string | string[][] | { [key: string]: string }[] | any[],
uFEFF = true,
headers?: string[] | HeaderObj[],
delimiter?: string,
Expand Down

0 comments on commit a4531fa

Please sign in to comment.