Skip to content

Commit

Permalink
chore: update versions (#878)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Nov 13, 2023
1 parent 2dec0df commit 1192b04
Show file tree
Hide file tree
Showing 58 changed files with 1,491 additions and 45 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# arktype

## 1.0.28-alpha

### Patch Changes

- Allow instanceof abstract classes, avoid treating some function props as morphs

## 1.0.27-alpha

### Patch Changes
Expand Down
8 changes: 4 additions & 4 deletions dev/arktype.io/docs/api/arkscope.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ arkScope: import("./scope.js").Scope<
creditCard: string
email: string
uuid: string
parsedNumber: (In: string) => number
parsedInteger: (In: string) => number
parsedDate: (In: string) => Date
parsedNumber: (In: string) => Out<number>
parsedInteger: (In: string) => Out<number>
parsedDate: (In: string) => Out<Date>
semver: string
json: (In: string) => unknown
json: (In: string) => Out<unknown>
integer: number
},
{},
Expand Down
30 changes: 15 additions & 15 deletions dev/arktype.io/docs/api/keywords.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@ hide_table_of_contents: true

## validationScope

| Name | Type | Description |
| ------------- | -------------------------- | ---------------------------- |
| alpha | ` string` | only letters |
| alphanumeric | ` string` | only letters and digits |
| lowercase | ` string` | only lowercase letters |
| uppercase | ` string` | only uppercase letters |
| creditCard | ` string` | a valid credit card number |
| email | ` string` | a valid email |
| uuid | ` string` | a valid UUID |
| parsedNumber | ` (In: string) => number` | a well-formed numeric string |
| parsedInteger | ` (In: string) => number` | a well-formed integer string |
| parsedDate | ` (In: string) => Date` | a valid date |
| semver | ` string` | a valid semantic version |
| json | ` (In: string) => unknown` | a JSON-parsable string |
| integer | ` number` | an integer |
| Name | Type | Description |
| ------------- | ------------------------------------------------------------------ | ---------------------------- |
| alpha | ` string` | only letters |
| alphanumeric | ` string` | only letters and digits |
| lowercase | ` string` | only lowercase letters |
| uppercase | ` string` | only uppercase letters |
| creditCard | ` string` | a valid credit card number |
| email | ` string` | a valid email |
| uuid | ` string` | a valid UUID |
| parsedNumber | ` (In: string) => import("../../parse/ast/morph.js").Out<number>` | a well-formed numeric string |
| parsedInteger | ` (In: string) => import("../../parse/ast/morph.js").Out<number>` | a well-formed integer string |
| parsedDate | ` (In: string) => import("../../parse/ast/morph.js").Out<Date>` | a valid date |
| semver | ` string` | a valid semantic version |
| json | ` (In: string) => import("../../parse/ast/morph.js").Out<unknown>` | a JSON-parsable string |
| integer | ` number` | an integer |
8 changes: 4 additions & 4 deletions dev/arktype.io/docs/api/precompileddefaults.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ export type PrecompiledDefaults = {
email: string
uuid: string
semver: string
json: (In: string) => unknown
parsedNumber: (In: string) => number
parsedInteger: (In: string) => number
parsedDate: (In: string) => Date
json: (In: string) => Out<unknown>
parsedNumber: (In: string) => Out<number>
parsedInteger: (In: string) => Out<number>
parsedDate: (In: string) => Out<Date>
Function: (...args: any[]) => unknown
Date: Date
Error: Error
Expand Down
30 changes: 15 additions & 15 deletions dev/arktype.io/docs/api/validationscope.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ hide_table_of_contents: true

## text

| Name | Type | Description |
| ------------- | -------------------------- | ---------------------------- |
| alpha | ` string` | only letters |
| alphanumeric | ` string` | only letters and digits |
| lowercase | ` string` | only lowercase letters |
| uppercase | ` string` | only uppercase letters |
| creditCard | ` string` | a valid credit card number |
| email | ` string` | a valid email |
| uuid | ` string` | a valid UUID |
| parsedNumber | ` (In: string) => number` | a well-formed numeric string |
| parsedInteger | ` (In: string) => number` | a well-formed integer string |
| parsedDate | ` (In: string) => Date` | a valid date |
| semver | ` string` | a valid semantic version |
| json | ` (In: string) => unknown` | a JSON-parsable string |
| integer | ` number` | an integer |
| Name | Type | Description |
| ------------- | ------------------------------------------------------------------ | ---------------------------- |
| alpha | ` string` | only letters |
| alphanumeric | ` string` | only letters and digits |
| lowercase | ` string` | only lowercase letters |
| uppercase | ` string` | only uppercase letters |
| creditCard | ` string` | a valid credit card number |
| email | ` string` | a valid email |
| uuid | ` string` | a valid UUID |
| parsedNumber | ` (In: string) => import("../../parse/ast/morph.js").Out<number>` | a well-formed numeric string |
| parsedInteger | ` (In: string) => import("../../parse/ast/morph.js").Out<number>` | a well-formed integer string |
| parsedDate | ` (In: string) => import("../../parse/ast/morph.js").Out<Date>` | a valid date |
| semver | ` string` | a valid semantic version |
| json | ` (In: string) => import("../../parse/ast/morph.js").Out<unknown>` | a JSON-parsable string |
| integer | ` number` | an integer |
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const createStackblitzDemo = async ({ embedId }: DemoProps) =>
template: "typescript",
dependencies: {
// @lineFrom:package.json:version |> embed("arktype":,,)
arktype: "1.0.27-alpha"
arktype: "1.0.28-alpha"
},
settings: {
compile: {
Expand Down
15 changes: 15 additions & 0 deletions dev/arktype.io/versioned_docs/version-1.0.28-alpha/api.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
id: api
hide_table_of_contents: true
title: API
---

# API

<!-- @blockFrom:README.md:api |> replace(./dev/test,https://github.com/arktypeio/arktype/tree/main/dev/test) -->

ArkType supports many of TypeScript's built-in types and operators, as well as some new ones dedicated exclusively to runtime validation. In fact, we got a little ahead of ourselves and built a ton of cool features, but we're still working on getting caught up syntax and API docs. Keep an eye out for more in the next couple weeks

In the meantime, check out the examples here and use the type hints you get to learn how you can customize your types and scopes. If you want to explore some of the more advanced features, take a look at [our unit tests](https://github.com/arktypeio/arktype/tree/main/dev/test) or ask us [on Discord](https://discord.gg/xEzdc3fJQC) if your functionality is supported. If not, [create a GitHub issue](https://github.com/arktypeio/arktype/issues/new) so we can prioritize it!

<!-- @blockEnd -->
11 changes: 11 additions & 0 deletions dev/arktype.io/versioned_docs/version-1.0.28-alpha/api/ark.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
hide_table_of_contents: true
---

# ark

## text

```ts
ark: Space<PrecompiledDefaults>
```
54 changes: 54 additions & 0 deletions dev/arktype.io/versioned_docs/version-1.0.28-alpha/api/arkscope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
hide_table_of_contents: true
---

# arkScope

## text

```ts
arkScope: import("./scope.js").Scope<
[
{
any: any
bigint: bigint
boolean: boolean
false: false
never: never
null: null
number: number
object: object
string: string
symbol: symbol
true: true
unknown: unknown
void: void
undefined: undefined
Function: (...args: any[]) => unknown
Date: Date
Error: Error
Map: Map<unknown, unknown>
RegExp: RegExp
Set: Set<unknown>
WeakMap: WeakMap<object, unknown>
WeakSet: WeakSet<object>
Promise: Promise<unknown>
alpha: string
alphanumeric: string
lowercase: string
uppercase: string
creditCard: string
email: string
uuid: string
parsedNumber: (In: string) => Out<number>
parsedInteger: (In: string) => Out<number>
parsedDate: (In: string) => Out<Date>
semver: string
json: (In: string) => Out<unknown>
integer: number
},
{},
false
]
>
```
24 changes: 24 additions & 0 deletions dev/arktype.io/versioned_docs/version-1.0.28-alpha/api/arrayof.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
hide_table_of_contents: true
---

# arrayOf

## operator

- [arrayOf](./arrayof.md)

## string

- "T[]" <br/>
- const numberArray = type("number[]")<br/>

## tuple

- [T, "[]"] <br/>
- const tupleArray = type(["number", "[]"])<br/>

## helper

- arrayOf(T) <br/>
- const helperArray = arrayOf("number")<br/>
13 changes: 13 additions & 0 deletions dev/arktype.io/versioned_docs/version-1.0.28-alpha/api/infer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
hide_table_of_contents: true
---

# Infer

## text

```ts
export type Infer<t> = {
[as]?: t
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
hide_table_of_contents: true
---

# inferDefinition

## text

```ts
export type inferDefinition<def, $> = isAny<def> extends true
? never
: def extends Infer<infer t> | InferredThunk<infer t>
? t
: def extends string
? inferString<def, $>
: def extends List
? inferTuple<def, $>
: def extends RegExp
? string
: def extends Dict
? inferRecord<def, $>
: never
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
hide_table_of_contents: true
---

# instanceOf

## operator

- [instanceOf](./instanceof.md)

## tuple

- ["instanceOf", T] <br/>
- const tupleInstanceOf = type(["instanceOf", Date])<br/>

## helper

- instanceOf(T) <br/>
- const helperInstanceOf = instanceOf(Date)<br/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
hide_table_of_contents: true
---

# intersection

## operator

- [&](./intersection.md)

## string

- "L&R" <br/>
- const intersection = type("/@arktype\.io$/ & email")<br/>

## tuple

- [L, "&", R] <br/>
- const tupleIntersection = type(["/@arktype\.io$/", "&", "email"])<br/>

## helper

- intersection(L,R) <br/>
- const helperIntersection = intersection("/@arktype\.io$/","email")<br/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
hide_table_of_contents: true
---

# jsObjectsScope

## text

| Name | Type | Description |
| -------- | ------------------------------ | ----------- |
| Function | ` (...args: any[]) => unknown` | |
| Date | ` Date` | |
| Error | ` Error` | |
| Map | ` Map<unknown, unknown>` | |
| RegExp | ` RegExp` | |
| Set | ` Set<unknown>` | |
| WeakMap | ` WeakMap<object, unknown>` | |
| WeakSet | ` WeakSet<object>` | |
| Promise | ` Promise<unknown>` | |
19 changes: 19 additions & 0 deletions dev/arktype.io/versioned_docs/version-1.0.28-alpha/api/keyof.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
hide_table_of_contents: true
---

# keyOf

## operator

- [keyOf](./keyof.md)

## tuple

- "["keyOf", T]" <br/>
- const tupleKeyOf = type(["keyOf", {a:"string"}])<br/>

## helper

- keyOf(T) <br/>
- const helperKeyOf = keyOf({a:"string"})<br/>
Loading

0 comments on commit 1192b04

Please sign in to comment.