libs: Declare dynamic properties and improve doc types