Skip to content

Sort implements #731

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
26 changes: 13 additions & 13 deletions baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3425,7 +3425,7 @@ interface CanvasRect {
}

/** The CanvasRenderingContext2D interface, part of the Canvas API, provides the 2D rendering context for the drawing surface of a <canvas> element. It is used for drawing shapes, text, images, and other objects. */
interface CanvasRenderingContext2D extends CanvasState, CanvasTransform, CanvasCompositing, CanvasImageSmoothing, CanvasFillStrokeStyles, CanvasShadowStyles, CanvasFilters, CanvasRect, CanvasDrawPath, CanvasUserInterface, CanvasText, CanvasDrawImage, CanvasImageData, CanvasPathDrawingStyles, CanvasTextDrawingStyles, CanvasPath {
interface CanvasRenderingContext2D extends CanvasCompositing, CanvasDrawImage, CanvasDrawPath, CanvasFillStrokeStyles, CanvasFilters, CanvasImageData, CanvasImageSmoothing, CanvasPath, CanvasPathDrawingStyles, CanvasRect, CanvasShadowStyles, CanvasState, CanvasText, CanvasTextDrawingStyles, CanvasTransform, CanvasUserInterface {
readonly canvas: HTMLCanvasElement;
}

Expand Down Expand Up @@ -3507,7 +3507,7 @@ declare var ChannelSplitterNode: {
};

/** The CharacterData abstract interface represents a Node object that contains characters. This is an abstract interface, meaning there aren't any object of type CharacterData: it is implemented by other interfaces, like Text, Comment, or ProcessingInstruction which aren't abstract. */
interface CharacterData extends Node, NonDocumentTypeChildNode, ChildNode {
interface CharacterData extends Node, ChildNode, NonDocumentTypeChildNode {
data: string;
readonly length: number;
appendData(data: string): void;
Expand Down Expand Up @@ -4449,7 +4449,7 @@ interface DocumentEventMap extends GlobalEventHandlersEventMap, DocumentAndEleme
}

/** Any web page loaded in the browser and serves as an entry point into the web page's content, which is the DOM tree. */
interface Document extends Node, NonElementParentNode, DocumentOrShadowRoot, ParentNode, XPathEvaluatorBase, GlobalEventHandlers, DocumentAndElementEventHandlers {
interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShadowRoot, GlobalEventHandlers, NonElementParentNode, ParentNode, XPathEvaluatorBase {
/**
* Sets or gets the URL for the current document.
*/
Expand Down Expand Up @@ -5140,7 +5140,7 @@ interface ElementEventMap {
}

/** Element is the most general base class from which all objects in a Document inherit. It only has methods and properties common to all kinds of elements. More specific classes inherit from Element. */
interface Element extends Node, ParentNode, NonDocumentTypeChildNode, ChildNode, Slotable, InnerHTML, Animatable {
interface Element extends Node, Animatable, ChildNode, InnerHTML, NonDocumentTypeChildNode, ParentNode, Slotable {
readonly assignedSlot: HTMLSlotElement | null;
readonly attributes: NamedNodeMap;
/**
Expand Down Expand Up @@ -6635,7 +6635,7 @@ interface HTMLElementEventMap extends ElementEventMap, GlobalEventHandlersEventM
}

/** Any HTML element. Some elements directly implement this interface, while others implement it via an interface that inherits it. */
interface HTMLElement extends Element, GlobalEventHandlers, DocumentAndElementEventHandlers, ElementContentEditable, HTMLOrSVGElement, ElementCSSInlineStyle {
interface HTMLElement extends Element, DocumentAndElementEventHandlers, ElementCSSInlineStyle, ElementContentEditable, GlobalEventHandlers, HTMLOrSVGElement {
accessKey: string;
readonly accessKeyLabel: string;
autocapitalize: string;
Expand Down Expand Up @@ -10817,7 +10817,7 @@ declare var NavigationPreloadManager: {
};

/** The state and the identity of the user agent. It allows scripts to query it and to register themselves to carry on some activities. */
interface Navigator extends NavigatorID, NavigatorLanguage, NavigatorOnLine, NavigatorContentUtils, NavigatorCookies, NavigatorPlugins, NavigatorConcurrentHardware, NavigatorStorage, NavigatorAutomationInformation, MSFileSaver, MSNavigatorDoNotTrack, NavigatorBeacon {
interface Navigator extends MSFileSaver, MSNavigatorDoNotTrack, NavigatorAutomationInformation, NavigatorBeacon, NavigatorConcurrentHardware, NavigatorContentUtils, NavigatorCookies, NavigatorID, NavigatorLanguage, NavigatorOnLine, NavigatorPlugins, NavigatorStorage {
readonly activeVRDisplays: ReadonlyArray<VRDisplay>;
readonly clipboard: Clipboard;
readonly credentials: CredentialsContainer;
Expand Down Expand Up @@ -11356,7 +11356,7 @@ declare var OffscreenCanvas: {
new(width: number, height: number): OffscreenCanvas;
};

interface OffscreenCanvasRenderingContext2D extends CanvasState, CanvasTransform, CanvasCompositing, CanvasImageSmoothing, CanvasFillStrokeStyles, CanvasShadowStyles, CanvasFilters, CanvasRect, CanvasDrawPath, CanvasText, CanvasDrawImage, CanvasImageData, CanvasPathDrawingStyles, CanvasTextDrawingStyles, CanvasPath {
interface OffscreenCanvasRenderingContext2D extends CanvasCompositing, CanvasDrawImage, CanvasDrawPath, CanvasFillStrokeStyles, CanvasFilters, CanvasImageData, CanvasImageSmoothing, CanvasPath, CanvasPathDrawingStyles, CanvasRect, CanvasShadowStyles, CanvasState, CanvasText, CanvasTextDrawingStyles, CanvasTransform {
readonly canvas: OffscreenCanvas;
commit(): void;
}
Expand Down Expand Up @@ -13113,7 +13113,7 @@ interface SVGElementEventMap extends ElementEventMap, GlobalEventHandlersEventMa
}

/** All of the SVG DOM interfaces that correspond directly to elements in the SVG language derive from the SVGElement interface. */
interface SVGElement extends Element, GlobalEventHandlers, DocumentAndElementEventHandlers, SVGElementInstance, HTMLOrSVGElement, ElementCSSInlineStyle {
interface SVGElement extends Element, DocumentAndElementEventHandlers, ElementCSSInlineStyle, GlobalEventHandlers, HTMLOrSVGElement, SVGElementInstance {
/** @deprecated */
readonly className: any;
readonly ownerSVGElement: SVGSVGElement | null;
Expand Down Expand Up @@ -14323,7 +14323,7 @@ declare var SVGPathSegMovetoRel: {
};

/** Corresponds to the <pattern> element. */
interface SVGPatternElement extends SVGElement, SVGTests, SVGFitToViewBox, SVGURIReference {
interface SVGPatternElement extends SVGElement, SVGFitToViewBox, SVGTests, SVGURIReference {
readonly height: SVGAnimatedLength;
readonly patternContentUnits: SVGAnimatedEnumeration;
readonly patternTransform: SVGAnimatedTransformList;
Expand Down Expand Up @@ -15624,7 +15624,7 @@ interface TextDecoderCommon {
readonly ignoreBOM: boolean;
}

interface TextDecoderStream extends TextDecoderCommon, GenericTransformStream {
interface TextDecoderStream extends GenericTransformStream, TextDecoderCommon {
}

declare var TextDecoderStream: {
Expand Down Expand Up @@ -15656,7 +15656,7 @@ interface TextEncoderCommon {
readonly encoding: string;
}

interface TextEncoderStream extends TextEncoderCommon, GenericTransformStream {
interface TextEncoderStream extends GenericTransformStream, TextEncoderCommon {
}

declare var TextEncoderStream: {
Expand Down Expand Up @@ -16424,7 +16424,7 @@ declare var WebAuthnAssertion: {
new(): WebAuthnAssertion;
};

interface WebGL2RenderingContext extends WebGLRenderingContextBase, WebGL2RenderingContextBase, WebGL2RenderingContextOverloads {
interface WebGL2RenderingContext extends WebGL2RenderingContextBase, WebGL2RenderingContextOverloads, WebGLRenderingContextBase {
}

declare var WebGL2RenderingContext: {
Expand Down Expand Up @@ -18477,7 +18477,7 @@ interface WindowEventMap extends GlobalEventHandlersEventMap, WindowEventHandler
}

/** A window containing a DOM document; the document property points to the DOM document loaded in that window. */
interface Window extends EventTarget, WindowTimers, WindowSessionStorage, WindowLocalStorage, WindowConsole, GlobalEventHandlers, IDBEnvironment, WindowBase64, AnimationFrameProvider, WindowOrWorkerGlobalScope, WindowEventHandlers {
interface Window extends EventTarget, AnimationFrameProvider, GlobalEventHandlers, IDBEnvironment, WindowBase64, WindowConsole, WindowEventHandlers, WindowLocalStorage, WindowOrWorkerGlobalScope, WindowSessionStorage, WindowTimers {
readonly applicationCache: ApplicationCache;
readonly caches: CacheStorage;
readonly clientInformation: Navigator;
Expand Down
12 changes: 6 additions & 6 deletions baselines/webworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2452,7 +2452,7 @@ declare var OffscreenCanvas: {
new(width: number, height: number): OffscreenCanvas;
};

interface OffscreenCanvasRenderingContext2D extends CanvasState, CanvasTransform, CanvasCompositing, CanvasImageSmoothing, CanvasFillStrokeStyles, CanvasShadowStyles, CanvasFilters, CanvasRect, CanvasDrawPath, CanvasText, CanvasDrawImage, CanvasImageData, CanvasPathDrawingStyles, CanvasTextDrawingStyles, CanvasPath {
interface OffscreenCanvasRenderingContext2D extends CanvasCompositing, CanvasDrawImage, CanvasDrawPath, CanvasFillStrokeStyles, CanvasFilters, CanvasImageData, CanvasImageSmoothing, CanvasPath, CanvasPathDrawingStyles, CanvasRect, CanvasShadowStyles, CanvasState, CanvasText, CanvasTextDrawingStyles, CanvasTransform {
readonly canvas: OffscreenCanvas;
commit(): void;
}
Expand Down Expand Up @@ -3082,7 +3082,7 @@ interface TextDecoderCommon {
readonly ignoreBOM: boolean;
}

interface TextDecoderStream extends TextDecoderCommon, GenericTransformStream {
interface TextDecoderStream extends GenericTransformStream, TextDecoderCommon {
}

declare var TextDecoderStream: {
Expand Down Expand Up @@ -3114,7 +3114,7 @@ interface TextEncoderCommon {
readonly encoding: string;
}

interface TextEncoderStream extends TextEncoderCommon, GenericTransformStream {
interface TextEncoderStream extends GenericTransformStream, TextEncoderCommon {
}

declare var TextEncoderStream: {
Expand Down Expand Up @@ -3365,7 +3365,7 @@ interface WEBGL_lose_context {
restoreContext(): void;
}

interface WebGL2RenderingContext extends WebGLRenderingContextBase, WebGL2RenderingContextBase, WebGL2RenderingContextOverloads {
interface WebGL2RenderingContext extends WebGL2RenderingContextBase, WebGL2RenderingContextOverloads, WebGLRenderingContextBase {
}

declare var WebGL2RenderingContext: {
Expand Down Expand Up @@ -5355,7 +5355,7 @@ interface WorkerGlobalScopeEventMap {
}

/** This Web Workers API interface is an interface representing the scope of any worker. Workers have no browsing context; this scope contains the information usually conveyed by Window objects — in this case event handlers, the console or the associated WorkerNavigator object. Each WorkerGlobalScope has its own event loop. */
interface WorkerGlobalScope extends EventTarget, WorkerUtils, WindowConsole, WindowOrWorkerGlobalScope {
interface WorkerGlobalScope extends EventTarget, WindowConsole, WindowOrWorkerGlobalScope, WorkerUtils {
readonly caches: CacheStorage;
readonly isSecureContext: boolean;
readonly location: WorkerLocation;
Expand Down Expand Up @@ -5394,7 +5394,7 @@ declare var WorkerLocation: {
};

/** A subset of the Navigator interface allowed to be accessed from a Worker. Such an object is initialized for each worker and is available via the WorkerGlobalScope.navigator property obtained by calling window.self.navigator. */
interface WorkerNavigator extends NavigatorID, NavigatorOnLine, NavigatorBeacon, NavigatorConcurrentHardware, NavigatorStorage {
interface WorkerNavigator extends NavigatorBeacon, NavigatorConcurrentHardware, NavigatorID, NavigatorOnLine, NavigatorStorage {
readonly permissions: Permissions;
readonly serviceWorker: ServiceWorkerContainer;
}
Expand Down
2 changes: 1 addition & 1 deletion src/emitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ export function emitWebIdl(webidl: Browser.WebIdl, flavor: Flavor) {

printer.print(`interface ${getNameWithTypeParameter(i, processedIName)}`);

const finalExtends = distinct([i.extends || "Object"].concat(i.implements || [])
const finalExtends = distinct([i.extends || "Object"].concat((i.implements || []).sort())
.filter(i => i !== "Object")
.map(processIName));

Expand Down