We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b418cf3 commit a2e837fCopy full SHA for a2e837f
packages/core-types/src/schema/fields.ts
@@ -1058,7 +1058,7 @@ export interface ObjectSchema {
1058
* @returns {ResourceSchema} the passed in schema
1059
* @public
1060
*/
1061
-export function resourceSchema(schema: ResourceSchema): ResourceSchema {
+export function resourceSchema<T extends ResourceSchema>(schema: T): T {
1062
return schema;
1063
}
1064
@@ -1075,7 +1075,7 @@ export function resourceSchema(schema: ResourceSchema): ResourceSchema {
1075
* @returns {ObjectSchema} the passed in schema
1076
1077
1078
-export function objectSchema(schema: ObjectSchema): ObjectSchema {
+export function objectSchema<T extends ObjectSchema>(schema: T): T {
1079
1080
1081
0 commit comments