Closed tagplus5 closed 8 years ago
Feel free to submit a PR, I don't use TS.
Using declare module
seems to be deprecated: https://github.com/Microsoft/TypeScript/issues/2839
I changed the typescript definition to the following:
declare namespace json2csv {
interface CSVCallback {
(error: Error, csv: string): void;
}
export function json2csv(options: any, callback: CSVCallback): string;
}
export = json2csv.json2csv;
I will prepare a pull request and try to validate if this the current state of the are type definition format.
In which version will this fix be available?
It is now released as 3.4.1
@knownasilya thanks :)
Has anyone been able to use this with TS? Would be great to add a section in the docs for ts for a minimal example.
Feel free to pioneer this, and I'll review your PR.
I found a stopgap,but not using this repo, atm I'm snowed under with work
[js] Exported external package typings file '.../node_modules/json2csv/index.d.ts' is not a module. Please contact the package author to update the package definition.