diff --git a/web3.js/module.d.ts b/web3.js/module.d.ts index 1ea36ca15d..4f137e5e9a 100644 --- a/web3.js/module.d.ts +++ b/web3.js/module.d.ts @@ -42,12 +42,12 @@ declare module '@solana/web3.js' { }; export type SendOptions = { - skipPreflight: boolean; + skipPreflight?: boolean; }; export type ConfirmOptions = { - confirmations: number; - skipPreflight: boolean; + confirmations?: number; + skipPreflight?: boolean; }; export type RpcResponseAndContext = { diff --git a/web3.js/module.flow.js b/web3.js/module.flow.js index f7f751eea7..6ee001fb79 100644 --- a/web3.js/module.flow.js +++ b/web3.js/module.flow.js @@ -55,12 +55,12 @@ declare module '@solana/web3.js' { }; declare export type SendOptions = { - skipPreflight: boolean, + skipPreflight: ?boolean, }; declare export type ConfirmOptions = { - confirmations: number, - skipPreflight: boolean, + confirmations: ?number, + skipPreflight: ?boolean, }; declare export type RpcResponseAndContext = { diff --git a/web3.js/src/connection.js b/web3.js/src/connection.js index 474aa43a2c..e9e9262dc9 100644 --- a/web3.js/src/connection.js +++ b/web3.js/src/connection.js @@ -38,22 +38,22 @@ type Context = { * Options for sending transactions * * @typedef {Object} SendOptions - * @property {boolean} skipPreflight disable transaction verification step + * @property {boolean | undefined} skipPreflight disable transaction verification step */ export type SendOptions = { - skipPreflight: boolean, + skipPreflight: ?boolean, }; /** * Options for confirming transactions * * @typedef {Object} ConfirmOptions - * @property {boolean} skipPreflight disable transaction verification step - * @property {number} confirmations desired number of cluster confirmations + * @property {boolean | undefined} skipPreflight disable transaction verification step + * @property {number | undefined} confirmations desired number of cluster confirmations */ export type ConfirmOptions = { - confirmations: number, - skipPreflight: boolean, + skipPreflight: ?boolean, + confirmations: ?number, }; /**