import { FastifyErrorConstructor } from '@fastify/error'
import { expect } from 'tstyche'
import { errorCodes } from '../../fastify.js'

expect(errorCodes.FST_ERR_NOT_FOUND).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_OPTIONS_NOT_OBJ).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_QSP_NOT_FN).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_SCHEMA_CONTROLLER_BUCKET_OPT_NOT_FN).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_SCHEMA_ERROR_FORMATTER_NOT_FN).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_OBJ).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_AJV_CUSTOM_OPTIONS_OPT_NOT_ARR).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_VALIDATION).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_LISTEN_OPTIONS_INVALID).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_ERROR_HANDLER_NOT_FN).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_ERROR_HANDLER_ALREADY_SET).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_CTP_ALREADY_PRESENT).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_CTP_INVALID_TYPE).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_CTP_EMPTY_TYPE).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_CTP_INVALID_HANDLER).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_CTP_INVALID_PARSE_TYPE).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_CTP_BODY_TOO_LARGE).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_CTP_INVALID_MEDIA_TYPE).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_CTP_INVALID_CONTENT_LENGTH).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_CTP_EMPTY_JSON_BODY).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_CTP_INVALID_JSON_BODY).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_CTP_INSTANCE_ALREADY_STARTED).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_DEC_ALREADY_PRESENT).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_DEC_DEPENDENCY_INVALID_TYPE).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_DEC_MISSING_DEPENDENCY).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_DEC_AFTER_START).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_DEC_REFERENCE_TYPE).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_DEC_UNDECLARED).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_HOOK_INVALID_TYPE).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_HOOK_INVALID_HANDLER).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_HOOK_INVALID_ASYNC_HANDLER).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_HOOK_NOT_SUPPORTED).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_MISSING_MIDDLEWARE).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_HOOK_TIMEOUT).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_LOG_INVALID_DESTINATION).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_LOG_INVALID_LOGGER).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_LOG_INVALID_LOGGER_INSTANCE).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_LOG_INVALID_LOGGER_CONFIG).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_LOG_LOGGER_AND_LOGGER_INSTANCE_PROVIDED).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_REP_INVALID_PAYLOAD_TYPE).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_REP_RESPONSE_BODY_CONSUMED).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_REP_READABLE_STREAM_LOCKED).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_REP_ALREADY_SENT).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_REP_SENT_VALUE).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_SEND_INSIDE_ONERR).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_SEND_UNDEFINED_ERR).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_BAD_STATUS_CODE).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_BAD_TRAILER_NAME).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_BAD_TRAILER_VALUE).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_FAILED_ERROR_SERIALIZATION).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_MISSING_SERIALIZATION_FN).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_REQ_INVALID_VALIDATION_INVOCATION).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_SCH_MISSING_ID).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_SCH_ALREADY_PRESENT).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_SCH_CONTENT_MISSING_SCHEMA).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_SCH_DUPLICATE).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_SCH_VALIDATION_BUILD).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_SCH_SERIALIZATION_BUILD).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_SCH_RESPONSE_SCHEMA_NOT_NESTED_2XX).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_INIT_OPTS_INVALID).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_FORCE_CLOSE_CONNECTIONS_IDLE_NOT_AVAILABLE).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_DUPLICATED_ROUTE).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_BAD_URL).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_ASYNC_CONSTRAINT).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_INVALID_URL).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_ROUTE_OPTIONS_NOT_OBJ).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_ROUTE_DUPLICATED_HANDLER).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_ROUTE_HANDLER_NOT_FN).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_ROUTE_MISSING_HANDLER).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_ROUTE_METHOD_INVALID).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_ROUTE_METHOD_NOT_SUPPORTED).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_ROUTE_BODY_VALIDATION_SCHEMA_NOT_SUPPORTED).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_ROUTE_BODY_LIMIT_OPTION_NOT_INT).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_ROUTE_REWRITE_NOT_STR).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_ROUTE_MISSING_CONTENT_TYPE).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_ROUTE_MISSING_CONTENT).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_REOPENED_CLOSE_SERVER).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_REOPENED_SERVER).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_INSTANCE_ALREADY_LISTENING).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_PLUGIN_VERSION_MISMATCH).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_PLUGIN_NOT_PRESENT_IN_INSTANCE).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_PLUGIN_INVALID_ASYNC_HANDLER).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_PLUGIN_DEPENDENCY_NOT_REGISTERED).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_PLUGIN_CALLBACK_NOT_FN).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_PLUGIN_NOT_VALID).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_ROOT_PLG_BOOTED).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_PARENT_PLUGIN_BOOTED).type.toBeAssignableTo<FastifyErrorConstructor>()
expect(errorCodes.FST_ERR_PLUGIN_TIMEOUT).type.toBeAssignableTo<FastifyErrorConstructor>()
