Note: This feature is available in Web Workers.
The terminate() method of the TransformStreamDefaultController interface closes the readable side and errors the writable side of the stream.
terminate()None.
None (undefined).
In the below example the terminate() method is called on a TransformStreamDefaultController.
controller.terminate();