Socket
Socket
Sign inDemoInstall

@types/webidl2

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/webidl2 - npm Package Compare versions

Comparing version 23.12.2 to 23.13.0

266

webidl2/index.d.ts

@@ -1,2 +0,2 @@

// Type definitions for webidl2 23.12
// Type definitions for webidl2 23.13
// Project: https://github.com/w3c/webidl2.js#readme

@@ -13,19 +13,28 @@ // Definitions by: Kagama Sascha Rosylight <https://github.com/saschanaz>

export type IDLRootType =
| InterfaceType
| InterfaceMixinType
| NamespaceType
| CallbackType
| CallbackInterfaceType
| DictionaryType
| EnumType
| TypedefType
| IncludesType;
| IncludesType
| InterfaceMixinType
| InterfaceType
| NamespaceType
| TypedefType;
export type IDLCallbackInterfaceMemberType = ConstantMemberType | OperationMemberType;
export type IDLInterfaceMemberType =
| OperationMemberType
| AttributeMemberType
| ConstantMemberType
| ConstructorMemberType
| DeclarationMemberType
| OperationMemberType;
export type IDLInterfaceMixinMemberType =
| AttributeMemberType
| ConstantMemberType
| DeclarationMemberType;
| (DeclarationMemberType & { type: "stringifier" })
| OperationMemberType;
export type IDLNamespaceMemberType = OperationMemberType | AttributeMemberType;
export type IDLNamespaceMemberType = AttributeMemberType | OperationMemberType;

@@ -49,3 +58,3 @@ export type IDLTypeDescription = SingleTypeDescription | UnionTypeDescription;

input: string;
tokens: ValueDescription[];
tokens: Token[];
});

@@ -67,8 +76,23 @@

/** the five tokens at the point of error, as understood by the tokeniser */
tokens: ValueDescription[];
tokens: Token[];
}
export interface SingleTypeDescription {
/** String indicating where this type is used. Can be null if not applicable. */
export interface Token {
type: string;
value: string;
trivia: string;
line: number;
index: number;
}
export interface AbstractBase {
/** String indicating the type of this node. */
type: string | null;
/** The container of this type. */
parent: AbstractBase | null;
/** A list of extended attributes. */
extAttrs: ExtendedAttribute[];
}
export interface AbstractTypeDescription extends AbstractBase {
/** Boolean indicating if it is a sequence. Same as generic === "sequence" */

@@ -80,2 +104,16 @@ sequence: boolean;

nullable: boolean;
/** The container of this type. */
parent:
| Argument
| AttributeMemberType
| CallbackType
| ConstantMemberType
| DeclarationMemberType
| FieldType
| OperationMemberType
| TypedefType
| UnionTypeDescription;
}
export interface SingleTypeDescription extends AbstractTypeDescription {
/** Boolean indicating whether this is a union type or not. */

@@ -90,26 +128,5 @@ union: false;

idlType: string;
/** A list of extended attributes. */
extAttrs: ExtendedAttribute[];
/** The container of this type. */
parent:
| UnionTypeDescription
| CallbackType
| FieldType
| TypedefType
| OperationMemberType
| AttributeMemberType
| ConstantMemberType
| Argument
| DeclarationMemberType;
}
export interface UnionTypeDescription {
/** String indicating where this type is used. Can be null if not applicable. */
type: string | null;
/** Boolean indicating if it is a sequence. Same as generic === "sequence" */
sequence: boolean;
/** String indicating the generic type (e.g. "Promise", "sequence"). null otherwise. */
generic: string | null;
/** Boolean indicating whether this is nullable or not. */
nullable: boolean;
export interface UnionTypeDescription extends AbstractTypeDescription {
/** Boolean indicating whether this is a union type or not. */

@@ -124,62 +141,42 @@ union: true;

idlType: IDLTypeDescription[];
/** A list of extended attributes. */
extAttrs: ExtendedAttribute[];
/** The container of this type. */
parent:
| UnionTypeDescription
| CallbackType
| FieldType
| TypedefType
| OperationMemberType
| AttributeMemberType
| ConstantMemberType
| Argument
| DeclarationMemberType;
}
export interface InterfaceType {
type: "interface" | "callback interface";
/** The name of the interface */
export interface AbstractContainer extends AbstractBase {
/** The name of the container. */
name: string;
/** A boolean indicating whether it's a partial interface. */
/** A boolean indicating whether this container is partial. */
partial: boolean;
/** An array of interface members (attributes, operations, etc.). Empty if there are none. */
/** An array of container members (attributes, operations, etc.). Empty if there are none. */
members: AbstractBase[];
}
export interface CallbackInterfaceType extends AbstractContainer {
type: "callback interface";
members: IDLCallbackInterfaceMemberType[];
parent: null;
}
export interface InterfaceType extends AbstractContainer {
type: "interface";
members: IDLInterfaceMemberType[];
/** A string giving the name of an interface this one inherits from, null otherwise. */
inheritance: string | null;
/** A list of extended attributes. */
extAttrs: ExtendedAttribute[];
/** The container of this type. */
parent: null;
}
export interface InterfaceMixinType {
export interface InterfaceMixinType extends AbstractContainer {
type: "interface mixin";
/** The name of the interface mixin */
name: string;
/** A boolean indicating whether it's a partial interface mixin. */
partial: boolean;
/** An array of interface members (attributes, operations, etc.). Empty if there are none. */
members: IDLInterfaceMemberType[];
/** A list of extended attributes. */
extAttrs: ExtendedAttribute[];
/** The container of this type. */
members: IDLInterfaceMixinMemberType[];
inheritance: null;
parent: null;
}
export interface NamespaceType {
export interface NamespaceType extends AbstractContainer {
type: "namespace";
/** A boolean indicating whether it's a partial namespace. */
partial: boolean;
/** The enum's name. */
name: string;
/** An array of namespace members (attributes, operations). Empty if there are none. */
members: IDLNamespaceMemberType[];
/** A list of extended attributes. */
extAttrs: ExtendedAttribute[];
/** The container of this type. */
inheritance: null;
parent: null;
}
export interface CallbackType {
export interface CallbackType extends AbstractBase {
type: "callback";

@@ -192,21 +189,10 @@ /** The name of the callback. */

arguments: Argument[];
/** A list of extended attributes. */
extAttrs: ExtendedAttribute[];
/** The container of this type. */
parent: null;
}
export interface DictionaryType {
export interface DictionaryType extends AbstractContainer {
type: "dictionary";
/** The dictionary name. */
name: string;
/** Boolean indicating whether it's a partial dictionary. */
partial: boolean;
/** An array of members (see below). */
members: DictionaryMemberType[];
/** A string indicating which dictionary is being inherited from, null otherwise. */
/** A string giving the name of a dictionary this one inherits from, null otherwise. */
inheritance: string | null;
/** A list of extended attributes. */
extAttrs: ExtendedAttribute[];
/** The container of this type. */
parent: null;

@@ -217,3 +203,3 @@ }

export interface FieldType {
export interface FieldType extends AbstractBase {
type: "field";

@@ -226,11 +212,8 @@ /** The name of the field. */

idlType: IDLTypeDescription;
/** A list of extended attributes. */
extAttrs: ExtendedAttribute[];
/** A default value, absent if there is none. */
default: ValueDescription | null;
/** The container of this type. */
parent: DictionaryType;
}
export interface EnumType {
export interface EnumType extends AbstractBase {
type: "enum";

@@ -240,5 +223,3 @@ /** The enum's name. */

/** An array of values (strings). */
values: Array<{ type: "string"; value: string }>;
/** A list of extended attributes. */
extAttrs: ExtendedAttribute[];
values: Array<{ type: "enum-value"; value: string; parent: EnumType }>;
/** The container of this type. */

@@ -248,3 +229,3 @@ parent: null;

export interface TypedefType {
export interface TypedefType extends AbstractBase {
type: "typedef";

@@ -255,9 +236,6 @@ /** The typedef's name. */

idlType: IDLTypeDescription;
/** A list of extended attributes. */
extAttrs: ExtendedAttribute[];
/** The container of this type. */
parent: null;
}
export interface IncludesType {
export interface IncludesType extends AbstractBase {
type: "includes";

@@ -268,19 +246,13 @@ /** The interface that includes an interface mixin. */

includes: string;
/** A list of extended attributes. */
extAttrs: ExtendedAttribute[];
/** The container of this type. */
parent: null;
}
export interface ConstructorMemberType {
export interface ConstructorMemberType extends AbstractBase {
type: "constructor";
/** An array of arguments for the constructor operation. */
arguments: Argument[];
/** A list of extended attributes. */
extAttrs: ExtendedAttribute[];
/** The container of this type. */
parent: InterfaceType;
}
export interface OperationMemberType {
export interface OperationMemberType extends AbstractBase {
type: "operation";

@@ -295,9 +267,6 @@ /** Special modifier if exists */

arguments: Argument[];
/** A list of extended attributes. */
extAttrs: ExtendedAttribute[];
/** The container of this type. */
parent: InterfaceType | InterfaceMixinType | NamespaceType;
parent: CallbackInterfaceType | InterfaceMixinType | InterfaceType | NamespaceType;
}
export interface AttributeMemberType {
export interface AttributeMemberType extends AbstractBase {
type: "attribute";

@@ -314,9 +283,6 @@ /** The attribute's name. */

idlType: IDLTypeDescription;
/** A list of extended attributes. */
extAttrs: ExtendedAttribute[];
/** The container of this type. */
parent: InterfaceType | InterfaceMixinType | NamespaceType;
parent: InterfaceMixinType | InterfaceType | NamespaceType;
}
export interface ConstantMemberType {
export interface ConstantMemberType extends AbstractBase {
type: "const";

@@ -331,9 +297,6 @@ /** Whether its type is nullable. */

value: ValueDescription;
/** A list of extended attributes. */
extAttrs: ExtendedAttribute[];
/** The container of this type. */
parent: InterfaceType | InterfaceMixinType;
parent: CallbackInterfaceType | InterfaceMixinType | InterfaceType;
}
export interface DeclarationMemberType {
export interface DeclarationMemberType extends AbstractBase {
type: "iterable" | "maplike" | "setlike";

@@ -346,11 +309,9 @@ /** An array with one or more IDL Types representing the declared type arguments. */

readonly: boolean;
/** A list of extended attributes. */
extAttrs: ExtendedAttribute[];
/** An array of arguments for the iterable declaration. */
arguments: Argument[];
/** The container of this type. */
parent: InterfaceType | InterfaceMixinType;
parent: InterfaceMixinType | InterfaceType;
}
export interface Argument {
export interface Argument extends AbstractBase {
type: "argument";
/** A default value, absent if there is none. */

@@ -366,9 +327,7 @@ default: ValueDescription | null;

name: string;
/** A list of extended attributes. */
extAttrs: ExtendedAttribute[];
/** The container of this type. */
parent: CallbackType | ConstructorMemberType | ExtendedAttribute | OperationMemberType;
}
export interface ExtendedAttribute {
export interface ExtendedAttribute extends AbstractBase {
type: "extended-attribute";
/** The extended attribute's name. */

@@ -380,6 +339,6 @@ name: string;

rhs: ExtendedAttributeRightHandSide | null;
/** The container of this extended attribute. */
parent: IDLRootType | FieldType | IDLInterfaceMemberType;
}
// prettier-ignore
export type ExtendedAttributeRightHandSide =

@@ -441,5 +400,4 @@ | ExtendedAttributeRightHandSideBase

export interface Token {
type: "decimal" | "integer" | "identifier" | "string" | "whitespace" | "other";
value: string;
export interface AbstractValueDescription extends AbstractBase {
parent: Argument | ConstantMemberType | FieldType;
}

@@ -457,53 +415,37 @@

export interface ValueDescriptionString {
export interface ValueDescriptionString extends AbstractValueDescription {
type: "string";
value: string;
/** The container of this type. */
parent: FieldType | ConstantMemberType | Argument;
}
export interface ValueDescriptionNumber {
export interface ValueDescriptionNumber extends AbstractValueDescription {
type: "number";
value: string;
/** The container of this type. */
parent: FieldType | ConstantMemberType | Argument;
}
export interface ValueDescriptionBoolean {
export interface ValueDescriptionBoolean extends AbstractValueDescription {
type: "boolean";
value: boolean;
/** The container of this type. */
parent: FieldType | ConstantMemberType | Argument;
}
export interface ValueDescriptionNull {
export interface ValueDescriptionNull extends AbstractValueDescription {
type: "null";
/** The container of this type. */
parent: FieldType | ConstantMemberType | Argument;
}
export interface ValueDescriptionInfinity {
export interface ValueDescriptionInfinity extends AbstractValueDescription {
type: "Infinity";
negative: boolean;
/** The container of this type. */
parent: FieldType | ConstantMemberType | Argument;
}
export interface ValueDescriptionNaN {
export interface ValueDescriptionNaN extends AbstractValueDescription {
type: "NaN";
/** The container of this type. */
parent: FieldType | ConstantMemberType | Argument;
}
export interface ValueDescriptionSequence {
export interface ValueDescriptionSequence extends AbstractValueDescription {
type: "sequence";
value: [];
/** The container of this type. */
parent: FieldType | ConstantMemberType | Argument;
}
export interface ValueDescriptionDictionary {
export interface ValueDescriptionDictionary extends AbstractValueDescription {
type: "dictionary";
/** The container of this type. */
parent: FieldType | ConstantMemberType | Argument;
}
{
"name": "@types/webidl2",
"version": "23.12.2",
"version": "23.13.0",
"description": "TypeScript definitions for webidl2",

@@ -27,4 +27,4 @@ "license": "MIT",

"dependencies": {},
"typesPublisherContentHash": "ab7c4cf423f40c5359a056b93c5f65827f48364892df537bbfe031459bb104d9",
"typesPublisherContentHash": "26656759555ebc667fbc30193903d272abe18846a20e791b6a8dba736c47657c",
"typeScriptVersion": "3.1"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Sat, 29 Aug 2020 12:03:30 GMT
* Last updated: Sat, 29 Aug 2020 18:13:35 GMT
* Dependencies: none

@@ -14,0 +14,0 @@ * Global values: `WebIDL2`

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc