Skip to content

Export type is required with --isolatedModules #29

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion client/create_headers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ const ALGORITHM: string = "AWS4-HMAC-SHA256";
const CONTENT_TYPE: string = "application/x-amz-json-1.0";

/** Required configuration for assembling headers. */
export interface HeadersConfig extends ClientConfig {
interface HeadersConfig extends ClientConfig {
host: string; // dynamodb.us-west-2.amazonaws.com
method: string; // POST
cache: Doc; // internal cache for expensive-2-make signing key (& credScope)
date?: Date; // allows reusing a date for 5min (max signature timestamp diff)
}

export type { HeadersConfig };

/** Assembles a header object for a DynamoDB request. */
export async function createHeaders(
op: string,
Expand Down
4 changes: 3 additions & 1 deletion util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ const ANY_BUT_DIGITS: RegExp = /[^\d]/g;
const ANY_BUT_DIGITS_T: RegExp = /[^\dT]/g;

/** Generic document. */
export interface Doc {
interface Doc {
[key: string]: any;
}

export type { Doc };

/** noop. */
export function noop(..._: any[]): void {}

Expand Down