I made search in SPFx by files and folders, now i need to display only files or only folders.
My code example:

```
 const _results: ISearchResult[] = [];
    return new Promise<ISearchResult[]>((resolve, reject) => {
        pnp.sp.search({
            Querytext: query,
            RowLimit: 20,
            StartRow: 0
        })
            .then((results) => {
                results.PrimarySearchResults.forEach((result) => {
                    _results.push({
                        title: result.Title,
                        description: result.HitHighlightedSummary,
                        link: result.Path,
                        author: result.Author
                    });
                });
            })
            .then(
                () => { resolve(_results); }
            )
            .catch(
                () => { reject(new Error("Error")); }
            );
    });

```