Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is PrecacheEntry interface not exported? #2952

Closed
RandomEngy opened this issue Oct 4, 2021 · 2 comments · Fixed by #2955
Closed

Why is PrecacheEntry interface not exported? #2952

RandomEngy opened this issue Oct 4, 2021 · 2 comments · Fixed by #2955
Labels
Feature Request TypeScript Issues related to our TypeScript annotations.

Comments

@RandomEngy
Copy link

Library Affected:
workbox-precaching

Browser & Platform:
all browsers

Issue or Feature Request Description:
The "precache" function takes this type as a parameter: entries: Array<PrecacheEntry | string>. However the PrecacheEntry interface doesn't seem to be exported from the workbox-precaching package.

When I try to run

import { PrecacheEntry } from "workbox-precaching";

It tells me:

Module '"workbox-precaching"' has no exported member 'PrecacheEntry'.

@jeffposnick
Copy link
Contributor

Sorry about that—similar to #2770, I think we need to re-export our interfaces from https://github.com/GoogleChrome/workbox/blob/v6/packages/workbox-precaching/src/_types.ts

@jeffposnick jeffposnick added Feature Request TypeScript Issues related to our TypeScript annotations. labels Oct 6, 2021
@RandomEngy
Copy link
Author

RandomEngy commented Oct 6, 2021

Same for NetworkFirstOptions in workbox-strategies . Might be worth it to just go over all the interfaces that are on exported functions.

(edit) It's available when importing from "workbox-strategies/NetworkFirst" but not when importing from "workbox-strategies"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request TypeScript Issues related to our TypeScript annotations.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants