chore: update to latest TypeScript (#32596)

This commit is contained in:
Milan Burda 2022-01-31 12:37:40 +01:00 committed by GitHub
parent 32ae67c873
commit db9ab80694
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 15 additions and 69 deletions

View file

@ -294,60 +294,9 @@ declare interface Window {
}
};
WebView: typeof ElectronInternal.WebViewElement;
ResizeObserver: ResizeObserver;
trustedTypes: TrustedTypePolicyFactory;
}
/**
* The ResizeObserver interface is used to observe changes to Element's content
* rect.
*
* It is modeled after MutationObserver and IntersectionObserver.
*/
declare class ResizeObserver {
constructor (callback: ResizeObserverCallback);
/**
* Adds target to the list of observed elements.
*/
observe: (target: Element) => void;
/**
* Removes target from the list of observed elements.
*/
unobserve: (target: Element) => void;
/**
* Clears both the observationTargets and activeTargets lists.
*/
disconnect: () => void;
}
/**
* This callback delivers ResizeObserver's notifications. It is invoked by a
* broadcast active observations algorithm.
*/
interface ResizeObserverCallback {
(entries: ResizeObserverEntry[], observer: ResizeObserver): void;
}
interface ResizeObserverEntry {
/**
* @param target The Element whose size has changed.
*/
new (target: Element): ResizeObserverEntry;
/**
* The Element whose size has changed.
*/
readonly target: Element;
/**
* Element's content rect when ResizeObserverCallback is invoked.
*/
readonly contentRect: DOMRectReadOnly;
}
// https://w3c.github.io/webappsec-trusted-types/dist/spec/#trusted-types
type TrustedHTML = string;