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.

Need to update types

See original GitHub issue

fileOpen() and fileSave() now either take an options object, or an array of options objects. The types need to reflect this new change.

// New as of v0.20.0
fileOpen([
    {
      description: 'Image files',
      mimeTypes: ['image/jpg', 'image/png', 'image/gif', 'image/webp'],
      extensions: ['.jpg', '.jpeg', '.png', '.gif', '.webp'],
      multiple: true,
    },
    {
      description: 'Text files',
      mimeTypes: ['text/*'],
      extensions: ['.txt'],
    },
]);

or

// Previous behavior
fileOpen({
  description: 'Image files',
  mimeTypes: ['image/jpg', 'image/png', 'image/gif', 'image/webp'],
  extensions: ['.jpg', '.jpeg', '.png', '.gif', '.webp'],
  multiple: true,
});

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
tomayaccommented, Aug 9, 2021

Just wanted to thank you again for the great work. Really makes for an awesome developer experience, even for non-TypeScript developers who happen to use a types-aware IDE.

1reaction
jmrogcommented, Aug 6, 2021

Sure, I can take a look!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Install Types for Packages -- newline - Fullstack.io
The biggest repository with type declarations is DefinitelyTyped. It contains type declarations for packages like React, Redux, Mobx, and many ...
Read more >
@types/node - npm
This package contains type definitions for Node.js (https://nodejs.org/). Details. Files were exported from https://github.com/DefinitelyTyped/ ...
Read more >
Updating Typescript Declaration Files from Definitely Typed
The quickest way to correct the types for our project is to extend the existing definitions. Grab the already available definitions from ...
Read more >
How to manually update a deprecated typings package
As you can see in the CLI options, you can however update the type definition for a specific package with a specific source...
Read more >
7 Types of Updates in the Cloud | CBT Nuggets
1. Hotfix: Fix a Rare or Edge Case Bug Quickly · 2. Patch: Keep Things Updated and Secure · 3. Version Update: New...
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