When I build my application I get. error TS2339: Property \'split\' does not exist on type \'string | string[]\'. Property \'split\' does not exist on type \'string[
error TS2339: Property \'split\' does not exist on type \'string | string[]\'. Property \'split\' does not exist on type \'string[
Brian Ball's solution is working, another approach for handling this situation is square brackets [ ].
For instance
req.headers.authorization[split](//define your conditions here)
For exmaple:
req.headers.authorization[split](",")