-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Description
Some types are currently defined using class
but, from what I can tell, TypeScript classes cannot be globally augmented (see How can I augment a globally declared class?).
e.g.
deno/ext/fetch/lib.deno_fetch.d.ts
Line 413 in 215528f
declare class Response implements Body { |
I'd like to see Headers
, Request
, Response
and any other applicable types follow the same pattern as many built-in type definitions:
interface {{Type}} { … }
interface {{Type}}Constructor { … }
var {{Type}}: {{Type}}Constructor;
e.g.
interface Map { … }
interface MapConstructor { … }
var Map: MapConstructor;
This will allow declaration merging for adding missing types or even defining custom ones.
Metadata
Metadata
Assignees
Labels
No labels