urlpattern-polyfill icon indicating copy to clipboard operation
urlpattern-polyfill copied to clipboard

Type 'URLPattern' has no construct signatures.

Open MellKam opened this issue 2 years ago • 1 comments

import { URLPattern } from "urlpattern-polyfill";

new URLPattern(); // Type 'URLPattern' has no construct signatures.

Codesandbox reproduction - https://codesandbox.io/p/sandbox/still-water-s2t9pg

Current type: https://github.com/kenchris/urlpattern-polyfill/blob/d02a0f4fdb056f59e103eee3d0d4f6d0f2df6840/src/index.d.ts#L10

// I think we can change it to class declaration (it works for me)
export declare class URLPattern extends Types.URLPattern {}

MellKam avatar Apr 08 '23 10:04 MellKam

I just noticed this pull request https://github.com/kenchris/urlpattern-polyfill/pull/111. I hope you will merge this soon.

MellKam avatar Apr 08 '23 11:04 MellKam