diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index cf9aed910..4d8d5184d 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -422,7 +422,7 @@ interface ExtendableMessageEventInit extends ExtendableEventInit { lastEventId?: string; origin?: string; ports?: MessagePort[]; - source?: object | ServiceWorker | MessagePort; + source?: object | ServiceWorker | MessagePort | null; } interface FetchEventInit extends ExtendableEventInit { @@ -501,7 +501,7 @@ interface IDBIndexParameters { interface IDBObjectStoreParameters { autoIncrement?: boolean; - keyPath?: string | string[]; + keyPath?: string | string[] | null; } interface IDBVersionChangeEventInit extends EventInit { @@ -1250,7 +1250,7 @@ interface PushSubscriptionJSON { } interface PushSubscriptionOptionsInit { - applicationServerKey?: BufferSource | string; + applicationServerKey?: BufferSource | string | null; userVisibleOnly?: boolean; } @@ -7699,7 +7699,7 @@ interface HTMLOptionsCollection extends HTMLCollectionOf { * This method will throw a "HierarchyRequestError" DOMException if * element is an ancestor of the element into which it is to be inserted. */ - add(element: HTMLOptionElement | HTMLOptGroupElement, before?: HTMLElement | number): void; + add(element: HTMLOptionElement | HTMLOptGroupElement, before?: HTMLElement | number | null): void; /** * Removes the item with index index from the collection. */ @@ -7964,7 +7964,7 @@ interface HTMLSelectElement extends HTMLElement { * @param element Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection. * @param before Variant of type Object that specifies an element to insert before, or null to append the object to the collection. */ - add(element: HTMLOptionElement | HTMLOptGroupElement, before?: HTMLElement | number): void; + add(element: HTMLOptionElement | HTMLOptGroupElement, before?: HTMLElement | number | null): void; /** * Returns whether a form will validate when it is submitted, without having to submit it. */ @@ -16414,7 +16414,7 @@ interface XMLHttpRequest extends XMLHttpRequestEventTarget { * Initiates the request. The optional argument provides the request body. The argument is ignored if request method is GET or HEAD. * Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set. */ - send(body?: Document | BodyInit): void; + send(body?: Document | BodyInit | null): void; /** * Combines a header in author request headers. * Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set. diff --git a/baselines/webworker.generated.d.ts b/baselines/webworker.generated.d.ts index bef66e14d..e487bedd4 100644 --- a/baselines/webworker.generated.d.ts +++ b/baselines/webworker.generated.d.ts @@ -109,7 +109,7 @@ interface ExtendableMessageEventInit extends ExtendableEventInit { lastEventId?: string; origin?: string; ports?: MessagePort[]; - source?: Client | ServiceWorker | MessagePort; + source?: Client | ServiceWorker | MessagePort | null; } interface FetchEventInit extends ExtendableEventInit { @@ -135,7 +135,7 @@ interface IDBIndexParameters { interface IDBObjectStoreParameters { autoIncrement?: boolean; - keyPath?: string | string[]; + keyPath?: string | string[] | null; } interface IDBVersionChangeEventInit extends EventInit { @@ -221,7 +221,7 @@ interface PushSubscriptionJSON { } interface PushSubscriptionOptionsInit { - applicationServerKey?: BufferSource | string; + applicationServerKey?: BufferSource | string | null; userVisibleOnly?: boolean; } @@ -2458,7 +2458,7 @@ interface XMLHttpRequest extends XMLHttpRequestEventTarget { * Initiates the request. The optional argument provides the request body. The argument is ignored if request method is GET or HEAD. * Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set. */ - send(body?: object | BodyInit): void; + send(body?: object | BodyInit | null): void; /** * Combines a header in author request headers. * Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set. diff --git a/src/emitter.ts b/src/emitter.ts index 019671234..463164f0a 100644 --- a/src/emitter.ts +++ b/src/emitter.ts @@ -256,7 +256,7 @@ export function emitWebIDl(webidl: Browser.WebIdl, flavor: Flavor) { else { type = { name: types.map(t => t.name).join(" | "), - nullable: !!types.find(t => t.nullable) + nullable: !!types.find(t => t.nullable) || !!obj.nullable }; } }