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

[@types/jsdom] Make contentType less restrictive #69520

Merged
merged 3 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion types/jsdom/base.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ declare module "jsdom" {
* contentType affects the value read from document.contentType, and how the document is parsed: as HTML or as XML.
* Values that are not "text/html" or an XML mime type will throw. It defaults to "text/html".
*/
contentType?: SupportedContentTypes | undefined;
contentType?: string | undefined;

/**
* The maximum size in code units for the separate storage areas used by localStorage and sessionStorage.
Expand Down
2 changes: 0 additions & 2 deletions types/jsdom/test/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,4 @@ function test_supported_contenttypes() {
new JSDOM("", { contentType: "text/xml" });
new JSDOM("", { contentType: "text/html" });
new JSDOM("", { contentType: "image/svg+xml" });
// @ts-expect-error Only the supported types are possible
new JSDOM("", { contentType: "somethingelse" });
}