Skip to content
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

Typescript typings #105

Open
shayded-exe opened this issue Mar 10, 2020 · 4 comments
Open

Typescript typings #105

shayded-exe opened this issue Mar 10, 2020 · 4 comments

Comments

@shayded-exe
Copy link

Would it be possible to get Typescript typings for this library?

I'll start making my own, but it probably won't be comprehensive.

@ZJONSSON
Copy link
Owner

Hey @PachowStudios that is a great idea, can you work towards a PR?

@antonsamper
Copy link

I'm happy to contribute. @PachowStudios Is it worth creating a set of very basic typings and merging that? The other can build on top.

Can you share what you have so far?

@shayded-exe
Copy link
Author

I had forgotten about this. I don't have time to make a PR, but here's what I created previously:

declare module 'etl' {
  import { Transform } from 'stream';

  export type MapStream = Transform & {
    promise(): Promise<void>;
  };

  export function map(fn: (...args: any[]) => void | Promise<void>): MapStream;
}

I only needed the map function so it's all I bothered to type out.

@gordonwho
Copy link

Is this done? I am getting an error

Could not find a declaration file for module 'etl'. 'c:/dev/GitHub/Scheduling/node_modules/etl/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/etl` if it exists or add a new declaration (.d.ts) file containing `declare module 'etl';`ts(7016)

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