Skip to content

Commit 05466f9

Browse files
committed
chore: match patterns
1 parent a8fa52f commit 05466f9

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

router/errors.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,15 @@ export const CANCEL_CODE = 'CANCEL';
3333

3434
type TLiteralString = TLiteral<string>;
3535

36-
/**
37-
* String literals or string enums for error codes.
38-
*/
39-
type TStringCode = TLiteralString | TEnum<Record<string, string>>;
36+
type TEnumString = TEnum<Record<string, string>>;
4037

4138
export type BaseErrorSchemaType =
4239
| TObject<{
43-
code: TStringCode;
40+
code: TLiteralString | TEnumString;
4441
message: TLiteralString | TString;
4542
}>
4643
| TObject<{
47-
code: TStringCode;
44+
code: TLiteralString | TEnumString;
4845
message: TLiteralString | TString;
4946
extras: TSchema;
5047
}>;

0 commit comments

Comments
 (0)