Skip to content
Merged
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
1 change: 1 addition & 0 deletions types/googlepay/googlepay-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ const shippingAddressParametersEmptyObjectIsValid: google.payments.api.ShippingA
const getGooglePaymentsClient = (env?: google.payments.api.Environment) => {
return new google.payments.api.PaymentsClient({
environment: env,
nonce: "abc123def456",
paymentDataCallbacks: {
onPaymentAuthorized: (paymentData) => ({ transactionState: "SUCCESS" }),
onPaymentDataChanged: (paymentData) => {
Expand Down
6 changes: 6 additions & 0 deletions types/googlepay/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2170,6 +2170,12 @@ declare namespace google.payments.api {
* This object declares the callbacks used for Dynamic Price Updates.
*/
paymentDataCallbacks?: PaymentDataCallbacks | undefined;

/**
* Optional Content Security Policy (CSP) nonce to apply to all dynamically
* injected styles and scripts.
*/
nonce?: string;
}

/**
Expand Down
3 changes: 3 additions & 0 deletions types/pg/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export interface ClientConfig {
stream?: () => stream.Duplex | undefined;
statement_timeout?: false | number | undefined;
ssl?: boolean | ConnectionOptions | undefined;
sslnegotiation?: "postgres" | "direct" | undefined;
query_timeout?: number | undefined;
lock_timeout?: number | undefined;
keepAliveInitialDelayMillis?: number | undefined;
Expand All @@ -30,6 +31,7 @@ export interface ClientConfig {
types?: CustomTypesConfig | undefined;
options?: string | undefined;
client_encoding?: string | undefined;
pipeline?: boolean | undefined;
}

export type ConnectionConfig = ClientConfig;
Expand Down Expand Up @@ -302,6 +304,7 @@ export class Client extends ClientBase {
host: string;
password?: string | undefined;
ssl: boolean;
readonly pipeline: boolean;
readonly connection: Connection;

constructor(config?: string | ClientConfig);
Expand Down
2 changes: 1 addition & 1 deletion types/pg/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@types/pg",
"version": "8.21.9999",
"version": "8.23.9999",
"projects": [
"https://github.com/brianc/node-postgres"
],
Expand Down
11 changes: 10 additions & 1 deletion types/pg/pg-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,14 @@ const client = new Client({
password: "secretpassword!!",
application_name: "DefinitelyTyped",
keepAlive: true,
});
ssl: true,
sslnegotiation: "direct",
pipeline: true,
});
// $ExpectType boolean
client.pipeline;
// @ts-expect-error – pipeline is readonly
client.pipeline = false;
client.setTypeParser(20, val => Number(val));
client.getTypeParser(20);

Expand Down Expand Up @@ -244,6 +251,8 @@ const poolParameterlessCtor = new Pool();

const poolOne = new Pool({
connectionString: "postgresql://dbuser:secretpassword@database.server.com:3211/mydb",
sslnegotiation: "postgres",
pipeline: true,
});

class MyClient extends Client {
Expand Down