Skip to content

Commit 27b6988

Browse files
committed
Sort implements
1 parent 7f5ab3c commit 27b6988

File tree

5 files changed

+29
-24
lines changed

5 files changed

+29
-24
lines changed

baselines/dom.generated.d.ts

+13-13
Original file line numberDiff line numberDiff line change
@@ -3425,7 +3425,7 @@ interface CanvasRect {
34253425
}
34263426

34273427
/** 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. */
3428-
interface CanvasRenderingContext2D extends CanvasState, CanvasTransform, CanvasCompositing, CanvasImageSmoothing, CanvasFillStrokeStyles, CanvasShadowStyles, CanvasFilters, CanvasRect, CanvasDrawPath, CanvasUserInterface, CanvasText, CanvasDrawImage, CanvasImageData, CanvasPathDrawingStyles, CanvasTextDrawingStyles, CanvasPath {
3428+
interface CanvasRenderingContext2D extends CanvasCompositing, CanvasDrawImage, CanvasDrawPath, CanvasFillStrokeStyles, CanvasFilters, CanvasImageData, CanvasImageSmoothing, CanvasPath, CanvasPathDrawingStyles, CanvasRect, CanvasShadowStyles, CanvasState, CanvasText, CanvasTextDrawingStyles, CanvasTransform, CanvasUserInterface {
34293429
readonly canvas: HTMLCanvasElement;
34303430
}
34313431

@@ -3507,7 +3507,7 @@ declare var ChannelSplitterNode: {
35073507
};
35083508

35093509
/** 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. */
3510-
interface CharacterData extends Node, NonDocumentTypeChildNode, ChildNode {
3510+
interface CharacterData extends Node, ChildNode, NonDocumentTypeChildNode {
35113511
data: string;
35123512
readonly length: number;
35133513
appendData(data: string): void;
@@ -4449,7 +4449,7 @@ interface DocumentEventMap extends GlobalEventHandlersEventMap, DocumentAndEleme
44494449
}
44504450

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

51425142
/** 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. */
5143-
interface Element extends Node, ParentNode, NonDocumentTypeChildNode, ChildNode, Slotable, InnerHTML, Animatable {
5143+
interface Element extends Node, Animatable, ChildNode, InnerHTML, NonDocumentTypeChildNode, ParentNode, Slotable {
51445144
readonly assignedSlot: HTMLSlotElement | null;
51455145
readonly attributes: NamedNodeMap;
51465146
/**
@@ -6635,7 +6635,7 @@ interface HTMLElementEventMap extends ElementEventMap, GlobalEventHandlersEventM
66356635
}
66366636

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

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

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

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

1432514325
/** Corresponds to the <pattern> element. */
14326-
interface SVGPatternElement extends SVGElement, SVGTests, SVGFitToViewBox, SVGURIReference {
14326+
interface SVGPatternElement extends SVGElement, SVGFitToViewBox, SVGTests, SVGURIReference {
1432714327
readonly height: SVGAnimatedLength;
1432814328
readonly patternContentUnits: SVGAnimatedEnumeration;
1432914329
readonly patternTransform: SVGAnimatedTransformList;
@@ -15624,7 +15624,7 @@ interface TextDecoderCommon {
1562415624
readonly ignoreBOM: boolean;
1562515625
}
1562615626

15627-
interface TextDecoderStream extends TextDecoderCommon, GenericTransformStream {
15627+
interface TextDecoderStream extends GenericTransformStream, TextDecoderCommon {
1562815628
}
1562915629

1563015630
declare var TextDecoderStream: {
@@ -15656,7 +15656,7 @@ interface TextEncoderCommon {
1565615656
readonly encoding: string;
1565715657
}
1565815658

15659-
interface TextEncoderStream extends TextEncoderCommon, GenericTransformStream {
15659+
interface TextEncoderStream extends GenericTransformStream, TextEncoderCommon {
1566015660
}
1566115661

1566215662
declare var TextEncoderStream: {
@@ -16424,7 +16424,7 @@ declare var WebAuthnAssertion: {
1642416424
new(): WebAuthnAssertion;
1642516425
};
1642616426

16427-
interface WebGL2RenderingContext extends WebGLRenderingContextBase, WebGL2RenderingContextBase, WebGL2RenderingContextOverloads {
16427+
interface WebGL2RenderingContext extends WebGL2RenderingContextBase, WebGL2RenderingContextOverloads, WebGLRenderingContextBase {
1642816428
}
1642916429

1643016430
declare var WebGL2RenderingContext: {
@@ -18477,7 +18477,7 @@ interface WindowEventMap extends GlobalEventHandlersEventMap, WindowEventHandler
1847718477
}
1847818478

1847918479
/** A window containing a DOM document; the document property points to the DOM document loaded in that window. */
18480-
interface Window extends EventTarget, WindowTimers, WindowSessionStorage, WindowLocalStorage, WindowConsole, GlobalEventHandlers, IDBEnvironment, WindowBase64, AnimationFrameProvider, WindowOrWorkerGlobalScope, WindowEventHandlers {
18480+
interface Window extends EventTarget, AnimationFrameProvider, GlobalEventHandlers, IDBEnvironment, WindowBase64, WindowConsole, WindowEventHandlers, WindowLocalStorage, WindowOrWorkerGlobalScope, WindowSessionStorage, WindowTimers {
1848118481
Blob: typeof Blob;
1848218482
TextDecoder: typeof TextDecoder;
1848318483
TextEncoder: typeof TextEncoder;

baselines/webworker.generated.d.ts

+6-6
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
}

package-lock.json

+8-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"dependencies": {
1313
"@types/jsdom": "^11.0.4",
14-
"@types/node": "^9.4.6",
14+
"@types/node": "^12.6.2",
1515
"@types/node-fetch": "^1.6.7",
1616
"@types/webidl2": "^10.2.1",
1717
"cpx": "^1.5.0",

src/emitter.ts

+1-1
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)