Skip to content

Commit

Permalink
style: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
climba03003 committed Jul 20, 2023
1 parent add255e commit cc06de4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import BreeClass, { BreeOptions } from 'bree'
import { FastifyPluginAsync } from 'fastify'
import BreeClass, { type BreeOptions } from 'bree'
import { type FastifyPluginAsync } from 'fastify'
import FastifyPlugin from 'fastify-plugin'
import * as fs from 'fs'
import { BreeTS } from './plugin'
Expand Down
6 changes: 3 additions & 3 deletions lib/plugin.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { PluginFunc } from 'bree'
import { type PluginFunc } from 'bree'
import { Worker } from 'worker_threads'

export const BreeTS: PluginFunc = function (options, Bree): void {
options = options ?? {}

// @ts-expect-error
// @ts-expect-error replace prototype
const oldInit = Bree.prototype.init

// we update init script, so the options is match for TypeScript
// @ts-expect-error
// @ts-expect-error replace prototype
Bree.prototype.init = async function () {
// add `.ts` extension to supported list
if (!this.config.acceptedExtensions.includes('.ts')) {
Expand Down

0 comments on commit cc06de4

Please sign in to comment.