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.

Typescript definitions in NPM are outdated

See original GitHub issue

Description

It seems typescript definitions in NPM are outdated.

Run npm install mathlive@0.59.0

in node_modules/mathlive/dist/public/mathlive.d.ts file the definition is like this:

export declare function makeMathField(element: HTMLElement | string, options: MathfieldOptions): Mathfield;

It should be generated like so though:

export declare function makeMathField(element: HTMLElement | string, options?: Partial<MathfieldOptions>): Mathfield;

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
arnogcommented, Mar 7, 2021

In general, MathLive supports the last two major versions of evergreen browsers. Unfortunately, supporting older browsers is not something within the reach of an unfunded open source project.

If your project require supporting older devices, you are more than welcome to keep using older versions of MathLive.

The benefits of web components were covered in #665:

  • easier integration with UI libraries and frameworks, including reactive libraries
  • encapsulation of the DOM elements and stylesheets used by the mathfield: as a web component implemented behind a shadow DOM, the DOM elements and styles of the component are invisible to the DOM outside of the element, and vice-versa, protecting from unwanted interaction between them
  • simpler programming model built on top of standard DOM elements conventions, for example using 'content-did-change' events instead of onContentDidChange callbacks, or calling methods directly on the element, i.e. getElementById('mf').$latex('f(x) = x + 1')
  • declarative syntax to configure a mathfield, for example: <math-field virtual-keyboard-mode="manual"></math-field>, while still supporting a programmatic way to create elements (i.e. new MathfieldElement({virtualKeyboardMode: "manual"}))
  • proper handling of focusing, including properly respecting tabindex attribute (see #544)
0reactions
arnogcommented, Apr 13, 2021

Fixed in mathlive@0.60.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm-outdated
Description. This command will check the registry to see if any (or, specific) installed packages are currently outdated.
Read more >
Serverless service file Typescript definitions will never be ...
Serverless service file Typescript definitions will never be outdated again! Since v1. 72.0, the Serverless framework accepts serverless. ts as ...
Read more >
Run npm outdated to check old packages - DEV Community ‍ ‍
Here is the tip: run npm outdated from the terminal in your project folder to see if the installed packages are outdated. npm...
Read more >
How to know that typescript type definitions in @types match ...
I have been using typescript for a little while in node.js projects. I understand that for many npm packages there is separate @types...
Read more >
5 things to know when writing a TypeScript NPM module
(Outdated) tips on building a npm module from scratch ... for import from nodejs environments "typings": "definitions/index", // TypeScript ...
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