# @averjs/typescript

> typescript support for averjs

Latest version **3.1.0** (published 2021-09-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install @averjs/typescript
pnpm add @averjs/typescript
yarn add @averjs/typescript
bun add @averjs/typescript
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.1.0 |
| Published | 2021-09-13 |
| First published | 2020-10-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 10.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Florian Weber |
| Maintainers | fweber, thegorilla |

## Links

- npm: https://www.npmjs.com/package/@averjs/typescript
- Repository: https://github.com/exreplay/aver.js
- Homepage: https://github.com/exreplay/aver.js#readme
- Issues: https://github.com/exreplay/aver.js/issues
- npm.io page: https://npm.io/package/@averjs/typescript

## Dependencies (3)

- [ts-loader](https://npm.io/package/ts-loader.md) ^9.2.5
- [typescript](https://npm.io/package/typescript.md) ^4.4.3
- [fork-ts-checker-webpack-plugin](https://npm.io/package/fork-ts-checker-webpack-plugin.md) ^6.3.3

## Recent versions

- 3.1.0 (latest) — 2021-09-13
- 3.0.0 — 2021-09-13
- 3.0.0-7 — 2021-06-14
- 3.0.0-6 — 2021-06-14
- 3.0.0-5 — 2021-06-12
- 3.0.0-4 — 2021-05-28
- 3.0.0-3 — 2021-05-27
- 3.0.0-2 — 2021-05-26
- 3.0.0-1 — 2021-05-09
- 3.0.0-0 — 2021-05-02
- 2.6.3 — 2021-04-26
- 2.6.2 — 2021-04-25
- 2.6.1 — 2021-04-25
- 2.6.0 — 2021-04-25
- 2.5.2 — 2021-04-17
- … 17 more at https://npm.io/package/@averjs/typescript/versions

## README

# @averjs/typescript

Official aver package for typescript support.

## Usage

Install the package

```bash
$ yarn add --dev @averjs/typescript
#or
$ npm i -D @averjs/typescript
```

Add the plugin to the `buildPlugins` array inside your aver-config.ts

```js
export default {
  buildPlugins: [
    '@averjs/typescript'
  ]
}
```

## Options

You can pass either one of the following options to the plugin

```js
export default {
  buildPlugins: [
    [
      '@averjs/typescript',
      {
        tsLoader: {},
        // or
        tsLoader: (default) => ({ ...default, /* add additional config */ }),

        forkTsChecker: {},
        // or
        forkTsChecker: (default) => ({ ...default, /* add additional config */ }),
      }
    ]
  ]
}
```

### tsLoader

- Type: `object | function`
- Default:
  ```js
  {
    transpileOnly: true,
    happyPackMode: true,
    appendTsSuffixTo: [/\.vue$/]
  }
  ```

You can either pass an object with the loader options, which can be found [here](https://github.com/TypeStrong/ts-loader#loader-options), or you can also use a function which is getting passed the default config, can be modified and should return a valid config.

### forkTsChecker

- Type: `object | function`
- Default:
  ```js
  {
    typescript: {
      configFile: path.resolve(process.env.PROJECT_PATH, '../tsconfig.json'),
      extensions: {
        vue: true
      }
    },
    formatter: 'codeframe',
    async: false,
    eslint: {
      files: [
        './src/**/*.vue',
        './src/**/*.ts'
      ]
    }
  }
  ```

You can either pass an object with the plugin options, which can be found [here](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin#options), or you can also use a function which is getting passed the default config, can be modified and should return a valid config.

---
_Source: https://npm.io/package/@averjs/typescript · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
