From 412bd9b2ddefea8146b3c0b93609e933c68d6030 Mon Sep 17 00:00:00 2001 From: Josh Vlk Date: Sun, 8 Nov 2026 13:44:52 -0500 Subject: [PATCH 1/4] fix: expose public concrete module types --- scripts/check-consumer.mjs | 5 + scripts/consumer-concrete-types.res | 99 ++++++++++++++++++++ src/animation/DocumentTimeline.res | 2 + src/canvas/CanvasGradient.res | 2 + src/canvas/CanvasPattern.res | 2 + src/canvas/CanvasRenderingContext2D.res | 2 + src/canvas/ImageBitmap.res | 2 + src/canvas/ImageBitmapRenderingContext.res | 2 + src/canvas/ImageData.res | 2 + src/canvas/Path2D.res | 2 + src/canvas/VideoColorSpace.res | 2 + src/canvas/VideoFrame.res | 2 + src/core/DOM.res | 1 + src/css-font-loading/FontFace.res | 2 + src/cssom/CSSRuleList.res | 2 + src/device/GamepadHapticActuator.res | 2 + src/device/Geolocation.res | 3 + src/device/GeolocationCoordinates.res | 2 + src/device/GeolocationPosition.res | 2 + src/device/GeolocationTypes.res | 2 +- src/device/LockManager.res | 2 + src/device/WakeLock.res | 2 + src/dom-nodes/CaretPosition.res | 2 + src/dom-nodes/NamedNodeMap.res | 3 + src/dom-nodes/NodeList.res | 2 + src/dom-platform/DOMTokenList.res | 2 + src/event/AbortController.res | 2 + src/fetch/Headers.res | 2 + src/file/FileList.res | 2 + src/file/FileSystemDirectoryEntry.res | 2 + src/file/FileSystemDirectoryHandle.res | 2 + src/file/FileSystemDirectoryReader.res | 2 + src/file/FileSystemEntry.res | 2 + src/file/FileSystemFileHandle.res | 2 + src/file/FileSystemHandle.res | 2 + src/file/FileSystemWritableFileStream.res | 2 + src/file/FileTypes.res | 1 + src/file/WritableStream.res | 3 + src/file/WritableStreamDefaultController.res | 2 + src/geometry/DOMMatrix.res | 2 + src/geometry/DOMMatrixReadOnly.res | 2 + src/geometry/DOMPoint.res | 2 + src/geometry/DOMPointReadOnly.res | 2 + src/geometry/DOMRect.res | 2 + src/geometry/DOMRectList.res | 2 + src/geometry/DOMRectReadOnly.res | 2 + src/media/MediaCapabilities.res | 3 + src/media/MediaCapabilitiesTypes.res | 2 +- src/media/MediaKeyStatusMap.res | 2 + src/media/MediaKeySystemAccess.res | 2 + src/media/MediaKeys.res | 2 + src/media/TextTrackCueList.res | 2 + src/messaging/PushManager.res | 2 + src/messaging/PushSubscription.res | 2 + src/navigator/ClipboardItem.res | 2 + src/navigator/CredentialsContainer.res | 2 + src/navigator/Permissions.res | 2 + src/navigator/PermissionsTypes.res | 2 +- src/observers/IntersectionObserver.res | 3 + src/observers/IntersectionObserverTypes.res | 2 +- src/observers/ResizeObserver.res | 3 + src/observers/ResizeObserverTypes.res | 2 +- src/performance/PerformanceEntry.res | 2 + src/performance/PerformanceMark.res | 2 + src/storage/Cache.res | 2 + src/storage/CacheStorage.res | 2 + src/storage/IDBFactory.res | 2 + src/storage/IDBIndex.res | 2 + src/storage/IDBObjectStore.res | 2 + src/storage/Storage.res | 3 + src/storage/StorageManager.res | 2 + src/storage/WebStorageTypes.res | 2 +- src/svg/SVGGraphicsElement.res | 2 + src/svg/SVGLength.res | 2 + src/ui-events/DataTransfer.res | 2 + src/ui-events/DataTransferItem.res | 2 + src/ui-events/DataTransferItemList.res | 2 + src/ui-events/Touch.res | 2 + src/ui-events/TouchList.res | 2 + src/url/URL.res | 3 + src/url/UrlTypes.res | 2 +- src/view-transitions/ViewTransition.res | 2 + src/web-audio/AudioBuffer.res | 2 + src/web-audio/AudioNode.res | 2 + src/web-audio/AudioParam.res | 2 + src/web-audio/BaseAudioContext.res | 2 + src/web-audio/PeriodicWave.res | 2 + src/web-audio/Worklet.res | 2 + src/window/CustomElementRegistry.res | 2 + src/window/History.res | 3 + src/window/HistoryTypes.res | 2 +- src/window/IdleDeadline.res | 2 + src/workers/Clients.res | 2 + src/workers/NavigationPreloadManager.res | 2 + 94 files changed, 287 insertions(+), 8 deletions(-) create mode 100644 scripts/consumer-concrete-types.res diff --git a/scripts/check-consumer.mjs b/scripts/check-consumer.mjs index 2300d4d5..9f1ec437 100644 --- a/scripts/check-consumer.mjs +++ b/scripts/check-consumer.mjs @@ -188,6 +188,11 @@ const checkConsumers = async () => { if (!negativeOnly) { const scenarios = [ { name: "default", fixture: "scripts/consumer-default.res", features: null }, + { + name: "concrete public types", + fixture: "scripts/consumer-concrete-types.res", + features: null, + }, { name: "Fetch-only", fixture: "scripts/consumer-fetch.res", diff --git a/scripts/consumer-concrete-types.res b/scripts/consumer-concrete-types.res new file mode 100644 index 00000000..928da2c0 --- /dev/null +++ b/scripts/consumer-concrete-types.res @@ -0,0 +1,99 @@ +let path2D: WebAPI.Path2D.t => WebAPI.Path2D.t = value => value +let fontFace: WebAPI.FontFace.t => WebAPI.FontFace.t = value => value +let domMatrix: WebAPI.DOMMatrix.t => WebAPI.DOMMatrix.t = value => value +let domMatrixReadOnly: WebAPI.DOMMatrixReadOnly.t => WebAPI.DOMMatrixReadOnly.t = value => value +let domPoint: WebAPI.DOMPoint.t => WebAPI.DOMPoint.t = value => value +let domPointReadOnly: WebAPI.DOMPointReadOnly.t => WebAPI.DOMPointReadOnly.t = value => value +let domRect: WebAPI.DOMRect.t => WebAPI.DOMRect.t = value => value +let domRectReadOnly: WebAPI.DOMRectReadOnly.t => WebAPI.DOMRectReadOnly.t = value => value +let domRectList: WebAPI.DOMRectList.t => WebAPI.DOMRectList.t = value => value +let domTokenList: WebAPI.DOMTokenList.t => WebAPI.DOMTokenList.t = value => value +let caretPosition: WebAPI.CaretPosition.t => WebAPI.CaretPosition.t = value => value +let namedNodeMap: WebAPI.NamedNodeMap.t => WebAPI.NamedNodeMap.t = value => value +let nodeList: WebAPI.NodeList.t<'node> => WebAPI.NodeList.t<'node> = value => value +let documentTimeline: WebAPI.DocumentTimeline.t => WebAPI.DocumentTimeline.t = value => value +let cssRuleList: WebAPI.CSSRuleList.t => WebAPI.CSSRuleList.t = value => value +let canvasGradient: WebAPI.CanvasGradient.t => WebAPI.CanvasGradient.t = value => value +let canvasPattern: WebAPI.CanvasPattern.t => WebAPI.CanvasPattern.t = value => value +let canvasRenderingContext2D: WebAPI.CanvasRenderingContext2D.t => WebAPI.CanvasRenderingContext2D.t = value => + value +let imageBitmap: WebAPI.ImageBitmap.t => WebAPI.ImageBitmap.t = value => value +let imageBitmapRenderingContext: WebAPI.ImageBitmapRenderingContext.t => WebAPI.ImageBitmapRenderingContext.t = value => + value +let imageData: WebAPI.ImageData.t => WebAPI.ImageData.t = value => value +let videoColorSpace: WebAPI.VideoColorSpace.t => WebAPI.VideoColorSpace.t = value => value +let videoFrame: WebAPI.VideoFrame.t => WebAPI.VideoFrame.t = value => value +let abortController: WebAPI.AbortController.t => WebAPI.AbortController.t = value => value +let pushManager: WebAPI.PushManager.t => WebAPI.PushManager.t = value => value +let pushSubscription: WebAPI.PushSubscription.t => WebAPI.PushSubscription.t = value => value +let clipboardItem: WebAPI.ClipboardItem.t => WebAPI.ClipboardItem.t = value => value +let credentialsContainer: WebAPI.CredentialsContainer.t => WebAPI.CredentialsContainer.t = value => + value +let permissions: WebAPI.Permissions.t => WebAPI.Permissions.t = value => value +let customElementRegistry: WebAPI.CustomElementRegistry.t => WebAPI.CustomElementRegistry.t = value => + value +let history: WebAPI.History.t => WebAPI.History.t = value => value +let idleDeadline: WebAPI.IdleDeadline.t => WebAPI.IdleDeadline.t = value => value +let gamepadHapticActuator: WebAPI.GamepadHapticActuator.t => WebAPI.GamepadHapticActuator.t = value => + value +let geolocation: WebAPI.Geolocation.t => WebAPI.Geolocation.t = value => value +let geolocationCoordinates: WebAPI.GeolocationCoordinates.t => WebAPI.GeolocationCoordinates.t = value => + value +let geolocationPosition: WebAPI.GeolocationPosition.t => WebAPI.GeolocationPosition.t = value => + value +let wakeLock: WebAPI.WakeLock.t => WebAPI.WakeLock.t = value => value +let fileList: WebAPI.FileList.t => WebAPI.FileList.t = value => value +let fileSystemDirectoryEntry: WebAPI.FileSystemDirectoryEntry.t => WebAPI.FileSystemDirectoryEntry.t = value => + value +let fileSystemDirectoryHandle: WebAPI.FileSystemDirectoryHandle.t => WebAPI.FileSystemDirectoryHandle.t = value => + value +let fileSystemDirectoryReader: WebAPI.FileSystemDirectoryReader.t => WebAPI.FileSystemDirectoryReader.t = value => + value +let fileSystemEntry: WebAPI.FileSystemEntry.t => WebAPI.FileSystemEntry.t = value => value +let fileSystemFileHandle: WebAPI.FileSystemFileHandle.t => WebAPI.FileSystemFileHandle.t = value => + value +let fileSystemHandle: WebAPI.FileSystemHandle.t => WebAPI.FileSystemHandle.t = value => value +let fileSystemWritableFileStream: WebAPI.FileSystemWritableFileStream.t => WebAPI.FileSystemWritableFileStream.t = value => + value +let writableStream: WebAPI.WritableStream.t<'writer> => WebAPI.WritableStream.t<'writer> = value => + value +let writableStreamDefaultController: WebAPI.WritableStreamDefaultController.t => WebAPI.WritableStreamDefaultController.t = value => + value +let lockManager: WebAPI.LockManager.t => WebAPI.LockManager.t = value => value +let cache: WebAPI.Cache.t => WebAPI.Cache.t = value => value +let cacheStorage: WebAPI.CacheStorage.t => WebAPI.CacheStorage.t = value => value +let idbFactory: WebAPI.IDBFactory.t => WebAPI.IDBFactory.t = value => value +let idbIndex: WebAPI.IDBIndex.t => WebAPI.IDBIndex.t = value => value +let idbObjectStore: WebAPI.IDBObjectStore.t => WebAPI.IDBObjectStore.t = value => value +let storage: WebAPI.Storage.t => WebAPI.Storage.t = value => value +let storageManager: WebAPI.StorageManager.t => WebAPI.StorageManager.t = value => value +let intersectionObserver: WebAPI.IntersectionObserver.t => WebAPI.IntersectionObserver.t = value => + value +let resizeObserver: WebAPI.ResizeObserver.t => WebAPI.ResizeObserver.t = value => value +let mediaCapabilities: WebAPI.MediaCapabilities.t => WebAPI.MediaCapabilities.t = value => value +let mediaKeyStatusMap: WebAPI.MediaKeyStatusMap.t => WebAPI.MediaKeyStatusMap.t = value => value +let mediaKeySystemAccess: WebAPI.MediaKeySystemAccess.t => WebAPI.MediaKeySystemAccess.t = value => + value +let mediaKeys: WebAPI.MediaKeys.t => WebAPI.MediaKeys.t = value => value +let textTrackCueList: WebAPI.TextTrackCueList.t => WebAPI.TextTrackCueList.t = value => value +let performanceEntry: WebAPI.PerformanceEntry.t => WebAPI.PerformanceEntry.t = value => value +let performanceMark: WebAPI.PerformanceMark.t => WebAPI.PerformanceMark.t = value => value +let clients: WebAPI.Clients.t => WebAPI.Clients.t = value => value +let navigationPreloadManager: WebAPI.NavigationPreloadManager.t => WebAPI.NavigationPreloadManager.t = value => + value +let dataTransfer: WebAPI.DataTransfer.t => WebAPI.DataTransfer.t = value => value +let dataTransferItem: WebAPI.DataTransferItem.t => WebAPI.DataTransferItem.t = value => value +let dataTransferItemList: WebAPI.DataTransferItemList.t => WebAPI.DataTransferItemList.t = value => + value +let touch: WebAPI.Touch.t => WebAPI.Touch.t = value => value +let touchList: WebAPI.TouchList.t => WebAPI.TouchList.t = value => value +let url: WebAPI.URL.t => WebAPI.URL.t = value => value +let viewTransition: WebAPI.ViewTransition.t => WebAPI.ViewTransition.t = value => value +let svgGraphicsElement: WebAPI.SVGGraphicsElement.t => WebAPI.SVGGraphicsElement.t = value => value +let svgLength: WebAPI.SVGLength.t => WebAPI.SVGLength.t = value => value +let audioBuffer: WebAPI.AudioBuffer.t => WebAPI.AudioBuffer.t = value => value +let audioParam: WebAPI.AudioParam.t => WebAPI.AudioParam.t = value => value +let audioNode: WebAPI.AudioNode.t => WebAPI.AudioNode.t = value => value +let baseAudioContext: WebAPI.BaseAudioContext.t => WebAPI.BaseAudioContext.t = value => value +let periodicWave: WebAPI.PeriodicWave.t => WebAPI.PeriodicWave.t = value => value +let worklet: WebAPI.Worklet.t => WebAPI.Worklet.t = value => value diff --git a/src/animation/DocumentTimeline.res b/src/animation/DocumentTimeline.res index ad7f3595..5520e857 100644 --- a/src/animation/DocumentTimeline.res +++ b/src/animation/DocumentTimeline.res @@ -1,3 +1,5 @@ +type t = DOM.documentTimeline + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DocumentTimeline) */ diff --git a/src/canvas/CanvasGradient.res b/src/canvas/CanvasGradient.res index b6123da8..1ff67bd4 100644 --- a/src/canvas/CanvasGradient.res +++ b/src/canvas/CanvasGradient.res @@ -1,3 +1,5 @@ +type t = CanvasTypes.canvasGradient + /** Adds a color stop with the given color to the gradient at the given offset. 0.0 is the offset at one end of the gradient, 1.0 is the offset at the other end. diff --git a/src/canvas/CanvasPattern.res b/src/canvas/CanvasPattern.res index 600bee97..278296d3 100644 --- a/src/canvas/CanvasPattern.res +++ b/src/canvas/CanvasPattern.res @@ -1,5 +1,7 @@ type domMatrix2DInit = DOM.domMatrix2DInit +type t = CanvasTypes.canvasPattern + /** Sets the transformation matrix that will be used when rendering the pattern during a fill or stroke painting operation. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasPattern/setTransform) diff --git a/src/canvas/CanvasRenderingContext2D.res b/src/canvas/CanvasRenderingContext2D.res index 0bde4367..debb060f 100644 --- a/src/canvas/CanvasRenderingContext2D.res +++ b/src/canvas/CanvasRenderingContext2D.res @@ -1,6 +1,8 @@ /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fillStyle) */ +type t = DOM.canvasRenderingContext2D + @get external getFillStyle: DOM.canvasRenderingContext2D => CanvasTypes.fillStyle = "fillStyle" diff --git a/src/canvas/ImageBitmap.res b/src/canvas/ImageBitmap.res index 92be5bc4..1eb2632f 100644 --- a/src/canvas/ImageBitmap.res +++ b/src/canvas/ImageBitmap.res @@ -1,3 +1,5 @@ +type t = CanvasTypes.imageBitmap + /** Releases imageBitmap's underlying bitmap data. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ImageBitmap/close) diff --git a/src/canvas/ImageBitmapRenderingContext.res b/src/canvas/ImageBitmapRenderingContext.res index d3366906..846feb01 100644 --- a/src/canvas/ImageBitmapRenderingContext.res +++ b/src/canvas/ImageBitmapRenderingContext.res @@ -1,3 +1,5 @@ +type t = CanvasTypes.imageBitmapRenderingContext + /** Transfers the underlying bitmap data from imageBitmap to context, and the bitmap becomes the contents of the canvas element to which context is bound. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ImageBitmapRenderingContext/transferFromImageBitmap) diff --git a/src/canvas/ImageData.res b/src/canvas/ImageData.res index 7510a295..e7332826 100644 --- a/src/canvas/ImageData.res +++ b/src/canvas/ImageData.res @@ -1,6 +1,8 @@ /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ImageData) */ +type t = DOM.imageData + @throws(JsExn) @new external make: (~sw: int, ~sh: int, ~settings: DOM.imageDataSettings=?) => DOM.imageData = "ImageData" diff --git a/src/canvas/Path2D.res b/src/canvas/Path2D.res index 538f63af..0193eddc 100644 --- a/src/canvas/Path2D.res +++ b/src/canvas/Path2D.res @@ -1,5 +1,7 @@ type domMatrix2DInit = DOM.domMatrix2DInit +type t = CanvasTypes.path2D + /** `make()` diff --git a/src/canvas/VideoColorSpace.res b/src/canvas/VideoColorSpace.res index 355f6458..10e91c40 100644 --- a/src/canvas/VideoColorSpace.res +++ b/src/canvas/VideoColorSpace.res @@ -1,3 +1,5 @@ +type t = DOM.videoColorSpace + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoColorSpace) */ diff --git a/src/canvas/VideoFrame.res b/src/canvas/VideoFrame.res index 2643b3e6..9fb9eb8d 100644 --- a/src/canvas/VideoFrame.res +++ b/src/canvas/VideoFrame.res @@ -1,3 +1,5 @@ +type t = DOM.videoFrame + /** `fromHTMLImageElement(~image: HTMLImageElement.t, ~init: videoFrameInit=?)` diff --git a/src/core/DOM.res b/src/core/DOM.res index 77140bac..50a9a5cd 100644 --- a/src/core/DOM.res +++ b/src/core/DOM.res @@ -596,6 +596,7 @@ type fileList = private { A collection of Attr objects. Objects inside a NamedNodeMap are not in any particular order, unlike NodeList, although they may be accessed by an index as in an array. [See NamedNodeMap on MDN](https://developer.mozilla.org/docs/Web/API/NamedNodeMap) */ +@editor.completeFrom(NamedNodeMap) type namedNodeMap = private { /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/NamedNodeMap/length) diff --git a/src/css-font-loading/FontFace.res b/src/css-font-loading/FontFace.res index d2e89a19..9b02c94d 100644 --- a/src/css-font-loading/FontFace.res +++ b/src/css-font-loading/FontFace.res @@ -1,3 +1,5 @@ +type t = CssFontLoadingTypes.fontFace + /** `fromString(~family: string, ~source: string, ~descriptors: fontFaceDescriptors=?)` diff --git a/src/cssom/CSSRuleList.res b/src/cssom/CSSRuleList.res index 115e97d5..35a27f53 100644 --- a/src/cssom/CSSRuleList.res +++ b/src/cssom/CSSRuleList.res @@ -1,3 +1,5 @@ +type t = StyleSheet.cssRuleList + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSRuleList/item) */ diff --git a/src/device/GamepadHapticActuator.res b/src/device/GamepadHapticActuator.res index 6a179b39..f08285f5 100644 --- a/src/device/GamepadHapticActuator.res +++ b/src/device/GamepadHapticActuator.res @@ -1,3 +1,5 @@ +type t = GamepadTypes.gamepadHapticActuator + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/GamepadHapticActuator/playEffect) */ diff --git a/src/device/Geolocation.res b/src/device/Geolocation.res index 18904fbe..981e3488 100644 --- a/src/device/Geolocation.res +++ b/src/device/Geolocation.res @@ -1,3 +1,6 @@ +@editor.completeFrom(Geolocation) +type t = GeolocationTypes.geolocation + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Geolocation/getCurrentPosition) */ diff --git a/src/device/GeolocationCoordinates.res b/src/device/GeolocationCoordinates.res index 27693bb8..f8bec86b 100644 --- a/src/device/GeolocationCoordinates.res +++ b/src/device/GeolocationCoordinates.res @@ -1,3 +1,5 @@ +type t = GeolocationTypes.geolocationCoordinates + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/GeolocationCoordinates/toJSON) */ diff --git a/src/device/GeolocationPosition.res b/src/device/GeolocationPosition.res index 6837f512..67fe9eea 100644 --- a/src/device/GeolocationPosition.res +++ b/src/device/GeolocationPosition.res @@ -1,3 +1,5 @@ +type t = GeolocationTypes.geolocationPosition + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/GeolocationPosition/toJSON) */ diff --git a/src/device/GeolocationTypes.res b/src/device/GeolocationTypes.res index d44a7321..d9149242 100644 --- a/src/device/GeolocationTypes.res +++ b/src/device/GeolocationTypes.res @@ -3,7 +3,7 @@ An object able to programmatically obtain the position of the device. It gives Web content access to the location of the device. This allows a Web site or app to offer customized results based on the user's location. [See WebApiGeolocation on MDN](https://developer.mozilla.org/docs/Web/API/Geolocation) */ -@editor.completeFrom(WebApiGeolocation) +@editor.completeFrom(Geolocation) type geolocation = private {} /** diff --git a/src/device/LockManager.res b/src/device/LockManager.res index 0959a1f1..6cd60bb8 100644 --- a/src/device/LockManager.res +++ b/src/device/LockManager.res @@ -1,6 +1,8 @@ /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/LockManager/request) */ +type t = WebLocksTypes.lockManager + @send external request: ( WebLocksTypes.lockManager, diff --git a/src/device/WakeLock.res b/src/device/WakeLock.res index 412e7da7..97e69ace 100644 --- a/src/device/WakeLock.res +++ b/src/device/WakeLock.res @@ -1,3 +1,5 @@ +type t = ScreenWakeLockTypes.wakeLock + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/WakeLock/request) */ diff --git a/src/dom-nodes/CaretPosition.res b/src/dom-nodes/CaretPosition.res index 687139d7..314d18b1 100644 --- a/src/dom-nodes/CaretPosition.res +++ b/src/dom-nodes/CaretPosition.res @@ -1,2 +1,4 @@ +type t = DOM.caretPosition + @send external getClientRect: DOM.caretPosition => Null.t = "getClientRect" diff --git a/src/dom-nodes/NamedNodeMap.res b/src/dom-nodes/NamedNodeMap.res index 349a25e6..6d367999 100644 --- a/src/dom-nodes/NamedNodeMap.res +++ b/src/dom-nodes/NamedNodeMap.res @@ -1,3 +1,6 @@ +@editor.completeFrom(NamedNodeMap) +type t = DOM.namedNodeMap + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/NamedNodeMap/item) */ diff --git a/src/dom-nodes/NodeList.res b/src/dom-nodes/NodeList.res index 5b3e8cf7..d2c0f6a4 100644 --- a/src/dom-nodes/NodeList.res +++ b/src/dom-nodes/NodeList.res @@ -1,3 +1,5 @@ +type t<'node> = DOM.nodeList<'node> + /** Returns the node with index index from the collection. The nodes are sorted in tree order. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/NodeList/item) diff --git a/src/dom-platform/DOMTokenList.res b/src/dom-platform/DOMTokenList.res index a7312f3a..c94fc116 100644 --- a/src/dom-platform/DOMTokenList.res +++ b/src/dom-platform/DOMTokenList.res @@ -1,3 +1,5 @@ +type t = DOM.domTokenList + /** Returns the token with index index. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMTokenList/item) diff --git a/src/event/AbortController.res b/src/event/AbortController.res index ef8737b1..2d7a3122 100644 --- a/src/event/AbortController.res +++ b/src/event/AbortController.res @@ -1,3 +1,5 @@ +type t = DOM.abortController + @new external make: unit => DOM.abortController = "AbortController" diff --git a/src/fetch/Headers.res b/src/fetch/Headers.res index 623043eb..bc06fc4f 100644 --- a/src/fetch/Headers.res +++ b/src/fetch/Headers.res @@ -1,6 +1,8 @@ /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Headers) */ +type t = FetchTypes.headers + @new external make: unit => FetchTypes.headers = "Headers" diff --git a/src/file/FileList.res b/src/file/FileList.res index 492582cd..d6509b3e 100644 --- a/src/file/FileList.res +++ b/src/file/FileList.res @@ -1,3 +1,5 @@ +type t = DOM.fileList + /** Returns the `WebApiFile` at the specified index. diff --git a/src/file/FileSystemDirectoryEntry.res b/src/file/FileSystemDirectoryEntry.res index 60cc57b3..fe7b9f38 100644 --- a/src/file/FileSystemDirectoryEntry.res +++ b/src/file/FileSystemDirectoryEntry.res @@ -1,3 +1,5 @@ +type t = FileAndDirectoryEntriesTypes.fileSystemDirectoryEntry + external asFileSystemEntry: FileAndDirectoryEntriesTypes.fileSystemDirectoryEntry => FileAndDirectoryEntriesTypes.fileSystemEntry = "%identity" /** diff --git a/src/file/FileSystemDirectoryHandle.res b/src/file/FileSystemDirectoryHandle.res index 0d9f4e48..477a3f30 100644 --- a/src/file/FileSystemDirectoryHandle.res +++ b/src/file/FileSystemDirectoryHandle.res @@ -1,3 +1,5 @@ +type t = FileTypes.fileSystemDirectoryHandle + external asFileSystemHandle: FileTypes.fileSystemDirectoryHandle => FileTypes.fileSystemHandle = "%identity" /** diff --git a/src/file/FileSystemDirectoryReader.res b/src/file/FileSystemDirectoryReader.res index 3575a2d4..d1614ab9 100644 --- a/src/file/FileSystemDirectoryReader.res +++ b/src/file/FileSystemDirectoryReader.res @@ -1,3 +1,5 @@ +type t = FileAndDirectoryEntriesTypes.fileSystemDirectoryReader + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryReader/readEntries) */ diff --git a/src/file/FileSystemEntry.res b/src/file/FileSystemEntry.res index 7dcfd930..951b37f3 100644 --- a/src/file/FileSystemEntry.res +++ b/src/file/FileSystemEntry.res @@ -1,3 +1,5 @@ +type t = FileAndDirectoryEntriesTypes.fileSystemEntry + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemEntry/getParent) */ diff --git a/src/file/FileSystemFileHandle.res b/src/file/FileSystemFileHandle.res index 550ef251..d527f0ed 100644 --- a/src/file/FileSystemFileHandle.res +++ b/src/file/FileSystemFileHandle.res @@ -1,3 +1,5 @@ +type t = FileTypes.fileSystemFileHandle + external asFileSystemHandle: FileTypes.fileSystemFileHandle => FileTypes.fileSystemHandle = "%identity" /** diff --git a/src/file/FileSystemHandle.res b/src/file/FileSystemHandle.res index a5072bbf..86fe9031 100644 --- a/src/file/FileSystemHandle.res +++ b/src/file/FileSystemHandle.res @@ -1,3 +1,5 @@ +type t = FileTypes.fileSystemHandle + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemHandle/isSameEntry) */ diff --git a/src/file/FileSystemWritableFileStream.res b/src/file/FileSystemWritableFileStream.res index 01774824..fa4de363 100644 --- a/src/file/FileSystemWritableFileStream.res +++ b/src/file/FileSystemWritableFileStream.res @@ -1,3 +1,5 @@ +type t = FileTypes.fileSystemWritableFileStream + external asWritableStream: FileTypes.fileSystemWritableFileStream => FileTypes.writableStream<'w> = "%identity" /** diff --git a/src/file/FileTypes.res b/src/file/FileTypes.res index e4400e20..d50b7cd1 100644 --- a/src/file/FileTypes.res +++ b/src/file/FileTypes.res @@ -48,6 +48,7 @@ type readableStream<'r> = { This Streams API interface provides a standard abstraction for writing streaming data to a destination, known as a sink. This object comes with built-in backpressure and queuing. [See WritableStream on MDN](https://developer.mozilla.org/docs/Web/API/WritableStream) */ +@editor.completeFrom(WritableStream) type writableStream<'w> = { /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/WritableStream/locked) diff --git a/src/file/WritableStream.res b/src/file/WritableStream.res index 379c25b9..7d7611ce 100644 --- a/src/file/WritableStream.res +++ b/src/file/WritableStream.res @@ -1,3 +1,6 @@ +@editor.completeFrom(WritableStream) +type t<'w> = FileTypes.writableStream<'w> + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/WritableStream) */ diff --git a/src/file/WritableStreamDefaultController.res b/src/file/WritableStreamDefaultController.res index 27ada3bd..c1f5fddb 100644 --- a/src/file/WritableStreamDefaultController.res +++ b/src/file/WritableStreamDefaultController.res @@ -1,3 +1,5 @@ +type t = FileTypes.writableStreamDefaultController + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error) */ diff --git a/src/geometry/DOMMatrix.res b/src/geometry/DOMMatrix.res index 183fe864..62069934 100644 --- a/src/geometry/DOMMatrix.res +++ b/src/geometry/DOMMatrix.res @@ -1,3 +1,5 @@ +type t = DOM.domMatrix + /** `make()` diff --git a/src/geometry/DOMMatrixReadOnly.res b/src/geometry/DOMMatrixReadOnly.res index 39bd42f2..2ee89113 100644 --- a/src/geometry/DOMMatrixReadOnly.res +++ b/src/geometry/DOMMatrixReadOnly.res @@ -1,3 +1,5 @@ +type t = DOM.domMatrixReadOnly + /** `make()` diff --git a/src/geometry/DOMPoint.res b/src/geometry/DOMPoint.res index 5d95475b..117dce26 100644 --- a/src/geometry/DOMPoint.res +++ b/src/geometry/DOMPoint.res @@ -1,3 +1,5 @@ +type t = DOM.domPoint + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMPoint) */ diff --git a/src/geometry/DOMPointReadOnly.res b/src/geometry/DOMPointReadOnly.res index 096494db..c8d95687 100644 --- a/src/geometry/DOMPointReadOnly.res +++ b/src/geometry/DOMPointReadOnly.res @@ -1,3 +1,5 @@ +type t = DOM.domPointReadOnly + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly) */ diff --git a/src/geometry/DOMRect.res b/src/geometry/DOMRect.res index 52507eeb..9bc4e8df 100644 --- a/src/geometry/DOMRect.res +++ b/src/geometry/DOMRect.res @@ -1,3 +1,5 @@ +type t = DOM.domRect + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMRect) */ diff --git a/src/geometry/DOMRectList.res b/src/geometry/DOMRectList.res index 624be726..35e540b2 100644 --- a/src/geometry/DOMRectList.res +++ b/src/geometry/DOMRectList.res @@ -1,2 +1,4 @@ +type t = DOM.domRectList + @send external item: (DOM.domRectList, int) => Null.t = "item" diff --git a/src/geometry/DOMRectReadOnly.res b/src/geometry/DOMRectReadOnly.res index 4f68e2ab..02af9fc3 100644 --- a/src/geometry/DOMRectReadOnly.res +++ b/src/geometry/DOMRectReadOnly.res @@ -1,3 +1,5 @@ +type t = DOM.domRectReadOnly + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly) */ diff --git a/src/media/MediaCapabilities.res b/src/media/MediaCapabilities.res index 56462692..234780f4 100644 --- a/src/media/MediaCapabilities.res +++ b/src/media/MediaCapabilities.res @@ -1,3 +1,6 @@ +@editor.completeFrom(MediaCapabilities) +type t = MediaCapabilitiesTypes.mediaCapabilities + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaCapabilities/decodingInfo) */ diff --git a/src/media/MediaCapabilitiesTypes.res b/src/media/MediaCapabilitiesTypes.res index 67706840..ebedb7ff 100644 --- a/src/media/MediaCapabilitiesTypes.res +++ b/src/media/MediaCapabilitiesTypes.res @@ -26,7 +26,7 @@ type mediaEncodingType = /** [See WebApiMediaCapabilities on MDN](https://developer.mozilla.org/docs/Web/API/MediaCapabilities) */ -@editor.completeFrom(WebApiMediaCapabilities) +@editor.completeFrom(MediaCapabilities) type mediaCapabilities = private {} type audioConfiguration = { diff --git a/src/media/MediaKeyStatusMap.res b/src/media/MediaKeyStatusMap.res index 05d8ef07..7e7a2d2d 100644 --- a/src/media/MediaKeyStatusMap.res +++ b/src/media/MediaKeyStatusMap.res @@ -1,6 +1,8 @@ /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeyStatusMap/has) */ +type t = EncryptedMediaExtensionsTypes.mediaKeyStatusMap + @send external has: (EncryptedMediaExtensionsTypes.mediaKeyStatusMap, DataView.t) => bool = "has" diff --git a/src/media/MediaKeySystemAccess.res b/src/media/MediaKeySystemAccess.res index 9cb3bed3..c573c3c4 100644 --- a/src/media/MediaKeySystemAccess.res +++ b/src/media/MediaKeySystemAccess.res @@ -1,3 +1,5 @@ +type t = EncryptedMediaExtensionsTypes.mediaKeySystemAccess + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeySystemAccess/getConfiguration) */ diff --git a/src/media/MediaKeys.res b/src/media/MediaKeys.res index 54389b39..503b490c 100644 --- a/src/media/MediaKeys.res +++ b/src/media/MediaKeys.res @@ -1,3 +1,5 @@ +type t = EncryptedMediaExtensionsTypes.mediaKeys + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeys/createSession) */ diff --git a/src/media/TextTrackCueList.res b/src/media/TextTrackCueList.res index 66db53dc..9bef0c1e 100644 --- a/src/media/TextTrackCueList.res +++ b/src/media/TextTrackCueList.res @@ -1,3 +1,5 @@ +type t = WebVttTypes.textTrackCueList + /** Returns the first text track cue (in text track cue order) with text track cue identifier id. diff --git a/src/messaging/PushManager.res b/src/messaging/PushManager.res index 6f2fbef8..bd40c0fb 100644 --- a/src/messaging/PushManager.res +++ b/src/messaging/PushManager.res @@ -1,3 +1,5 @@ +type t = PushTypes.pushManager + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/PushManager/subscribe) */ diff --git a/src/messaging/PushSubscription.res b/src/messaging/PushSubscription.res index 44bc8637..eb396bae 100644 --- a/src/messaging/PushSubscription.res +++ b/src/messaging/PushSubscription.res @@ -1,3 +1,5 @@ +type t = PushTypes.pushSubscription + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/PushSubscription/getKey) */ diff --git a/src/navigator/ClipboardItem.res b/src/navigator/ClipboardItem.res index c7ae3b68..a0a91766 100644 --- a/src/navigator/ClipboardItem.res +++ b/src/navigator/ClipboardItem.res @@ -1,3 +1,5 @@ +type t = ClipboardTypes.clipboardItem + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ClipboardItem) */ diff --git a/src/navigator/CredentialsContainer.res b/src/navigator/CredentialsContainer.res index 70fd96f0..a38a54a3 100644 --- a/src/navigator/CredentialsContainer.res +++ b/src/navigator/CredentialsContainer.res @@ -1,3 +1,5 @@ +type t = CredentialManagementTypes.credentialsContainer + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CredentialsContainer/get) */ diff --git a/src/navigator/Permissions.res b/src/navigator/Permissions.res index 7b653abc..f66911c7 100644 --- a/src/navigator/Permissions.res +++ b/src/navigator/Permissions.res @@ -1,3 +1,5 @@ +type t = PermissionsTypes.permissions + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Permissions/query) */ diff --git a/src/navigator/PermissionsTypes.res b/src/navigator/PermissionsTypes.res index fe50f244..73ef20d7 100644 --- a/src/navigator/PermissionsTypes.res +++ b/src/navigator/PermissionsTypes.res @@ -17,7 +17,7 @@ type permissionState = /** [See WebApiPermissions on MDN](https://developer.mozilla.org/docs/Web/API/Permissions) */ -@editor.completeFrom(WebApiPermissions) +@editor.completeFrom(Permissions) type permissions = private {} /** diff --git a/src/observers/IntersectionObserver.res b/src/observers/IntersectionObserver.res index 5ddea765..06af801c 100644 --- a/src/observers/IntersectionObserver.res +++ b/src/observers/IntersectionObserver.res @@ -1,3 +1,6 @@ +@editor.completeFrom(IntersectionObserver) +type t = IntersectionObserverTypes.intersectionObserver + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserver) */ diff --git a/src/observers/IntersectionObserverTypes.res b/src/observers/IntersectionObserverTypes.res index 175d8af1..f2fac51d 100644 --- a/src/observers/IntersectionObserverTypes.res +++ b/src/observers/IntersectionObserverTypes.res @@ -7,7 +7,7 @@ type root provides a way to asynchronously observe changes in the intersection of a target element with an ancestor element or with a top-level document's viewport. [See WebApiIntersectionObserver on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserver) */ -@editor.completeFrom(WebApiIntersectionObserver) +@editor.completeFrom(IntersectionObserver) type intersectionObserver = private { /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserver/root) diff --git a/src/observers/ResizeObserver.res b/src/observers/ResizeObserver.res index 5a73232b..bb7d725e 100644 --- a/src/observers/ResizeObserver.res +++ b/src/observers/ResizeObserver.res @@ -1,3 +1,6 @@ +@editor.completeFrom(ResizeObserver) +type t = ResizeObserverTypes.resizeObserver + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ResizeObserver) */ diff --git a/src/observers/ResizeObserverTypes.res b/src/observers/ResizeObserverTypes.res index fdce78e7..8e8c9de8 100644 --- a/src/observers/ResizeObserverTypes.res +++ b/src/observers/ResizeObserverTypes.res @@ -48,7 +48,7 @@ type resizeObserverEntry = { /** [See WebApiResizeObserver on MDN](https://developer.mozilla.org/docs/Web/API/ResizeObserver) */ -@editor.completeFrom(WebApiResizeObserver) +@editor.completeFrom(ResizeObserver) type resizeObserver = private {} type resizeObserverOptions = {mutable box?: resizeObserverBoxOptions} diff --git a/src/performance/PerformanceEntry.res b/src/performance/PerformanceEntry.res index d351f8ab..66d6503b 100644 --- a/src/performance/PerformanceEntry.res +++ b/src/performance/PerformanceEntry.res @@ -1,3 +1,5 @@ +type t = PerformanceTypes.performanceEntry + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/toJSON) */ diff --git a/src/performance/PerformanceMark.res b/src/performance/PerformanceMark.res index 724f8f3e..893d9c43 100644 --- a/src/performance/PerformanceMark.res +++ b/src/performance/PerformanceMark.res @@ -1,3 +1,5 @@ +type t = PerformanceTypes.performanceMark + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/PerformanceMark) */ diff --git a/src/storage/Cache.res b/src/storage/Cache.res index 2f1e7099..e36d6e0e 100644 --- a/src/storage/Cache.res +++ b/src/storage/Cache.res @@ -1,6 +1,8 @@ /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/match) */ +type t = CacheTypes.cache + @send external match: ( CacheTypes.cache, diff --git a/src/storage/CacheStorage.res b/src/storage/CacheStorage.res index 112f298a..6eeda8c4 100644 --- a/src/storage/CacheStorage.res +++ b/src/storage/CacheStorage.res @@ -1,6 +1,8 @@ /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CacheStorage/match) */ +type t = CacheTypes.cacheStorage + @send external match: ( CacheTypes.cacheStorage, diff --git a/src/storage/IDBFactory.res b/src/storage/IDBFactory.res index 712e695a..57e64ac6 100644 --- a/src/storage/IDBFactory.res +++ b/src/storage/IDBFactory.res @@ -1,3 +1,5 @@ +type t = IndexedDbTypes.idbFactory + /** Attempts to open a connection to the named database with the current version, or 1 if it does not already exist. If the request is successful request's result will be the connection. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/IDBFactory/open) diff --git a/src/storage/IDBIndex.res b/src/storage/IDBIndex.res index 0f338cde..72a9d3eb 100644 --- a/src/storage/IDBIndex.res +++ b/src/storage/IDBIndex.res @@ -1,3 +1,5 @@ +type t = IndexedDbTypes.idbIndex + /** Retrieves the value of the first record matching the given key or key range in query. diff --git a/src/storage/IDBObjectStore.res b/src/storage/IDBObjectStore.res index 26650a9c..156648ae 100644 --- a/src/storage/IDBObjectStore.res +++ b/src/storage/IDBObjectStore.res @@ -8,6 +8,8 @@ If put() is used, any existing record with the key will be replaced. If add() is If successful, request's result will be the record's key. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/put) */ +type t = IndexedDbTypes.idbObjectStore + @throws(JsExn) @send external put: ( IndexedDbTypes.idbObjectStore, diff --git a/src/storage/Storage.res b/src/storage/Storage.res index 767e6769..f4519a3e 100644 --- a/src/storage/Storage.res +++ b/src/storage/Storage.res @@ -1,3 +1,6 @@ +@editor.completeFrom(Storage) +type t = WebStorageTypes.storage + /** Returns the name of the nth key, or null if n is greater than or equal to the number of key/value pairs. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Storage/key) diff --git a/src/storage/StorageManager.res b/src/storage/StorageManager.res index 0e744cc9..c623b148 100644 --- a/src/storage/StorageManager.res +++ b/src/storage/StorageManager.res @@ -1,3 +1,5 @@ +type t = StorageTypes.storageManager + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StorageManager/persisted) */ diff --git a/src/storage/WebStorageTypes.res b/src/storage/WebStorageTypes.res index 28d58296..8f866917 100644 --- a/src/storage/WebStorageTypes.res +++ b/src/storage/WebStorageTypes.res @@ -4,7 +4,7 @@ This Web WebApiStorage API interface provides access to a particular domain's session or local storage. It allows, for example, the addition, modification, or deletion of stored data items. [See WebApiStorage on MDN](https://developer.mozilla.org/docs/Web/API/Storage) */ -@editor.completeFrom(WebApiStorage) +@editor.completeFrom(Storage) type storage = private { /** Returns the number of key/value pairs. diff --git a/src/svg/SVGGraphicsElement.res b/src/svg/SVGGraphicsElement.res index 6c4e84a5..ca2d9405 100644 --- a/src/svg/SVGGraphicsElement.res +++ b/src/svg/SVGGraphicsElement.res @@ -1,3 +1,5 @@ +type t = SVGElement.svgGraphicsElement + include SVGElement.Impl({type t = SVGElement.svgGraphicsElement}) /** diff --git a/src/svg/SVGLength.res b/src/svg/SVGLength.res index e13fa314..80aee062 100644 --- a/src/svg/SVGLength.res +++ b/src/svg/SVGLength.res @@ -1,3 +1,5 @@ +type t = SVGElement.svgLength + @throws(JsExn) @send external newValueSpecifiedUnits: ( SVGElement.svgLength, diff --git a/src/ui-events/DataTransfer.res b/src/ui-events/DataTransfer.res index f0cca01d..7c0101a9 100644 --- a/src/ui-events/DataTransfer.res +++ b/src/ui-events/DataTransfer.res @@ -1,3 +1,5 @@ +type t = UiEventsTypes.dataTransfer + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransfer) */ diff --git a/src/ui-events/DataTransferItem.res b/src/ui-events/DataTransferItem.res index 7adfc2cb..b510bc74 100644 --- a/src/ui-events/DataTransferItem.res +++ b/src/ui-events/DataTransferItem.res @@ -1,3 +1,5 @@ +type t = UiEventsTypes.dataTransferItem + /** Invokes the callback with the string data as the argument, if the drag data item kind is text. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransferItem/getAsString) diff --git a/src/ui-events/DataTransferItemList.res b/src/ui-events/DataTransferItemList.res index 9e8f07d3..a1355472 100644 --- a/src/ui-events/DataTransferItemList.res +++ b/src/ui-events/DataTransferItemList.res @@ -2,6 +2,8 @@ Adds a new entry for the given data to the drag data store. If the data is plain text then a type string has to be provided also. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransferItemList/add) */ +type t = UiEventsTypes.dataTransferItemList + @throws(JsExn) @send external add: ( UiEventsTypes.dataTransferItemList, diff --git a/src/ui-events/Touch.res b/src/ui-events/Touch.res index 47ddb3ad..96b65353 100644 --- a/src/ui-events/Touch.res +++ b/src/ui-events/Touch.res @@ -1,3 +1,5 @@ +type t = UiEventsTypes.touch + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Touch) */ diff --git a/src/ui-events/TouchList.res b/src/ui-events/TouchList.res index fc081ba2..e48e5c9f 100644 --- a/src/ui-events/TouchList.res +++ b/src/ui-events/TouchList.res @@ -1,5 +1,7 @@ /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/TouchList/item) */ +type t = UiEventsTypes.touchList + @send external item: (UiEventsTypes.touchList, int) => Null.t = "item" diff --git a/src/url/URL.res b/src/url/URL.res index c7e6e371..fb0c9add 100644 --- a/src/url/URL.res +++ b/src/url/URL.res @@ -1,3 +1,6 @@ +@editor.completeFrom(URL) +type t = UrlTypes.url + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/URL) */ diff --git a/src/url/UrlTypes.res b/src/url/UrlTypes.res index d375beae..7718a467 100644 --- a/src/url/UrlTypes.res +++ b/src/url/UrlTypes.res @@ -16,7 +16,7 @@ The WebApiURL interface represents an object providing static methods used for [See WebApiURL on MDN](https://developer.mozilla.org/docs/Web/API/URL) TODO: mark as private once mutating fields of private records is allowed */ -@editor.completeFrom(WebApiURL) +@editor.completeFrom(URL) type url = { /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/URL/href) diff --git a/src/view-transitions/ViewTransition.res b/src/view-transitions/ViewTransition.res index 87396c9b..2aba96f7 100644 --- a/src/view-transitions/ViewTransition.res +++ b/src/view-transitions/ViewTransition.res @@ -1,3 +1,5 @@ +type t = ViewTransitionsTypes.viewTransition + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ViewTransition/skipTransition) */ diff --git a/src/web-audio/AudioBuffer.res b/src/web-audio/AudioBuffer.res index 01878002..e3e36647 100644 --- a/src/web-audio/AudioBuffer.res +++ b/src/web-audio/AudioBuffer.res @@ -1,3 +1,5 @@ +type t = WebAudioTypes.audioBuffer + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioBuffer) */ diff --git a/src/web-audio/AudioNode.res b/src/web-audio/AudioNode.res index 1c62a72d..33338670 100644 --- a/src/web-audio/AudioNode.res +++ b/src/web-audio/AudioNode.res @@ -1,3 +1,5 @@ +type t = WebAudioTypes.audioNode + module Impl = ( T: { type t diff --git a/src/web-audio/AudioParam.res b/src/web-audio/AudioParam.res index c2cf1012..7f558d96 100644 --- a/src/web-audio/AudioParam.res +++ b/src/web-audio/AudioParam.res @@ -1,3 +1,5 @@ +type t = WebAudioTypes.audioParam + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioParam/setValueAtTime) */ diff --git a/src/web-audio/BaseAudioContext.res b/src/web-audio/BaseAudioContext.res index b1bf9db6..8c083a4f 100644 --- a/src/web-audio/BaseAudioContext.res +++ b/src/web-audio/BaseAudioContext.res @@ -1,3 +1,5 @@ +type t = WebAudioTypes.baseAudioContext + module Impl = ( T: { type t diff --git a/src/web-audio/PeriodicWave.res b/src/web-audio/PeriodicWave.res index 9ddd4bb9..8eadfc1b 100644 --- a/src/web-audio/PeriodicWave.res +++ b/src/web-audio/PeriodicWave.res @@ -1,3 +1,5 @@ +type t = WebAudioTypes.periodicWave + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/PeriodicWave) */ diff --git a/src/web-audio/Worklet.res b/src/web-audio/Worklet.res index 96d62dae..bac25ae4 100644 --- a/src/web-audio/Worklet.res +++ b/src/web-audio/Worklet.res @@ -1,3 +1,5 @@ +type t = WebAudioTypes.worklet + /** Loads and executes the module script given by moduleURL into all of worklet's global scopes. It can also create additional global scopes as part of this process, depending on the worklet type. The returned promise will fulfill once the script has been successfully loaded and run in all global scopes. diff --git a/src/window/CustomElementRegistry.res b/src/window/CustomElementRegistry.res index badd6ce4..6b02ae65 100644 --- a/src/window/CustomElementRegistry.res +++ b/src/window/CustomElementRegistry.res @@ -1,3 +1,5 @@ +type t = DOM.customElementRegistry + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CustomElementRegistry/define) */ diff --git a/src/window/History.res b/src/window/History.res index c622e668..d8b8ab16 100644 --- a/src/window/History.res +++ b/src/window/History.res @@ -1,3 +1,6 @@ +@editor.completeFrom(History) +type t = HistoryTypes.history + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/History/go) */ diff --git a/src/window/HistoryTypes.res b/src/window/HistoryTypes.res index 5a340e9b..f3c1774b 100644 --- a/src/window/HistoryTypes.res +++ b/src/window/HistoryTypes.res @@ -9,7 +9,7 @@ Allows manipulation of the browser session history, that is the pages visited [See WebApiHistory on MDN](https://developer.mozilla.org/docs/Web/API/History) TODO: mark as private once mutating fields of private records is allowed */ -@editor.completeFrom(WebApiHistory) +@editor.completeFrom(History) type history = { /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/History/length) diff --git a/src/window/IdleDeadline.res b/src/window/IdleDeadline.res index 5ec2b409..e78c5035 100644 --- a/src/window/IdleDeadline.res +++ b/src/window/IdleDeadline.res @@ -1,3 +1,5 @@ +type t = DOM.idleDeadline + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/IdleDeadline/timeRemaining) */ diff --git a/src/workers/Clients.res b/src/workers/Clients.res index bb9e028d..473f8362 100644 --- a/src/workers/Clients.res +++ b/src/workers/Clients.res @@ -1,3 +1,5 @@ +type t = ServiceWorkerTypes.clients + type clientQueryOptions = { mutable includeUncontrolled?: bool, @as("type") mutable type_?: string, diff --git a/src/workers/NavigationPreloadManager.res b/src/workers/NavigationPreloadManager.res index b6241da5..96023f70 100644 --- a/src/workers/NavigationPreloadManager.res +++ b/src/workers/NavigationPreloadManager.res @@ -1,3 +1,5 @@ +type t = ServiceWorkerTypes.navigationPreloadManager + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/NavigationPreloadManager/enable) */ From 737c852cf7a968b956f06caffa8110a86a02a192 Mon Sep 17 00:00:00 2001 From: Josh Vlk Date: Sun, 8 Nov 2026 13:48:57 -0500 Subject: [PATCH 2/4] test: cover Headers public type alias --- scripts/consumer-concrete-types.res | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/consumer-concrete-types.res b/scripts/consumer-concrete-types.res index 928da2c0..80b64d12 100644 --- a/scripts/consumer-concrete-types.res +++ b/scripts/consumer-concrete-types.res @@ -24,6 +24,7 @@ let imageData: WebAPI.ImageData.t => WebAPI.ImageData.t = value => value let videoColorSpace: WebAPI.VideoColorSpace.t => WebAPI.VideoColorSpace.t = value => value let videoFrame: WebAPI.VideoFrame.t => WebAPI.VideoFrame.t = value => value let abortController: WebAPI.AbortController.t => WebAPI.AbortController.t = value => value +let headers: WebAPI.Headers.t = WebAPI.Headers.make() let pushManager: WebAPI.PushManager.t => WebAPI.PushManager.t = value => value let pushSubscription: WebAPI.PushSubscription.t => WebAPI.PushSubscription.t = value => value let clipboardItem: WebAPI.ClipboardItem.t => WebAPI.ClipboardItem.t = value => value From 707b803c506f4f606b4a422f1aeb1632119e8688 Mon Sep 17 00:00:00 2001 From: Josh Vlk Date: Sun, 8 Nov 2026 16:13:17 -0500 Subject: [PATCH 3/4] fix: preserve method documentation ownership --- src/canvas/CanvasRenderingContext2D.res | 4 ++-- src/canvas/ImageData.res | 4 ++-- src/device/LockManager.res | 4 ++-- src/fetch/Headers.res | 4 ++-- src/media/MediaKeyStatusMap.res | 4 ++-- src/storage/Cache.res | 4 ++-- src/storage/CacheStorage.res | 4 ++-- src/storage/IDBObjectStore.res | 4 ++-- src/ui-events/DataTransferItemList.res | 4 ++-- src/ui-events/TouchList.res | 4 ++-- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/canvas/CanvasRenderingContext2D.res b/src/canvas/CanvasRenderingContext2D.res index debb060f..bf7e0e98 100644 --- a/src/canvas/CanvasRenderingContext2D.res +++ b/src/canvas/CanvasRenderingContext2D.res @@ -1,8 +1,8 @@ +type t = DOM.canvasRenderingContext2D + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fillStyle) */ -type t = DOM.canvasRenderingContext2D - @get external getFillStyle: DOM.canvasRenderingContext2D => CanvasTypes.fillStyle = "fillStyle" diff --git a/src/canvas/ImageData.res b/src/canvas/ImageData.res index e7332826..1606e5ee 100644 --- a/src/canvas/ImageData.res +++ b/src/canvas/ImageData.res @@ -1,8 +1,8 @@ +type t = DOM.imageData + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ImageData) */ -type t = DOM.imageData - @throws(JsExn) @new external make: (~sw: int, ~sh: int, ~settings: DOM.imageDataSettings=?) => DOM.imageData = "ImageData" diff --git a/src/device/LockManager.res b/src/device/LockManager.res index 6cd60bb8..69cb6198 100644 --- a/src/device/LockManager.res +++ b/src/device/LockManager.res @@ -1,8 +1,8 @@ +type t = WebLocksTypes.lockManager + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/LockManager/request) */ -type t = WebLocksTypes.lockManager - @send external request: ( WebLocksTypes.lockManager, diff --git a/src/fetch/Headers.res b/src/fetch/Headers.res index bc06fc4f..dc27e935 100644 --- a/src/fetch/Headers.res +++ b/src/fetch/Headers.res @@ -1,8 +1,8 @@ +type t = FetchTypes.headers + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Headers) */ -type t = FetchTypes.headers - @new external make: unit => FetchTypes.headers = "Headers" diff --git a/src/media/MediaKeyStatusMap.res b/src/media/MediaKeyStatusMap.res index 7e7a2d2d..c867d271 100644 --- a/src/media/MediaKeyStatusMap.res +++ b/src/media/MediaKeyStatusMap.res @@ -1,8 +1,8 @@ +type t = EncryptedMediaExtensionsTypes.mediaKeyStatusMap + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeyStatusMap/has) */ -type t = EncryptedMediaExtensionsTypes.mediaKeyStatusMap - @send external has: (EncryptedMediaExtensionsTypes.mediaKeyStatusMap, DataView.t) => bool = "has" diff --git a/src/storage/Cache.res b/src/storage/Cache.res index e36d6e0e..d46f1e17 100644 --- a/src/storage/Cache.res +++ b/src/storage/Cache.res @@ -1,8 +1,8 @@ +type t = CacheTypes.cache + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/match) */ -type t = CacheTypes.cache - @send external match: ( CacheTypes.cache, diff --git a/src/storage/CacheStorage.res b/src/storage/CacheStorage.res index 6eeda8c4..1f716add 100644 --- a/src/storage/CacheStorage.res +++ b/src/storage/CacheStorage.res @@ -1,8 +1,8 @@ +type t = CacheTypes.cacheStorage + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CacheStorage/match) */ -type t = CacheTypes.cacheStorage - @send external match: ( CacheTypes.cacheStorage, diff --git a/src/storage/IDBObjectStore.res b/src/storage/IDBObjectStore.res index 156648ae..bd4938b3 100644 --- a/src/storage/IDBObjectStore.res +++ b/src/storage/IDBObjectStore.res @@ -1,3 +1,5 @@ +type t = IndexedDbTypes.idbObjectStore + /** Adds or updates a record in store with the given value and key. @@ -8,8 +10,6 @@ If put() is used, any existing record with the key will be replaced. If add() is If successful, request's result will be the record's key. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/put) */ -type t = IndexedDbTypes.idbObjectStore - @throws(JsExn) @send external put: ( IndexedDbTypes.idbObjectStore, diff --git a/src/ui-events/DataTransferItemList.res b/src/ui-events/DataTransferItemList.res index a1355472..6b553cf0 100644 --- a/src/ui-events/DataTransferItemList.res +++ b/src/ui-events/DataTransferItemList.res @@ -1,9 +1,9 @@ +type t = UiEventsTypes.dataTransferItemList + /** Adds a new entry for the given data to the drag data store. If the data is plain text then a type string has to be provided also. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransferItemList/add) */ -type t = UiEventsTypes.dataTransferItemList - @throws(JsExn) @send external add: ( UiEventsTypes.dataTransferItemList, diff --git a/src/ui-events/TouchList.res b/src/ui-events/TouchList.res index e48e5c9f..ed788d4a 100644 --- a/src/ui-events/TouchList.res +++ b/src/ui-events/TouchList.res @@ -1,7 +1,7 @@ +type t = UiEventsTypes.touchList + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/TouchList/item) */ -type t = UiEventsTypes.touchList - @send external item: (UiEventsTypes.touchList, int) => Null.t = "item" From 8a1e398b345ca895f1a9443fac344166004bbaaf Mon Sep 17 00:00:00 2001 From: Josh Vlk Date: Sun, 8 Nov 2026 16:54:05 -0500 Subject: [PATCH 4/4] fix: preserve privacy in public type re-exports --- scripts/consumer-concrete-types.res | 6 ++++++ .../PrivatePublicModuleRecordCannotBeConstructed.res | 1 + scripts/negative-fixtures.json | 6 ++++++ src/animation/DocumentTimeline.res | 2 +- src/canvas/CanvasGradient.res | 2 +- src/canvas/CanvasPattern.res | 2 +- src/canvas/ImageBitmap.res | 2 +- src/canvas/ImageBitmapRenderingContext.res | 4 +++- src/canvas/ImageData.res | 2 +- src/canvas/Path2D.res | 2 +- src/canvas/VideoColorSpace.res | 2 +- src/canvas/VideoFrame.res | 2 +- src/css-font-loading/FontFace.res | 2 +- src/cssom/CSSRuleList.res | 2 +- src/device/GamepadHapticActuator.res | 2 +- src/device/Geolocation.res | 2 +- src/device/GeolocationCoordinates.res | 4 +++- src/device/GeolocationPosition.res | 2 +- src/device/LockManager.res | 2 +- src/device/WakeLock.res | 2 +- src/dom-nodes/CaretPosition.res | 2 +- src/dom-nodes/NamedNodeMap.res | 2 +- src/dom-nodes/NodeList.res | 2 +- src/dom-platform/DOMTokenList.res | 2 +- src/event/AbortController.res | 2 +- src/fetch/Headers.res | 2 +- src/file/BaseFileAndDirectoryEntries.res | 6 ++---- src/file/FileList.res | 2 +- src/file/FileSystemDirectoryEntry.res | 4 +++- src/file/FileSystemDirectoryHandle.res | 2 +- src/file/FileSystemDirectoryReader.res | 4 +++- src/file/FileSystemEntry.res | 4 +++- src/file/FileSystemFileHandle.res | 2 +- src/file/FileSystemHandle.res | 2 +- src/file/FileSystemWritableFileStream.res | 4 +++- src/file/WritableStream.res | 2 +- src/file/WritableStreamDefaultController.res | 4 +++- src/geometry/DOMMatrix.res | 2 +- src/geometry/DOMMatrixReadOnly.res | 2 +- src/geometry/DOMPoint.res | 2 +- src/geometry/DOMPointReadOnly.res | 2 +- src/geometry/DOMRect.res | 2 +- src/geometry/DOMRectList.res | 2 +- src/geometry/DOMRectReadOnly.res | 2 +- src/media/BaseEncryptedMediaExtensions.res | 4 ++-- src/media/MediaCapabilities.res | 4 +++- src/media/MediaKeyStatusMap.res | 4 +++- src/media/MediaKeySystemAccess.res | 4 +++- src/media/MediaKeys.res | 4 +++- src/media/TextTrackCueList.res | 2 +- src/messaging/PushManager.res | 2 +- src/messaging/PushSubscription.res | 2 +- src/navigator/ClipboardItem.res | 2 +- src/navigator/CredentialsContainer.res | 4 +++- src/navigator/Permissions.res | 2 +- src/observers/IntersectionObserver.res | 4 +++- src/observers/ResizeObserver.res | 2 +- src/performance/PerformanceEntry.res | 2 +- src/performance/PerformanceMark.res | 2 +- src/storage/Cache.res | 2 +- src/storage/CacheStorage.res | 2 +- src/storage/IDBFactory.res | 2 +- src/storage/IDBIndex.res | 2 +- src/storage/IDBObjectStore.res | 2 +- src/storage/Storage.res | 2 +- src/storage/StorageManager.res | 2 +- src/svg/SVGGraphicsElement.res | 2 +- src/svg/SVGLength.res | 2 +- src/ui-events/DataTransfer.res | 2 +- src/ui-events/DataTransferItem.res | 2 +- src/ui-events/DataTransferItemList.res | 2 +- src/ui-events/Touch.res | 2 +- src/ui-events/TouchList.res | 2 +- src/url/URL.res | 2 +- src/view-transitions/ViewTransition.res | 2 +- src/web-audio/AudioBuffer.res | 2 +- src/web-audio/AudioNode.res | 2 +- src/web-audio/AudioParam.res | 2 +- src/web-audio/BaseAudioContext.res | 2 +- src/web-audio/PeriodicWave.res | 2 +- src/web-audio/Worklet.res | 2 +- src/window/CustomElementRegistry.res | 2 +- src/window/History.res | 2 +- src/window/IdleDeadline.res | 2 +- src/workers/NavigationPreloadManager.res | 4 +++- 85 files changed, 125 insertions(+), 86 deletions(-) create mode 100644 scripts/fixtures/negative/PrivatePublicModuleRecordCannotBeConstructed.res diff --git a/scripts/consumer-concrete-types.res b/scripts/consumer-concrete-types.res index 80b64d12..c1aee495 100644 --- a/scripts/consumer-concrete-types.res +++ b/scripts/consumer-concrete-types.res @@ -98,3 +98,9 @@ let audioNode: WebAPI.AudioNode.t => WebAPI.AudioNode.t = value => value let baseAudioContext: WebAPI.BaseAudioContext.t => WebAPI.BaseAudioContext.t = value => value let periodicWave: WebAPI.PeriodicWave.t => WebAPI.PeriodicWave.t = value => value let worklet: WebAPI.Worklet.t => WebAPI.Worklet.t = value => value + +let makePublicUrl = () => { + let url: WebAPI.URL.t = WebAPI.URL.make(~url="https://example.invalid") + url.href = "https://example.com" + url.href +} diff --git a/scripts/fixtures/negative/PrivatePublicModuleRecordCannotBeConstructed.res b/scripts/fixtures/negative/PrivatePublicModuleRecordCannotBeConstructed.res new file mode 100644 index 00000000..fc4e6d64 --- /dev/null +++ b/scripts/fixtures/negative/PrivatePublicModuleRecordCannotBeConstructed.res @@ -0,0 +1 @@ +let imageBitmap: WebAPI.ImageBitmap.t = {width: 1, height: 1} diff --git a/scripts/negative-fixtures.json b/scripts/negative-fixtures.json index 9eaffcbb..98b868fb 100644 --- a/scripts/negative-fixtures.json +++ b/scripts/negative-fixtures.json @@ -53,6 +53,12 @@ "features": ["WebAPI.Storage"], "expectedDiagnostic": "This has type:" }, + { + "name": "private public-module records cannot be constructed", + "fixture": "scripts/fixtures/negative/PrivatePublicModuleRecordCannotBeConstructed.res", + "features": ["WebAPI.Canvas"], + "expectedDiagnostic": "Cannot create values of the" + }, { "name": "Web Locks callback accepts nullable Lock", "fixture": "scripts/fixtures/negative/WebLocksRejectsNonNullableCallback.res", diff --git a/src/animation/DocumentTimeline.res b/src/animation/DocumentTimeline.res index 5520e857..d70fe18b 100644 --- a/src/animation/DocumentTimeline.res +++ b/src/animation/DocumentTimeline.res @@ -1,4 +1,4 @@ -type t = DOM.documentTimeline +type t = DOM.documentTimeline = private {...DOM.documentTimeline} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DocumentTimeline) diff --git a/src/canvas/CanvasGradient.res b/src/canvas/CanvasGradient.res index 1ff67bd4..5c3b4676 100644 --- a/src/canvas/CanvasGradient.res +++ b/src/canvas/CanvasGradient.res @@ -1,4 +1,4 @@ -type t = CanvasTypes.canvasGradient +type t = CanvasTypes.canvasGradient = private {...CanvasTypes.canvasGradient} /** Adds a color stop with the given color to the gradient at the given offset. 0.0 is the offset at one end of the gradient, 1.0 is the offset at the other end. diff --git a/src/canvas/CanvasPattern.res b/src/canvas/CanvasPattern.res index 278296d3..84b32179 100644 --- a/src/canvas/CanvasPattern.res +++ b/src/canvas/CanvasPattern.res @@ -1,6 +1,6 @@ type domMatrix2DInit = DOM.domMatrix2DInit -type t = CanvasTypes.canvasPattern +type t = CanvasTypes.canvasPattern = private {...CanvasTypes.canvasPattern} /** Sets the transformation matrix that will be used when rendering the pattern during a fill or stroke painting operation. diff --git a/src/canvas/ImageBitmap.res b/src/canvas/ImageBitmap.res index 1eb2632f..a5c37376 100644 --- a/src/canvas/ImageBitmap.res +++ b/src/canvas/ImageBitmap.res @@ -1,4 +1,4 @@ -type t = CanvasTypes.imageBitmap +type t = CanvasTypes.imageBitmap = private {...CanvasTypes.imageBitmap} /** Releases imageBitmap's underlying bitmap data. diff --git a/src/canvas/ImageBitmapRenderingContext.res b/src/canvas/ImageBitmapRenderingContext.res index 846feb01..12518658 100644 --- a/src/canvas/ImageBitmapRenderingContext.res +++ b/src/canvas/ImageBitmapRenderingContext.res @@ -1,4 +1,6 @@ -type t = CanvasTypes.imageBitmapRenderingContext +type t = CanvasTypes.imageBitmapRenderingContext = private { + ...CanvasTypes.imageBitmapRenderingContext, +} /** Transfers the underlying bitmap data from imageBitmap to context, and the bitmap becomes the contents of the canvas element to which context is bound. diff --git a/src/canvas/ImageData.res b/src/canvas/ImageData.res index 1606e5ee..477105a7 100644 --- a/src/canvas/ImageData.res +++ b/src/canvas/ImageData.res @@ -1,4 +1,4 @@ -type t = DOM.imageData +type t = DOM.imageData = private {...DOM.imageData} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ImageData) diff --git a/src/canvas/Path2D.res b/src/canvas/Path2D.res index 0193eddc..0aba876b 100644 --- a/src/canvas/Path2D.res +++ b/src/canvas/Path2D.res @@ -1,6 +1,6 @@ type domMatrix2DInit = DOM.domMatrix2DInit -type t = CanvasTypes.path2D +type t = CanvasTypes.path2D = private {...CanvasTypes.path2D} /** `make()` diff --git a/src/canvas/VideoColorSpace.res b/src/canvas/VideoColorSpace.res index 10e91c40..f7852782 100644 --- a/src/canvas/VideoColorSpace.res +++ b/src/canvas/VideoColorSpace.res @@ -1,4 +1,4 @@ -type t = DOM.videoColorSpace +type t = DOM.videoColorSpace = private {...DOM.videoColorSpace} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoColorSpace) diff --git a/src/canvas/VideoFrame.res b/src/canvas/VideoFrame.res index 9fb9eb8d..92ee92cd 100644 --- a/src/canvas/VideoFrame.res +++ b/src/canvas/VideoFrame.res @@ -1,4 +1,4 @@ -type t = DOM.videoFrame +type t = DOM.videoFrame = private {...DOM.videoFrame} /** `fromHTMLImageElement(~image: HTMLImageElement.t, ~init: videoFrameInit=?)` diff --git a/src/css-font-loading/FontFace.res b/src/css-font-loading/FontFace.res index 9b02c94d..4f8defe9 100644 --- a/src/css-font-loading/FontFace.res +++ b/src/css-font-loading/FontFace.res @@ -1,4 +1,4 @@ -type t = CssFontLoadingTypes.fontFace +type t = CssFontLoadingTypes.fontFace = {...CssFontLoadingTypes.fontFace} /** `fromString(~family: string, ~source: string, ~descriptors: fontFaceDescriptors=?)` diff --git a/src/cssom/CSSRuleList.res b/src/cssom/CSSRuleList.res index 35a27f53..525746de 100644 --- a/src/cssom/CSSRuleList.res +++ b/src/cssom/CSSRuleList.res @@ -1,4 +1,4 @@ -type t = StyleSheet.cssRuleList +type t = StyleSheet.cssRuleList = private {...StyleSheet.cssRuleList} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSRuleList/item) diff --git a/src/device/GamepadHapticActuator.res b/src/device/GamepadHapticActuator.res index f08285f5..aea65a42 100644 --- a/src/device/GamepadHapticActuator.res +++ b/src/device/GamepadHapticActuator.res @@ -1,4 +1,4 @@ -type t = GamepadTypes.gamepadHapticActuator +type t = GamepadTypes.gamepadHapticActuator = private {...GamepadTypes.gamepadHapticActuator} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/GamepadHapticActuator/playEffect) diff --git a/src/device/Geolocation.res b/src/device/Geolocation.res index 981e3488..f5224f3f 100644 --- a/src/device/Geolocation.res +++ b/src/device/Geolocation.res @@ -1,5 +1,5 @@ @editor.completeFrom(Geolocation) -type t = GeolocationTypes.geolocation +type t = GeolocationTypes.geolocation = private {...GeolocationTypes.geolocation} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Geolocation/getCurrentPosition) diff --git a/src/device/GeolocationCoordinates.res b/src/device/GeolocationCoordinates.res index f8bec86b..2ccc9709 100644 --- a/src/device/GeolocationCoordinates.res +++ b/src/device/GeolocationCoordinates.res @@ -1,4 +1,6 @@ -type t = GeolocationTypes.geolocationCoordinates +type t = GeolocationTypes.geolocationCoordinates = private { + ...GeolocationTypes.geolocationCoordinates, +} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/GeolocationCoordinates/toJSON) diff --git a/src/device/GeolocationPosition.res b/src/device/GeolocationPosition.res index 67fe9eea..4152c53f 100644 --- a/src/device/GeolocationPosition.res +++ b/src/device/GeolocationPosition.res @@ -1,4 +1,4 @@ -type t = GeolocationTypes.geolocationPosition +type t = GeolocationTypes.geolocationPosition = private {...GeolocationTypes.geolocationPosition} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/GeolocationPosition/toJSON) diff --git a/src/device/LockManager.res b/src/device/LockManager.res index 69cb6198..bdab9423 100644 --- a/src/device/LockManager.res +++ b/src/device/LockManager.res @@ -1,4 +1,4 @@ -type t = WebLocksTypes.lockManager +type t = WebLocksTypes.lockManager = private {...WebLocksTypes.lockManager} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/LockManager/request) diff --git a/src/device/WakeLock.res b/src/device/WakeLock.res index 97e69ace..4bebbbfa 100644 --- a/src/device/WakeLock.res +++ b/src/device/WakeLock.res @@ -1,4 +1,4 @@ -type t = ScreenWakeLockTypes.wakeLock +type t = ScreenWakeLockTypes.wakeLock = private {...ScreenWakeLockTypes.wakeLock} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/WakeLock/request) diff --git a/src/dom-nodes/CaretPosition.res b/src/dom-nodes/CaretPosition.res index 314d18b1..3f1dc1e7 100644 --- a/src/dom-nodes/CaretPosition.res +++ b/src/dom-nodes/CaretPosition.res @@ -1,4 +1,4 @@ -type t = DOM.caretPosition +type t = DOM.caretPosition = private {...DOM.caretPosition} @send external getClientRect: DOM.caretPosition => Null.t = "getClientRect" diff --git a/src/dom-nodes/NamedNodeMap.res b/src/dom-nodes/NamedNodeMap.res index 6d367999..ec7bb19e 100644 --- a/src/dom-nodes/NamedNodeMap.res +++ b/src/dom-nodes/NamedNodeMap.res @@ -1,5 +1,5 @@ @editor.completeFrom(NamedNodeMap) -type t = DOM.namedNodeMap +type t = DOM.namedNodeMap = private {...DOM.namedNodeMap} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/NamedNodeMap/item) diff --git a/src/dom-nodes/NodeList.res b/src/dom-nodes/NodeList.res index d2c0f6a4..f7f7a471 100644 --- a/src/dom-nodes/NodeList.res +++ b/src/dom-nodes/NodeList.res @@ -1,4 +1,4 @@ -type t<'node> = DOM.nodeList<'node> +type t<'node> = DOM.nodeList<'node> = private {...DOM.nodeList<'node>} /** Returns the node with index index from the collection. The nodes are sorted in tree order. diff --git a/src/dom-platform/DOMTokenList.res b/src/dom-platform/DOMTokenList.res index c94fc116..931e826e 100644 --- a/src/dom-platform/DOMTokenList.res +++ b/src/dom-platform/DOMTokenList.res @@ -1,4 +1,4 @@ -type t = DOM.domTokenList +type t = DOM.domTokenList = {...DOM.domTokenList} /** Returns the token with index index. diff --git a/src/event/AbortController.res b/src/event/AbortController.res index 2d7a3122..0c109eca 100644 --- a/src/event/AbortController.res +++ b/src/event/AbortController.res @@ -1,4 +1,4 @@ -type t = DOM.abortController +type t = DOM.abortController = private {...DOM.abortController} @new external make: unit => DOM.abortController = "AbortController" diff --git a/src/fetch/Headers.res b/src/fetch/Headers.res index dc27e935..cef5fc4d 100644 --- a/src/fetch/Headers.res +++ b/src/fetch/Headers.res @@ -1,4 +1,4 @@ -type t = FetchTypes.headers +type t = FetchTypes.headers = private {...FetchTypes.headers} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Headers) diff --git a/src/file/BaseFileAndDirectoryEntries.res b/src/file/BaseFileAndDirectoryEntries.res index e04fc41b..74dee7be 100644 --- a/src/file/BaseFileAndDirectoryEntries.res +++ b/src/file/BaseFileAndDirectoryEntries.res @@ -3,7 +3,7 @@ /** [See FileSystemEntry on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemEntry) */ -@editor.completeFrom(BaseFileAndDirectoryEntries.FileSystemEntry) +@editor.completeFrom(FileSystemEntry) type rec fileSystemEntry = private { /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemEntry/isFile) @@ -30,9 +30,7 @@ type rec fileSystemEntry = private { /** [See FileSystemDirectoryEntry on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryEntry) */ -@editor.completeFrom( - BaseFileAndDirectoryEntries.FileSystemDirectoryEntry -) and fileSystemDirectoryEntry = private { +@editor.completeFrom(FileSystemDirectoryEntry) and fileSystemDirectoryEntry = private { // Base properties from FileSystemEntry /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemEntry/isFile) diff --git a/src/file/FileList.res b/src/file/FileList.res index d6509b3e..cca270eb 100644 --- a/src/file/FileList.res +++ b/src/file/FileList.res @@ -1,4 +1,4 @@ -type t = DOM.fileList +type t = DOM.fileList = private {...DOM.fileList} /** Returns the `WebApiFile` at the specified index. diff --git a/src/file/FileSystemDirectoryEntry.res b/src/file/FileSystemDirectoryEntry.res index fe7b9f38..fb943376 100644 --- a/src/file/FileSystemDirectoryEntry.res +++ b/src/file/FileSystemDirectoryEntry.res @@ -1,4 +1,6 @@ -type t = FileAndDirectoryEntriesTypes.fileSystemDirectoryEntry +type t = BaseFileAndDirectoryEntries.fileSystemDirectoryEntry = private { + ...BaseFileAndDirectoryEntries.fileSystemDirectoryEntry, +} external asFileSystemEntry: FileAndDirectoryEntriesTypes.fileSystemDirectoryEntry => FileAndDirectoryEntriesTypes.fileSystemEntry = "%identity" diff --git a/src/file/FileSystemDirectoryHandle.res b/src/file/FileSystemDirectoryHandle.res index 477a3f30..d1f6ac45 100644 --- a/src/file/FileSystemDirectoryHandle.res +++ b/src/file/FileSystemDirectoryHandle.res @@ -1,4 +1,4 @@ -type t = FileTypes.fileSystemDirectoryHandle +type t = FileTypes.fileSystemDirectoryHandle = private {...FileTypes.fileSystemDirectoryHandle} external asFileSystemHandle: FileTypes.fileSystemDirectoryHandle => FileTypes.fileSystemHandle = "%identity" diff --git a/src/file/FileSystemDirectoryReader.res b/src/file/FileSystemDirectoryReader.res index d1614ab9..7ed1a21e 100644 --- a/src/file/FileSystemDirectoryReader.res +++ b/src/file/FileSystemDirectoryReader.res @@ -1,4 +1,6 @@ -type t = FileAndDirectoryEntriesTypes.fileSystemDirectoryReader +type t = FileAndDirectoryEntriesTypes.fileSystemDirectoryReader = private { + ...FileAndDirectoryEntriesTypes.fileSystemDirectoryReader, +} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryReader/readEntries) diff --git a/src/file/FileSystemEntry.res b/src/file/FileSystemEntry.res index 951b37f3..2796430f 100644 --- a/src/file/FileSystemEntry.res +++ b/src/file/FileSystemEntry.res @@ -1,4 +1,6 @@ -type t = FileAndDirectoryEntriesTypes.fileSystemEntry +type t = BaseFileAndDirectoryEntries.fileSystemEntry = private { + ...BaseFileAndDirectoryEntries.fileSystemEntry, +} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemEntry/getParent) diff --git a/src/file/FileSystemFileHandle.res b/src/file/FileSystemFileHandle.res index d527f0ed..3f9bd5b5 100644 --- a/src/file/FileSystemFileHandle.res +++ b/src/file/FileSystemFileHandle.res @@ -1,4 +1,4 @@ -type t = FileTypes.fileSystemFileHandle +type t = FileTypes.fileSystemFileHandle = private {...FileTypes.fileSystemFileHandle} external asFileSystemHandle: FileTypes.fileSystemFileHandle => FileTypes.fileSystemHandle = "%identity" diff --git a/src/file/FileSystemHandle.res b/src/file/FileSystemHandle.res index 86fe9031..6a145012 100644 --- a/src/file/FileSystemHandle.res +++ b/src/file/FileSystemHandle.res @@ -1,4 +1,4 @@ -type t = FileTypes.fileSystemHandle +type t = FileTypes.fileSystemHandle = private {...FileTypes.fileSystemHandle} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileSystemHandle/isSameEntry) diff --git a/src/file/FileSystemWritableFileStream.res b/src/file/FileSystemWritableFileStream.res index fa4de363..996002ee 100644 --- a/src/file/FileSystemWritableFileStream.res +++ b/src/file/FileSystemWritableFileStream.res @@ -1,4 +1,6 @@ -type t = FileTypes.fileSystemWritableFileStream +type t = FileTypes.fileSystemWritableFileStream = private { + ...FileTypes.fileSystemWritableFileStream, +} external asWritableStream: FileTypes.fileSystemWritableFileStream => FileTypes.writableStream<'w> = "%identity" diff --git a/src/file/WritableStream.res b/src/file/WritableStream.res index 7d7611ce..d2cabeb4 100644 --- a/src/file/WritableStream.res +++ b/src/file/WritableStream.res @@ -1,5 +1,5 @@ @editor.completeFrom(WritableStream) -type t<'w> = FileTypes.writableStream<'w> +type t<'w> = FileTypes.writableStream<'w> = {...FileTypes.writableStream<'w>} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/WritableStream) diff --git a/src/file/WritableStreamDefaultController.res b/src/file/WritableStreamDefaultController.res index c1f5fddb..83bdffae 100644 --- a/src/file/WritableStreamDefaultController.res +++ b/src/file/WritableStreamDefaultController.res @@ -1,4 +1,6 @@ -type t = FileTypes.writableStreamDefaultController +type t = FileTypes.writableStreamDefaultController = private { + ...FileTypes.writableStreamDefaultController, +} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error) diff --git a/src/geometry/DOMMatrix.res b/src/geometry/DOMMatrix.res index 62069934..f9ba24ee 100644 --- a/src/geometry/DOMMatrix.res +++ b/src/geometry/DOMMatrix.res @@ -1,4 +1,4 @@ -type t = DOM.domMatrix +type t = DOM.domMatrix = private {...DOM.domMatrix} /** `make()` diff --git a/src/geometry/DOMMatrixReadOnly.res b/src/geometry/DOMMatrixReadOnly.res index 2ee89113..b1b5a740 100644 --- a/src/geometry/DOMMatrixReadOnly.res +++ b/src/geometry/DOMMatrixReadOnly.res @@ -1,4 +1,4 @@ -type t = DOM.domMatrixReadOnly +type t = DOM.domMatrixReadOnly = private {...DOM.domMatrixReadOnly} /** `make()` diff --git a/src/geometry/DOMPoint.res b/src/geometry/DOMPoint.res index 117dce26..34225952 100644 --- a/src/geometry/DOMPoint.res +++ b/src/geometry/DOMPoint.res @@ -1,4 +1,4 @@ -type t = DOM.domPoint +type t = DOM.domPoint = private {...DOM.domPoint} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMPoint) diff --git a/src/geometry/DOMPointReadOnly.res b/src/geometry/DOMPointReadOnly.res index c8d95687..1a7b220b 100644 --- a/src/geometry/DOMPointReadOnly.res +++ b/src/geometry/DOMPointReadOnly.res @@ -1,4 +1,4 @@ -type t = DOM.domPointReadOnly +type t = DOM.domPointReadOnly = private {...DOM.domPointReadOnly} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly) diff --git a/src/geometry/DOMRect.res b/src/geometry/DOMRect.res index 9bc4e8df..96246ce1 100644 --- a/src/geometry/DOMRect.res +++ b/src/geometry/DOMRect.res @@ -1,4 +1,4 @@ -type t = DOM.domRect +type t = DOM.domRect = private {...DOM.domRect} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMRect) diff --git a/src/geometry/DOMRectList.res b/src/geometry/DOMRectList.res index 35e540b2..9e18173a 100644 --- a/src/geometry/DOMRectList.res +++ b/src/geometry/DOMRectList.res @@ -1,4 +1,4 @@ -type t = DOM.domRectList +type t = DOM.domRectList = private {...DOM.domRectList} @send external item: (DOM.domRectList, int) => Null.t = "item" diff --git a/src/geometry/DOMRectReadOnly.res b/src/geometry/DOMRectReadOnly.res index 02af9fc3..99fda140 100644 --- a/src/geometry/DOMRectReadOnly.res +++ b/src/geometry/DOMRectReadOnly.res @@ -1,4 +1,4 @@ -type t = DOM.domRectReadOnly +type t = DOM.domRectReadOnly = private {...DOM.domRectReadOnly} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly) diff --git a/src/media/BaseEncryptedMediaExtensions.res b/src/media/BaseEncryptedMediaExtensions.res index 25d97584..a9d43598 100644 --- a/src/media/BaseEncryptedMediaExtensions.res +++ b/src/media/BaseEncryptedMediaExtensions.res @@ -40,14 +40,14 @@ type mediaKeySystemAccess = private { This WebApiEncryptedMediaExtensions API interface the represents a set of keys that an associated HTMLMediaElement can use for decryption of media data during playback. [See MediaKeys on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeys) */ -@editor.completeFrom(BaseEncryptedMediaExtensions.MediaKeys) +@editor.completeFrom(MediaKeys) type mediaKeys = private {} /** This WebApiEncryptedMediaExtensions API interface is a read-only map of media key statuses by key IDs. [See MediaKeyStatusMap on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeyStatusMap) */ -@editor.completeFrom(BaseEncryptedMediaExtensions.MediaKeyStatusMap) +@editor.completeFrom(MediaKeyStatusMap) type mediaKeyStatusMap = private { /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeyStatusMap/size) diff --git a/src/media/MediaCapabilities.res b/src/media/MediaCapabilities.res index 234780f4..f1a6b5f0 100644 --- a/src/media/MediaCapabilities.res +++ b/src/media/MediaCapabilities.res @@ -1,5 +1,7 @@ @editor.completeFrom(MediaCapabilities) -type t = MediaCapabilitiesTypes.mediaCapabilities +type t = MediaCapabilitiesTypes.mediaCapabilities = private { + ...MediaCapabilitiesTypes.mediaCapabilities, +} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaCapabilities/decodingInfo) diff --git a/src/media/MediaKeyStatusMap.res b/src/media/MediaKeyStatusMap.res index c867d271..2de44581 100644 --- a/src/media/MediaKeyStatusMap.res +++ b/src/media/MediaKeyStatusMap.res @@ -1,4 +1,6 @@ -type t = EncryptedMediaExtensionsTypes.mediaKeyStatusMap +type t = BaseEncryptedMediaExtensions.mediaKeyStatusMap = private { + ...BaseEncryptedMediaExtensions.mediaKeyStatusMap, +} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeyStatusMap/has) diff --git a/src/media/MediaKeySystemAccess.res b/src/media/MediaKeySystemAccess.res index c573c3c4..e5fb5b6a 100644 --- a/src/media/MediaKeySystemAccess.res +++ b/src/media/MediaKeySystemAccess.res @@ -1,4 +1,6 @@ -type t = EncryptedMediaExtensionsTypes.mediaKeySystemAccess +type t = BaseEncryptedMediaExtensions.mediaKeySystemAccess = private { + ...BaseEncryptedMediaExtensions.mediaKeySystemAccess, +} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeySystemAccess/getConfiguration) diff --git a/src/media/MediaKeys.res b/src/media/MediaKeys.res index 503b490c..3487ae6f 100644 --- a/src/media/MediaKeys.res +++ b/src/media/MediaKeys.res @@ -1,4 +1,6 @@ -type t = EncryptedMediaExtensionsTypes.mediaKeys +type t = BaseEncryptedMediaExtensions.mediaKeys = private { + ...BaseEncryptedMediaExtensions.mediaKeys, +} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeys/createSession) diff --git a/src/media/TextTrackCueList.res b/src/media/TextTrackCueList.res index 9bef0c1e..7d514817 100644 --- a/src/media/TextTrackCueList.res +++ b/src/media/TextTrackCueList.res @@ -1,4 +1,4 @@ -type t = WebVttTypes.textTrackCueList +type t = WebVttTypes.textTrackCueList = private {...WebVttTypes.textTrackCueList} /** Returns the first text track cue (in text track cue order) with text track cue identifier id. diff --git a/src/messaging/PushManager.res b/src/messaging/PushManager.res index bd40c0fb..ebe98fb3 100644 --- a/src/messaging/PushManager.res +++ b/src/messaging/PushManager.res @@ -1,4 +1,4 @@ -type t = PushTypes.pushManager +type t = PushTypes.pushManager = private {...PushTypes.pushManager} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/PushManager/subscribe) diff --git a/src/messaging/PushSubscription.res b/src/messaging/PushSubscription.res index eb396bae..f43faba4 100644 --- a/src/messaging/PushSubscription.res +++ b/src/messaging/PushSubscription.res @@ -1,4 +1,4 @@ -type t = PushTypes.pushSubscription +type t = PushTypes.pushSubscription = private {...PushTypes.pushSubscription} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/PushSubscription/getKey) diff --git a/src/navigator/ClipboardItem.res b/src/navigator/ClipboardItem.res index a0a91766..e8e8e957 100644 --- a/src/navigator/ClipboardItem.res +++ b/src/navigator/ClipboardItem.res @@ -1,4 +1,4 @@ -type t = ClipboardTypes.clipboardItem +type t = ClipboardTypes.clipboardItem = private {...ClipboardTypes.clipboardItem} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ClipboardItem) diff --git a/src/navigator/CredentialsContainer.res b/src/navigator/CredentialsContainer.res index a38a54a3..9a930ff9 100644 --- a/src/navigator/CredentialsContainer.res +++ b/src/navigator/CredentialsContainer.res @@ -1,4 +1,6 @@ -type t = CredentialManagementTypes.credentialsContainer +type t = CredentialManagementTypes.credentialsContainer = private { + ...CredentialManagementTypes.credentialsContainer, +} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CredentialsContainer/get) diff --git a/src/navigator/Permissions.res b/src/navigator/Permissions.res index f66911c7..3c5df49b 100644 --- a/src/navigator/Permissions.res +++ b/src/navigator/Permissions.res @@ -1,4 +1,4 @@ -type t = PermissionsTypes.permissions +type t = PermissionsTypes.permissions = private {...PermissionsTypes.permissions} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Permissions/query) diff --git a/src/observers/IntersectionObserver.res b/src/observers/IntersectionObserver.res index 06af801c..4daf2c3c 100644 --- a/src/observers/IntersectionObserver.res +++ b/src/observers/IntersectionObserver.res @@ -1,5 +1,7 @@ @editor.completeFrom(IntersectionObserver) -type t = IntersectionObserverTypes.intersectionObserver +type t = IntersectionObserverTypes.intersectionObserver = private { + ...IntersectionObserverTypes.intersectionObserver, +} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/IntersectionObserver) diff --git a/src/observers/ResizeObserver.res b/src/observers/ResizeObserver.res index bb7d725e..b9a7e16c 100644 --- a/src/observers/ResizeObserver.res +++ b/src/observers/ResizeObserver.res @@ -1,5 +1,5 @@ @editor.completeFrom(ResizeObserver) -type t = ResizeObserverTypes.resizeObserver +type t = ResizeObserverTypes.resizeObserver = private {...ResizeObserverTypes.resizeObserver} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ResizeObserver) diff --git a/src/performance/PerformanceEntry.res b/src/performance/PerformanceEntry.res index 66d6503b..56741988 100644 --- a/src/performance/PerformanceEntry.res +++ b/src/performance/PerformanceEntry.res @@ -1,4 +1,4 @@ -type t = PerformanceTypes.performanceEntry +type t = PerformanceTypes.performanceEntry = private {...PerformanceTypes.performanceEntry} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/toJSON) diff --git a/src/performance/PerformanceMark.res b/src/performance/PerformanceMark.res index 893d9c43..fb20b47a 100644 --- a/src/performance/PerformanceMark.res +++ b/src/performance/PerformanceMark.res @@ -1,4 +1,4 @@ -type t = PerformanceTypes.performanceMark +type t = PerformanceTypes.performanceMark = private {...PerformanceTypes.performanceMark} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/PerformanceMark) diff --git a/src/storage/Cache.res b/src/storage/Cache.res index d46f1e17..0b6519ee 100644 --- a/src/storage/Cache.res +++ b/src/storage/Cache.res @@ -1,4 +1,4 @@ -type t = CacheTypes.cache +type t = CacheTypes.cache = private {...CacheTypes.cache} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/match) diff --git a/src/storage/CacheStorage.res b/src/storage/CacheStorage.res index 1f716add..0dc00bce 100644 --- a/src/storage/CacheStorage.res +++ b/src/storage/CacheStorage.res @@ -1,4 +1,4 @@ -type t = CacheTypes.cacheStorage +type t = CacheTypes.cacheStorage = private {...CacheTypes.cacheStorage} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CacheStorage/match) diff --git a/src/storage/IDBFactory.res b/src/storage/IDBFactory.res index 57e64ac6..acf4d67d 100644 --- a/src/storage/IDBFactory.res +++ b/src/storage/IDBFactory.res @@ -1,4 +1,4 @@ -type t = IndexedDbTypes.idbFactory +type t = IndexedDbTypes.idbFactory = private {...IndexedDbTypes.idbFactory} /** Attempts to open a connection to the named database with the current version, or 1 if it does not already exist. If the request is successful request's result will be the connection. diff --git a/src/storage/IDBIndex.res b/src/storage/IDBIndex.res index 72a9d3eb..e1e7d823 100644 --- a/src/storage/IDBIndex.res +++ b/src/storage/IDBIndex.res @@ -1,4 +1,4 @@ -type t = IndexedDbTypes.idbIndex +type t = IndexedDbTypes.idbIndex = {...IndexedDbTypes.idbIndex} /** Retrieves the value of the first record matching the given key or key range in query. diff --git a/src/storage/IDBObjectStore.res b/src/storage/IDBObjectStore.res index bd4938b3..cf30c2cc 100644 --- a/src/storage/IDBObjectStore.res +++ b/src/storage/IDBObjectStore.res @@ -1,4 +1,4 @@ -type t = IndexedDbTypes.idbObjectStore +type t = IndexedDbTypes.idbObjectStore = {...IndexedDbTypes.idbObjectStore} /** Adds or updates a record in store with the given value and key. diff --git a/src/storage/Storage.res b/src/storage/Storage.res index f4519a3e..be2a85e3 100644 --- a/src/storage/Storage.res +++ b/src/storage/Storage.res @@ -1,5 +1,5 @@ @editor.completeFrom(Storage) -type t = WebStorageTypes.storage +type t = WebStorageTypes.storage = private {...WebStorageTypes.storage} /** Returns the name of the nth key, or null if n is greater than or equal to the number of key/value pairs. diff --git a/src/storage/StorageManager.res b/src/storage/StorageManager.res index c623b148..633df79c 100644 --- a/src/storage/StorageManager.res +++ b/src/storage/StorageManager.res @@ -1,4 +1,4 @@ -type t = StorageTypes.storageManager +type t = StorageTypes.storageManager = private {...StorageTypes.storageManager} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StorageManager/persisted) diff --git a/src/svg/SVGGraphicsElement.res b/src/svg/SVGGraphicsElement.res index ca2d9405..c67b72d1 100644 --- a/src/svg/SVGGraphicsElement.res +++ b/src/svg/SVGGraphicsElement.res @@ -1,4 +1,4 @@ -type t = SVGElement.svgGraphicsElement +type t = SVGElement.svgGraphicsElement = private {...SVGElement.svgGraphicsElement} include SVGElement.Impl({type t = SVGElement.svgGraphicsElement}) diff --git a/src/svg/SVGLength.res b/src/svg/SVGLength.res index 80aee062..247db569 100644 --- a/src/svg/SVGLength.res +++ b/src/svg/SVGLength.res @@ -1,4 +1,4 @@ -type t = SVGElement.svgLength +type t = SVGElement.svgLength = private {...SVGElement.svgLength} @throws(JsExn) @send external newValueSpecifiedUnits: ( diff --git a/src/ui-events/DataTransfer.res b/src/ui-events/DataTransfer.res index 7c0101a9..4db56003 100644 --- a/src/ui-events/DataTransfer.res +++ b/src/ui-events/DataTransfer.res @@ -1,4 +1,4 @@ -type t = UiEventsTypes.dataTransfer +type t = UiEventsTypes.dataTransfer = {...UiEventsTypes.dataTransfer} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransfer) diff --git a/src/ui-events/DataTransferItem.res b/src/ui-events/DataTransferItem.res index b510bc74..d3b73953 100644 --- a/src/ui-events/DataTransferItem.res +++ b/src/ui-events/DataTransferItem.res @@ -1,4 +1,4 @@ -type t = UiEventsTypes.dataTransferItem +type t = UiEventsTypes.dataTransferItem = private {...UiEventsTypes.dataTransferItem} /** Invokes the callback with the string data as the argument, if the drag data item kind is text. diff --git a/src/ui-events/DataTransferItemList.res b/src/ui-events/DataTransferItemList.res index 6b553cf0..30c9eb50 100644 --- a/src/ui-events/DataTransferItemList.res +++ b/src/ui-events/DataTransferItemList.res @@ -1,4 +1,4 @@ -type t = UiEventsTypes.dataTransferItemList +type t = UiEventsTypes.dataTransferItemList = private {...UiEventsTypes.dataTransferItemList} /** Adds a new entry for the given data to the drag data store. If the data is plain text then a type string has to be provided also. diff --git a/src/ui-events/Touch.res b/src/ui-events/Touch.res index 96b65353..94885854 100644 --- a/src/ui-events/Touch.res +++ b/src/ui-events/Touch.res @@ -1,4 +1,4 @@ -type t = UiEventsTypes.touch +type t = UiEventsTypes.touch = private {...UiEventsTypes.touch} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Touch) diff --git a/src/ui-events/TouchList.res b/src/ui-events/TouchList.res index ed788d4a..2718ce1d 100644 --- a/src/ui-events/TouchList.res +++ b/src/ui-events/TouchList.res @@ -1,4 +1,4 @@ -type t = UiEventsTypes.touchList +type t = UiEventsTypes.touchList = private {...UiEventsTypes.touchList} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/TouchList/item) diff --git a/src/url/URL.res b/src/url/URL.res index fb0c9add..3d04c6a7 100644 --- a/src/url/URL.res +++ b/src/url/URL.res @@ -1,5 +1,5 @@ @editor.completeFrom(URL) -type t = UrlTypes.url +type t = UrlTypes.url = {...UrlTypes.url} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/URL) diff --git a/src/view-transitions/ViewTransition.res b/src/view-transitions/ViewTransition.res index 2aba96f7..0bcd447c 100644 --- a/src/view-transitions/ViewTransition.res +++ b/src/view-transitions/ViewTransition.res @@ -1,4 +1,4 @@ -type t = ViewTransitionsTypes.viewTransition +type t = ViewTransitionsTypes.viewTransition = private {...ViewTransitionsTypes.viewTransition} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ViewTransition/skipTransition) diff --git a/src/web-audio/AudioBuffer.res b/src/web-audio/AudioBuffer.res index e3e36647..c7ac1fa7 100644 --- a/src/web-audio/AudioBuffer.res +++ b/src/web-audio/AudioBuffer.res @@ -1,4 +1,4 @@ -type t = WebAudioTypes.audioBuffer +type t = WebAudioTypes.audioBuffer = private {...WebAudioTypes.audioBuffer} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioBuffer) diff --git a/src/web-audio/AudioNode.res b/src/web-audio/AudioNode.res index 33338670..f671e316 100644 --- a/src/web-audio/AudioNode.res +++ b/src/web-audio/AudioNode.res @@ -1,4 +1,4 @@ -type t = WebAudioTypes.audioNode +type t = WebAudioTypes.audioNode = {...WebAudioTypes.audioNode} module Impl = ( T: { diff --git a/src/web-audio/AudioParam.res b/src/web-audio/AudioParam.res index 7f558d96..10b5ea96 100644 --- a/src/web-audio/AudioParam.res +++ b/src/web-audio/AudioParam.res @@ -1,4 +1,4 @@ -type t = WebAudioTypes.audioParam +type t = WebAudioTypes.audioParam = {...WebAudioTypes.audioParam} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioParam/setValueAtTime) diff --git a/src/web-audio/BaseAudioContext.res b/src/web-audio/BaseAudioContext.res index 8c083a4f..c644c68a 100644 --- a/src/web-audio/BaseAudioContext.res +++ b/src/web-audio/BaseAudioContext.res @@ -1,4 +1,4 @@ -type t = WebAudioTypes.baseAudioContext +type t = WebAudioTypes.baseAudioContext = private {...WebAudioTypes.baseAudioContext} module Impl = ( T: { diff --git a/src/web-audio/PeriodicWave.res b/src/web-audio/PeriodicWave.res index 8eadfc1b..c37fd1ff 100644 --- a/src/web-audio/PeriodicWave.res +++ b/src/web-audio/PeriodicWave.res @@ -1,4 +1,4 @@ -type t = WebAudioTypes.periodicWave +type t = WebAudioTypes.periodicWave = private {...WebAudioTypes.periodicWave} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/PeriodicWave) diff --git a/src/web-audio/Worklet.res b/src/web-audio/Worklet.res index bac25ae4..6ba49333 100644 --- a/src/web-audio/Worklet.res +++ b/src/web-audio/Worklet.res @@ -1,4 +1,4 @@ -type t = WebAudioTypes.worklet +type t = WebAudioTypes.worklet = private {...WebAudioTypes.worklet} /** Loads and executes the module script given by moduleURL into all of worklet's global scopes. It can also create additional global scopes as part of this process, depending on the worklet type. The returned promise will fulfill once the script has been successfully loaded and run in all global scopes. diff --git a/src/window/CustomElementRegistry.res b/src/window/CustomElementRegistry.res index 6b02ae65..ba2a96f0 100644 --- a/src/window/CustomElementRegistry.res +++ b/src/window/CustomElementRegistry.res @@ -1,4 +1,4 @@ -type t = DOM.customElementRegistry +type t = DOM.customElementRegistry = private {...DOM.customElementRegistry} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CustomElementRegistry/define) diff --git a/src/window/History.res b/src/window/History.res index d8b8ab16..a170b46f 100644 --- a/src/window/History.res +++ b/src/window/History.res @@ -1,5 +1,5 @@ @editor.completeFrom(History) -type t = HistoryTypes.history +type t = HistoryTypes.history = {...HistoryTypes.history} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/History/go) diff --git a/src/window/IdleDeadline.res b/src/window/IdleDeadline.res index e78c5035..4d7c407d 100644 --- a/src/window/IdleDeadline.res +++ b/src/window/IdleDeadline.res @@ -1,4 +1,4 @@ -type t = DOM.idleDeadline +type t = DOM.idleDeadline = private {...DOM.idleDeadline} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/IdleDeadline/timeRemaining) diff --git a/src/workers/NavigationPreloadManager.res b/src/workers/NavigationPreloadManager.res index 96023f70..e754a008 100644 --- a/src/workers/NavigationPreloadManager.res +++ b/src/workers/NavigationPreloadManager.res @@ -1,4 +1,6 @@ -type t = ServiceWorkerTypes.navigationPreloadManager +type t = ServiceWorkerTypes.navigationPreloadManager = private { + ...ServiceWorkerTypes.navigationPreloadManager, +} /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/NavigationPreloadManager/enable)