Skip to content

Commit

Permalink
Improve JSDoc deprecation warning for nonempty
Browse files Browse the repository at this point in the history
Now it will automatically be marked as deprecated by your IDE.
  • Loading branch information
lennartnederstigt committed May 19, 2022
1 parent d506b08 commit f75b668
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions deno/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -634,8 +634,8 @@ export class ZodString extends ZodType<string, ZodStringDef> {
}

/**
* Deprecated.
* Use z.string().min(1) instead.
* @deprecated Use z.string().min(1) instead.
* @see {@link min}
*/
nonempty = (message?: errorUtil.ErrMessage) =>
this.min(1, errorUtil.errToObj(message));
Expand Down
4 changes: 2 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -634,8 +634,8 @@ export class ZodString extends ZodType<string, ZodStringDef> {
}

/**
* Deprecated.
* Use z.string().min(1) instead.
* @deprecated Use z.string().min(1) instead.
* @see {@link min}
*/
nonempty = (message?: errorUtil.ErrMessage) =>
this.min(1, errorUtil.errToObj(message));
Expand Down

0 comments on commit f75b668

Please sign in to comment.