Skip to content

Commit 85175fb

Browse files
committed
Use parser
1 parent 6c24e65 commit 85175fb

9 files changed

Lines changed: 18 additions & 19 deletions

File tree

packages/core/src/types/external/OrgSchema/Action.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { intersect, lazy, object, parse, string, type GenericSchema } from 'valibot';
1+
import { intersect, lazy, object, parser, string, type GenericSchema } from 'valibot';
22

33
import { actionStatusSchema, type ActionStatusInput, type ActionStatusOutput } from './ActionStatus';
44
import jsonLinkedDataProperty from './private/jsonLinkedDataProperty';
@@ -87,6 +87,6 @@ const actionSchema: GenericSchema<ActionInput, ActionOutput> = intersect([
8787
]);
8888

8989
/** @deprecated Use Valibot.parse(actionSchema) instead. Will be removed on or after 2028-04-23. */
90-
const parseAction = (action: ActionInput): ActionOutput => parse(actionSchema, action);
90+
const parseAction: (action: ActionInput) => ActionOutput = parser(actionSchema);
9191

9292
export { actionSchema, parseAction, type ActionInput, type ActionOutput };

packages/core/src/types/external/OrgSchema/Claim.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { intersect, lazy, object, parse, type GenericSchema } from 'valibot';
1+
import { intersect, lazy, object, parser, type GenericSchema } from 'valibot';
22

33
import { creativeWorkSchema, type CreativeWorkInput, type CreativeWorkOutput } from './CreativeWork';
44
import { projectSchema, type ProjectInput, type ProjectOutput } from './Project';
@@ -63,6 +63,6 @@ const claimSchema: GenericSchema<ClaimInput, ClaimOutput> = intersect([
6363
]);
6464

6565
/** @deprecated Use Valibot.parse(claimSchema) instead. Will be removed on or after 2028-04-23. */
66-
const parseClaim = (claim: ClaimInput): ClaimOutput => parse(claimSchema, claim);
66+
const parseClaim: (claim: ClaimInput) => ClaimOutput = parser(claimSchema);
6767

6868
export { claimSchema, parseClaim, type ClaimInput, type ClaimOutput };

packages/core/src/types/external/OrgSchema/CreativeWork.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { intersect, lazy, number, object, parse, string, union, type GenericSchema } from 'valibot';
1+
import { intersect, lazy, number, object, parser, string, union, type GenericSchema } from 'valibot';
22

33
import { claimSchema } from './Claim';
44
import {
@@ -209,7 +209,6 @@ creativeWorkSchema_ = intersect([
209209
const creativeWorkSchema = creativeWorkSchema_;
210210

211211
/** @deprecated Use Valibot.parse(creativeWorkSchema) instead. Will be removed on or after 2028-04-23. */
212-
const parseCreativeWork = (creativeWork: CreativeWorkInput): CreativeWorkOutput =>
213-
parse(creativeWorkSchema_, creativeWork);
212+
const parseCreativeWork: (creativeWork: CreativeWorkInput) => CreativeWorkOutput = parser(creativeWorkSchema);
214213

215214
export { creativeWorkSchema, parseCreativeWork, type CreativeWorkInput, type CreativeWorkOutput };

packages/core/src/types/external/OrgSchema/DefinedTerm.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { intersect, lazy, object, parse, string, type GenericSchema } from 'valibot';
1+
import { intersect, lazy, object, parser, string, type GenericSchema } from 'valibot';
22

33
import { thingSchema, type ThingInput, type ThingOutput } from './Thing';
44
import jsonLinkedDataProperty from './private/jsonLinkedDataProperty';
@@ -58,6 +58,6 @@ const definedTermSchema: GenericSchema<DefinedTermInput, DefinedTermOutput> = in
5858
]);
5959

6060
/** @deprecated Use Valibot.parse(definedTermSchema) instead. Will be removed on or after 2028-04-23. */
61-
const parseDefinedTerm = (definedTerm: DefinedTermInput): DefinedTermOutput => parse(definedTermSchema, definedTerm);
61+
const parseDefinedTerm: (definedTerm: DefinedTermInput) => DefinedTermOutput = parser(definedTermSchema);
6262

6363
export { definedTermSchema, parseDefinedTerm, type DefinedTermInput, type DefinedTermOutput };

packages/core/src/types/external/OrgSchema/Person.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { intersect, lazy, object, parse, string, type GenericSchema } from 'valibot';
1+
import { intersect, lazy, object, parser, string, type GenericSchema } from 'valibot';
22
import { thingSchema, type ThingInput, type ThingOutput } from './Thing';
33
import jsonLinkedDataProperty from './private/jsonLinkedDataProperty';
44

@@ -48,6 +48,6 @@ const personSchema: GenericSchema<PersonInput, PersonOutput> = intersect([
4848
]);
4949

5050
/** @deprecated Use Valibot.parse(personSchema) instead. Will be removed on or after 2028-04-23. */
51-
const parsePerson = (person: PersonInput): PersonOutput => parse(personSchema, person);
51+
const parsePerson: (person: PersonInput) => PersonOutput = parser(personSchema);
5252

5353
export { parsePerson, personSchema, type PersonInput, type PersonOutput };

packages/core/src/types/external/OrgSchema/Project.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { intersect, lazy, object, parse, string, type GenericSchema } from 'valibot';
1+
import { intersect, lazy, object, parser, string, type GenericSchema } from 'valibot';
22

33
import jsonLinkedDataProperty from './private/jsonLinkedDataProperty';
44
import { thingSchema, type ThingInput, type ThingOutput } from './Thing';
@@ -43,6 +43,6 @@ const projectSchema: GenericSchema<ProjectInput, ProjectOutput> = intersect([
4343
]);
4444

4545
/** @deprecated Use Valibot.parse(projectSchema) instead. Will be removed on or after 2028-04-23. */
46-
const parseProject = (project: ProjectInput): ProjectOutput => parse(projectSchema, project);
46+
const parseProject: (project: ProjectInput) => ProjectOutput = parser(projectSchema);
4747

4848
export { parseProject, projectSchema, type ProjectInput, type ProjectOutput };

packages/core/src/types/external/OrgSchema/Thing.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { intersect, lazy, object, parse, string, type GenericSchema } from 'valibot';
1+
import { intersect, lazy, object, parser, string, type GenericSchema } from 'valibot';
22

33
import { actionSchema, type ActionInput, type ActionOutput } from './Action';
44
import jsonLinkedDataProperty from './private/jsonLinkedDataProperty';
@@ -119,6 +119,6 @@ const thingSchema: GenericSchema<ThingInput, ThingOutput> = intersect([
119119
]);
120120

121121
/** @deprecated Use Valibot.parse(thingSchema) instead. Will be removed on or after 2028-04-23. */
122-
const parseThing = (thing: ThingInput): ThingOutput => parse(thingSchema, thing);
122+
const parseThing: (thing: ThingInput) => ThingOutput = parser(thingSchema);
123123

124124
export { parseThing, thingSchema, type ThingInput, type ThingOutput };

packages/core/src/types/external/OrgSchema/UserReview.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { intersect, lazy, object, parse, string, type GenericSchema } from 'valibot';
1+
import { intersect, lazy, object, parser, string, type GenericSchema } from 'valibot';
22

33
import jsonLinkedDataProperty from './private/jsonLinkedDataProperty';
44
import { thingSchema, type ThingInput, type ThingOutput } from './Thing';
@@ -39,6 +39,6 @@ const userReviewSchema: GenericSchema<UserReviewInput, UserReviewOutput> = inter
3939
]);
4040

4141
/** @deprecated Use Valibot.parse(userReviewSchema) instead. Will be removed on or after 2028-04-23. */
42-
const parseUserReview = (userReview: UserReviewInput): UserReviewOutput => parse(userReviewSchema, userReview);
42+
const parseUserReview: (userReview: UserReviewInput) => UserReviewOutput = parser(userReviewSchema);
4343

4444
export { parseUserReview, userReviewSchema, type UserReviewInput, type UserReviewOutput };

packages/core/src/types/external/OrgSchema/VoteAction.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { intersect, lazy, object, parse, string, type GenericSchema } from 'valibot';
1+
import { intersect, lazy, object, parser, string, type GenericSchema } from 'valibot';
22

33
import { actionSchema, type ActionInput, type ActionOutput } from './Action';
44
import jsonLinkedDataProperty from './private/jsonLinkedDataProperty';
@@ -47,6 +47,6 @@ const voteActionSchema: GenericSchema<VoteActionInput, VoteActionOutput> = inter
4747
]);
4848

4949
/** @deprecated Use Valibot.parse(voteActionSchema) instead. Will be removed on or after 2028-04-23. */
50-
const parseVoteAction = (voteAction: VoteActionInput): VoteActionOutput => parse(voteActionSchema, voteAction);
50+
const parseVoteAction: (voteAction: VoteActionInput) => VoteActionOutput = parser(voteActionSchema);
5151

5252
export { parseVoteAction, voteActionSchema, type VoteActionInput, type VoteActionOutput };

0 commit comments

Comments
 (0)