You need to define the array like this:
playerBullets: bullet[] = new Array(40);
And the overall code will look like this:
interface bullet{
active :bool;
}
var playerBullets:bullet[] = new Array(40)
playerBullets = playerBullets.filter( function (bullet) {
return bullet.active;
});
Of course you don't have to define the bullet type (but if you use typescript you probably want)
var playerBullets:any = new Array(40)
playerBullets = playerBullets.filter( function (bullet) {
return bullet.active;
});