Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing interface definition for Highlight API #58051

Closed
Momomash opened this issue Apr 3, 2024 · 1 comment
Closed

Missing interface definition for Highlight API #58051

Momomash opened this issue Apr 3, 2024 · 1 comment

Comments

@Momomash
Copy link

Momomash commented Apr 3, 2024

🔎 Search Terms

Highlight
Highlight API
CSS custom highlight api

🕗 Version & Regression Information

Version 4.9.5

This happen in the 'Nightly' version as well.

Please keep and fill in the line that best applies:

This is a crash
This changed between versions ______ and _______
X This is the behavior in every version I tried, and I reviewed the FAQ for entries about: Could not find anything relevant.
I was unable to test this on prior versions because _______

⏯ Playground Link

A link to a TypeScript Playground "Share" link which shows this behavior: http://www.typescriptlang.org/play/?ts=Nightly

💻 Code

const hl = new Highlight()

🙁 Actual behavior

Cannot find name 'Highlight'.(2304)

🙂 Expected behavior

Should return a newly created Highlight object.

Constructor
Highlight()

let hl = new Highlight();
console.log(hl) // Highlight {priority: 0, type: 'highlight', size: 0}

Additional information about the issue

There was been a similar issue before — #53003. The issue was closed because the Highlighter API was experimental — #53003 (comment).

But now the Highlighter API is no longer experimental and is supported by many browsers:
https://developer.mozilla.org/en-US/docs/Web/API/CSS_Custom_Highlight_API#browser_compatibility
Снимок экрана 2024-04-03 в 11 16 19

@MartinJohns
Copy link
Contributor

Duplicate of microsoft/TypeScript-DOM-lib-generator#1698.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants