Php Cannot Access Offset Of Type Array In Typescript