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

Wrong types for js bindings #340

Open
darahe opened this issue Mar 7, 2024 · 2 comments · May be fixed by #343
Open

Wrong types for js bindings #340

darahe opened this issue Mar 7, 2024 · 2 comments · May be fixed by #343
Assignees

Comments

@darahe
Copy link

darahe commented Mar 7, 2024

request_type

Current:

request_type: string

Expected:

request_type: RequestType // union type or enum

engine.check

Current:

check(url: string, source_url: string, request_type: string, debug?: boolean): boolean;

Expected:

check(url: string, source_url: string, request_type: string, debug?: boolean): boolean | DebugObject; // it returns object with debug info if debug is true

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/f5925b6c95f53653f35ce3f83fcda1ba9b1e04a6/types/adblock-rs/index.d.ts#L27C43-L27C65

@diracdeltas
Copy link
Member

@antonok-edm

@antonok-edm
Copy link
Collaborator

interesting, I didn't realize there were 3rd-party type bindings for this repo. Probably the issue should be filed there instead?

I guess the ideal solution would be to migrate the types into this repo... I'm not a TS expert but I will investigate options.

@antonok-edm antonok-edm linked a pull request Mar 12, 2024 that will close this issue
@antonok-edm antonok-edm self-assigned this Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants