question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Types exported from playwright-core, but not playwright

See original GitHub issue
// this works
import { ElementHandle } from "playwright-core";
// this does not
import { ElementHandle } from "playwright";

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
dgozmancommented, Jan 24, 2020

Thanks @jperl! Collecting typing issues around specific methods is great, and any PRs are welcome. However, we plan to work on types soonish (probably hand-written .d.ts file), so general improvements like re-exporting types between packages will be probably lost during transition.

1reaction
dgozmancommented, Jan 24, 2020

@dgozman Out of curiosity, what is the benefit of hand writing declaration files instead of exporting types directly from packages?

We can have different defaults externally vs internally (e.g. ElementHandle wrapping HTMLElement by default), have short documentation attached to be shown in IDEs, and not pollute types with internal methods starting with underscore.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced: configuration | Playwright - CukeTest
It must export a single function. globalTeardown: string - Path to the global teardown file. This file will be required and run after...
Read more >
How To Run End-to-End Tests Using Playwright and Docker
In this tutorial, you will set up an environment to use Playwright with Typescript for end-to-end testing, write and execute the tests, export...
Read more >
React + Typescript + Playwright , Module Not found
I am using React, Typescript and I want to create a web scraper using Playwright. My code is: const playwright = require('playwright'); ...
Read more >
playwright-elements - npm
Playwright elements helps you to create reusable components and allows lazy initialization. ... IMPORTANT: playwright elements is not standalone ...
Read more >
fix(playwright-test): have the proper default export (#7328)
Also, typescript types import from `.d.ts` file was broken because we had no default export (`export *` syntax does not export default). pull/7331/head....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found