ads-manager icon indicating copy to clipboard operation
ads-manager copied to clipboard

Types

Open Hoodgail opened this issue 3 years ago • 9 comments

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

Hoodgail avatar Mar 27 '22 13:03 Hoodgail

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

rafa8626 avatar Dec 10 '24 02:12 rafa8626

@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

basil79 avatar Dec 10 '24 09:12 basil79

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

rafa8626 avatar Dec 11 '24 03:12 rafa8626

@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 avatar Dec 11 '24 09:12 basil79

@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

basil79 avatar Dec 11 '24 13:12 basil79

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

Screenshot 2024-12-11 at 8 36 52 AM

rafa8626 avatar Dec 11 '24 13:12 rafa8626

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

basil79 avatar Dec 11 '24 15:12 basil79

@basil79 ok that did the trick. Thanks

rafa8626 avatar Dec 11 '24 15:12 rafa8626

@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

basil79 avatar Dec 11 '24 16:12 basil79