getTypes interface error
See original GitHub issueThe lookup()
function has been changed to getType()
. I believe the interface is out of date.
My code:
import mime from 'mime'; // mime: "^2.5.2"
const ContentType = mime.getType(originalPath);
Typescript error:
Property 'getType' does not exist on type 'typeof import("....../node_modules/@types/mime/index")'.
Lookup type:
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Error handling with "Getting all types that implement an ...
Data assemblies in GAC? 1 · Type.GetType not finding a type by name · 4 · Finding objects that implement interface from loaded...
Read more >Assembly.GetTypes() does not return types that implement ...
Coding example for the question Assembly.GetTypes() does not return types that implement an interface defined elsewhere-C#.
Read more >DOMError (Java Platform SE 7 )
DOMError is an interface that describes an error. ... getType. String getType(). A DOMString indicating which related data is expected in relatedData ....
Read more >Assembly.GetTypes Method (System.Reflection)
Represents type declarations for class types, interface types, array types, value types, enumeration types, type parameters, generic type definitions, and open ...
Read more >generalizer
func (GsonGeneralizer) Generalize(obj interface{}) (interface{}, error); func (GsonGeneralizer) GetType(obj interface{}) (typ string, err error) ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve got the same issue After installing @types/mime it started to work as the expected
// mime: “^2.5.2”
import { getType } from 'mime';
const ContentType = getType(originalPath);
it didn’t work