Skip to content

Commit

Permalink
Add undefined to optional properties, part H (#54355)
Browse files Browse the repository at this point in the history
* Add undefined to optional properties, part H

In preparation for exactOptionalPropertyTypes in Typescript 4.4, add undefined to all optional properties. #no-publishing-comment

This PR covers non-widely used packages starting with h- and following.

microsoft/dtslint#335

* shorten line lengths
  • Loading branch information
sandersn authored Jul 7, 2021
1 parent 3189753 commit 5339593
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
8 changes: 4 additions & 4 deletions types/keyv__mongo/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export = KeyvMongo;

declare class KeyvMongo<TValue> extends EventEmitter implements Store<TValue> {
readonly ttlSupport: false;
namespace?: string;
namespace?: string | undefined;

constructor(uri?: string);
constructor(options?: KeyvMongo.Options); // tslint:disable-line:unified-signatures
Expand All @@ -26,8 +26,8 @@ declare class KeyvMongo<TValue> extends EventEmitter implements Store<TValue> {

declare namespace KeyvMongo {
interface Options {
uri?: string;
url?: string;
collection?: string;
uri?: string | undefined;
url?: string | undefined;
collection?: string | undefined;
}
}
8 changes: 4 additions & 4 deletions types/keyv__mysql/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export = KeyvMysql;

declare class KeyvMysql extends EventEmitter implements Store<string | undefined> {
readonly ttlSupport: false;
namespace?: string;
namespace?: string | undefined;

constructor(uri?: string);
constructor(options?: KeyvMysql.Options); // tslint:disable-line:unified-signatures
Expand All @@ -26,8 +26,8 @@ declare class KeyvMysql extends EventEmitter implements Store<string | undefined

declare namespace KeyvMysql {
interface Options {
uri?: string;
table?: string;
keySize?: number;
uri?: string | undefined;
table?: string | undefined;
keySize?: number | undefined;
}
}
8 changes: 4 additions & 4 deletions types/keyv__postgres/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export = KeyvPostgres;

declare class KeyvPostgres extends EventEmitter implements Store<string | undefined> {
readonly ttlSupport: false;
namespace?: string;
namespace?: string | undefined;

constructor(options?: KeyvPostgres.Options);

Expand All @@ -25,8 +25,8 @@ declare class KeyvPostgres extends EventEmitter implements Store<string | undefi

declare namespace KeyvPostgres {
interface Options {
uri?: string;
table?: string;
keySize?: number;
uri?: string | undefined;
table?: string | undefined;
keySize?: number | undefined;
}
}
4 changes: 2 additions & 2 deletions types/keyv__redis/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export = KeyvRedis;

declare class KeyvRedis extends EventEmitter implements Store<string | undefined> {
readonly ttlSupport: true;
namespace?: string;
namespace?: string | undefined;

constructor(options?: KeyvRedis.Options);
constructor(uri: string, options?: KeyvRedis.Options);
Expand All @@ -27,6 +27,6 @@ declare class KeyvRedis extends EventEmitter implements Store<string | undefined

declare namespace KeyvRedis {
interface Options extends ClientOpts {
uri?: string;
uri?: string | undefined;
}
}
10 changes: 5 additions & 5 deletions types/keyv__sqlite/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export = KeyvSqlite;

declare class KeyvSqlite extends EventEmitter implements Store<string | undefined> {
readonly ttlSupport: false;
namespace?: string;
namespace?: string | undefined;

constructor(options?: KeyvSqlite.Options);

Expand All @@ -25,9 +25,9 @@ declare class KeyvSqlite extends EventEmitter implements Store<string | undefine

declare namespace KeyvSqlite {
interface Options {
uri?: string;
busyTimeout?: number;
table?: string;
keySize?: number;
uri?: string | undefined;
busyTimeout?: number | undefined;
table?: string | undefined;
keySize?: number | undefined;
}
}

0 comments on commit 5339593

Please sign in to comment.