TypeScript-DOM-lib-generator
TypeScript-DOM-lib-generator copied to clipboard
TypeScript 4.4 libdom changes
Beta
With TypeScript 4.4, we coordinated some pretty fundamental infrastructure work to prepare for the version of dom.d.ts with the future of the generator repo. This work resulted in two note-worthy items:
-
The
dom.d.tsfiles typically accessed inside TypeScript are now also deployed to@types/webstarting with version0.0.1which corresponds to the version oflibdom.d.tsin TypeScript 4.3. This means an update to TypeScript 4.4 does not mean you have to update all of your web.d.tsfiles.The name change is to more accurately reflect the scope of the APIs, for a long time the file has provided much more APIs than just the DOM and
@types/webreflects that. If you're interested in switching to use@types/web, there are instructions in the npm README. -
The 4.4
dom.d.tsfile which is included with TypeScript includes quite a lot of changes, with a lot of APIs which have been marked as deleted by the web standards committees. You can see the full list in this issueWe've been testing these changes with DefinitelyTyped, and have been individually rolling back changes which we think are a bit too breaking, this is more of an art than a science however. If you think we should rollback a particular change we're open to discussing change in this issue or the
dom-lib-generatorchannel in the TypeScript Community Discord
We plan to have thorough support for replacing lib.dom.d.ts with @types/web in 4.5 with https://github.com/microsoft/TypeScript/issues/44795
High Level Changes from 4.3 to 4.4
dom.d.ts
New interfaces
BlobEventCSSAnimationCSSCounterStyleRuleCSSTransitionClipboardItemFileSystemFileSystemDirectoryEntryFileSystemDirectoryReaderFileSystemEntryFileSystemFileEntryFontFaceFontFaceSetFontFaceSetLoadEventFormDataEventIdleDeadlineMathMLElementMediaCapabilitiesMediaMetadataMediaRecorderMediaRecorderErrorEventMediaSessionNetworkInformationPerformanceEventTimingPerformancePaintTimingPictureInPictureWindowRemotePlaybackSVGMPathElementSVGSetElementSubmitEvent
Removed interfaces
ApplicationCacheBhxBrowserCaretPositionClientRectClientRectListCryptoKeyPairDOMErrorDOMSettableTokenListDataCueDeferredPermissionRequestDeviceAccelerationDeviceRotationRateExtensionScriptApisFocusNavigationEventGamepadPoseHTMLAppletElementHTMLDialogElementHTMLTableDataCellElementHTMLTableHeaderCellElementInputDeviceInfoListeningStateChangedEventMSAssertionMSBlobBuilderMSFIDOCredentialAssertionMSFIDOSignatureMSFIDOSignatureAssertionMSGestureMSGraphicsTrustMSInputMethodContextMSMediaKeyErrorMSMediaKeySessionMSMediaKeysMSStreamMediaStreamErrorMediaStreamErrorEventMediaStreamEventMediaStreamTrackAudioSourceNodeNavigationPreloadManagerNodeFilterOffscreenCanvasOffscreenCanvasRenderingContext2DOverflowEventPerfWidgetExternalPermissionRequestPermissionRequestedEventRTCDtlsTransportStateChangedEventRTCDtmfSenderRTCErrorRTCErrorEventRTCIceCandidatePairChangedEventRTCIceGathererRTCIceGathererEventRTCIceTransportStateChangedEventRTCIdentityAssertionRTCSctpTransportRTCSrtpSdesTransportRTCSsrcConflictEventRTCStatsProviderRandomSourceSVGCursorElementSVGElementInstanceSVGElementInstanceListSVGPathSegSVGPathSegArcAbsSVGPathSegArcRelSVGPathSegClosePathSVGPathSegCurvetoCubicAbsSVGPathSegCurvetoCubicRelSVGPathSegCurvetoCubicSmoothAbsSVGPathSegCurvetoCubicSmoothRelSVGPathSegCurvetoQuadraticAbsSVGPathSegCurvetoQuadraticRelSVGPathSegCurvetoQuadraticSmoothAbsSVGPathSegCurvetoQuadraticSmoothRelSVGPathSegLinetoAbsSVGPathSegLinetoHorizontalAbsSVGPathSegLinetoHorizontalRelSVGPathSegLinetoRelSVGPathSegLinetoVerticalAbsSVGPathSegLinetoVerticalRelSVGPathSegListSVGPathSegMovetoAbsSVGPathSegMovetoRelSVGZoomEventServiceUIFrameContextSpeechGrammarSpeechGrammarListSpeechRecognitionSpeechRecognitionErrorEventSpeechRecognitionEventStyleMediaSyncManagerTextEventVRDisplayVRDisplayCapabilitiesVRDisplayEventVREyeParametersVRFieldOfViewVRFrameDataVRPoseWebKitPointwebkitRTCPeerConnection
Modified
- Animation
- Added:
onremove,replaceState,commitStyles,persist
- Added:
- AudioContext
- Removed:
outputLatency,createMediaStreamTrackSource
- Removed:
- CSSStyleDeclaration
- Added:
appearance,aspectRatio,backgroundBlendMode,borderBlock,borderBlockColor,borderBlockStyle,borderBlockWidth,borderEndEndRadius,borderEndStartRadius,borderInline,borderInlineColor,borderInlineStyle,borderInlineWidth,borderStartEndRadius,borderStartStartRadius,colorScheme,contain,counterSet,fontOpticalSizing,fontVariantAlternates,fontVariationSettings,inset,insetBlock,insetBlockEnd,insetBlockStart,insetInline,insetInlineEnd,insetInlineStart,isolation,marginBlock,marginInline,mixBlendMode,offset,offsetAnchor,offsetDistance,offsetPath,offsetRotate,paddingBlock,paddingInline,scrollMargin,scrollMarginBlock,scrollMarginBlockEnd,scrollMarginBlockStart,scrollMarginBottom,scrollMarginInline,scrollMarginInlineEnd,scrollMarginInlineStart,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollPadding,scrollPaddingBlock,scrollPaddingBlockEnd,scrollPaddingBlockStart,scrollPaddingBottom,scrollPaddingInline,scrollPaddingInlineEnd,scrollPaddingInlineStart,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollSnapAlign,scrollSnapStop,scrollSnapType,shapeImageThreshold,shapeMargin,shapeOutside,textDecorationSkipInk,textDecorationThickness,textUnderlineOffset - Removed:
glyphOrientationVertical,maskComposite,maskImage,maskPosition,maskRepeat,maskSize,rubyAlign,textJustify,webkitTapHighlightColor,webkitTextSizeAdjust,zoom
- Added:
- CanvasRenderingContext2D
- Added:
getContextAttributes
- Added:
- Clipboard
- Added:
read,write
- Added:
- CompositionEvent
- Added:
initCompositionEvent
- Added:
- DataTransferItemList
- Removed:
item
- Removed:
- Document
- Added:
pictureInPictureEnabled,rootElement,exitPictureInPicture,hasStorageAccess,requestStorageAccess - Removed:
caretPositionFromPoint,getAnimations
- Added:
- Element
- Added:
part - Removed:
msGetRegionContent
- Added:
- File
- Added:
webkitRelativePath
- Added:
- Gamepad
- Removed:
hand,pose
- Removed:
- GamepadHapticActuator
- Removed:
pulse
- Removed:
- HTMLCanvasElement
- Added:
captureStream - Removed:
transferControlToOffscreen
- Added:
- HTMLElement
- Added:
outerText
- Added:
- HTMLFormElement
- Added:
requestSubmit
- Added:
- HTMLIFrameElement
- Removed:
allowPaymentRequest
- Removed:
- HTMLInputElement
- Added:
capture,webkitEntries,webkitdirectory
- Added:
- HTMLMarqueeElement
- Removed:
onbounce,onfinish,onstart
- Removed:
- HTMLMediaElement
- Added:
disableRemotePlayback,remote
- Added:
- HTMLOptGroupElement
- Removed:
form
- Removed:
- HTMLVideoElement
- Added:
disablePictureInPicture,onenterpictureinpicture,onleavepictureinpicture,requestPictureInPicture
- Added:
- IDBCursor
- Added:
request
- Added:
- IDBFactory
- Added:
databases
- Added:
- IDBTransaction
- Added:
commit
- Added:
- InputEvent
- Added:
dataTransfer,getTargetRanges
- Added:
- KeyboardEvent
- Added:
initKeyboardEvent - Removed:
char
- Added:
- KeyframeEffect
- Added:
pseudoElement
- Added:
- MediaDevices
- Added:
getDisplayMedia
- Added:
- MediaStreamTrack
- Added:
contentHint
- Added:
- MessageEvent
- Added:
initMessageEvent
- Added:
- Navigator
- Added:
mediaCapabilities,mediaSession - Removed:
activeVRDisplays,msManipulationViewsEnabled,msMaxTouchPoints,msPointerEnabled,getUserMedia,getVRDisplays,msLaunchUri,msSaveBlob,msSaveOrOpenBlob
- Added:
- Node
- Removed:
namespaceURI
- Removed:
- Notification
- Removed:
actions,badge,image,renotify,requireInteraction,silent,timestamp,vibrate
- Removed:
- PaymentRequest
- Removed:
onshippingaddresschange,onshippingoptionchange,shippingAddress,shippingOption,shippingType
- Removed:
- PaymentResponse
- Removed:
onpayerdetailchange,payerEmail,payerName,payerPhone,shippingAddress,shippingOption,addEventListener,removeEventListener
- Removed:
- PerformanceMark
- Added:
detail
- Added:
- PerformanceMeasure
- Added:
detail
- Added:
- PushSubscription
- Removed:
expirationTime
- Removed:
- PushSubscriptionOptions
- Removed:
userVisibleOnly
- Removed:
- RTCDtlsTransport
- Removed:
iceTransport,onerror,getRemoteCertificates
- Removed:
- RTCIceCandidate
- Added:
address
- Added:
- RTCIceTransport
- Removed:
ongatheringstatechange,onselectedcandidatepairchange,onstatechange,role,getLocalCandidates,getLocalParameters,getRemoteCandidates,getRemoteParameters,getSelectedCandidatePair,addEventListener,removeEventListener
- Removed:
- RTCPeerConnection
- Removed:
idpErrorInfo,idpLoginUrl,peerIdentity,sctp,getIdentityAssertion,setIdentityProvider
- Removed:
- RTCRtpTransceiver
- Removed:
setCodecPreferences
- Removed:
- ReadableStream
- Added:
forEach
- Added:
- Request
- Removed:
isHistoryNavigation,isReloadNavigation
- Removed:
- Response
- Removed:
trailer
- Removed:
- SVGAElement
- Added:
rel,relList
- Added:
- SVGAnimationElement
- Added:
beginElement,beginElementAt,endElement,endElementAt
- Added:
- SVGPathElement
- Removed:
pathSegList,getPointAtLength,getTotalLength
- Removed:
- SVGSVGElement
- Removed:
onunload,onzoom,getComputedStyle
- Removed:
- SVGTransformList
- Added:
length
- Added:
- SVGViewElement
- Removed:
viewTarget
- Removed:
- SecurityPolicyViolationEvent
- Added:
disposition,sample
- Added:
- ServiceWorkerRegistration
- Removed:
navigationPreload,sync
- Removed:
- ShadowRoot
- Added:
delegatesFocus
- Added:
- SourceBuffer
- Added:
changeType
- Added:
- StorageEvent
- Added:
initStorageEvent
- Added:
- TextMetrics
- Added:
fontBoundingBoxAscent,fontBoundingBoxDescent
- Added:
- Touch
- Removed:
altitudeAngle,azimuthAngle,touchType
- Removed:
- UIEvent
- Added:
initUIEvent
- Added:
- VideoPlaybackQuality
- Added:
corruptedVideoFrames
- Added:
- Window
- Added:
cancelIdleCallback,requestIdleCallback - Removed:
applicationCache,defaultStatus,doNotTrack,msContentScript,offscreenBuffering,oncompassneedscalibration,ondeviceorientationabsolute,ongamepadconnected,ongamepaddisconnected,onmousewheel,onreadystatechange,onvrdisplayactivate,onvrdisplayblur,onvrdisplayconnect,onvrdisplaydeactivate,onvrdisplaydisconnect,onvrdisplaypresentchange,styleMedia,departFocus,getMatchedCSSRules,msWriteProfilerMark,webkitCancelAnimationFrame,webkitConvertPointFromNodeToPage,webkitConvertPointFromPageToNode,webkitRequestAnimationFrame
- Added:
- WritableStream
- Added:
close
- Added:
Non-value types
- AddEventListenerOptions
- Added:
signal
- Added:
- CanvasRenderingContext2DSettings
- Added:
colorSpace,willReadFrequently
- Added:
- ComputedEffectTiming
- Added:
startTime
- Added:
- EffectTiming
- Added:
playbackRate
- Added:
- InputEventInit
- Added:
dataTransfer,targetRanges
- Added:
- KeyframeEffectOptions
- Added:
pseudoElement
- Added:
- MediaKeySystemMediaCapability
- Added:
encryptionScheme
- Added:
- MediaStreamConstraints
- Added:
preferCurrentTab
- Added:
- MediaTrackCapabilities
- Added:
cursor,displaySurface,logicalSurface
- Added:
- MediaTrackConstraintSet
- Added:
suppressLocalAudioPlayback - Removed:
autoGainControl,noiseSuppression,resizeMode
- Added:
- MediaTrackSettings
- Added:
restrictOwnAudio - Removed:
autoGainControl,channelCount,latency,noiseSuppression,resizeMode
- Added:
- MediaTrackSupportedConstraints
- Added:
suppressLocalAudioPlayback - Removed:
autoGainControl,channelCount,latency,noiseSuppression,resizeMode
- Added:
- OptionalEffectTiming
- Added:
playbackRate
- Added:
- PaymentDetailsBase
- Removed:
shippingOptions
- Removed:
- PaymentDetailsUpdate
- Removed:
error,payerErrors,shippingAddressErrors
- Removed:
- PaymentValidationErrors
- Removed:
payer,shippingAddress
- Removed:
- RTCIceCandidatePairStats
- Removed:
bytesDiscardedOnSend,circuitBreakerTriggerCount,consentExpiredTimestamp,consentRequestsSent,currentRtt,firstRequestTimestamp,lastPacketReceivedTimestamp,lastPacketSentTimestamp,lastRequestTimestamp,lastResponseTimestamp,packetsDiscardedOnSend,packetsReceived,packetsSent,priority,retransmissionsReceived,retransmissionsSent,totalRtt
- Removed:
- RTCPeerConnectionIceErrorEventInit
- Added:
errorText - Removed:
statusText
- Added:
- RTCRtpEncodingParameters
- Added:
priority
- Added:
- RTCRtpSendParameters
- Added:
degradationPreference
- Added:
- RTCRtpSynchronizationSource
- Removed:
voiceActivityFlag
- Removed:
- RTCTransportStats
- Removed:
iceRole,packetsReceived,packetsSent,selectedCandidatePairChanges,tlsGroup
- Removed:
- SecurityPolicyViolationEventInit
- Added:
disposition,sample
- Added:
- ShadowRootInit
- Added:
slotAssignment
- Added:
- ShareData
- Added:
files
- Added:
- UIEventInit
- Added:
which
- Added:
- AnimationEventMap
- Added:
"remove"
- Added:
- CanvasUserInterface
- Removed:
scrollPathIntoView
- Removed:
- DocumentOrShadowRoot
- Added:
pictureInPictureElement,getAnimations - Removed:
caretPositionFromPoint,caretRangeFromPoint,elementFromPoint,elementsFromPoint,getSelection
- Added:
- GlobalEventHandlersEventMap
- Added:
"formdata","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend" - Removed:
"cancel","dragexit"
- Added:
- GlobalEventHandlers
- Added:
onformdata,onwebkitanimationend,onwebkitanimationiteration,onwebkitanimationstart,onwebkittransitionend - Removed:
oncancel,ondragexit,onsecuritypolicyviolation
- Added:
- NavigatorContentUtils
- Removed:
unregisterProtocolHandler
- Removed:
- ParentNode
- Added:
replaceChildren
- Added:
- PaymentRequestEventMap
- Removed:
"shippingaddresschange","shippingoptionchange"
- Removed:
- RTCDtlsTransportEventMap
- Removed:
"error"
- Removed:
- SVGSVGElementEventMap
- Removed:
"SVGUnload","SVGZoom"
- Removed:
- WindowEventMap
- Removed:
"abort","afterprint","beforeprint","beforeunload","blur","canplay","canplaythrough","change","click","compassneedscalibration","contextmenu","dblclick","deviceorientationabsolute","drag","dragend","dragenter","dragleave","dragover","dragstart","drop","durationchange","emptied","ended","error","focus","hashchange","input","invalid","keydown","keypress","keyup","load","loadeddata","loadedmetadata","loadstart","message","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","mousewheel","offline","online","pagehide","pageshow","pause","play","playing","popstate","progress","ratechange","readystatechange","reset","resize","scroll","seeked","seeking","select","stalled","storage","submit","suspend","timeupdate","unload","volumechange","vrdisplayactivate","vrdisplayblur","vrdisplayconnect","vrdisplaydeactivate","vrdisplaydisconnect","vrdisplaypresentchange","waiting"
- Removed:
- WindowEventHandlersEventMap
- Added:
"gamepadconnected","gamepaddisconnected"
- Added:
- WindowEventHandlers
- Added:
ongamepadconnected,ongamepaddisconnected
- Added:
- WindowOrWorkerGlobalScope
- Added:
crossOriginIsolated
- Added:
- Console
- Removed:
memory,exception
- Removed:
- HTMLElementTagNameMap
- Removed:
"applet"
- Removed:
- SVGElementTagNameMap
- Added:
"animate","animateMotion","animateTransform","feDropShadow","mpath","set"
- Added:
index.iterable.d.ts
Non-value types
- Navigator
- Added:
vibrate
- Added:
The following four types also seems to be removed, but are not mentioned in the above list :
- AudioParamDescriptor
- RTCInboundRTPStreamStats
- RTCMediaStreamTrackStats
- RTCStatsCallback
@types/[email protected] should be the version which is shipped with TS 4.4rc
Found undocumented breaking change: PermissionName has less union members than 4.3 which cause the following code type error.
navigator.permissions.query({ name: 'camera' })
See: https://w3c.github.io/permissions/#enumdef-permissionname
Breaking change documented wrong:
CryptoKeyPair didn't get removed.
// 4.3
interface CryptoKeyPair {
privateKey: CryptoKey;
publicKey: CryptoKey;
}
// 4.4
interface CryptoKeyPair {
privateKey?: CryptoKey;
publicKey?: CryptoKey;
}
ClipboardItem constructor type is wrong. According to MDN, it should be string | Blob | Promise<string | Blob>.
In 4.3 it is string | Blob, in 4.4 it is Promise<string | Blob> which is wrong.
Found undocumented breaking change:
PermissionNamehas less union members than 4.3 which cause the following code type error.navigator.permissions.query({ name: 'camera' })See: https://w3c.github.io/permissions/#enumdef-permissionname
Camera permission is at risk because of lack of multiple implementation, so I guess the work item is to document the removal.
ClipboardItemconstructor type is wrong. According to MDN, it should bestring | Blob | Promise<string | Blob>.In 4.3 it is
string | Blob, in 4.4 it isPromise<string | Blob>which is wrong.
#1102
I want to add (deprecated: ref #884) mouseWheelEvent to the list of removed types
Undocumented change msSaveBlob was removed from window.navigator in TypeScript 4.4.2.
I tried upgrading from TS 4.3.5 to 4.4.2 today and encountered two issues:
HTMLDialogElementwent missing (as a value, not as a type). This is noted in the list above. But why? It's supported by Chrome, Edge, and Opera, and by Firefox behind a flag. The type is still present, as it is needed to represent<dialog>elements. I can writedeclare var HTMLDialogElement: HTMLDialogElement;to allow using it as a value, but thenelement instanceof HTMLDialogElementno longer works as a type guard.HTMLInputElement.autofocuswas removed. This is not noted in the list above. This seems like a bug since it is supported in every browser. The MDN page's browser compatibility section just refers to the page for the global autofocus attribute where it is noted as fully supported in Chrome, Edge, and Opera, and supported everywhere on several elements including HTMLInputElement. In my case, I have a custom JSX implementation, and I basically have to patch theHTMLInputElementtype to work around this.
It would be great if these changes could be reverted.
HTMLDialogElementwent missing (as a value, not as a type). This is noted in the list above. But why? It's supported by Chrome, Edge, and Opera, and by Firefox behind a flag. The type is still present, as it is needed to represent<dialog>elements. I can writedeclare var HTMLDialogElement: HTMLDialogElement;to allow using it as a value, but thenelement instanceof HTMLDialogElementno longer works as a type guard.
Chrome/Edge/Opera all uses the same engine Blink and no other engine supports it without a flag, that is why. Please refer to https://github.com/microsoft/TypeScript-DOM-lib-generator#when-the-type-is-missing for the reasoning here.
HTMLInputElement.autofocuswas removed. This is not noted in the list above. This seems like a bug since it is supported in every browser. The MDN page's browser compatibility section just refers to the page for the global autofocus attribute where it is noted as fully supported in Chrome, Edge, and Opera, and supported everywhere on several elements including HTMLInputElement. In my case, I have a custom JSX implementation, and I basically have to patch theHTMLInputElementtype to work around this.
Fixed by #1111
Thanks, I read that section of the README but it's not clear about flagged features, plus <dialog> is enabled by default in Firefox Nightly.
Why was hashchange event removed? Now there is only Event which doesn't have newURL property:
https://www.typescriptlang.org/play?ts=4.4.2#code/O4SwdgJg9sB0CGEIFEBuBTMAXAMiAzlpugE4AUA5ABbz5UDGNYA5uhQDQAEZ6AXJwAlaVAMJNWaTFgCUnALwA+TgG90sMOmABVAEo4AvtKA
Why was
hashchangeevent removed? Now there is onlyEventwhich doesn't havenewURLproperty: https://www.typescriptlang.org/play?ts=4.4.2#code/O4SwdgJg9sB0CGEIFEBuBTMAXAMiAzlpugE4AUA5ABbz5UDGNYA5uhQDQAEZ6AXJwAlaVAMJNWaTFgCUnALwA+TgG90sMOmABVAEo4AvtKA
Fixed by #1104
Location#reload(forcedReload: boolean): void was removed as well.
Was that intended?
Location#reload(forcedReload: boolean): voidwas removed as well. Was that intended?
It's currently a Firefox specific extension, so yes, that was intended.
Hello, speech recognition apis have been removed but i don't find informations about deprecation of this technology.
is there a remplacement api ?
Hello, speech recognition apis have been removed but i don't find informations about deprecation of this technology.
is there a remplacement api ?
It's not deprecated, it's just not mature enough with no prefix-less implementation and being still in WICG (where immature specifications exist).
Just a query, maybe my bad understanding, but File.webkitRelativePath is not a standard property and, according to MDN, should NOT be used on production sites. Can this be made optional or removed (or is my understanding here wrong)? https://developer.mozilla.org/en-US/docs/Web/API/File/webkitRelativePath
I believe ClipboardItem constructor should be restricted to only accept Blob. Blink has only partial support for ClipboardItem - as per MDN:
The ClipboardItem constructor only accepts a blob as the item data, but not strings or Promises that resolve to strings or blobs. See bug 1014310.
I believe ClipboardItem constructor should be restricted to only accept
Blob. Blink has only partial support for ClipboardItem - as per MDN:The ClipboardItem constructor only accepts a blob as the item data, but not strings or Promises that resolve to strings or blobs. See bug 1014310.
Makes sense, do you want to write a patch?
sorry for the noob question: how is it decided which interfaces get added or removed? at what point do changes usually end up in microsoft/TypeScript?
the new TS features are great, but sadly all the dom type changes are a bit of a disincentive to upgrade for me at the moment. for example, some code that I work on uses RTCSctpTransport which is still in the spec, has no "feature at risk" annotation, and still works in chrome :/
nonetheless thanks for all the great work.
Mostly based on MDN browser compatibility data. For example, RTCSctpTransport is marked as Chrome(ium)-only on MDN: https://developer.mozilla.org/en-US/docs/Web/API/RTCSctpTransport#browser_compatibility
FYI at Chrome DevTools we have started our attempts to upgrade to TypeScript 4.4.2, but sadly this issue is one the major timesinks for this release. Initial big hitters are:
getSelectionremoved fromShadowRootgetElementFromPointremoved fromShadowRoot- Removed
DOMError unknownin catch (but we were able to turn off the config setting for this 👍 )
Unfortunately, adding @types/web isn't as straightforward for us and also does not appear to resolve the situation for us where we rely on Chromium-only API's. That said, Chrome DevTools is probably in a special situation where we run on a single engine, so sometimes we use modern API's that are not supported on other engines just yet.
It seems like our Google internal team ran into similar issues before: https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/1067 But since we use a different stack and upgrade TypeScript at our own pace, we ran into this later than them.
I think the correct approach would be to add @deprecated with an explanation to the functions or properties that will be removed in the next major release. With this approach, developers will be able to see that object.~~deprecated~~ is going to be removed and can raise their concerns before the removal happens.
With the current approach, you need won't realize that a change is coming if you are not actively using the beta or RC version of TypeScript, because in 4.3 the function exists and in 4.4 the function is gone.
4.4 was a special release that trimmed a lot of nonstandard things, I think any future releases will follow W3C/WHATWG deprecation step.
The removal of autoGainControl and noiseSuppression caused a build break. This is supported in most browsers and outlined in W3C Capture Streams - https://www.w3.org/TR/mediacapture-streams/#dom-mediatracksupportedconstraints-autogaincontrol Can you provide any insight into why it was removed?
The removal of the userVisibleOnly property from the PushSubscriptionOptions interface caused issues in a project where WebPush is being used. Chrome & Edge still require userVisibleOnly to be set when calling PushManager.subscribe() or the call will fail. userVisibleOnly is also still documented in the latest W3C Push API Draft: https://www.w3.org/TR/push-api/#pushsubscriptionoptions-interface. Is there a reason why this property was removed?
The removal of autoGainControl and noiseSuppression caused a build break. This is supported in most browsers and outlined in W3C Capture Streams - https://www.w3.org/TR/mediacapture-streams/#dom-mediatracksupportedconstraints-autogaincontrol Can you provide any insight into why it was removed?
Seems they are supported on Firefox and Chrome. PR welcome.
userVisibleOnlyis also still documented in the latest W3C Push API Draft: https://www.w3.org/TR/push-api/#pushsubscriptionoptions-interface. Is there a reason why this property was removed?
Yes: https://github.com/microsoft/TypeScript-DOM-lib-generator#why-is-my-fancy-api-still-not-available-here
See MDN for the data. Note that PushSubscrptionOptionsInit still has userVisibleOnly so the option still can be set. (Logically it shouldn't exist either but there is no good way to autodetect dictionary member support.)
Why did you remove OffscreenCanvas? It is available in Edge, Chrome and Opera.