fastify-cli
Version:
Run a fastify route with one command!
16 lines (14 loc) • 333 B
text/typescript
import fastify from 'fastify'
import example from '..'
import { expectType } from 'tsd'
let app
try {
app = fastify()
// eslint-disable-next-line no-void
void app.ready()
// eslint-disable-next-line no-void
void app.register(example)
expectType<() => string>(app.exampleDecorator)
} catch (err) {
console.error(err)
}