Types provided don't seem to work
See original GitHub issueWe can’t get our previously working code to work with the new types provided.
import * as sizeof from 'object-sizeof';
results in error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'typeof 'object-sizeof'' has no compatible call signatures.
at compile time, but…
import sizeof from 'object-sizeof';
results in object_sizeof_1.default is not a function
at runtime.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How To Handle a Lack of Support at Work (And Why It's ...
In a supportive work environment, company leaders are often present and accessible to provide tips and listen to the concerns of employees.
Read more >4 types of difficult co-workers and how to deal with ... - CNBC
Everyone wants to work in a friendly and productive environment, but sometimes even one bad co-worker can make getting your job done seem...
Read more >Personality Disorders: Types, Causes, Symptoms & Treatment
People with personality disorders often don't realize their thoughts and behaviors ... including work, relationships and social functioning.
Read more >Hierarchy of Controls | NIOSH - CDC
Controlling exposures to hazards in the workplace is vital to protecting workers. The hierarchy of controls is a way of determining which ...
Read more >Troubleshoot Surface Type Cover or Keyboard
The Keyboard or Type Cover appears to disconnect or stop responding randomly. The Keyboard or Type Cover goes back and forth between working,...
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 Free
Top 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
I’ve gotten it to work, but had to make a couple of changes. I’m not sure if there’s an easier/better way to do this.
I changed the types declaration to
Note
export =
instead ofdefault
.But then my import has to be changed to the TS-only:
import sizeof = require('object-sizeof');
Maybe this is the only way to do it? I don’t know enough about TypeScript to be sure.
Does not work with the same ts(2349) error: