Skip to content

Commit dadd327

Browse files
cooktthomas-cook
andauthored
🤖 Merge PR DefinitelyTyped#57966 fix: add support for ts3.9 by @cookt
* fix: add support for ts3.9 * Changed string[] to [string, string] to better match matchHost signature * Removed ts3.9 and removed tuple labels in main type declarations Co-authored-by: Thomas Cook <[email protected]>
1 parent 41c9ff2 commit dadd327

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

types/aws4/aws4-tests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import aws4 = require("aws4");
2323
// $ExpectType RequestSigner
2424
const requestSigner = new aws4.RequestSigner({});
2525

26-
// $ExpectType [service: string, region: string]
26+
// $ExpectType [string, string]
2727
requestSigner.matchHost("");
2828
// $ExpectType boolean
2929
requestSigner.isSingleRegion();

types/aws4/index.d.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Definitions by: Andrew Crites <https://github.com/ajcrites>
44
// Alexandre Szymocha <https://github.com/Aksamyt>
55
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
6-
// Minimum TypeScript Version: 4.0
6+
// Minimum TypeScript Version: 3.9
77

88
/// <reference types="node" />
99

@@ -91,8 +91,9 @@ export class RequestSigner {
9191

9292
/**
9393
* Extract the service code and region code from a Host name.
94+
* @returns two element string tuple with values [service, region].
9495
*/
95-
matchHost(host: string): [service: string, region: string];
96+
matchHost(host: string): [string, string];
9697

9798
/**
9899
* https://docs.aws.amazon.com/general/latest/gr/rande.html

0 commit comments

Comments
 (0)