Question: Classes like DocumentReference, CollectionReference, etc., don't seem to be exported. Is there a way to import these classes?

Answer: 
1. Install firebase if it's not in your package.json:

```
npm install --save firebase

```

2. In the .ts file just import whatever you need:

```
import * as firebase from 'firebase/app'
import DocumentReference = firebase.firestore.DocumentReference

```

3. Use DocumentReference:

```
posts.forEach((doc: DocumentReference) => {
   doc.ref.delete()
})

```
using typescript, this works:

`import * as firebase from "firebase"`

then do
`firebase.firestore().DocumentReference`