Skip to content

Commit 9cc75bf

Browse files
committed
refactor: prefer Record built-in over object maps
1 parent c86916f commit 9cc75bf

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

index.d.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ declare namespace OAuth2Server {
5151
*/
5252
class Request {
5353
body?: any;
54-
headers?: { [key: string]: string; };
54+
headers?: Record<string, string>;
5555
method?: string;
56-
query?: { [key: string]: string; };
56+
query?: Record<string, string>;
5757

5858
/**
5959
* Instantiates Request using the supplied options.
6060
*
6161
*/
62-
constructor(options?: { [key: string]: any } | http.IncomingMessage);
62+
constructor(options?: Record<string, any> | http.IncomingMessage);
6363

6464
/**
6565
* Returns the specified HTTP header field. The match is case-insensitive.
@@ -79,14 +79,14 @@ declare namespace OAuth2Server {
7979
*/
8080
class Response {
8181
body?: any;
82-
headers?: { [key: string]: string; };
82+
headers?: Record<string, string>;
8383
status?: number;
8484

8585
/**
8686
* Instantiates Response using the supplied options.
8787
*
8888
*/
89-
constructor(options?: { [key: string]: any; } | http.ServerResponse);
89+
constructor(options?: Record<string, any> | http.ServerResponse);
9090

9191
/**
9292
* Returns the specified HTTP header field. The match is case-insensitive.
@@ -232,7 +232,7 @@ declare namespace OAuth2Server {
232232
/**
233233
* Additional supported grant types.
234234
*/
235-
extendedGrantTypes?: { [key: string]: typeof AbstractGrantType };
235+
extendedGrantTypes?: Record<string, typeof AbstractGrantType>;
236236
}
237237

238238
/**

0 commit comments

Comments
 (0)