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.

Improve on TypeScript definitions to relfect support for multiple data types

See original GitHub issue

Can’t one create a matrix of custom elements, e.g. objects, like {type:'something'}? I noticed that only numbers are supported

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
josdejongcommented, Jun 6, 2020

Thanks Jason for picking this up! Maybe it’s possible to define a MathScalar type, which is all types like number and Unit, except matrix types?

1reaction
ghostcommented, Apr 26, 2020

I’ve raised a new issue and hours later find this one (didn’t searched the correct key words).

I suggest to modify the @types/mathjs/index.d.ts on line 24

type MathArray = Number[] | Number[][];

to

type MathArray = MathType[] | MathType[][];

I’ve also noticed another potential typo on line 2974:

valueOff(): MathArray | Matrix;

should be

valueOf(): MathArray | Matrix;
Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation - Everyday Types - TypeScript
In this chapter, we'll cover some of the most common types of values you'll find in JavaScript code, and explain the corresponding ways...
Read more >
Improving Workers TypeScript support: accuracy, ergonomics ...
Today, we're excited to announce the next major release of Workers TypeScript definitions with a bunch of improvements, ...
Read more >
How To Create Custom Types in TypeScript - DigitalOcean
This section will go through two ways that you can compose types together. These will use the union operator to pass any data...
Read more >
Understanding and using interfaces in TypeScript
​​TypeScript has taken the JavaScript world by storm, allowing teams to work smarter by adding robust typing features. These typing features ...
Read more >
The repository for high quality TypeScript type definitions.
See more in the handbook. For an npm package "foo", typings for it will be at "@types/foo". If you can't find your package ......
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