How can I setting Dynamic Serialport parameters? NodeJS

I’m using Node.js serialport for electron in raspberrypi4
https://serialport.io/docs/
but I can’t setting Dynamic parameters for serialport

Here is my code

var portname, baudrate, databits, stopbits, Parity, RTSCTS;
var portOpen = false;

const port = new serialport('COM4', {
    baudRate: baudrate,
    dataBits: databits,
    stopBits: stopbits,
    parity: Parity,
    rtscts: RTSCTS,
    autoOpen: false,
})

This code is error in electron “TypeError: “baudRate” must be a number: undefined at new SerialPort”

Baudrate is using port.update() for dynamic parameter,
but other things is not available.
Please help me