@jafps/plugin-schema 1.2.4 → 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SchemaController } from "#fastify";
|
|
2
|
-
import type { StaticDecode,
|
|
2
|
+
import type { StaticDecode, TProperties, TSchema } from "typebox";
|
|
3
3
|
export type SchemaPluginOptions = {
|
|
4
4
|
/**
|
|
5
5
|
* {@link FastifyInstance.getSchemas} as references.
|
|
@@ -14,7 +14,7 @@ export default _default;
|
|
|
14
14
|
export { ValidationError } from "#error";
|
|
15
15
|
declare module "fastify" {
|
|
16
16
|
interface FastifyTypeProviderDefault {
|
|
17
|
-
serializer: this["schema"] extends TSchema ?
|
|
17
|
+
serializer: this["schema"] extends TSchema ? StaticDecode<this["schema"], FastifySchemas> : unknown;
|
|
18
18
|
validator: this["schema"] extends TSchema ? StaticDecode<this["schema"], FastifySchemas> : unknown;
|
|
19
19
|
}
|
|
20
20
|
interface FastifySchemas extends TProperties {
|