Skip to content

visual studio code show error #112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tagplus5 opened this issue May 5, 2016 · 8 comments
Closed

visual studio code show error #112

tagplus5 opened this issue May 5, 2016 · 8 comments

Comments

@tagplus5
Copy link

tagplus5 commented May 5, 2016

[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.

@knownasilya
Copy link
Collaborator

Feel free to submit a PR, I don't use TS.

@mlegenhausen
Copy link
Contributor

Using declare module seems to be deprecated: microsoft/TypeScript#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.

@mlegenhausen
Copy link
Contributor

In which version will this fix be available?

@knownasilya
Copy link
Collaborator

It is now released as 3.4.1

@mlegenhausen
Copy link
Contributor

@knownasilya thanks :)

@quantuminformation
Copy link

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.

@knownasilya
Copy link
Collaborator

Feel free to pioneer this, and I'll review your PR.

@quantuminformation
Copy link

I found a stopgap,but not using this repo, atm I'm snowed under with work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants