Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hmhealey/types

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hmhealey/types

Shared type definitions used by the Mattermost web app

  • 6.6.0-4
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Mattermost Types

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

It is currently a work in progress and contains internal types that will be removed in a followup release.

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.

TypeScript

In the tsconfig.json, you can use compilerOptions.paths to add that alias. This also requires a compilerOptions.baseUrl if you haven't set that already.

{
    "compilerOptions": {
        "baseUrl": ".",
        "paths": {
            "@mattermost/types/*": ["node_modules/@mattermost/types/lib/*"]
        }
    }
}

Jest

In your Jest config, you can use the moduleNameMapper field to adsd 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=packages/types
npm publish --workspace=packages/types

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

Keywords

FAQs

Package last updated on 07 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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