-
Notifications
You must be signed in to change notification settings - Fork 441
ResponseConstructor #1518
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
Comments
The way to extend static part is requested multiple times, I still think the right way to do this is to convert them to class declarations. (Because, well, they are classes.) |
This specific case will be solved once Gecko or WebKit adds the support in https://bugzilla.mozilla.org/show_bug.cgi?id=1758943 or WebKit/WebKit#10593. |
Until microsoft/TypeScript#36813 is supported, declaring them as classes won't work for augmenting
That's true but I want to define my own too using unique symbols. e.g. |
I would like to globally augment the
ResponseConstructor
(e.g. add the missingjson(data, init)
static method, safely add my own using unique symbols, etc.).However I do not see how to do that as
var Response
isn't defined with a named type.TypeScript-DOM-lib-generator/baselines/dom.generated.d.ts
Lines 12436 to 12441 in 48c4695
I suggest extracting the type to an interface, e.g. named
ResponseConstructor
to enable global augmentation of these types.There are likely other types/constructors that could also be given named types too (e.g.
AbortController
, etc.).The text was updated successfully, but these errors were encountered: