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..c1aee495 --- /dev/null +++ b/scripts/consumer-concrete-types.res @@ -0,0 +1,106 @@ +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 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 +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 + +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 ad7f3595..d70fe18b 100644 --- a/src/animation/DocumentTimeline.res +++ b/src/animation/DocumentTimeline.res @@ -1,3 +1,5 @@ +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 b6123da8..5c3b4676 100644 --- a/src/canvas/CanvasGradient.res +++ b/src/canvas/CanvasGradient.res @@ -1,3 +1,5 @@ +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 600bee97..84b32179 100644 --- a/src/canvas/CanvasPattern.res +++ b/src/canvas/CanvasPattern.res @@ -1,5 +1,7 @@ type domMatrix2DInit = DOM.domMatrix2DInit +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. [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..bf7e0e98 100644 --- a/src/canvas/CanvasRenderingContext2D.res +++ b/src/canvas/CanvasRenderingContext2D.res @@ -1,3 +1,5 @@ +type t = DOM.canvasRenderingContext2D + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fillStyle) */ diff --git a/src/canvas/ImageBitmap.res b/src/canvas/ImageBitmap.res index 92be5bc4..a5c37376 100644 --- a/src/canvas/ImageBitmap.res +++ b/src/canvas/ImageBitmap.res @@ -1,3 +1,5 @@ +type t = CanvasTypes.imageBitmap = private {...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..12518658 100644 --- a/src/canvas/ImageBitmapRenderingContext.res +++ b/src/canvas/ImageBitmapRenderingContext.res @@ -1,3 +1,7 @@ +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. [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..477105a7 100644 --- a/src/canvas/ImageData.res +++ b/src/canvas/ImageData.res @@ -1,3 +1,5 @@ +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 538f63af..0aba876b 100644 --- a/src/canvas/Path2D.res +++ b/src/canvas/Path2D.res @@ -1,5 +1,7 @@ type domMatrix2DInit = DOM.domMatrix2DInit +type t = CanvasTypes.path2D = private {...CanvasTypes.path2D} + /** `make()` diff --git a/src/canvas/VideoColorSpace.res b/src/canvas/VideoColorSpace.res index 355f6458..f7852782 100644 --- a/src/canvas/VideoColorSpace.res +++ b/src/canvas/VideoColorSpace.res @@ -1,3 +1,5 @@ +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 2643b3e6..92ee92cd 100644 --- a/src/canvas/VideoFrame.res +++ b/src/canvas/VideoFrame.res @@ -1,3 +1,5 @@ +type t = DOM.videoFrame = private {...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..4f8defe9 100644 --- a/src/css-font-loading/FontFace.res +++ b/src/css-font-loading/FontFace.res @@ -1,3 +1,5 @@ +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 115e97d5..525746de 100644 --- a/src/cssom/CSSRuleList.res +++ b/src/cssom/CSSRuleList.res @@ -1,3 +1,5 @@ +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 6a179b39..aea65a42 100644 --- a/src/device/GamepadHapticActuator.res +++ b/src/device/GamepadHapticActuator.res @@ -1,3 +1,5 @@ +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 18904fbe..f5224f3f 100644 --- a/src/device/Geolocation.res +++ b/src/device/Geolocation.res @@ -1,3 +1,6 @@ +@editor.completeFrom(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 27693bb8..2ccc9709 100644 --- a/src/device/GeolocationCoordinates.res +++ b/src/device/GeolocationCoordinates.res @@ -1,3 +1,7 @@ +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 6837f512..4152c53f 100644 --- a/src/device/GeolocationPosition.res +++ b/src/device/GeolocationPosition.res @@ -1,3 +1,5 @@ +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/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..bdab9423 100644 --- a/src/device/LockManager.res +++ b/src/device/LockManager.res @@ -1,3 +1,5 @@ +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 412e7da7..4bebbbfa 100644 --- a/src/device/WakeLock.res +++ b/src/device/WakeLock.res @@ -1,3 +1,5 @@ +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 687139d7..3f1dc1e7 100644 --- a/src/dom-nodes/CaretPosition.res +++ b/src/dom-nodes/CaretPosition.res @@ -1,2 +1,4 @@ +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 349a25e6..ec7bb19e 100644 --- a/src/dom-nodes/NamedNodeMap.res +++ b/src/dom-nodes/NamedNodeMap.res @@ -1,3 +1,6 @@ +@editor.completeFrom(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 5b3e8cf7..f7f7a471 100644 --- a/src/dom-nodes/NodeList.res +++ b/src/dom-nodes/NodeList.res @@ -1,3 +1,5 @@ +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. [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..931e826e 100644 --- a/src/dom-platform/DOMTokenList.res +++ b/src/dom-platform/DOMTokenList.res @@ -1,3 +1,5 @@ +type t = DOM.domTokenList = {...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..0c109eca 100644 --- a/src/event/AbortController.res +++ b/src/event/AbortController.res @@ -1,3 +1,5 @@ +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 623043eb..cef5fc4d 100644 --- a/src/fetch/Headers.res +++ b/src/fetch/Headers.res @@ -1,3 +1,5 @@ +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 492582cd..cca270eb 100644 --- a/src/file/FileList.res +++ b/src/file/FileList.res @@ -1,3 +1,5 @@ +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 60cc57b3..fb943376 100644 --- a/src/file/FileSystemDirectoryEntry.res +++ b/src/file/FileSystemDirectoryEntry.res @@ -1,3 +1,7 @@ +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 0d9f4e48..d1f6ac45 100644 --- a/src/file/FileSystemDirectoryHandle.res +++ b/src/file/FileSystemDirectoryHandle.res @@ -1,3 +1,5 @@ +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 3575a2d4..7ed1a21e 100644 --- a/src/file/FileSystemDirectoryReader.res +++ b/src/file/FileSystemDirectoryReader.res @@ -1,3 +1,7 @@ +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 7dcfd930..2796430f 100644 --- a/src/file/FileSystemEntry.res +++ b/src/file/FileSystemEntry.res @@ -1,3 +1,7 @@ +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 550ef251..3f9bd5b5 100644 --- a/src/file/FileSystemFileHandle.res +++ b/src/file/FileSystemFileHandle.res @@ -1,3 +1,5 @@ +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 a5072bbf..6a145012 100644 --- a/src/file/FileSystemHandle.res +++ b/src/file/FileSystemHandle.res @@ -1,3 +1,5 @@ +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 01774824..996002ee 100644 --- a/src/file/FileSystemWritableFileStream.res +++ b/src/file/FileSystemWritableFileStream.res @@ -1,3 +1,7 @@ +type t = FileTypes.fileSystemWritableFileStream = private { + ...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..d2cabeb4 100644 --- a/src/file/WritableStream.res +++ b/src/file/WritableStream.res @@ -1,3 +1,6 @@ +@editor.completeFrom(WritableStream) +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 27ada3bd..83bdffae 100644 --- a/src/file/WritableStreamDefaultController.res +++ b/src/file/WritableStreamDefaultController.res @@ -1,3 +1,7 @@ +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 183fe864..f9ba24ee 100644 --- a/src/geometry/DOMMatrix.res +++ b/src/geometry/DOMMatrix.res @@ -1,3 +1,5 @@ +type t = DOM.domMatrix = private {...DOM.domMatrix} + /** `make()` diff --git a/src/geometry/DOMMatrixReadOnly.res b/src/geometry/DOMMatrixReadOnly.res index 39bd42f2..b1b5a740 100644 --- a/src/geometry/DOMMatrixReadOnly.res +++ b/src/geometry/DOMMatrixReadOnly.res @@ -1,3 +1,5 @@ +type t = DOM.domMatrixReadOnly = private {...DOM.domMatrixReadOnly} + /** `make()` diff --git a/src/geometry/DOMPoint.res b/src/geometry/DOMPoint.res index 5d95475b..34225952 100644 --- a/src/geometry/DOMPoint.res +++ b/src/geometry/DOMPoint.res @@ -1,3 +1,5 @@ +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 096494db..1a7b220b 100644 --- a/src/geometry/DOMPointReadOnly.res +++ b/src/geometry/DOMPointReadOnly.res @@ -1,3 +1,5 @@ +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 52507eeb..96246ce1 100644 --- a/src/geometry/DOMRect.res +++ b/src/geometry/DOMRect.res @@ -1,3 +1,5 @@ +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 624be726..9e18173a 100644 --- a/src/geometry/DOMRectList.res +++ b/src/geometry/DOMRectList.res @@ -1,2 +1,4 @@ +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 4f68e2ab..99fda140 100644 --- a/src/geometry/DOMRectReadOnly.res +++ b/src/geometry/DOMRectReadOnly.res @@ -1,3 +1,5 @@ +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 56462692..f1a6b5f0 100644 --- a/src/media/MediaCapabilities.res +++ b/src/media/MediaCapabilities.res @@ -1,3 +1,8 @@ +@editor.completeFrom(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/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..2de44581 100644 --- a/src/media/MediaKeyStatusMap.res +++ b/src/media/MediaKeyStatusMap.res @@ -1,3 +1,7 @@ +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 9cb3bed3..e5fb5b6a 100644 --- a/src/media/MediaKeySystemAccess.res +++ b/src/media/MediaKeySystemAccess.res @@ -1,3 +1,7 @@ +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 54389b39..3487ae6f 100644 --- a/src/media/MediaKeys.res +++ b/src/media/MediaKeys.res @@ -1,3 +1,7 @@ +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 66db53dc..7d514817 100644 --- a/src/media/TextTrackCueList.res +++ b/src/media/TextTrackCueList.res @@ -1,3 +1,5 @@ +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 6f2fbef8..ebe98fb3 100644 --- a/src/messaging/PushManager.res +++ b/src/messaging/PushManager.res @@ -1,3 +1,5 @@ +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 44bc8637..f43faba4 100644 --- a/src/messaging/PushSubscription.res +++ b/src/messaging/PushSubscription.res @@ -1,3 +1,5 @@ +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 c7ae3b68..e8e8e957 100644 --- a/src/navigator/ClipboardItem.res +++ b/src/navigator/ClipboardItem.res @@ -1,3 +1,5 @@ +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 70fd96f0..9a930ff9 100644 --- a/src/navigator/CredentialsContainer.res +++ b/src/navigator/CredentialsContainer.res @@ -1,3 +1,7 @@ +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 7b653abc..3c5df49b 100644 --- a/src/navigator/Permissions.res +++ b/src/navigator/Permissions.res @@ -1,3 +1,5 @@ +type t = PermissionsTypes.permissions = private {...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..4daf2c3c 100644 --- a/src/observers/IntersectionObserver.res +++ b/src/observers/IntersectionObserver.res @@ -1,3 +1,8 @@ +@editor.completeFrom(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/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..b9a7e16c 100644 --- a/src/observers/ResizeObserver.res +++ b/src/observers/ResizeObserver.res @@ -1,3 +1,6 @@ +@editor.completeFrom(ResizeObserver) +type t = ResizeObserverTypes.resizeObserver = private {...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..56741988 100644 --- a/src/performance/PerformanceEntry.res +++ b/src/performance/PerformanceEntry.res @@ -1,3 +1,5 @@ +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 724f8f3e..fb20b47a 100644 --- a/src/performance/PerformanceMark.res +++ b/src/performance/PerformanceMark.res @@ -1,3 +1,5 @@ +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 2f1e7099..0b6519ee 100644 --- a/src/storage/Cache.res +++ b/src/storage/Cache.res @@ -1,3 +1,5 @@ +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 112f298a..0dc00bce 100644 --- a/src/storage/CacheStorage.res +++ b/src/storage/CacheStorage.res @@ -1,3 +1,5 @@ +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 712e695a..acf4d67d 100644 --- a/src/storage/IDBFactory.res +++ b/src/storage/IDBFactory.res @@ -1,3 +1,5 @@ +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. [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..e1e7d823 100644 --- a/src/storage/IDBIndex.res +++ b/src/storage/IDBIndex.res @@ -1,3 +1,5 @@ +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 26650a9c..cf30c2cc 100644 --- a/src/storage/IDBObjectStore.res +++ b/src/storage/IDBObjectStore.res @@ -1,3 +1,5 @@ +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 767e6769..be2a85e3 100644 --- a/src/storage/Storage.res +++ b/src/storage/Storage.res @@ -1,3 +1,6 @@ +@editor.completeFrom(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. [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..633df79c 100644 --- a/src/storage/StorageManager.res +++ b/src/storage/StorageManager.res @@ -1,3 +1,5 @@ +type t = StorageTypes.storageManager = private {...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..c67b72d1 100644 --- a/src/svg/SVGGraphicsElement.res +++ b/src/svg/SVGGraphicsElement.res @@ -1,3 +1,5 @@ +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 e13fa314..247db569 100644 --- a/src/svg/SVGLength.res +++ b/src/svg/SVGLength.res @@ -1,3 +1,5 @@ +type t = SVGElement.svgLength = private {...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..4db56003 100644 --- a/src/ui-events/DataTransfer.res +++ b/src/ui-events/DataTransfer.res @@ -1,3 +1,5 @@ +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 7adfc2cb..d3b73953 100644 --- a/src/ui-events/DataTransferItem.res +++ b/src/ui-events/DataTransferItem.res @@ -1,3 +1,5 @@ +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. [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..30c9eb50 100644 --- a/src/ui-events/DataTransferItemList.res +++ b/src/ui-events/DataTransferItemList.res @@ -1,3 +1,5 @@ +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. [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DataTransferItemList/add) diff --git a/src/ui-events/Touch.res b/src/ui-events/Touch.res index 47ddb3ad..94885854 100644 --- a/src/ui-events/Touch.res +++ b/src/ui-events/Touch.res @@ -1,3 +1,5 @@ +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 fc081ba2..2718ce1d 100644 --- a/src/ui-events/TouchList.res +++ b/src/ui-events/TouchList.res @@ -1,3 +1,5 @@ +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 c7e6e371..3d04c6a7 100644 --- a/src/url/URL.res +++ b/src/url/URL.res @@ -1,3 +1,6 @@ +@editor.completeFrom(URL) +type t = UrlTypes.url = {...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..0bcd447c 100644 --- a/src/view-transitions/ViewTransition.res +++ b/src/view-transitions/ViewTransition.res @@ -1,3 +1,5 @@ +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 01878002..c7ac1fa7 100644 --- a/src/web-audio/AudioBuffer.res +++ b/src/web-audio/AudioBuffer.res @@ -1,3 +1,5 @@ +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 1c62a72d..f671e316 100644 --- a/src/web-audio/AudioNode.res +++ b/src/web-audio/AudioNode.res @@ -1,3 +1,5 @@ +type t = WebAudioTypes.audioNode = {...WebAudioTypes.audioNode} + module Impl = ( T: { type t diff --git a/src/web-audio/AudioParam.res b/src/web-audio/AudioParam.res index c2cf1012..10b5ea96 100644 --- a/src/web-audio/AudioParam.res +++ b/src/web-audio/AudioParam.res @@ -1,3 +1,5 @@ +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 b1bf9db6..c644c68a 100644 --- a/src/web-audio/BaseAudioContext.res +++ b/src/web-audio/BaseAudioContext.res @@ -1,3 +1,5 @@ +type t = WebAudioTypes.baseAudioContext = private {...WebAudioTypes.baseAudioContext} + module Impl = ( T: { type t diff --git a/src/web-audio/PeriodicWave.res b/src/web-audio/PeriodicWave.res index 9ddd4bb9..c37fd1ff 100644 --- a/src/web-audio/PeriodicWave.res +++ b/src/web-audio/PeriodicWave.res @@ -1,3 +1,5 @@ +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 96d62dae..6ba49333 100644 --- a/src/web-audio/Worklet.res +++ b/src/web-audio/Worklet.res @@ -1,3 +1,5 @@ +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 badd6ce4..ba2a96f0 100644 --- a/src/window/CustomElementRegistry.res +++ b/src/window/CustomElementRegistry.res @@ -1,3 +1,5 @@ +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 c622e668..a170b46f 100644 --- a/src/window/History.res +++ b/src/window/History.res @@ -1,3 +1,6 @@ +@editor.completeFrom(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/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..4d7c407d 100644 --- a/src/window/IdleDeadline.res +++ b/src/window/IdleDeadline.res @@ -1,3 +1,5 @@ +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/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..e754a008 100644 --- a/src/workers/NavigationPreloadManager.res +++ b/src/workers/NavigationPreloadManager.res @@ -1,3 +1,7 @@ +type t = ServiceWorkerTypes.navigationPreloadManager = private { + ...ServiceWorkerTypes.navigationPreloadManager, +} + /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/NavigationPreloadManager/enable) */