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

Types #50

Open
Hoodgail opened this issue Mar 27, 2022 · 9 comments
Open

Types #50

Hoodgail opened this issue Mar 27, 2022 · 9 comments

Comments

@Hoodgail
Copy link

Add types support.
Read https://www.typescriptlang.org/docs/handbook/declaration-files/templates/module-d-ts.html
I might be able to contribute with that with that when I have time. because this package is really useful

@rafa8626
Copy link

rafa8626 commented Dec 10, 2024

@basil79 is this something planned for the near future? My IDE complains about their absence in Typescript projects

@basil79
Copy link
Owner

basil79 commented Dec 10, 2024

@rafa8626 , use it as an npm package, I don't see the point in rewriting it to ts, if any additions or changes are needed, let me know. It is used by many leading players for non-GAM tags and provides good ad performance, up to 30% higher than IMA SDK

@rafa8626
Copy link

rafa8626 commented Dec 11, 2024

@basil79 I don’t necessarily say to rewrite it, but definitely add types; if you have any tips on how to use this in a Typescript project so the IDE doesn’t complain let me know.

@basil79
Copy link
Owner

basil79 commented Dec 11, 2024

@rafa8626 , regarding VAST 4.+
it already supports VAST 4.0, you can test your VAST tags in our VAST Inspector/VAST Tester based on this ad manager -> https://adserve.tv/vast-inspector/

VAST 4.0 Samples:
https://github.com/InteractiveAdvertisingBureau/VAST_Samples/blob/master/VAST%204.0%20Samples/Universal_Ad_ID-test.xml

Types - I will check...

@basil79
Copy link
Owner

basil79 commented Dec 11, 2024

@rafa8626 , if you receive warnings about -> 'this' implicitly has type 'any' because it does not have a type annotation.
Screen Shot 2024-12-11 at 14 05 45
disable -> noImplicitThis in TSConfig -> https://www.typescriptlang.org/tsconfig/#noImplicitThis

@rafa8626
Copy link

@basil79 the error comes when I implement the library inside my project

Screenshot 2024-12-11 at 8 36 52 AM

@basil79
Copy link
Owner

basil79 commented Dec 11, 2024

@rafa8626, do you have "strict": true in your tsconf.json ? if so, comment it out

@rafa8626
Copy link

@basil79 ok that did the trick. Thanks

@basil79
Copy link
Owner

basil79 commented Dec 11, 2024

@rafa8626 , in my free time I will try to generate the definition file -> .d.ts
-> https://www.typescriptlang.org/docs/handbook/declaration-files/dts-from-js.html

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

3 participants