• Version 2.0.4
  • Published
  • 3.36 kB
  • No dependencies
  • MIT license


npm i @types/module-alias
yarn add @types/module-alias
pnpm add @types/module-alias


TypeScript definitions for module-alias



function addAlias

addAlias: (alias: string, path: string) => void;
  • Register a single alias

function addAliases

addAliases: (aliases: { [alias: string]: string }) => void;
  • Register mutliple aliases

function addPath

addPath: (path: string) => void;
  • Register a custom modules directory

function init

init: typeof init;
  • Import aliases from package.json

function isPathMatchesAlias

isPathMatchesAlias: (path: string, alias: string) => boolean;

    function reset

    reset: () => void;
    • Reset any changes maded (resets all registered aliases and custom module directories) The function is undocumented and for testing purposes only


    interface Options

    interface Options {}
    • module intialis options type

    property base

    base: 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/module-alias.

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