@mattermost/types
TypeScript icon, indicating that this package has built-in type declarations

10.0.0 • Public • Published

Mattermost Types

This package contains shared type definitions used by the Mattermost web app and related projects.

Usage

For technologies that support subpath exports, such as Node.js, Webpack, and Babel, you can import these types directly from individual files.

import {UserProfile} from '@mattermost/types/users';

For technologies that don't support that yet, you can add an alias in its package resolution settings to support that.

Jest

In your Jest config, you can use the moduleNameMapper field to add that alias.

{
    "moduleNameMapper": {
        "^@mattermost/types/(.*)$": "<rootDir>/node_modules/@mattermost/types/lib/$1"
    }
}

Compilation and Packaging

As a member of Mattermost with write access to our NPM organization, you can build and publish this package by running the following commands:

npm run build --workspace=platform/types
npm publish --workspace=platform/types

Make sure to increment the version number in package.json first! You can add -0, -1, etc for pre-release versions.

/@mattermost/types/

    Package Sidebar

    Install

    npm i @mattermost/types

    Weekly Downloads

    2,091

    Version

    10.0.0

    License

    MIT

    Unpacked Size

    118 kB

    Total Files

    100

    Last publish

    Collaborators

    • danielschalla
    • harshil.sharma
    • danielsischy
    • streamer45
    • cpoile
    • devinbinnie
    • mattermost-user
    • crspeller
    • jwilander
    • coreyhulen
    • enahum
    • matterbuild
    • hmhealey