Skip to content

Commit

Permalink
refactor: prefer Record built-in over object maps
Browse files Browse the repository at this point in the history
  • Loading branch information
dhensby committed Jul 28, 2024
1 parent dbb1cab commit 631cf6e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ declare namespace OAuth2Server {
*/
class Request {
body?: any;
headers?: { [key: string]: string; };
headers?: Record<string, string>;
method?: string;
query?: { [key: string]: string; };
query?: Record<string, string>;

/**
* Instantiates Request using the supplied options.
*
*/
constructor(options?: { [key: string]: any } | http.IncomingMessage);
constructor(options?: Record<string, any> | http.IncomingMessage);

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

/**
* Instantiates Response using the supplied options.
*
*/
constructor(options?: { [key: string]: any; } | http.ServerResponse);
constructor(options?: Record<string, any> | http.ServerResponse);

/**
* Returns the specified HTTP header field. The match is case-insensitive.
Expand Down Expand Up @@ -232,7 +232,7 @@ declare namespace OAuth2Server {
/**
* Additional supported grant types.
*/
extendedGrantTypes?: { [key: string]: typeof AbstractGrantType };
extendedGrantTypes?: Record<string, typeof AbstractGrantType>;
}

/**
Expand Down

0 comments on commit 631cf6e

Please sign in to comment.