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.

Bad type definitions

See original GitHub issue
Property 'type' is missing in type '{ data: { labels: string[]; datasets: { label: string; data: number[]; fill: boolean; backgroundColor: string; borderColor: string; }[]; }; options: { scales: { yAxes: { ticks: { beginAtZero: boolean; }; }[]; }; }; }' but required in type 'Props'.

Following example and using a Line component in typescript codebase as such results in error above

<Line data={data} options={options} />

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:6
  • Comments:8

github_iconTop GitHub Comments

4reactions
AshotNcommented, Jul 18, 2021

When is that next release happening?

3reactions
finnmerlettcommented, Sep 11, 2021

@YakovlevCoded FYI this is still not working for me. The fix is actually changing

import Chart from 'chart.js/auto';

to this

import * as Chart from 'chart.js/auto';

This is needed because the types referenced in this package as Chart.XXX are actually exported as interfaces directly from the chart.js/auto file, rather than as part of the Chart namespace.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bad Type - @LettError
Identifying bad type is definining criteria for all type. Erik van Blokland, published St. Bride, 2004. Ask people about bad typefaces and you'll...
Read more >
How to overwrite incorrect TypeScript type definition installed ...
Should I just copy the downloaded type definition to another file, update it manually and uninstall @types/dotenv? Is there a better way? (I...
Read more >
Bad type - synonyms for phrase - Synonym.tech
Bad replaced. wrong type. dangerous type. nasty type. poor type. unpleasant type. terrible type. inferior type. harmful type. vicious type. low type.
Read more >
Surviving the TypeScript Ecosystem — Part 4 - Medium
We've told TypeScript there is a module called “lodash” and that it has a function called “fake”. This is wrong of course, but...
Read more >
@types/bad-words - npm
TypeScript definitions for bad-words. Latest version: 3.0.1, last published: a year ago. Start using @types/bad-words in your project by ...
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