Skip to content

Commit 3f73f39

Browse files
committed
chore: Forgot to run pre-pr command
1 parent a1cafb3 commit 3f73f39

File tree

4 files changed

+23
-3
lines changed

4 files changed

+23
-3
lines changed

etc/types.api.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
55
```ts
66

7+
import { StandardSchemaV1 } from '@standard-schema/spec';
8+
79
// @public
810
export function array<ElementType extends BaseTypeImpl<any>>(...args: [name: string, elementType: ElementType, typeConfig?: ArrayTypeConfig] | [elementType: ElementType, typeConfig?: ArrayTypeConfig]): TypeImpl<ArrayType<ElementType, TypeOf<ElementType>, Array<TypeOf<ElementType>>>>;
911

@@ -56,7 +58,8 @@ export abstract class BaseObjectLikeTypeImpl<ResultType, TypeConfig = unknown> e
5658
}
5759

5860
// @public
59-
export abstract class BaseTypeImpl<ResultType, TypeConfig = unknown> implements TypeLink<ResultType> {
61+
export abstract class BaseTypeImpl<ResultType, TypeConfig = unknown> implements TypeLink<ResultType>, StandardSchemaV1<unknown, ResultType> {
62+
get ['~standard'](): StandardSchemaV1.Props<unknown, ResultType>;
6063
// @internal
6164
readonly [designType]: ResultType;
6265
abstract accept<R>(visitor: Visitor<R>): R;
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [@skunkteam/types](./types.md) &gt; [BaseTypeImpl](./types.basetypeimpl.md) &gt; ["\~standard"](./types.basetypeimpl.__standard_.md)
4+
5+
## BaseTypeImpl."\~standard" property
6+
7+
Skunkteam Types implementation of \[StandardSchemaV1\](https://standardschema.dev/)
8+
9+
**Signature:**
10+
11+
```typescript
12+
get ['~standard'](): StandardSchemaV1.Props<unknown, ResultType>;
13+
```

markdown/types.basetypeimpl.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ The base-class of all type-implementations.
99
**Signature:**
1010

1111
```typescript
12-
declare abstract class BaseTypeImpl<ResultType, TypeConfig = unknown> implements TypeLink<ResultType>
12+
declare abstract class BaseTypeImpl<ResultType, TypeConfig = unknown> implements TypeLink<ResultType>, StandardSchemaV1<unknown, ResultType>
1313
```
1414
15-
**Implements:** [TypeLink](./types.typelink.md)<!-- -->&lt;ResultType&gt;
15+
**Implements:** [TypeLink](./types.typelink.md)<!-- -->&lt;ResultType&gt;, StandardSchemaV1&lt;unknown, ResultType&gt;
1616
1717
## Remarks
1818
@@ -22,6 +22,7 @@ All type-implementations must extend this base class. Use [createType()](./types
2222
2323
| Property | Modifiers | Type | Description |
2424
| --------------------------------------------------------------------------- | --------------------------------------------------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
25+
| ["\~standard"](./types.basetypeimpl.__standard_.md) | <code>readonly</code> | StandardSchemaV1.Props&lt;unknown, ResultType&gt; | Skunkteam Types implementation of \[StandardSchemaV1\](https://standardschema.dev/) |
2526
| [basicType](./types.basetypeimpl.basictype.md) | <p><code>abstract</code></p><p><code>readonly</code></p> | [BasicType](./types.basictype.md) \| 'mixed' | The kind of values this type validates. |
2627
| [check](./types.basetypeimpl.check.md) | <code>readonly</code> | (this: void, input: unknown) =&gt; ResultType | Asserts that a value conforms to this Type and returns the input as is, if it does. |
2728
| [customValidators](./types.basetypeimpl.customvalidators.md) | <p><code>protected</code></p><p><code>readonly</code></p> | ReadonlyArray&lt;[Validator](./types.validator.md)<!-- -->&lt;unknown&gt;&gt; | Additional custom validation added using [withValidation](./types.basetypeimpl.withvalidation.md) or [withConstraint](./types.basetypeimpl.withconstraint.md)<!-- -->. |

src/base-type.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,9 @@ export abstract class BaseTypeImpl<ResultType, TypeConfig = unknown>
501501
return { ...oldConfig, ...newConfig };
502502
}
503503

504+
/**
505+
* Skunkteam Types implementation of [StandardSchemaV1](https://standardschema.dev/)
506+
*/
504507
get ['~standard'](): StandardSchemaV1.Props<unknown, ResultType> {
505508
return (this._instanceCache.standardSchema ??= {
506509
version: 1,

0 commit comments

Comments
 (0)