0.4.0 • Published 1 year ago

@hashicorp/platform-types v0.4.0

Weekly downloads
-
License
MPL-2.0
Repository
github
Last release
1 year ago

@hashicorp/platform-types

Common, shared types for use across all web properties.

Usage

Install the package as a devDependency:

npm install --save-dev @hashicorp/platform-types

Add a global.d.ts file at the root of your project:

/// <reference types="@hashicorp/platform-types" />

Ensure that global.d.ts is included in tsconfig.json

{
  // "compilerOptions":...
  "include": [ "global.d.ts", /* other types */ ],
  // "exclude": [...]
}

Utility Types

This package also ships a collection of utility types from utility-types. You can import a utility type with the following:

import { Optional } from '@hashicorp/platform-types/utilities'