Skip to content

Commit 1332a5b

Browse files
saschanazsandersn
authored andcommitted
Sort implements (#731)
1 parent b135c7e commit 1332a5b

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

baselines/dom.generated.d.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3460,7 +3460,7 @@ interface CanvasRect {
34603460
}
34613461

34623462
/** 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. */
3463-
interface CanvasRenderingContext2D extends CanvasState, CanvasTransform, CanvasCompositing, CanvasImageSmoothing, CanvasFillStrokeStyles, CanvasShadowStyles, CanvasFilters, CanvasRect, CanvasDrawPath, CanvasUserInterface, CanvasText, CanvasDrawImage, CanvasImageData, CanvasPathDrawingStyles, CanvasTextDrawingStyles, CanvasPath {
3463+
interface CanvasRenderingContext2D extends CanvasCompositing, CanvasDrawImage, CanvasDrawPath, CanvasFillStrokeStyles, CanvasFilters, CanvasImageData, CanvasImageSmoothing, CanvasPath, CanvasPathDrawingStyles, CanvasRect, CanvasShadowStyles, CanvasState, CanvasText, CanvasTextDrawingStyles, CanvasTransform, CanvasUserInterface {
34643464
readonly canvas: HTMLCanvasElement;
34653465
}
34663466

@@ -3542,7 +3542,7 @@ declare var ChannelSplitterNode: {
35423542
};
35433543

35443544
/** 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. */
3545-
interface CharacterData extends Node, NonDocumentTypeChildNode, ChildNode {
3545+
interface CharacterData extends Node, ChildNode, NonDocumentTypeChildNode {
35463546
data: string;
35473547
readonly length: number;
35483548
appendData(data: string): void;
@@ -4484,7 +4484,7 @@ interface DocumentEventMap extends GlobalEventHandlersEventMap, DocumentAndEleme
44844484
}
44854485

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

51775177
/** 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. */
5178-
interface Element extends Node, ParentNode, NonDocumentTypeChildNode, ChildNode, Slotable, InnerHTML, Animatable {
5178+
interface Element extends Node, Animatable, ChildNode, InnerHTML, NonDocumentTypeChildNode, ParentNode, Slotable {
51795179
readonly assignedSlot: HTMLSlotElement | null;
51805180
readonly attributes: NamedNodeMap;
51815181
/**
@@ -6670,7 +6670,7 @@ interface HTMLElementEventMap extends ElementEventMap, GlobalEventHandlersEventM
66706670
}
66716671

66726672
/** Any HTML element. Some elements directly implement this interface, while others implement it via an interface that inherits it. */
6673-
interface HTMLElement extends Element, GlobalEventHandlers, DocumentAndElementEventHandlers, ElementContentEditable, HTMLOrSVGElement, ElementCSSInlineStyle {
6673+
interface HTMLElement extends Element, DocumentAndElementEventHandlers, ElementCSSInlineStyle, ElementContentEditable, GlobalEventHandlers, HTMLOrSVGElement {
66746674
accessKey: string;
66756675
readonly accessKeyLabel: string;
66766676
autocapitalize: string;
@@ -10852,7 +10852,7 @@ declare var NavigationPreloadManager: {
1085210852
};
1085310853

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

11394-
interface OffscreenCanvasRenderingContext2D extends CanvasState, CanvasTransform, CanvasCompositing, CanvasImageSmoothing, CanvasFillStrokeStyles, CanvasShadowStyles, CanvasFilters, CanvasRect, CanvasDrawPath, CanvasText, CanvasDrawImage, CanvasImageData, CanvasPathDrawingStyles, CanvasTextDrawingStyles, CanvasPath {
11394+
interface OffscreenCanvasRenderingContext2D extends CanvasCompositing, CanvasDrawImage, CanvasDrawPath, CanvasFillStrokeStyles, CanvasFilters, CanvasImageData, CanvasImageSmoothing, CanvasPath, CanvasPathDrawingStyles, CanvasRect, CanvasShadowStyles, CanvasState, CanvasText, CanvasTextDrawingStyles, CanvasTransform {
1139511395
readonly canvas: OffscreenCanvas;
1139611396
commit(): void;
1139711397
}
@@ -13148,7 +13148,7 @@ interface SVGElementEventMap extends ElementEventMap, GlobalEventHandlersEventMa
1314813148
}
1314913149

1315013150
/** All of the SVG DOM interfaces that correspond directly to elements in the SVG language derive from the SVGElement interface. */
13151-
interface SVGElement extends Element, GlobalEventHandlers, DocumentAndElementEventHandlers, SVGElementInstance, HTMLOrSVGElement, ElementCSSInlineStyle {
13151+
interface SVGElement extends Element, DocumentAndElementEventHandlers, ElementCSSInlineStyle, GlobalEventHandlers, HTMLOrSVGElement, SVGElementInstance {
1315213152
/** @deprecated */
1315313153
readonly className: any;
1315413154
readonly ownerSVGElement: SVGSVGElement | null;
@@ -14358,7 +14358,7 @@ declare var SVGPathSegMovetoRel: {
1435814358
};
1435914359

1436014360
/** Corresponds to the <pattern> element. */
14361-
interface SVGPatternElement extends SVGElement, SVGTests, SVGFitToViewBox, SVGURIReference {
14361+
interface SVGPatternElement extends SVGElement, SVGFitToViewBox, SVGTests, SVGURIReference {
1436214362
readonly height: SVGAnimatedLength;
1436314363
readonly patternContentUnits: SVGAnimatedEnumeration;
1436414364
readonly patternTransform: SVGAnimatedTransformList;
@@ -15659,7 +15659,7 @@ interface TextDecoderCommon {
1565915659
readonly ignoreBOM: boolean;
1566015660
}
1566115661

15662-
interface TextDecoderStream extends TextDecoderCommon, GenericTransformStream {
15662+
interface TextDecoderStream extends GenericTransformStream, TextDecoderCommon {
1566315663
}
1566415664

1566515665
declare var TextDecoderStream: {
@@ -15691,7 +15691,7 @@ interface TextEncoderCommon {
1569115691
readonly encoding: string;
1569215692
}
1569315693

15694-
interface TextEncoderStream extends TextEncoderCommon, GenericTransformStream {
15694+
interface TextEncoderStream extends GenericTransformStream, TextEncoderCommon {
1569515695
}
1569615696

1569715697
declare var TextEncoderStream: {
@@ -16459,7 +16459,7 @@ declare var WebAuthnAssertion: {
1645916459
new(): WebAuthnAssertion;
1646016460
};
1646116461

16462-
interface WebGL2RenderingContext extends WebGLRenderingContextBase, WebGL2RenderingContextBase, WebGL2RenderingContextOverloads {
16462+
interface WebGL2RenderingContext extends WebGL2RenderingContextBase, WebGL2RenderingContextOverloads, WebGLRenderingContextBase {
1646316463
}
1646416464

1646516465
declare var WebGL2RenderingContext: {
@@ -18512,7 +18512,7 @@ interface WindowEventMap extends GlobalEventHandlersEventMap, WindowEventHandler
1851218512
}
1851318513

1851418514
/** A window containing a DOM document; the document property points to the DOM document loaded in that window. */
18515-
interface Window extends EventTarget, WindowTimers, WindowSessionStorage, WindowLocalStorage, WindowConsole, GlobalEventHandlers, IDBEnvironment, WindowBase64, AnimationFrameProvider, WindowOrWorkerGlobalScope, WindowEventHandlers {
18515+
interface Window extends EventTarget, AnimationFrameProvider, GlobalEventHandlers, IDBEnvironment, WindowBase64, WindowConsole, WindowEventHandlers, WindowLocalStorage, WindowOrWorkerGlobalScope, WindowSessionStorage, WindowTimers {
1851618516
readonly applicationCache: ApplicationCache;
1851718517
readonly caches: CacheStorage;
1851818518
readonly clientInformation: Navigator;

baselines/webworker.generated.d.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2452,7 +2452,7 @@ declare var OffscreenCanvas: {
24522452
new(width: number, height: number): OffscreenCanvas;
24532453
};
24542454

2455-
interface OffscreenCanvasRenderingContext2D extends CanvasState, CanvasTransform, CanvasCompositing, CanvasImageSmoothing, CanvasFillStrokeStyles, CanvasShadowStyles, CanvasFilters, CanvasRect, CanvasDrawPath, CanvasText, CanvasDrawImage, CanvasImageData, CanvasPathDrawingStyles, CanvasTextDrawingStyles, CanvasPath {
2455+
interface OffscreenCanvasRenderingContext2D extends CanvasCompositing, CanvasDrawImage, CanvasDrawPath, CanvasFillStrokeStyles, CanvasFilters, CanvasImageData, CanvasImageSmoothing, CanvasPath, CanvasPathDrawingStyles, CanvasRect, CanvasShadowStyles, CanvasState, CanvasText, CanvasTextDrawingStyles, CanvasTransform {
24562456
readonly canvas: OffscreenCanvas;
24572457
commit(): void;
24582458
}
@@ -3082,7 +3082,7 @@ interface TextDecoderCommon {
30823082
readonly ignoreBOM: boolean;
30833083
}
30843084

3085-
interface TextDecoderStream extends TextDecoderCommon, GenericTransformStream {
3085+
interface TextDecoderStream extends GenericTransformStream, TextDecoderCommon {
30863086
}
30873087

30883088
declare var TextDecoderStream: {
@@ -3114,7 +3114,7 @@ interface TextEncoderCommon {
31143114
readonly encoding: string;
31153115
}
31163116

3117-
interface TextEncoderStream extends TextEncoderCommon, GenericTransformStream {
3117+
interface TextEncoderStream extends GenericTransformStream, TextEncoderCommon {
31183118
}
31193119

31203120
declare var TextEncoderStream: {
@@ -3365,7 +3365,7 @@ interface WEBGL_lose_context {
33653365
restoreContext(): void;
33663366
}
33673367

3368-
interface WebGL2RenderingContext extends WebGLRenderingContextBase, WebGL2RenderingContextBase, WebGL2RenderingContextOverloads {
3368+
interface WebGL2RenderingContext extends WebGL2RenderingContextBase, WebGL2RenderingContextOverloads, WebGLRenderingContextBase {
33693369
}
33703370

33713371
declare var WebGL2RenderingContext: {
@@ -5355,7 +5355,7 @@ interface WorkerGlobalScopeEventMap {
53555355
}
53565356

53575357
/** 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. */
5358-
interface WorkerGlobalScope extends EventTarget, WorkerUtils, WindowConsole, WindowOrWorkerGlobalScope {
5358+
interface WorkerGlobalScope extends EventTarget, WindowConsole, WindowOrWorkerGlobalScope, WorkerUtils {
53595359
readonly caches: CacheStorage;
53605360
readonly isSecureContext: boolean;
53615361
readonly location: WorkerLocation;
@@ -5394,7 +5394,7 @@ declare var WorkerLocation: {
53945394
};
53955395

53965396
/** 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. */
5397-
interface WorkerNavigator extends NavigatorID, NavigatorOnLine, NavigatorBeacon, NavigatorConcurrentHardware, NavigatorStorage {
5397+
interface WorkerNavigator extends NavigatorBeacon, NavigatorConcurrentHardware, NavigatorID, NavigatorOnLine, NavigatorStorage {
53985398
readonly permissions: Permissions;
53995399
readonly serviceWorker: ServiceWorkerContainer;
54005400
}

src/emitter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ export function emitWebIdl(webidl: Browser.WebIdl, flavor: Flavor) {
847847

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

850-
const finalExtends = distinct([i.extends || "Object"].concat(i.implements || [])
850+
const finalExtends = distinct([i.extends || "Object"].concat((i.implements || []).sort())
851851
.filter(i => i !== "Object")
852852
.map(processIName));
853853

0 commit comments

Comments
 (0)