TypeScript doesn't ship with type declarations for the experimental Navigator.userAgentData property by default.
You could install e.g. this package which claims to add the types or just look at its implementation to see how to write the declarations yourself.
You need to install types for Navigator.userAgentData
Install user agent types from npm:
npm i -D user-agent-data-types
In the tsconfig.json add:
{
"compilerOptions": {
...
"types": [
"./node_modules/user-agent-data-types"
]
},
}
Now you should be able to see userAgentData property on navigator object.