Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@byu-oit/nuxt-alerts

byu-oit56Apache-2.01.0.5TypeScript support: included

Organize alerts for displaying errors and other messages on a Nuxt client

nuxt, typescript, alerts

readme

Setup

Install

Install with yarn:

`shell script yarn add @byu-oit/nuxt-alerts


Install with npm:

```shell script
npm install @byu-oit/nuxt-alerts

nuxt.config.js

module.exports = {
    modules: [
        '@byu-oit/nuxt-alerts',
    ],
}

Typescript

Add the types to your "types" array in tsconfig.json after the @nuxt/types (Nuxt 2.12.0+)

tsconfig.json

{
  "compilerOptions": {
    "types": [
      "@nuxt/types",
      "@byu-oit/nuxt-alerts"
    ]
  }
}

Why?

Because of the way nuxt works the $axios property on the context has to be merged into the nuxt Context interface via declaration merging. Adding @byu-oit/nuxt-alerts to your types will import the types from the package and make typescript aware of the additions to the Context interface.

Usage

TODO