@types/loader-utils

  • Version 3.0.0
  • Published
  • 7.88 kB
  • 2 dependencies
  • MIT license

Install

npm i @types/loader-utils
yarn add @types/loader-utils
pnpm add @types/loader-utils

Overview

TypeScript definitions for loader-utils

Index

Functions

function getHashDigest

getHashDigest: (
buffer: Buffer,
hashType?: HashType,
digestType?: DigestType,
maxLength?: number
) => string;
  • Parameter buffer

    the content that should be hashed

    Parameter hashType

    one of xxhash64, sha1, md4, md5, sha256, sha512 or any other node.js supported hash type

    Parameter digestType

    one of hex, base26, base32, base36, base49, base52, base58, base62, base64, base64safe

    Parameter maxLength

    the maximum length in chars https://github.com/webpack/loader-utils#gethashdigest

function interpolateName

interpolateName: (
loaderContext: LoaderContext<LoaderInterpolateOption>,
name: InterpolateNameType,
options?: InterpolateOption
) => string;

function isUrlRequest

isUrlRequest: (url: string, root?: string) => boolean;

function urlToRequest

urlToRequest: (url: string, root?: string) => string;

Interfaces

interface InterpolateOption

interface InterpolateOption {}

    property content

    content?: string | Buffer | undefined;

      property context

      context?: string | undefined;

        property regExp

        regExp?: string | RegExp | undefined;

          interface LoaderInterpolateOption

          interface LoaderInterpolateOption {}

            property customInterpolateName

            customInterpolateName?: typeof interpolateName;

              interface OptionObject

              interface OptionObject {}

                index signature

                [key: string]: null | false | true | string;

                  Type Aliases

                  type DigestType

                  type DigestType =
                  | 'hex'
                  | 'base26'
                  | 'base32'
                  | 'base36'
                  | 'base49'
                  | 'base52'
                  | 'base58'
                  | 'base62'
                  | 'base64'
                  | 'base64safe';

                    type HashType

                    type HashType =
                    | 'xxhash64'
                    | 'sha1'
                    | 'md4'
                    | 'native-md4'
                    | 'md5'
                    | 'sha256'
                    | 'sha512';

                      type InterpolateNameType

                      type InterpolateNameType =
                      | string
                      | ((resourcePath: string, resourceQuery?: string) => string);

                        type Readonly

                        type Readonly<T> = {
                        readonly [P in keyof T]: T[P];
                        };

                          Package Files (1)

                          Dependencies (2)

                          Dev Dependencies (0)

                          No dev dependencies.

                          Peer Dependencies (0)

                          No peer dependencies.

                          Badge

                          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/loader-utils.

                          • Markdown
                            [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/loader-utils)
                          • HTML
                            <a href="https://www.jsdocs.io/package/@types/loader-utils"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>