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 file has a bug

See original GitHub issue

Sorry I can’t really help fix it, as I’m not yet very good at typescript. But updating to 0.5.2 from 0.5.1 introduced this error at compile time:

[ ERROR ]  TypeScript: ./node_modules/dialog-polyfill/index.d.ts:17:16
           Cannot find name 'DialogPolyfill'. Did you mean 'dialogPolyfill'?

     L16:   */
     L17:  export default DialogPolyfill;

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
qurbencommented, Nov 6, 2020

In the latest version the value exported from dialog-polyfill is a TypeScript interface, this should be a const.

This is a possible fix for the esm part of index.d.ts, I am not sure if it might break something else.

/**
 * If used as ESM, then we export a const of type "DialogPolyfillType" as the default type.
 */
declare const dialogPolyfill: DialogPolyfillType
export default dialogPolyfill;
1reaction
CamJNcommented, Nov 5, 2020

@yukulele that code is fine, the issue is with how the typescript types are provided by the module, which is what causes the issue in typescript (and not javascript). I was just trying to explain to you why your suggested fix wouldn’t work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Open .BUG File (Bugs and Problems file) - File Extension
A file with an extension of .BUG is known as a Bugs and Problems file. These .BUG files can be opened on Windows...
Read more >
Bug Ransomware - Decryption, removal, and lost files ... - PCrisk
Bug ransomware was discovered by Jirehlov. Software of this type usually encrypts files, appends an extension to the filenames and creates and/ ...
Read more >
[BUG] Extension required when importing other files with type ...
Describe the bug. I am using type="module" in my package.json, and running with PW_EXPERIMENTAL_TS_ESM=1 . I found that when I attempt to ...
Read more >
Software bug - Wikipedia
A software bug is an error, flaw or fault in the design, development, or operation of computer software that causes it to produce...
Read more >
Types of Viruses | Wi-Fi & Security
Explanation for different types of viruses, including: adware, boot, bug, direct action, directory, file infector, and others.
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