Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Disable createSyncAccessHandle API
  • Loading branch information
j-f1 committed Jun 29, 2023
commit 8b33db5e66896e228f2e51745fd761c5596e6aee
13 changes: 2 additions & 11 deletions Sources/FileSystem/Generated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -194,17 +194,9 @@ public class FileSystemFileHandle: FileSystemHandle {
return try await _promise.value.fromJSValue()!
}

@inlinable public func createSyncAccessHandle() -> JSPromise {
let this = jsObject
return this[Strings.createSyncAccessHandle].function!(this: this, arguments: []).fromJSValue()!
}
// XXX: member 'createSyncAccessHandle' is ignored

@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
@inlinable public func createSyncAccessHandle() async throws -> FileSystemSyncAccessHandle {
let this = jsObject
let _promise: JSPromise = this[Strings.createSyncAccessHandle].function!(this: this, arguments: []).fromJSValue()!
return try await _promise.value.fromJSValue()!
}
// XXX: member 'createSyncAccessHandle' is ignored
}

public class FileSystemGetDirectoryOptions: BridgedDictionary {
Expand Down Expand Up @@ -556,7 +548,6 @@ public class WriteParams: BridgedDictionary {
@usableFromInline static let accept: JSString = "accept"
@usableFromInline static let at: JSString = "at"
@usableFromInline static let create: JSString = "create"
@usableFromInline static let createSyncAccessHandle: JSString = "createSyncAccessHandle"
@usableFromInline static let createWritable: JSString = "createWritable"
@usableFromInline static let data: JSString = "data"
@usableFromInline static let description: JSString = "description"
Expand Down
2 changes: 2 additions & 0 deletions Sources/WebIDLToSwift/IDLBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ enum IDLBuilder {
// manually implemented
"HTMLCanvasElement": ["getContext"],
"OffscreenCanvas": ["getContext"],
// [Exposed] is unsupported, manually disable affected symbols:
"FileSystemFileHandle": ["createSyncAccessHandle"],
],
types: merged.types
)
Expand Down