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

fix implicit "any" type in index.d.ts #3551

Merged
merged 1 commit into from
Feb 25, 2021

Conversation

slhck
Copy link
Contributor

@slhck slhck commented Feb 23, 2021

These functions need an explicit response type to prevent warnings like the following:

index.d.ts (350,9): 'registerLicenseRequestFilter', which lacks return-type annotation, implicitly has an 'any' return type.
index.d.ts (351,9): 'registerLicenseResponseFilter', which lacks return-type annotation, implicitly has an 'any' return type.
index.d.ts (352,9): 'unregisterLicenseRequestFilter', which lacks return-type annotation, implicitly has an 'any' return type.
index.d.ts (353,9): 'unregisterLicenseResponseFilter', which lacks return-type annotation, implicitly has an 'any' return type

@dsilhavy dsilhavy added this to the 3.3.0 milestone Feb 23, 2021
@bbert
Copy link
Contributor

bbert commented Feb 23, 2021

@slhck thanks for pointed out this, sorry I missed the return type for these functions.
But it does not return any promise, return type shall be : void;
Can you modify?

These functions need an explicit response type to prevent warnings like the following:

index.d.ts (350,9): 'registerLicenseRequestFilter', which lacks return-type annotation, implicitly has an 'any' return type.
index.d.ts (351,9): 'registerLicenseResponseFilter', which lacks return-type annotation, implicitly has an 'any' return type.
index.d.ts (352,9): 'unregisterLicenseRequestFilter', which lacks return-type annotation, implicitly has an 'any' return type.
index.d.ts (353,9): 'unregisterLicenseResponseFilter', which lacks return-type annotation, implicitly has an 'any' return type
@slhck
Copy link
Contributor Author

slhck commented Feb 23, 2021

You're right, thank you. (I mistakenly pulled it from the filter itself.)

@dsilhavy Could you perhaps push this to the next bugfix release (if any)? This bug prevents building the package with strict TypeScript rules.

@dsilhavy dsilhavy merged commit 6afaaaa into Dash-Industry-Forum:development Feb 25, 2021
@dsilhavy
Copy link
Collaborator

@slhck Thanks for the fix, such errors should not happen again with #3553. Next release will be 3.3.0 if no major bugs occur in the meantime

@dsilhavy
Copy link
Collaborator

dsilhavy commented Apr 6, 2021

@slhck If you find some time it would be nice if you could do a quick check regarding missing Typescript values in the RC 3.2.2 https://github.com/Dash-Industry-Forum/dash.js/tree/RC_v3.2.2 . We have a static TypeScript check in place now, but if your app uses the Typescript definition file you might see additional problems.

@slhck
Copy link
Contributor Author

slhck commented Apr 8, 2021

From what I can tell, the fix works, yes!

We basically use import { MediaPlayerSettingClass } from 'dashjs', not the definition file directly.

@dsilhavy
Copy link
Collaborator

dsilhavy commented Apr 8, 2021

@slhck Great, thanks for checking

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

Successfully merging this pull request may close these issues.

3 participants