build: filter out docs private members from interfaces (#22831)
build: filter out docs private members from interfaces (#22831)

Fixes that docs private members weren't being filtered out from interfaces.

Also moves the code around slightly so that we don't mutate the data inside `Array.filter` since the expectation is that the filter function is pure.

Fixes #20327.
angular/components,DevVersion/material2,mmalerba/material2,crisbeto/material2,josephperrott/material2,josephperrott/material2,mmalerba/material2,DevVersion/material2,angular/components,angular/components,mmalerba/material2,crisbeto/material2,josephperrott/material2,mmalerba/material2,josephperrott/material2,DevVersion/material2,angular/components,crisbeto/material2,DevVersion/material2,crisbeto/material2,mmalerba/material2,DevVersion/material2,josephperrott/material2