import { expectType } from 'tsd' import Warinig, { BuildWarnOptsFn, WarnOpts } from './' const warning = Warinig() const buildWarnOpts = warning.create('FastifyWarning', 'CODE', 'message') expectType(buildWarnOpts) const opts = buildWarnOpts() expectType(opts) expectType(opts.code) expectType(opts.message) expectType(opts.name) expectType(warning.emit('CODE')) expectType>(warning.emitted)