Skip to content

Commit 1ef8d34

Browse files
committed
Remove import *
1 parent 57df9d9 commit 1ef8d34

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/dynamodb-store.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as session from 'express-session';
1+
import { Store, SessionData } from 'express-session';
22
import {
33
DynamoDBClient,
44
CreateTableCommandInput,
@@ -170,7 +170,7 @@ export interface DynamoDBStoreOptions {
170170
* - $50 / month for writes
171171
* - $134 / month total
172172
*/
173-
export class DynamoDBStore extends session.Store {
173+
export class DynamoDBStore extends Store {
174174
private _dynamoDBClient: DynamoDBClient;
175175
private _ddbDocClient: DynamoDBDocument;
176176
private _createTableOptions?: Partial<CreateTableCommandInput>;
@@ -387,7 +387,7 @@ export class DynamoDBStore extends session.Store {
387387
* @param session Session data
388388
* @returns void
389389
*/
390-
callback: (err: unknown, session?: session.SessionData | null) => void,
390+
callback: (err: unknown, session?: SessionData | null) => void,
391391
): void {
392392
void (async () => {
393393
try {
@@ -445,7 +445,7 @@ export class DynamoDBStore extends session.Store {
445445
* @see {@link https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/howitworks-ttl.html}
446446
* @see {@link https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/time-to-live-ttl-how-to.html}
447447
*/
448-
session: session.SessionData,
448+
session: SessionData,
449449
/**
450450
* Callback to return an error if the session was not saved
451451
* @param err Error
@@ -499,7 +499,7 @@ export class DynamoDBStore extends session.Store {
499499
/**
500500
* Session data
501501
*/
502-
session: session.SessionData & { lastModified?: string },
502+
session: SessionData & { lastModified?: string },
503503
/**
504504
* Callback to return an error if the session TTL was not updated
505505
*/
@@ -595,15 +595,15 @@ export class DynamoDBStore extends session.Store {
595595
})();
596596
}
597597

598-
private newExpireSecondsSinceEpochUTC(sess: session.SessionData): number {
598+
private newExpireSecondsSinceEpochUTC(sess: SessionData): number {
599599
const expires =
600600
typeof sess.cookie.maxAge === 'number'
601601
? +new Date() + sess.cookie.maxAge
602602
: +new Date() + 60 * 60 * 24 * 1000;
603603
return Math.floor(expires / 1000);
604604
}
605605

606-
private getTTLSeconds(sess: session.SessionData) {
606+
private getTTLSeconds(sess: SessionData) {
607607
return sess && sess.cookie && sess.cookie.expires
608608
? Math.ceil((Number(new Date(sess.cookie.expires)) - Date.now()) / 1000)
609609
: this._touchAfter;

0 commit comments

Comments
 (0)