Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
sinclairzx81 committed Dec 27, 2024
1 parent f689aa9 commit f687a49
Show file tree
Hide file tree
Showing 82 changed files with 611 additions and 426 deletions.
2 changes: 1 addition & 1 deletion changelog/0.31.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ export class ApplicationTypeBuilder extends ExtendedTypeBuilder {}
//
export class ApplicationTypeBuilder extends JavaScriptTypeBuilder {}
```
These builders also update the jsdoc comment to `[Json]` and `[JavaScript]` inline with this new naming convention.
These builders also update the jsdoc comment to `[Standard]` and `[Extended]` inline with this new naming convention.

<a name="TypeSystemPolicy"></a>

Expand Down
2 changes: 1 addition & 1 deletion changelog/0.32.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ const E = Type.RegExp(/<a?:.+?:\d{18}>|\p{Extended_Pictographic}/gu)
Value.Check(E, '♥️♦️♠️♣️') // ok - emoji supported
```

The RegExp type can be thought of as a more capable TemplateLiteral that can only reasonably infer as `string`. Additionally, the RegExp inference type of `string` is unique to the other `[JavaScript]` types in that it does not infer as it's named type. The updates to RegExp were prompted by the limitations with Json Schema expressions, and to provide better options for users requiring general Unicode validation support. For Json Schema compliance, the recommendation moving forward will be to use either String with pattern or TemplateLiteral.
The RegExp type can be thought of as a more capable TemplateLiteral that can only reasonably infer as `string`. Additionally, the RegExp inference type of `string` is unique to the other `[Extended]` types in that it does not infer as it's named type. The updates to RegExp were prompted by the limitations with Json Schema expressions, and to provide better options for users requiring general Unicode validation support. For Json Schema compliance, the recommendation moving forward will be to use either String with pattern or TemplateLiteral.

```typescript
const T = Type.String({ pattern: '^(a|b|c)$' }) // Json Schema compliant
Expand Down
2 changes: 1 addition & 1 deletion changelog/0.34.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ For those who still need Strict, the recommended approach is to use the JSON str
```typescript
/**
* @deprecated `[Json]` Omits compositing symbols from this schema. It is recommended
* @deprecated `[Standard]` Omits compositing symbols from this schema. It is recommended
* to use the JSON parse/stringify to remove compositing symbols if needed. This
* is how Strict works internally.
*
Expand Down
Loading

0 comments on commit f687a49

Please sign in to comment.