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

[7.0.4] Can't import type Viewport #6876

Closed
uyamazak opened this issue Feb 12, 2021 · 1 comment · Fixed by #6881
Closed

[7.0.4] Can't import type Viewport #6876

uyamazak opened this issue Feb 12, 2021 · 1 comment · Fixed by #6881

Comments

@uyamazak
Copy link

uyamazak commented Feb 12, 2021

Steps to reproduce

Tell us about your environment:

  • Puppeteer version: 7.0.4
  • Platform / OS version: Mac OS 11.1
  • Node.js version: v14.14.0
  • TypeScript version: 4.1.5

What steps will reproduce the problem?

import { Viewport } from 'puppeteer'
// Module '"../../node_modules/puppeteer/lib/types"' has no exported member 'Viewport'.ts(2305)

What is the expected result?
import this type without any error

What happens instead?

I neeedd this type.

https://github.com/puppeteer/puppeteer/blob/main/src/common/PuppeteerViewport.ts

but it seems not to be exported in node_modules/puppeteer/lib/types.d.ts:24210

declare interface Viewport {
    width: number;
    height: number;
    deviceScaleFactor?: number;
    isMobile?: boolean;
    isLandscape?: boolean;
    hasTouch?: boolean;
}

see also
#6873
#6816
#6820
#6829

@jackfranklin
Copy link
Collaborator

Thanks. #6881 will resolve this so marking this as closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants