diff --git a/lib/utils.js b/lib/utils.js index 374f811..7f4e2dd 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -99,6 +99,12 @@ const typify = (type) => { return 'string' case 'touchbaritem': return '(TouchBarButton | TouchBarColorPicker | TouchBarGroup | TouchBarLabel | TouchBarPopover | TouchBarScrubber | TouchBarSegmentedControl | TouchBarSlider | TouchBarSpacer | null)' + case 'readablestream': + // See StreamProtocolResponse.data which accepts a Node.js readable stream. + // The ReadableStream type unfortunately conflicts with the ReadableStream interface + // defined in the Streams standard (https://streams.spec.whatwg.org/#rs-class) so + // we'll have to qualify it with the Node.js namespace. + return 'NodeJS.ReadableStream' } // if (type.substr(0, 8) === 'TouchBar' && type !== 'TouchBar') { // return `Electron.${type}`