Reputation: 81
I have the problem that in my Angular app the error Property 'serial' does not exist on type 'Navigator'. get.
https://stackblitz.com/edit/angular-ivy-kf19n7?file=src/app/app.component.ts
The app works in local mode. To fix this error I have to integrate serial into the Navigator interface.
https://wicg.github.io/serial/
can someone please help me how to do this ?
My attempts unfortunately show errors
interface Navigator extends MSFileSaver,..... {
readonly Serial: serial; }
Thanks :)
EDIT: solved
I Edited the Stackblitz files.
Upvotes: 8
Views: 3181
Reputation: 327
The type information for navigator.serial is available from DefinitelyTyped as dom-serial
npm install --save-dev @types/dom-serial
Upvotes: 8