• Version 7.0.3
  • Published
  • 6.77 kB
  • No dependencies
  • MIT license


npm i @types/webidl-conversions
yarn add @types/webidl-conversions
pnpm add @types/webidl-conversions


TypeScript definitions for webidl-conversions



variable WebIDLConversions

const WebIDLConversions: {
any<V>(V: V, opts?: WebIDLConversions.Options): V;
undefined(V?: unknown, opts?: WebIDLConversions.Options): void;
boolean(V: unknown, opts?: WebIDLConversions.Options): boolean;
byte(V: unknown, opts?: WebIDLConversions.IntegerOptions): number;
octet(V: unknown, opts?: WebIDLConversions.IntegerOptions): number;
short(V: unknown, opts?: WebIDLConversions.IntegerOptions): number;
'unsigned short'(V: unknown, opts?: WebIDLConversions.IntegerOptions): number;
long(V: unknown, opts?: WebIDLConversions.IntegerOptions): number;
'unsigned long'(V: unknown, opts?: WebIDLConversions.IntegerOptions): number;
'long long'(V: unknown, opts?: WebIDLConversions.IntegerOptions): number;
'unsigned long long'(
V: unknown,
opts?: WebIDLConversions.IntegerOptions
): number;
double(V: unknown, opts?: WebIDLConversions.Options): number;
'unrestricted double'(V: unknown, opts?: WebIDLConversions.Options): number;
float(V: unknown, opts?: WebIDLConversions.Options): number;
'unrestricted float'(V: unknown, opts?: WebIDLConversions.Options): number;
DOMString(V: unknown, opts?: WebIDLConversions.StringOptions): string;
ByteString(V: unknown, opts?: WebIDLConversions.StringOptions): string;
USVString(V: unknown, opts?: WebIDLConversions.StringOptions): string;
V: V,
opts?: WebIDLConversions.Options
): V extends object ? V : V & object;
V: unknown,
opts?: WebIDLConversions.BufferSourceOptions & {
allowShared?: false | undefined;
): ArrayBuffer;
V: unknown,
opts?: WebIDLConversions.BufferSourceOptions
): ArrayBufferLike;
DataView(V: unknown, opts?: WebIDLConversions.BufferSourceOptions): DataView;
Int8Array(V: unknown, opts?: WebIDLConversions.BufferSourceOptions): Int8Array;
Int16Array(V: unknown, opts?: WebIDLConversions.BufferSourceOptions): Int16Array;
Int32Array(V: unknown, opts?: WebIDLConversions.BufferSourceOptions): Int32Array;
Uint8Array(V: unknown, opts?: WebIDLConversions.BufferSourceOptions): Uint8Array;
V: unknown,
opts?: WebIDLConversions.BufferSourceOptions
): Uint16Array;
V: unknown,
opts?: WebIDLConversions.BufferSourceOptions
): Uint32Array;
V: unknown,
opts?: WebIDLConversions.BufferSourceOptions
): Uint8ClampedArray;
V: unknown,
opts?: WebIDLConversions.BufferSourceOptions
): Float32Array;
V: unknown,
opts?: WebIDLConversions.BufferSourceOptions
): Float64Array;
V: unknown,
opts?: WebIDLConversions.BufferSourceOptions
): ArrayBufferView;
V: unknown,
opts?: WebIDLConversions.BufferSourceOptions & {
allowShared?: false | undefined;
): ArrayBuffer | ArrayBufferView;
V: unknown,
opts?: WebIDLConversions.BufferSourceOptions
): ArrayBufferLike | ArrayBufferView;
DOMTimeStamp(V: unknown, opts?: WebIDLConversions.Options): number;


    interface BufferSourceOptions

    interface BufferSourceOptions extends Options {}

      property allowShared

      allowShared?: boolean | undefined;

        interface Globals

        interface Globals {}

          property Number

          Number: (value?: unknown) => number;

            property String

            String: (value?: unknown) => string;

              property TypeError

              TypeError: new (message?: string) => TypeError;

                index signature

                [key: string]: unknown;

                  interface IntegerOptions

                  interface IntegerOptions extends Options {}

                    property clamp

                    clamp?: boolean | undefined;

                      property enforceRange

                      enforceRange?: boolean | undefined;

                        interface Options

                        interface Options {}

                          property context

                          context?: string | undefined;

                            property globals

                            globals?: Globals | undefined;

                              interface StringOptions

                              interface StringOptions extends Options {}

                                property treatNullAsEmptyString

                                treatNullAsEmptyString?: boolean | undefined;

                                  Type Aliases

                                  type IntegerConversion

                                  type IntegerConversion = (V: unknown, opts?: IntegerOptions) => number;

                                    type NumberConversion

                                    type NumberConversion = (V: unknown, opts?: Options) => number;

                                      type StringConversion

                                      type StringConversion = (V: unknown, opts?: StringOptions) => string;

                                        Package Files (1)

                                        Dependencies (0)

                                        No dependencies.

                                        Dev Dependencies (0)

                                        No dev dependencies.

                                        Peer Dependencies (0)

                                        No peer dependencies.


                                        To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                        You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/webidl-conversions.

                                        • Markdown
                                        • HTML
                                          <a href="https://www.jsdocs.io/package/@types/webidl-conversions"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>