Skip to content

Commit

Permalink
Add support for special as key of record #291
Browse files Browse the repository at this point in the history
  • Loading branch information
fabian-hiller committed Dec 10, 2023
1 parent b58a974 commit 6ce50d4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions library/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

All notable changes to the library will be documented in this file.

## vX.X.X (Month DD, YYYY)

- Add support for `special` schema as key of `record` schema (issue #291)
- Add support for `special` and `specialAsync` schema as key of `recordAsync` schema (issue #291)

## v0.23.0 (December 08, 2023)

- Add `bic` validation function (pull request #284)
Expand Down
2 changes: 2 additions & 0 deletions library/src/schemas/record/record.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type {
import { parseResult, pipeResult, schemaIssue } from '../../utils/index.ts';
import type { EnumSchema } from '../enum/index.ts';
import type { PicklistSchema } from '../picklist/index.ts';
import type { SpecialSchema } from '../special/index.ts';
import type { StringSchema } from '../string/index.ts';
import type { UnionSchema } from '../union/index.ts';
import type { RecordOutput, RecordInput, RecordPathItem } from './types.ts';
Expand All @@ -19,6 +20,7 @@ import { BLOCKED_KEYS } from './values.ts';
export type RecordKey =
| EnumSchema<any, string | number | symbol>
| PicklistSchema<any, string | number | symbol>
| SpecialSchema<any, string | number | symbol>
| StringSchema<string | number | symbol>
| UnionSchema<any, string | number | symbol>;

Expand Down
3 changes: 3 additions & 0 deletions library/src/schemas/record/recordAsync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
} from '../../utils/index.ts';
import type { EnumSchema, EnumSchemaAsync } from '../enum/index.ts';
import type { PicklistSchema, PicklistSchemaAsync } from '../picklist/index.ts';
import type { SpecialSchema, SpecialSchemaAsync } from '../special/index.ts';
import type { StringSchema, StringSchemaAsync } from '../string/index.ts';
import type { UnionSchema, UnionSchemaAsync } from '../union/index.ts';
import type { RecordInput, RecordOutput, RecordPathItem } from './types.ts';
Expand All @@ -26,6 +27,8 @@ export type RecordKeyAsync =
| EnumSchemaAsync<any, string | number | symbol>
| PicklistSchema<any, string | number | symbol>
| PicklistSchemaAsync<any, string | number | symbol>
| SpecialSchema<any, string | number | symbol>
| SpecialSchemaAsync<any, string | number | symbol>
| StringSchema<string | number | symbol>
| StringSchemaAsync<string | number | symbol>
| UnionSchema<any, string | number | symbol>
Expand Down

0 comments on commit 6ce50d4

Please sign in to comment.